-
Notifications
You must be signed in to change notification settings - Fork 353
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
webui: mount point assignment support #4843
Conversation
0f55651
to
b911384
Compare
Some UI things I did not address, which can be a follow up: Allows selection when you have no partitionsAllows selection, when you have a partition but no FilesystemAfter going back and adding a new partition, the file system was not detected. I think this is due to the re-use of the Note that every time you change something with the partitions you need to go back and click Error stays after switching back and forth.When switching back and forth because I had a missing filesystem, then created one and clicked Nice to haveFormatting a partition as This could be an inline error, downside is that we'd have to hardcode a rule in the web ui. |
|
||
useEffect(() => { | ||
if (requests === null) { | ||
findPartitioning({ method: "MANUAL" }).then(([partitioning]) => { |
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.
TLDR:
When scanning for new devices we correctly call ResetPartitioning
but this does not pick up filesystem changes, only new partitions. (As GatherRequests which is called here does the right thing)
@poncovka I assume this is not expected behaviour but a bug?
Creating a new Partitining does pick up the filesystem changes on disk:
[anaconda root@localhost ~]# busctl --verbose --address=$(cat /run/anaconda/bus.address) call org.fedoraproject.Anaconda.Modules.Storage /org/fedoraproject/Anaconda/Modules/Storage org.fedoraproject.Anaconda.Modules.Storage CreatePartitioning s "MANUAL"
[anaconda root@localhost ~]# busctl --verbose --address=$(cat /run/anaconda/bus.address) call org.fedoraproject.Anaconda.Modules.Storage /org/fedoraproject/Anaconda/Modules/Storage/Partitioning/3 org.fedoraproject.Anaconda.Modules.Storage.Partitioning.Manual GatherRequests | grep ext4
STRING "ext4";
STRING "ext4";
Old partitioning model:
[anaconda root@localhost ~]# busctl --verbose --address=$(cat /run/anaconda/bus.address) call org.fedoraproject.Anaconda.Modules.Storage /org/fedoraproject/Anaconda/Modules/Storage/Partitioning/2 org.fedoraproject.Anaconda.Modules.Storage.Partitioning.Manual GatherRequests | grep ext4
[anaconda root@localhost ~]#
@KKoukiou so this is where we find the "existing" ManualPartitioning. If I recall correctly you can't deleted CreatedPartitioning models so findPartitioning just finds the last one. So this is a bit of an issue, it can be fixed in two ways I think.
Either invalidate the PartioningModel's Requests property so it fetches the new information from the DeviceTree. I thought ResetPartitioning
should do that But it does not seem so.
Keep some global state somewhere, so create a ManualPartitioning object when you select Custom Mount point and if you click Rescan devices
. This is however a rather suboptimal solution I'd say.
Listing Partitionings:
[anaconda root@localhost ~]# busctl --verbose --address=$(cat /run/anaconda/bus.address) get-property org.fedoraproject.Anaconda.Modules.Storage /org/fedoraproject/Anaconda/Modules/Storage org.fedoraproject.Anaconda.Modules.Storage CreatedPartitioning
ARRAY "o" {
OBJECT_PATH "/org/fedoraproject/Anaconda/Modules/Storage/Partitioning/1";
OBJECT_PATH "/org/fedoraproject/Anaconda/Modules/Storage/Partitioning/2";
};
Getting the GatherRequests (Turns should turn into a Requests property).
busctl --verbose --address=$(cat /run/anaconda/bus.address) call org.fedoraproject.Anaconda.Modules.Storage /org/fedoraproject/Anaconda/Modules/Storage/Partitioning/2 org.fedoraproject.Anaconda.Modules.Storage.Partitioning.Manual GatherRequests
We should be able to call ResetPartitioning
to Reset the Partitioning model.
busctl --verbose --address=$(cat /run/anaconda/bus.address) call org.fedoraproject.Anaconda.Modules.Storage /org/fedoraproject/Anaconda/Modules/Storage org.fedoraproject.Anaconda.Modules.Storage ResetPartitioning
And then call GatherRequests
again, but this does not seem to discover new filesystems.
Would it perhaps make sense to split the PR into more commits ? Say one commit for the JS API code calling DBus, one for the review screen & similar ? |
But we need the front end to make the JS APIs call for dbus testable. |
/boot-iso --webui |
b911384
to
8b2377b
Compare
8b2377b
to
a0baf0e
Compare
/boot-iso --webui |
0766591
to
651ad21
Compare
2b2b038
to
39bb620
Compare
/boot-iso --webui |
This get's reprinted on each re-render of the component polluting the browser console and therefore the test run outputs.
39bb620
to
312d20e
Compare
312d20e
to
9e51641
Compare
@jelly i need some support on this. Checked your review comments from above:
|
9e51641
to
775ff4c
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.
|
||
const MountPointSelect = ({ partition, requests, mountpoint, handleOnSelect, isDisabled }) => { | ||
// TODO: extend? | ||
const defaultOptions = [ |
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.
No really relevant for this review, but I'm thinking this might eventually end up in the config file, as various distro variants might have very different ideas of what the suggested partitions should be (eq. swap, separate /var, /boot not on separate partition, etc.) & might want to set it up in a custom manner.
<TextContent> | ||
<Text component={TextVariants.p}> | ||
{_("This option requires you to first partition and format your disk and " + | ||
"then assign custom mount points in the next step.")} |
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 suggest also mentioning (possibly in another paragraph) that if the layout already exists (from an existing installation or already created by the user beforehand) that the user can proceed right away to assign the mount points.
775ff4c
to
38081fc
Compare
Support a new storage configuration method where a user first has to manually partition and create file systems using the tools on the installation image. When selecting the custom mount point option the user can now select which partition to map to mount point either from a well known list of Mount points or a manually created one. Co-authored-by: Katerina Koukiou <kkoukiou@redhat.com>
38081fc
to
792d3e9
Compare
…scan button Previously we were replacing the wizard content with a loading empty state but that causes a flicker when rescanning disks.
/kickstart-test --waive webui only |
Enhanced version of #4757
I made many changes that I felt maybe force pushing into the existing branch is bad idea. Let me know if you prefer.
@jelly kept your commit an d fixed the issue with the custom mountpoint option still showing plain disks.
Wanna take a look?