-
Notifications
You must be signed in to change notification settings - Fork 258
fix: Ignore ENOENT error when calling unmount #2347
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
base: main
Are you sure you want to change the base?
Conversation
If the file or directoy doesn't exist then we can assume it is unmounted. Signed-off-by: Lewis Roy <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ninja-quokka The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Maybe I should handle this sooner, for example checking if storage/drivers/overlay/overlay.go Lines 859 to 865 in e1679c1
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a fairly crude hammer, affecting many callers, and ENOENT might well be an indication of a serious problem.
Can you trace and write down how the ENOENT
happens, please?
From a quick check, drivers/overlay.Init
should always create home
(e.g. as a side-effect of creating linkDir
). And then, podman system reset
invokes store.Shutdown
, calling overlay.Driver.Cleanup
— at that point I’d expect home
to still exist. Only afterwards does podman system reset
start actually indiscriminately removing things.
What am I missing? When does this ENOENT happen? Is it that the reset
actually fully succeeds, and we fail only later when closing down the Podman process, and that triggers another store shutdown operation?
Looking a tiny bit further, I’m not saying that definitely means that c/storage is not ultimately the best place to fix this — |
I agree it's a crude hammer, I couldn't think of when we would care that something doesn't exist when we're trying to unmount it anyway but I'm not happy other callers would be effected with this patch. The ENOENT can be reproduced on a fresh system (RHEL or Fedora) where you run In this situation, from the Podman side, we don't care if What do you think about the following ideas?
Thank you and appreciate your expertise on this issue. |
Is the situation really that none of the directories were created yet? or is it that
I’m afraid this might be infuriating, but at this point I don’t quite care how the message is suppressed, or this particular unmount is made conditional; if we decide that that is the right thing to do, we can figure out a way. (If we know nothing else, adding targeted conditionals to I’m much more concerned that, from a quick and very ignorant look at the reset code, the That should probably be discussed in the Podman issue with the Podman experts — if my very cursory reading of the code is confirmed to be approximately correct. |
If the file or directoy doesn't exist then we can assume it is unmounted.
JIRA: https://issues.redhat.com/browse/RHEL-99488