-
Notifications
You must be signed in to change notification settings - Fork 400
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
Add new dmsquash-live-autooverlay module #1991
Conversation
This looks great! I've approved the test run as you're a first-time contributor. |
b7a8bed
to
8502d32
Compare
Shell linting failed due to a couple instances of missing double quotes. |
b2089b8
to
1e681fe
Compare
I will run this once the Fedora datacenter maintenance window is over. |
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.
Unfortunately, we're stuck in a catch-22, and while I can verify the failing test passes locally when I build the container and use it locally, it won't fix itself in here until after we merge it.
Otherwise, this looks good to merge. Thanks!
fi | ||
|
||
live_dir=$(getarg rd.live.dir) | ||
[ -z "$live_dir" ] && live_dir="LiveOS" |
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 line seems repeat from https://github.com/dracutdevs/dracut/blob/master/modules.d/90dmsquash-live/dmsquash-live-root.sh#L21
Can we avoid repeating and risking making the two modules out of sync for the default value with later PRs ?
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 script must run before dmsquash-live-root.sh
in order to work properly and this script won't always run since it's an optional module that complements 90dmsquash-live
. So, both scripts will need a similar line, but it would be nice to have the constant ("LiveOS") in a single location.
Can you point me to some code that demonstrates sharing a constant between two related modules so I can follow the project's existing conventions?
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.
To share a constant, we would need to introduce a shared file between dmsquash-live and dmsquash-live-autooverlay. I think it make sense to limit making changes in other modules as part of this module introduction PR, so perhaps we can do this refactoring as a follow-up PR.
|
||
overlayPartition=${blockDevice}$((currentPartitionCount + 1)) | ||
|
||
label=$(blkid --match-tag LABEL --output value "$rootDevice") |
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.
Would it make sense to reuse devnames from 99base/dracut-lib.sh here ?
crypt and fs-lib modules need similar functionality and we call into devnames in those modules.
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.
The approach I took was to gather all the data necessary to perform the task before making any destructive changes to the disk. That way it can avoid doing anything if it doesn't have all the information it needs.
devnames
provides device names within /dev
. This is gathering the root device's label and UUID for use in the createFilesystem()
function on line 105, which creates a directory with a name that matches the default path format defined in dmsquash-live-root.sh
. So, that's potentially another constant that should be shared between the two modules from a single place.
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.
Some review comments to better align with existing modules..
I find it a better option to just run the job under your personal github fork e.g. https://github.com/iammattcoleman/dracut/actions/workflows/manualtest.yml and post the log of at least one successful run. You might need to trigger container creation first manually under your personal github before triggering the manual test run. |
Head branch was pushed to by a user without write access
1e681fe
to
4e46a80
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.
Changes all look good to me, but perhaps the module is not yet complete, see additional comments.
Also if you have a chance, can you please also update the Gentoo container and add parted ?
4e46a80
to
8c7d153
Compare
LGTM, thanks for the timely interactions. |
As I mentioned in the Matrix channel, please hold off on merging this: as @LaszloGombos's suggested, I ran the manual test in my fork and it failed: While working on this, I was testing on bare metal (well, really a VM) and successfully running the test from within the After I saw the test fail in my fork, I reproduced it in a |
63d0e69
to
c3240d9
Compare
4ff9ddf
to
1260587
Compare
This enables checkout to work in the Gentoo container. See: actions/runner#2115
1260587
to
97422ce
Compare
This pull request introduces a new module that creates a partition for overlayfs usage in the free space on the root filesystem's parent block device.
Ubuntu 20.04 (the
main
branch) and Fedora 36 (thefedora-36
branch) Kiwi image descriptions that produce ISO images that demonstrate this feature are available in this repository:https://github.com/iammattcoleman/overlay-test
Checklist