Skip to content
Snippets Groups Projects
Commit 73064714 authored by Guido Trotter's avatar Guido Trotter
Browse files

Add config.DropECReservations


For now this function does nothing, but it gets called by mcpu when the
execution of an LU is done, making sure any pending reservations are
dropped.

Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent adfa97e3
No related branches found
No related tags found
No related merge requests found
...@@ -1379,3 +1379,11 @@ class ConfigWriter: ...@@ -1379,3 +1379,11 @@ class ConfigWriter:
self._temporary_macs.discard(nic.mac) self._temporary_macs.discard(nic.mac)
self._WriteConfig(feedback_fn=feedback_fn) self._WriteConfig(feedback_fn=feedback_fn)
@locking.ssynchronized(_config_lock)
def DropECReservations(self, ec_id):
"""Drop per-execution-context reservations
"""
pass
...@@ -451,8 +451,13 @@ class Processor(object): ...@@ -451,8 +451,13 @@ class Processor(object):
lu.ExpandNames() lu.ExpandNames()
assert lu.needed_locks is not None, "needed_locks not set by LU" assert lu.needed_locks is not None, "needed_locks not set by LU"
return self._LockAndExecLU(lu, locking.LEVEL_INSTANCE, try:
timeout_strategy.CalcRemainingTimeout) return self._LockAndExecLU(lu, locking.LEVEL_INSTANCE,
timeout_strategy.CalcRemainingTimeout)
finally:
if self._ec_id:
self.context.cfg.DropECReservations(self._ec_id)
finally: finally:
self.context.glm.release(locking.LEVEL_CLUSTER) self.context.glm.release(locking.LEVEL_CLUSTER)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment