mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
salt.cloud: race if item was removed in another loop
This commit is contained in:
parent
0d8661b9a3
commit
94c3c68ca9
@ -147,7 +147,7 @@ def enter_mainloop(target,
|
||||
iterable = [[queue, [arg], kwargs] for arg in mapped_args]
|
||||
ret = pool.map(func=target, iterable=iterable)
|
||||
else:
|
||||
ret = pool.apply(target, [queue, args, kwargs])
|
||||
ret = pool.apply(target, [queue, args, kwargs])
|
||||
while True:
|
||||
test = queue.get()
|
||||
if test in ['ERROR', 'KEYBOARDINT']:
|
||||
@ -791,7 +791,8 @@ class Cloud(object):
|
||||
if driver not in processed[alias]:
|
||||
processed[alias][driver] = {}
|
||||
processed[alias][driver][name] = ret_multip[name]
|
||||
names.remove(name)
|
||||
if name in names:
|
||||
names.remove(name)
|
||||
|
||||
# not destroying in parallel
|
||||
else:
|
||||
@ -808,7 +809,8 @@ class Cloud(object):
|
||||
if driver not in processed[alias]:
|
||||
processed[alias][driver] = {}
|
||||
processed[alias][driver][name] = ret
|
||||
names.remove(name)
|
||||
if name in names:
|
||||
names.remove(name)
|
||||
|
||||
# now the processed data structure contains the output from either
|
||||
# the parallel or non-parallel destroy and we should finish up
|
||||
|
Loading…
Reference in New Issue
Block a user