labgrid
labgrid copied to clipboard
Reservation allocated to place without resources
Hello! Thank you for a great tool.
Environment
- Linux
- Python 3.10
- labgrid v23.0.6
Background We are making use of the Place Scheduling functionality using tags to reserve and acquire.
Problem: When a device (with an exporter) goes offline, then the place exists in the coordinator, but its resource capabilities are rightfully lost. It does not seem like the reservation logic takes this into account as it can allocate a place without any resources, which ultimately will fail to be acquired.
$ labgrid-client -p some-device show
Place 'some-device':
tags: board=foo
matches:
*/some-device/*/*
acquired: None
acquired resources:
created: 2024-08-09 14:20:53.035338
changed: 2024-08-13 15:24:40.631180
$ labgrid-client resources
$ labgrid-client reserve board=foo
Reservation 'M29NQZJS42':
owner: host/user
token: M29NQZJS42
state: allocated
filters:
main: board=foo
allocations:
main: some-device
created: 2024-08-15 15:21:41.387948
timeout: 2024-08-15 15:22:41.387987
$ labgrid-client -p +M29NQZJS42 acquire
labgrid-client: error: Match */some-device/*/* has no matching remote resource
I am wondering if there is a possible workaround to this situation aside from passing name=<place-name>
to the reserve
call, as this defeats the purpose of reserving any of the possible tag matches. Can I pass the resource name or something similar?