-
Notifications
You must be signed in to change notification settings - Fork 259
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
Conversation
...manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/AddDiskCommand.java
Outdated
Show resolved
Hide resolved
16c2fba
to
19cda9d
Compare
/ost |
There was a problem hiding this 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?
...manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/AddDiskCommand.java
Outdated
Show resolved
Hide resolved
19cda9d
to
d0af99c
Compare
d0af99c
to
68aa264
Compare
There was a problem hiding this 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
.../manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/profiles/DiskProfileHelper.java
Outdated
Show resolved
Hide resolved
68aa264
to
8efd30c
Compare
.../manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/profiles/DiskProfileHelper.java
Outdated
Show resolved
Hide resolved
8efd30c
to
e8318b1
Compare
There was a problem hiding this 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
e8318b1
to
7049ea9
Compare
/ost |
There was a problem hiding this 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").
7049ea9
to
0b2cc7a
Compare
thanks, updated. |
also the following doesn't describe accurately what this PR does now: |
0b2cc7a
to
01013a6
Compare
changed. |
There was a problem hiding this 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>
01013a6
to
9b4bf2c
Compare
/ost |
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