-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
machines: Make readonly and shareable disk options configurable #12314
machines: Make readonly and shareable disk options configurable #12314
Conversation
32488ee
to
1c9a7e3
Compare
1c9a7e3
to
4e2ab79
Compare
4e2ab79
to
7d7324c
Compare
7d7324c
to
dcf83a4
Compare
dcf83a4
to
cc1e823
Compare
This affects the design of the disk row as well, @garrett are you good with this change? |
|
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.
I think we need to rework the design. (See my previous comment for questions that need answering.)
I cannot think of sensible labels.
Usually when user wants multiple VMs to use the same disk. To prevent write conflicts you set this disk as readonly for some VMs, so they loose write access. Or disks which you want to act as "CDrom" or other RO disk types.
Again, mainly for specific use cases such as multiple VMs share disk, or to simulate readonly disk type.
No, this can be only updated after a reboot. You can modify readonly/shareable options only for permanent VM's XML, which will be loaded with all the new modifications after VM reboots. I forgot to take into account error handling, good idea. (altought I can't think of any error apart from some undocumented libvirt/qemu internal error).
Again, used when you want to share a disk with multiple VMs, but in this case you want all of them to have a write access. From what I can read in documentation, it will turn off I/O caching, locking of the disk which will make disk available for modification by multiple VMs. It's mainly used for cluster-aware guests.
Both of these things are not affected by this PR. |
cc1e823
to
efeda2c
Compare
efeda2c
to
474c50c
Compare
Allow multiple running VMs share a single disk. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1684304 Closes cockpit-project#12314
@garrett After our IRC discussion to pull readonly and shareable configuration into separate disk Edit dialog, here is the first take of how it could look: Alternatively checkboxes can be replaced by dropdown with options (Read-only / Read-write) and (Shareable / Non-shareable). |
@skobyda: Cool! Thanks for working on splitting the state changing into a dialog.
|
Yes, you can edit stuff like Bus, storage format and several performance options.
Disk is uniquely specified by it's path. So dialog name could be something like "Edit /var/lib/libvirt/images/fedora30.qcow2 Disk Settings".
Yes. You can attach disk which is already used by another VM without setting readonly or shareable. Then however if you will try to run both VMs, you will have problem (e.g. write conflict). To prevent that, you have 2 solutions: make disk readonly for others VMs, so there will be no write conflict, or make disk shareable so libvirt/qemu will prevent conflicts by using shared file locks, turning I/O caching off...
Agree.
It wil happen only after reboot. I will put warning at the dialog footer similar to Vcpu or Network Interface Edit dialogs.
|
What if the dialog would be something like this:
Name and size are not editable (at least in this iteration). They're in the dialog for reference, to make sure someone knows what they're editing. State is a group of 3 radio buttons. If "read-only and shared" is selected, then perhaps there should be a warning message about how this makes the disk read-only until it is removed from other VMs. It would also be good to know which VMs are using the disk (from somewhere, within Cockpit). The × is centered because this is a limitation of doing mockups in tables in Markdown on GitHub. Same for other alignment issues. 😉 What do you think? |
Needs to rebase to master since #12367 changed tests names |
@garrett Current state of dialog: Also as you requested I:
|
c5f56ab
to
caf014e
Compare
Tests seem to be green. It also seems there are no more design objections. |
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.
I have some minor comments, but no need to block on these for these to get merged
Retriggering for testCreate on rhel-8-1 to get green.
Access value encompasses both readonly and shareable values. "Read-Only": readonly==true, shareable==false "Read-Write": readonly==false, shareable==false "Read-Write and Shared": readonly==false, shareable==true Combination of both readonly==true and shareable==true is incorrect and not recommended by libvirt to use.
Change button for disk detaching, which now contains word "Detach". Also align all actions to the right.
caf014e
to
b1d3959
Compare
Allow multiple running VMs share a single disk. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1684304 Closes cockpit-project#12314
b1d3959
to
37d8ed8
Compare
Allow multiple running VMs share a single disk. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1684304 Closes #12314
Allow multiple running VMs share a single disk.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1684304
Closes #12314