Fix for #38704 archive extracted and dockerio states

Do not run file managed as state.single as this conflicts (and fails)
when additional state runs are already scheduled.
This commit is contained in:
Nasenbaer 2017-01-12 12:03:32 +01:00 committed by Erik Johnson
parent 88b171f863
commit 15db8d47ed
2 changed files with 16 additions and 22 deletions

View file

@ -869,7 +869,6 @@ def extracted(name,
else:
source_sum = {}
concurrent = bool(__opts__.get('sudo_user'))
if not source_is_local and not os.path.isfile(cached_source):
if __opts__['test']:
ret['result'] = None
@ -879,15 +878,14 @@ def extracted(name,
log.debug('%s is not in cache, downloading it', source_match)
file_result = __salt__['state.single']('file.managed',
cached_source,
source=source_match,
source_hash=source_hash,
source_hash_name=source_hash_name,
makedirs=True,
skip_verify=skip_verify,
saltenv=__env__,
concurrent=concurrent)
file_result = __states__['file.managed'](cached_source,
source=source_match,
source_hash=source_hash,
source_hash_name=source_hash_name,
makedirs=True,
skip_verify=skip_verify,
env=__env__)
log.debug('file.managed: {0}'.format(file_result))
# Prevent a traceback if errors prevented the above state from getting
@ -1341,13 +1339,11 @@ def extracted(name,
dirname,
' (dry-run only)' if __opts__['test'] else ''
)
dir_result = __salt__['state.single']('file.directory',
full_path,
user=user,
group=group,
recurse=recurse,
test=__opts__['test'],
concurrent=concurrent)
dir_result = __states__['file.directory'](full_path,
user=user,
group=group,
recurse=recurse,
test=__opts__['test'])
try:
dir_result = dir_result[next(iter(dir_result))]
except AttributeError:

View file

@ -504,11 +504,9 @@ def loaded(name, tag='latest', source=None, source_hash='', force=False):
return _ret_status(name=name, comment=comment)
tmp_filename = salt.utils.mkstemp()
__salt__['state.single']('file.managed',
name=tmp_filename,
source=source,
source_hash=source_hash,
concurrent=bool(__opts__.get('sudo_user')))
__states__['file.managed'](name=tmp_filename,
source=source,
source_hash=source_hash)
changes = {}
if image_infos['status']: