Bug 1172297
| Summary: | umount: don't call umount helpers on --fake | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Rachel Kroll <rkroll> |
| Component: | util-linux-ng | Assignee: | Karel Zak <kzak> |
| Status: | CLOSED ERRATA | QA Contact: | Tomas Dolezal <todoleza> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.3 | CC: | phil, psklenar, tcallawa, todoleza |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | util-linux-ng-2.17.2-12.19.el6 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-05-11 00:34:44 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1270825 | ||
|
Description
Rachel Kroll
2014-12-09 19:31:45 UTC
You're right, the "fake" flag is not propagated to mount helpers, but umount code assumes that mtab entry has been removed by the helper. It's bug. It seems like there are two options to resolve this:
1) Fix the helpers to handle the "fake" flag, then propogate the "fake" flag to the helpers. Helpers remove the mtab entry. That doesn't seem like it covers this case completely though.
2) Edit the writemtab: jump point code. Currently, it looks like this:
*****
writemtab:
if (!nomtab &&
(umnt_err == 0 || umnt_err == EINVAL || umnt_err == ENOENT)) {
update_mtab (node, NULL);
}
...
*****
It seems like we might be able to cover this by doing this instead:
writemtab:
if ((fake) || (!nomtab &&
(umnt_err == 0 || umnt_err == EINVAL || umnt_err == ENOENT))) {
update_mtab (node, NULL);
}
...
*****
Assuming that if we're doing a --fake umount, we always want to update the mtab. I'm guessing that's the point of doing the --fake umount, at least for the original bug reporter.
Then again, I might not have understood this entirely. This older mount code looks nothing like the current stuff.
I haven't looked at modern versions of this code, we delved into the CentOS6 version... but as I recall, mount passes --fake to mount.nfs which does not then pass it back to mount. So without pulling up the code right now, I'm guessing that even if you made that writemtab change, you'd still get an error from `mount`. It may be that there's two bugs in here. I'm pretty sure the version of the umount code being used in EL6 doesn't pass --fake to a helper. I'm also pretty sure that the nfs helper doesn't know what to do with it if it was passed. :) The --fake option is unsupported by umount.<type> helpers, it's the same in old umount (rhel6) as well as in the current upstream code. The good news is that rhel6 is the last release with /etc/mtab :-) I think Tom is right, it should be enough to clean up mtab and we probably don't have to call the helper at all if --fake specified. This is necessary to fix in the current upstream code too. The upstream commit 28cdf9c61206034b733bf5dcbdea179b8238271f fixes libmount to not call umount helpers on --fake. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2016-0911.html |