Skip to content

Commit a5adaa5

Browse files
alexterceteidan-arm
andcommitted
remote/coordinator: publish correct place after reservation re-scheduling
Fix a bug in schedule_reservations() where the update notification could publish a stale/incorrect place due to reuse of a loop variable. Now it publishes the place corresponding to the name whose reservation mapping actually changed. Signed-off-by: Alex Tercete <alex.tercete@arm.com> Reviewed-by: Alex Tercete <alex.tercete@arm.com> # gatekeeper Co-authored-by: Idan Saadon <idan.saadon@arm.com>
1 parent 952b88d commit a5adaa5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

labgrid/remote/coordinator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,7 @@ def schedule_reservations(self):
10541054
place.reservation = res.token
10551055
for name in old_map.keys() | new_map.keys():
10561056
if old_map.get(name) != new_map.get(name):
1057-
self._publish_place(place)
1057+
self._publish_place(self.places[name])
10581058

10591059
@locked
10601060
async def CreateReservation(self, request: labgrid_coordinator_pb2.CreateReservationRequest, context):

0 commit comments

Comments
 (0)