Skip to content

Conversation

@poettering
Copy link
Member

Let's explicitly deactivate all home dirs on shutdown, in order to
properly synchronizing unmounting and avoiding blocking devices.

Previously, we'd rely on automatic deactivation when home directories
become unused. However, that scheme is asynchronous, and ongoing
deactviations might conflicts with attempts to unmount /home. Let's fix
that by providing an explicit service systemd-homed-activate.service
whose only job is to have a ExecStop= line that explicitly deactivates
all home directories on shutdown. This service can the be ordered after
home.mount and similar, ensuring that we'll first deactivate all homes
before deactivating /home itself during shutdown.

This is kept separate from systemd-homed.service so that it is possible
to restart systemd-homed.service without deactivating all home
directories.

Fixes: #16842

@poettering poettering added the homed homed, homectl, pam_homed label Sep 21, 2020
man/homectl.xml Outdated
<listitem><para>Execute the <command>deactivate</command> command on all active home directories at
once. This operation is generally executed on system shutdown (i.e. by <command>systemctl
poweroff</command> and related commands), to ensure all active user's home directories are fully
shutdown before <filename>/home/</filename> and related file systems are unmounted.</para></listitem>
Copy link
Member

Choose a reason for hiding this comment

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

"shut down"

@poettering
Copy link
Member Author

Force pushed new version. Only changes are the suggested ones. Taking liberty to upgrade green label

@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 Sep 23, 2020
@anitazha anitazha added ci-fails/needs-rework 🔥 Please rework this, the CI noticed an issue with the PR and removed 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 labels Sep 24, 2020
@anitazha
Copy link
Member

ninja -C build man/update-dbus-docs

This docs test is really nice

Let's explicitly deactivate all home dirs on shutdown, in order to
properly synchronizing unmounting and avoiding blocking devices.

Previously, we'd rely on automatic deactivation when home directories
become unused. However, that scheme is asynchronous, and ongoing
deactviations might conflicts with attempts to unmount /home. Let's fix
that by providing an explicit service systemd-homed-activate.service
whose only job is to have a ExecStop= line that explicitly deactivates
all home directories on shutdown. This service can the be ordered after
home.mount and similar, ensuring that we'll first deactivate all homes
before deactivating /home itself during shutdown.

This is kept separate from systemd-homed.service so that it is possible
to restart systemd-homed.service without deactivating all home
directories.

Fixes: systemd#16842
@poettering
Copy link
Member Author

force pushed new version. Only change: added the missing dbus iface docs. Setting green label, since change is so minimal

@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 ci-fails/needs-rework 🔥 Please rework this, the CI noticed an issue with the PR labels Sep 30, 2020
@poettering poettering merged commit d1f6e01 into systemd:master Sep 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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 homed homed, homectl, pam_homed

Development

Successfully merging this pull request may close these issues.

Failed unmounting /home. systemd-homed

3 participants