Skip to content

Conversation

@poettering
Copy link
Member

So far we only reported access mode and fs type that is supposed to be used for a home dir when it is created. Let's also report what actually is currently used, as part of the "status" part of the user record.

Also split out of #21253

@poettering poettering added the homed homed, homectl, pam_homed label Nov 12, 2021
`accessMode` → The access mode currently in effect for the home directory iself.

`fileSystemType` → The file system type backing the home directory: a short
string, such as "btrfs", "ext4", "xfs".
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we have an authoritative list we can point to beside these examples? or is this the one?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So right now homed only supports these three file systems inside the LUKS volumes, hence I added support for them, but nothing else.

I figure sooner or later we should have a table somewhere which can translate the various file system magics into their string identifiers, using the same names as /proc/filesystems would use, building on the infra we have in src/basic/filesystems.[ch] already (and which already looks at the magic but doesn't include it in the generated tables).

Once we have that we should drop this manual translation function and just use that.

I'll add an explicit TODO list item for this. It requires some work and I don't really think it fits into this PR.

…N from it

We later want to query per-home free status for implementing automatic
grow/shrink of home directories, hence let's separate the JSON
generation from the disk free status determination.
…on of user record

So far we have two properties for the intended fstype + access mode of
home dirs, but they might differ from what is actually used (because the
user record changed from the home dir, after it was created, or vice
versa). Let's hence add these props also to the "status" section of user
record, which report the status quo. That way we can always show the
correct, current settings.
@poettering
Copy link
Member Author

Force pushed a new version, with the suggested assert(), and the mentioned TODO list entry. Upgrading green label.

@poettering poettering force-pushed the homed-report-fs-and-access-mode branch from 55da9bd to e0c311b Compare November 12, 2021 21:54
@poettering poettering added good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed and removed good-to-merge/with-minor-suggestions labels Nov 12, 2021
@poettering poettering merged commit 1ca5a6c into systemd:main Nov 13, 2021
@keszybz keszybz removed the good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed label Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation homed homed, homectl, pam_homed

Development

Successfully merging this pull request may close these issues.

3 participants