-
Notifications
You must be signed in to change notification settings - Fork 86
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
Fstab support (rebased to 3.9) #1119
Conversation
japokorn
commented
Mar 22, 2023
•
edited
Loading
edited
- added support for blivet to directly modify fstab based on blivet actions
- added tests
Summary of replies to review comments from #1093:
|
|
2956abe
to
04d9581
Compare
These tests run using GitHub Actions and not in our CI, the missing dependencies need to be resolved in the specific workflow configuration. |
5976394
to
27b0e04
Compare
9b78410
to
43876a6
Compare
20652d2
to
e8985f2
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.
This looks okay to me overall. Some of the stuff in get_device
around swap files or bind mounts makes me a bit nervous. I might prefer to leave that out unless we also have test coverage.
6db5e36
to
b1a5d28
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.
Just a few observations based on trying to use blivet.fstab.FSTabManager
as a standalone module without blivet.
|
||
entry.file = None | ||
if device.format.mountable: | ||
entry.file = device.format.mountpoint |
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.
What if the device doesn't have a mount point set? I don't think that None
is a valid value in fstab:
In [13]: f.entry_from_device(nvme0n1p1)
Out[13]: UUID=3E7F-3333 efi None 0 0
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 function is meant to be able to produce incomplete entries as well (these are used for looking up existing entries). There is a sanity check in FSTabManager.write
that prevents invalid entries to be written into the file in case of misuse.
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.
Ok, please make a note about this in the docstring, thanks.
b1a5d28
to
434bb42
Compare
7d2e09b
to
a741460
Compare
76c28ad
to
5f881f9
Compare
- added support for blivet to directly modify fstab based on blivet actions - added tests and unit tests
- changed API - other fixes
- Allows to set prefered spec type in fstab by either setting blivet.fstab.spec_type for 'global' effect or device.format.fstab.spec_type for individual device. Allowed values are "UUID", "PARTUUID", "LABEL", "PARTLABEL" or "PATH". When selected value is not available, it uses other one (defaults to UUID). - Allows to set freq, passno and mntops for individual devices to be written in fstab. Done by setting device.format.fstab.freq/passno/mntops values respectively.
(to be squashed)
5f881f9
to
2778634
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.
Looks good to me now, thank you.
Anaconda tests revealed missing FSTabOptions object in SwapSpace class. This issue is related to the recent merge of fstab rework PR storaged-project#1119 which added this object to FS class. SwapSpace does not inherit from FS and was overlooked. This change adds the object.
Anaconda tests revealed missing FSTabOptions object in SwapSpace class. This issue is related to the recent merge of fstab rework PR storaged-project#1119 which added this object to FS class. SwapSpace does not inherit from FS and was overlooked. This change adds the missing object. It also adds logic that skips all fstab related operations if fstab file is not to be written (i.e. fstab.dest_file is None). The reason for this is to eliminate the risk of potential issues caused by unused component. The test for above has been added as well.
Anaconda tests revealed missing FSTabOptions object in SwapSpace class. This issue is related to the recent merge of fstab rework PR storaged-project#1119 which added this object to FS class. SwapSpace does not inherit from FS and was overlooked. This change adds the missing object. It also adds logic that skips all fstab related operations if fstab file is not to be written (i.e. fstab.dest_file is None). The reason for this is to eliminate the risk of potential issues caused by unused component. The test for above has been added as well.