cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

No permission to migrate volume, only root admin can migrate a volume

Open cdfgallo opened this issue 2 years ago • 4 comments

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 avatar Sep 05 '22 15:09 cdfgallo

@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

shwstppr avatar Sep 06 '22 12:09 shwstppr

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.

harikrishna-patnala avatar Sep 06 '22 12:09 harikrishna-patnala

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.

cdfgallo avatar Sep 06 '22 13:09 cdfgallo

Hi my name is Aarushi Soni . I want to contribute to this issue . Please guide me through this process.

aarushisoni avatar Sep 08 '22 08:09 aarushisoni

@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":

Screenshot 2022-10-07 at 2 18 14 PM

rohityadavcloud avatar Oct 07 '22 08:10 rohityadavcloud

@rohityadavcloud nope, unfortunately this does not work too. Still receive same error from the UI.

cdfgallo avatar Oct 07 '22 13:10 cdfgallo

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.

mik-allen avatar Oct 07 '22 15:10 mik-allen

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):

  1. Deploy a VM using a small offering and stop it.

  2. Scale the VM with the option to auto-migrate: Screenshot 2022-10-11 at 3 45 10 PM

  3. The operation fails with permission to migrate issue: Screenshot 2022-10-11 at 3 45 24 PM

  4. 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 avatar Oct 11 '22 10:10 rohityadavcloud

@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 avatar Oct 24 '22 14:10 soreana

@soreana are you working on this?

DaanHoogland avatar Nov 03 '22 12:11 DaanHoogland

@DaanHoogland Not yet. I was waiting for the @shwstppr @harikrishna-patnala reply.

soreana avatar Nov 03 '22 12:11 soreana

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 avatar Nov 03 '22 13:11 DaanHoogland

@DaanHoogland Cool 👍 I will keep an eye on the https://github.com/apache/cloudstack/pull/6704 then :)

soreana avatar Nov 03 '22 13:11 soreana

any update on this @shwstppr @harikrishna-patnala @DaanHoogland ?

rohityadavcloud avatar Nov 08 '22 11:11 rohityadavcloud

LGTM based on manual testing.

vladimirpetrov avatar Nov 29 '22 16:11 vladimirpetrov

Fixed in https://github.com/apache/cloudstack/pull/6704

rohityadavcloud avatar Nov 30 '22 07:11 rohityadavcloud