cloudstack
cloudstack copied to clipboard
No permission to migrate volume, only root admin can migrate a volume
ISSUE TYPE
- Bug Report
COMPONENT NAME
ALL
CLOUDSTACK VERSION
4.17.0.1
CONFIGURATION
N/A
OS / ENVIRONMENT
CentOS 7
SUMMARY
When a non-root user try to change the compute offering on a VM he faces the error: " No permission to migrate volume, only root admin can migrate a volume ".
STEPS TO REPRODUCE
Change the compute offering of a powered-off VM
EXPECTED RESULTS
The compute offering is changed.
ACTUAL RESULTS
Non-root user faces error " No permission to migrate volume, only root admin can migrate a volume "
@cdfgallo Thanks for reporting the issue. The behaviour here needs to be discussed. My view, https://github.com/apache/cloudstack/pull/6704#issuecomment-1238056686 cc @harikrishna-patnala @NuxRo @alexandremattioli
I agree with your comment @shwstppr, usually migrate operations are not given to users, if at all user hits these kind of issues, they may need to contact admin. Others please chime in.
I agree on the migration part, but a normal user should be allowed to change the compute offering on a VM if this doesn't lead to a volume migration.
Hi my name is Aarushi Soni . I want to contribute to this issue . Please guide me through this process.
@cdfgallo does it work for you if you try changing the offering of the VM but untick the automatic migration option that says "Auto migrate volume to another storage pool if required":

@rohityadavcloud nope, unfortunately this does not work too. Still receive same error from the UI.
This is a major bug for our company and is preventing us from upgrading to 4.17.1. If we were to upgrade from 4.16.1, we would be inundated with customer support requests to do what should be a basic operation- increase or decrease CPU/RAM.
@rohityadavcloud, I can also confirm that unticking 'auto migrate' does not help. Logging in as a root admin is the only way to scale successfully in our lab environment.
Thanks @mik-allen for reporting, I'm able to consistently reproduce this as normal user account in a KVM env (I think this is hypervisor agnostic):
-
Deploy a VM using a small offering and stop it.
-
Scale the VM with the option to auto-migrate:
-
The operation fails with permission to migrate issue:
-
This happens even when the auto-migration option in ScaleVM is selected.
The auto-migrate feature was introduced in case there's a service offering that has storage tags and offers something specific to the offering.
@rohityadavcloud @weizhouapache @shwstppr @harikrishna-patnala Any update on this? Is it in progress? I'm willing to contribute if you need an extra hand.
@soreana are you working on this?
@DaanHoogland Not yet. I was waiting for the @shwstppr @harikrishna-patnala reply.
I know @harikrishna-patnala is busy on https://github.com/apache/cloudstack/pull/6704 so I think he is in the lead right now.
@DaanHoogland Cool 👍 I will keep an eye on the https://github.com/apache/cloudstack/pull/6704 then :)
any update on this @shwstppr @harikrishna-patnala @DaanHoogland ?
LGTM based on manual testing.
Fixed in https://github.com/apache/cloudstack/pull/6704