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

Skip disk profiles validation on memory disk #594

Merged
merged 1 commit into from
Aug 23, 2022

Conversation

liranr23
Copy link
Member

When we create the memory or metadata disks they are a result of live
snapshot with memory or hibernation command. In some cases the user can
own the VM, including the option to execute the above command but he may
not have the disk profile permission to add those disks.

This patch will skip the permission validation in those cases, allowing
a user that owns the VM and capable of executing the command to not fail
on the underlying addDisk command.

Change-Id: Ib04048d652c8d98df84ffccc4babd71730b218dc
Bug-Url: https://bugzilla.redhat.com/1565183
Signed-off-by: Liran Rotenberg lrotenbe@redhat.com

@liranr23 liranr23 force-pushed the skip_disk_ownership branch 2 times, most recently from 16c2fba to 19cda9d Compare August 17, 2022 14:00
@liranr23
Copy link
Member Author

/ost

Copy link
Member

@ahadas ahadas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bennyz the commit message is focused on a concrete bug but it's actually a broader change of not setting disk profiles to memory dump/metadata disks. this looks like a better approach to me since those are not really virtual disks. what do you think?

Copy link
Member

@ahadas ahadas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, minor comment inside

Copy link
Member

@ahadas ahadas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, please update the commit message to better reflect the change

@liranr23
Copy link
Member Author

/ost

Copy link
Member

@smelamud smelamud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a typo in the commit message ("virutal disks").

@liranr23
Copy link
Member Author

There is a typo in the commit message ("virutal disks").

thanks, updated.

@ahadas
Copy link
Member

ahadas commented Aug 22, 2022

There is a typo in the commit message ("virutal disks").

thanks, updated.

also the following doesn't describe accurately what this PR does now:
This patch will skip the permission validation in those cases, allowing a user to create attach disks for disks that are not a real virtual disks.

@liranr23
Copy link
Member Author

also the following doesn't describe accurately what this PR does now: This patch will skip the permission validation in those cases, allowing a user to create attach disks for disks that are not a real virtual disks.

changed.

Copy link
Member

@ahadas ahadas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch will skip setting the profile in those cases, allowing a user to create attach disks for disks that are not a real virtual disks.
could have been phrased better (e.g., This patch skips setting the profile in these cases, allowing the user to create those disks even when the user doesn't have a permission to set them with a disk profile) but let's not block it on phrasing, it's close enough

When we create the memory or metadata disks they are a result of other
command. These disks are not act as virtual disks. In some cases the
user can have permission to execute these command, but he may not have
the disk profile permission to add those disks.

This patch will skip setting the profile in those cases, allowing a user
to create attach disks for disks that are not a real virtual disks.

Change-Id: Ib04048d652c8d98df84ffccc4babd71730b218dc
Bug-Url: https://bugzilla.redhat.com/1565183
Signed-off-by: Liran Rotenberg <lrotenbe@redhat.com>
@ahadas
Copy link
Member

ahadas commented Aug 23, 2022

/ost

@ahadas ahadas merged commit 27dc8ee into oVirt:master Aug 23, 2022
@liranr23 liranr23 deleted the skip_disk_ownership branch August 23, 2022 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants