Skip to content

Cleanup dangling bundle mount point before install. #1678

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HiFiPhile
Copy link

@HiFiPhile HiFiPhile commented Mar 28, 2025

If rauc install process is terminated, the next run will fail with the following error:
Failed mounting bundle: Failed to create dm device: Device or resource busy

The cause is the bundle from previous run is still mounted. This patch address this issue by check bundle mount point and unmount dangling bundle.

Fix #1676

If rauc install process is terminated, the next run will fail with the following error:
Failed mounting bundle: Failed to create dm device: Device or resource busy

The cause is the bundle from previous run is still mounted. This patch address this
issue by check bundle mount point and unmount dangling bundle.

Signed-off-by: Zixun LI <zli@ogga.fr>
@jluebbe
Copy link
Member

jluebbe commented Mar 31, 2025

Do we really want to clean up automatically here? This could also be a concurrently running RAUC process.

As this is an unexpected state, I'd prefer to abort instead of silently trying to fix it.

@ejoerns
Copy link
Member

ejoerns commented Mar 31, 2025

I think it's just a variant of what I raised my concerns about in #1676 (comment). Thus, agreed to what @jluebbe noted.

@HiFiPhile
Copy link
Author

HiFiPhile commented Mar 31, 2025

Do we really want to clean up automatically here? This could also be a concurrently running RAUC process.

Currently is there no locking for concurrent protection ? I think multiples install from the same bundle will not end up well...

As this is an unexpected state, I'd prefer to abort instead of silently trying to fix it.

A fixup is needed otherwise following update will fail forever.

Maybe what you prefer is an explicit cleanup mode ?

@ejoerns in #1676 the main concern is identification of previous used DM devices, here the bundle mount points stays the same.

@jluebbe
Copy link
Member

jluebbe commented Mar 31, 2025

In the service case, locking is internal and cleanup is handled by using a mount namespace. For the non-service case, cleanup (perhaps also using an unshare mount namspace) and locking is the responsibility of the user.

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.

Failed to create dm device: Device or resource busy error if previous update process is terminated
3 participants