Skip to content

Commit a1b12f7

Browse files
committed
remote/coordinator: check state of acquried and released resources
Signed-off-by: Jan Luebbe <[email protected]>
1 parent fff35ee commit a1b12f7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

labgrid/remote/coordinator.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,8 @@ async def _acquire_resource(self, place, resource):
593593
await cmd.wait()
594594
if not cmd.response.success:
595595
raise ExporterError("failed to acquire {resource}")
596+
if resource.acquired != place.name:
597+
logging.warning("resource %s not acquired by this place after acquire request", resource)
596598

597599
async def _acquire_resources(self, place, resources):
598600
assert self.lock.locked()
@@ -647,6 +649,8 @@ async def _release_resources(self, place, resources, callback=True):
647649
await cmd.wait()
648650
if not cmd.response.success:
649651
raise ExporterError(f"failed to release {resource}")
652+
if resource.acquired:
653+
logging.warning("resource %s still acquired after release request", resource)
650654
except (ExporterError, TimeoutError):
651655
logging.exception("failed to release %s", resource)
652656
# at leaset try to notify the clients

0 commit comments

Comments
 (0)