Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release --kick doesn't clean the reservations table #1253

Open
ElenaGrigore opened this issue Jul 28, 2023 · 0 comments
Open

release --kick doesn't clean the reservations table #1253

ElenaGrigore opened this issue Jul 28, 2023 · 0 comments
Assignees
Labels

Comments

@ElenaGrigore
Copy link

Hi,

I have below scenario:

  1. user1: makes a reservation for a board
  2. user1: lock the board
  3. user2: release --kick the board

After step 3 , the board is not acquired by anyone , but it can be re-acquired/locked only by user1 because the reservation table still keeps a record of allocated for that place to user1 - is this the wanted behavior? Shouldn't kick be more aggressive and also clean the reservation?

and with the commands/output:
user1: makes a reservation for a board:

(venv) user1@ws1:~/work$ labgrid-client reserve --wait name=RO--MX6Q_sabresd--2
Reservation 'UYOHFZXX2A':
  owner: workstation1/user1
  token: UYOHFZXX2A
  state: allocated
  filters:
    main: name=RO--MX6Q_sabresd--2
  allocations:
    main: RO--MX6Q_sabresd--2
  created: 2023-07-28 14:41:28.345891
  timeout: 2023-07-28 14:42:28.346233
Waiting for allocation...
(venv) user1@ws1:~/work$ labgrid-client  reservations
Reservation 'UYOHFZXX2A':
  owner: workstation1/user1
  token: UYOHFZXX2A
  state: allocated
  filters:
    main: name=RO--MX6Q_sabresd--2
  allocations:
    main: RO--MX6Q_sabresd--2
  created: 2023-07-28 14:41:28.345891
  timeout: 2023-07-28 14:42:28.407206
(venv) user1@ws1:~/work$ labgrid-client who | grep RO--MX6Q_sabresd--2
(venv) user1@ws1:~/work$

user1: lock the board

(venv) user1@ws1:~/work$ labgrid-client -p RO--MX6Q_sabresd--2 lock
acquired place RO--MX6Q_sabresd--2
(venv) user1@ws1:~/work$ labgrid-client who | grep RO--MX6Q_sabresd--2
user1  workstation1  RO--MX6Q_sabresd--2       2023-07-28 14:42:10.493009
(venv) user1@ws1:~/work$ labgrid-client  reservations
Reservation 'UYOHFZXX2A':
  owner: workstation1/user1
  token: UYOHFZXX2A
  state: acquired
  filters:
    main: name=RO--MX6Q_sabresd--2
  allocations:
    main: RO--MX6Q_sabresd--2
  created: 2023-07-28 14:41:28.345891
  timeout: 2023-07-28 14:43:10.493459

user2: release --kick the board

(venv) user2@ws2:~/test$ labgrid-client -p RO--MX6Q_sabresd--2 release --kick
warning: kicking user (workstation1/user1)
released place RO--MX6Q_sabresd--2

After step 3 , the board is not acquired by anyone , but it can be re-acquired/locked only by user1

(venv) user2@ws2:~/test$  labgrid-client -p RO--MX6Q_sabresd--2 acquire
labgrid-client: error: failed to acquire place RO--MX6Q_sabresd--2
(venv) user2@ws2:~/test$ labgrid-client -p RO--MX6Q_sabresd--2 lock
labgrid-client: error: failed to acquire place RO--MX6Q_sabresd--2
(venv) user1@ws1:~/work$ labgrid-client  reservations
Reservation 'UYOHFZXX2A':
  owner: workstation1/user1
  token: UYOHFZXX2A
  state: allocated
  filters:
    main: name=RO--MX6Q_sabresd--2
  allocations:
    main: RO--MX6Q_sabresd--2
  created: 2023-07-28 14:41:28.345891
  timeout: 2023-07-28 14:43:43.625886
(venv) user1@ws1:~/work$ labgrid-client who | grep RO--MX6Q_sabresd--2
(venv) user1@ws1:~/work$ labgrid-client -p RO--MX6Q_sabresd--2 lock
acquired place RO--MX6Q_sabresd--2
@Emantor Emantor added the bug label Jul 28, 2023
@Emantor Emantor self-assigned this Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants