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

storage: Don't allow mounting over other mounted filesystems #19388

Merged
merged 3 commits into from
Oct 5, 2023

Conversation

mvollmer
Copy link
Member

@mvollmer mvollmer commented Sep 25, 2023

@mvollmer
Copy link
Member Author

Oh, nice coverage report, very accurate!

@mvollmer mvollmer force-pushed the storage-no-overmounting branch 4 times, most recently from 360ec0b to 0731117 Compare September 28, 2023 07:15
@mvollmer mvollmer force-pushed the storage-no-overmounting branch from 0731117 to 60b44b5 Compare September 28, 2023 09:16
@mvollmer mvollmer added the blocked Don't land until something else happens first (see task list) label Sep 28, 2023
@mvollmer mvollmer force-pushed the storage-no-overmounting branch from 60b44b5 to 49dc2a8 Compare September 28, 2023 10:19
@mvollmer mvollmer removed the blocked Don't land until something else happens first (see task list) label Sep 28, 2023
Comment on lines +795 to +798
if (u.usage == 'mounted' && u.location == location) {
if (is_top) {
u.actions = get_actions(_("unmount"));
u.set_noauto = false;

This comment was marked as resolved.

@mvollmer mvollmer force-pushed the storage-no-overmounting branch 2 times, most recently from 963df5d to b2b52bd Compare September 28, 2023 13:54
@mvollmer mvollmer marked this pull request as ready for review September 28, 2023 13:55
@mvollmer mvollmer force-pushed the storage-no-overmounting branch 2 times, most recently from ddd3daa to f2fde63 Compare September 29, 2023 08:08
@mvollmer mvollmer marked this pull request as draft September 29, 2023 10:32
@mvollmer mvollmer marked this pull request as ready for review September 29, 2023 11:42
@mvollmer mvollmer force-pushed the storage-no-overmounting branch from 64a9fe0 to 8fd9cae Compare October 2, 2023 06:49
@mvollmer mvollmer force-pushed the storage-no-overmounting branch 2 times, most recently from 6b3322b to e3e3b90 Compare October 2, 2023 08:24
@mvollmer mvollmer requested a review from jelly October 2, 2023 11:14
@mvollmer mvollmer force-pushed the storage-no-overmounting branch from e3e3b90 to f2b455b Compare October 2, 2023 11:44
jelly
jelly previously approved these changes Oct 3, 2023
@@ -828,7 +872,8 @@ export function get_active_usage(client, path, top_action, child_action) {
return usage;
}

let usage = get_usage(path, 0);
let usage = [];
get_usage(usage, path, 0);
Copy link
Member

Choose a reason for hiding this comment

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

Can't say I am super big fan of the indirection of filling in usage.

Copy link
Member Author

Choose a reason for hiding this comment

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

Immutable data structures are overrated. :-)

And unmount nested filesystems during teardown.
Just janking out the disk will leave debris behind in /dev.
We still want to check whether it is unique etc.
@mvollmer mvollmer force-pushed the storage-no-overmounting branch from f2b455b to 0407a6e Compare October 4, 2023 13:23
Comment on lines +1198 to +1201
} else if (n_processes > 0) {
return _("Related processes will be forcefully stopped.");
} else if (n_services > 0) {
return _("Related services will be forcefully stopped.");
Copy link
Contributor

Choose a reason for hiding this comment

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

These 4 added lines are not executed by any test. Details

@mvollmer mvollmer merged commit ad2748f into cockpit-project:main Oct 5, 2023
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants