BZ 1959186 lets clients provisioning a VM from template also on behalf of users that don't have access to the template's quota. This patch should provide the complementary part in the VM portal to consume that fix.
Tamir, please close this together with bz 1959186
Verified on RHV 4.5.0-4. Env: - Engine instance with RHV 4.5.0-4 (ovirt-engine-4.5.0-0.237.el8ev) and RHEL 8.6 installed. - 3 hosts with RHV 4.5.0-4 and RHEL 8.6 and with vdsm-4.50.0.10-1.el8ev. Steps: In Admin Portal: 1. Log in as an admin user. 2. Create a 4.7 data center with a quota set to Enforced and a 4.7 cluster. 3. Create 2 non-admin users in the env, we will refer to those as user1 and user2 with the VMCreator role set in the cluster. 4. Install the hosts and create a new NFS storage domain. 5. Create an RHEL 8.6 VM. 6. Create 3 quotas with the names: TemplateQuota, UserOneQuota, UserTwoQuota 7. Create a template from the RHEL 8.6 VM with its quota set to TemplateQuota. 8. Add user1 as TemplateQuota quota's consumer. 9. Add user1 as UserOneQuota quota's consumer. 10. Add user2 as UserTwoQuota quota's consumer. In VM portal: 11. Log in as user1. 12. As User1, create a VM in the VM portal from the template, and it will succeed. 13. Log out. 14. Log in as user2. 15. As User2, create a VM in the VM portal from the template, and it will succeed. Results (As Expected): 1. Logged in as an admin user. 2. The 4.7 data center and the 4.7 cluster were created. 3. The users were created and set with the VMCreator role. 4. The host was installed and the NFS storage domain was created. 5. The VM was created. 6. The quotas were created. 7. The template was created. 8. Added user1 as TemplateQuota quota's consumer. 9. Added user1 as UserOneQuota quota's consumer. 10. Added user2 as UserTwoQuota quota's consumer. 11. Logged in as user1. 12. The VM was created successfully. 13. Logged out. 14. Logged in as user2. 15. The VM was created successfully.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: RHV Manager (ovirt-engine) [ovirt-4.5.0] security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:4711
Due to QE capacity, we are not going to cover this issue in our automation