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

Users Allocation to PoolVM remains even after VM detachment/deletion #179

Closed
Arrakaij opened this issue Mar 22, 2022 · 5 comments
Closed

Comments

@Arrakaij
Copy link

Good Evening

When a user logs in to VM-Portal and requests a VM from a Pool, this assignment remains even after the according VM gets shutdown, detached or deleted, resulting in unexpected (from a user point of view 'weird') behaviour. In case of deletion of the attached VM, oVirt tries to start the non-existing VM. After some time the attachment to a specific VM gets lost and everything works again as normal; However, even in a normal production enviroment this may result in some unwanted behaviour.

See additional info for other problems and my thoughts on solutions

Engine Version: Version 4.4.10.7-1.el8
Cluster Comb. Level: 4.6

Steps to Reproduce:

  1. Setup a Pool of VM (for us Windows using sysprep)
  2. Login as a user, request a VM from that pool, login to the VM
  3. Shutdown the VM as User (from inside or WebUI)
  4. Logout as a User
  5. Login as Admin, detach and delete the VM the user is bound to
  6. Login as User and request a VM from the pool

Actual results:
The System requests the non-existing VM from the Pool, resulting in an error

Expected results:
The System requests any functioning VM.

Additional info:

Another - for us - unwanted scenario: The User wants to get a fresh VM.
He shuts down his VM; After that the user can request a new VM from the Pool. But instead of oVirt giving any already prepared VMs, the user gets the same VM he had before - and now he has to sit through all the sysprep work that is done when a VM from the pool is setup. This maybe wanted, but it can be painful.

Feature enhancement request:

Solutions i thought about. They are not mutually exclusive, all of them would be nice.
1)
Let the API have a function "deallocateVm" similar to "allocateVm" ( http://ovirt.github.io/ovirt-engine-api-model/4.5/#services/vm_pool ) It removes the allocation between user and vm and guarantees a fresh start. The function may have a parameter on what to do with the VM is attached to (shutdown, restart, ...)
This way any software can force a deallocation (And the WebUI should have that option then)
2) I know the behavior can be wanted, so add an Parameter to a Pool, an "User Allocation Policy", which could be:

  • Same User (try to allocate the same VM to the same user as long as possible; if all vms already have an allocation, allocate the vm that belongs to the user that was not seen the longest time; This is kind of the situation we have now)
  • Bind to User (Same as "Same", but if all VMs are bound, throw an error)
  • Bind to User and Extend (Same as Bind to User, but extend the pool by 1 machine every time a new user requests a vm)
    [The Bind to User settings may have a timeout that deletes the binding when the user was absent for a certain period of time)
  • Any (Ignore bindings, just hand out any VM that is ready, except the user is logged in into a VM)
@sandrobonazzola
Copy link
Member

@ahadas can you please triage?

@sgratch
Copy link
Member

sgratch commented Mar 23, 2022

@sandrobonazzola @ahadas @Arrakaij
This seems like a web-ui issue and as a follow up issue to this oVirt/ovirt-web-ui#719.
The specific scenario described above (an error after de-touching a vm from the pool) is not reproduced to me but anyway it seems a problem due to wrong permission assignment. Please check oVirt/ovirt-web-ui#719 (comment).
We added those permissions requirement to our documentation as well.

let's re-open this issue under web-ui project and continue the discussion there.

@sgratch
Copy link
Member

sgratch commented Mar 23, 2022

opened oVirt/ovirt-web-ui#1574

@ahadas
Copy link
Member

ahadas commented Mar 23, 2022

Great, thanks Sharon - I suspected this might be a web-ui issue but didn't want to move before giving it some more thought
If you can also check gchat - there's another thing that waits for your feedback :)

@sandrobonazzola
Copy link
Member

closing this issue as duplicate of oVirt/ovirt-web-ui#1574 then, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants