Skip to content
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

automount: handle expire_tokens when the mount unit changes its state #3434

Merged
merged 1 commit into from Jun 5, 2016

Conversation

michaelolbrich
Copy link
Contributor

This basically reverts 7b2fd9d ("core:
remove duplicate code in automount_update_mount()").

This was not duplicate code. The expire_tokens need to be handled as well:
Send 0 == success for MOUNT_DEAD (umount successful), do nothing for
MOUNT_UNMOUNTING (not yet done) and an error for everything else.

Otherwise the automount logic will assume unmounting is not done and will
not send any new requests for mounting.

@keszybz
Copy link
Member

keszybz commented Jun 5, 2016

Does this fix some bug, or in other words, do you have a reproducer to test the bad behaviour?

This basically reverts 7b2fd9d ("core:
remove duplicate code in automount_update_mount()").

This was not duplicate code. The expire_tokens need to be handled as well:
Send 0 == success for MOUNT_DEAD (umount successful), do nothing for
MOUNT_UNMOUNTING (not yet done) and an error for everything else.

Otherwise the automount logic will assume unmounting is not done and will
not send any new requests for mounting. As a result, the corresponding
mount unit is never mounted.

Without this, automounts with TimeoutIdleSec= are broken. Once the idle
timeout triggered a umount, any access to the corresponding filesystem
hangs forever.
@michaelolbrich
Copy link
Contributor Author

It fixes #3332. I've clarified the commit message.

@keszybz
Copy link
Member

keszybz commented Jun 5, 2016

autopkgtests fail in test-network, which seems unrelated.

@keszybz keszybz merged commit 0a62f81 into systemd:master Jun 5, 2016
@poettering poettering added the pid1 label Jun 7, 2016
Werkov pushed a commit to Werkov/systemd that referenced this pull request Jun 22, 2017
…systemd#3434)

This basically reverts 7b2fd9d ("core:
remove duplicate code in automount_update_mount()").

This was not duplicate code. The expire_tokens need to be handled as well:
Send 0 == success for MOUNT_DEAD (umount successful), do nothing for
MOUNT_UNMOUNTING (not yet done) and an error for everything else.

Otherwise the automount logic will assume unmounting is not done and will
not send any new requests for mounting. As a result, the corresponding
mount unit is never mounted.

Without this, automounts with TimeoutIdleSec= are broken. Once the idle
timeout triggered a umount, any access to the corresponding filesystem
hangs forever.

Fixes systemd#3332.
(cherry picked from commit 0a62f81)

[fbui: fixes bsc#1040942]
xrg pushed a commit to xrg/systemd that referenced this pull request Sep 3, 2017
…systemd#3434)

This basically reverts 7b2fd9d ("core:
remove duplicate code in automount_update_mount()").

This was not duplicate code. The expire_tokens need to be handled as well:
Send 0 == success for MOUNT_DEAD (umount successful), do nothing for
MOUNT_UNMOUNTING (not yet done) and an error for everything else.

Otherwise the automount logic will assume unmounting is not done and will
not send any new requests for mounting. As a result, the corresponding
mount unit is never mounted.

Without this, automounts with TimeoutIdleSec= are broken. Once the idle
timeout triggered a umount, any access to the corresponding filesystem
hangs forever.

Fixes systemd#3332.
mikhailnov pushed a commit to mikhailnov/systemd that referenced this pull request Aug 16, 2019
…systemd#3434)

This basically reverts 7b2fd9d ("core:
remove duplicate code in automount_update_mount()").

This was not duplicate code. The expire_tokens need to be handled as well:
Send 0 == success for MOUNT_DEAD (umount successful), do nothing for
MOUNT_UNMOUNTING (not yet done) and an error for everything else.

Otherwise the automount logic will assume unmounting is not done and will
not send any new requests for mounting. As a result, the corresponding
mount unit is never mounted.

Without this, automounts with TimeoutIdleSec= are broken. Once the idle
timeout triggered a umount, any access to the corresponding filesystem
hangs forever.

Fixes systemd#3332.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

3 participants