Bug 726715
Summary: | Importing /etc/auto.master does not detect and import /etc/auto.direct. | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Gowrishankar Rajaiyan <grajaiya> |
Component: | ipa | Assignee: | Rob Crittenden <rcritten> |
Status: | CLOSED ERRATA | QA Contact: | Chandrasekar Kannan <ckannan> |
Severity: | unspecified | Docs Contact: | |
Priority: | high | ||
Version: | 6.2 | CC: | benl, dpal, jgalipea, mkosek |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | ipa-2.1.1-1.el6 | Doc Type: | Bug Fix |
Doc Text: |
Cause: When importing automaster maps auto.direct mounted on /- was ignored because it was considered a duplicate.
Consequence: Direct maps needed to be manually added.
Fix: An exception is made for the auto.direct map when importing so its keys can be added.
Result: Importing direct maps works.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2011-12-06 18:25:10 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Gowrishankar Rajaiyan
2011-07-29 15:16:50 UTC
I don't think this is a bug? In automountlocation-import operation we import all maps/keys that are in given /etc/auto.master file. However, mapping "/- auto.direct" was not in auto.master in the first case and thus it was not loaded. When you added the mapping "/- auto.direct" to /etc/auto.master, the import of auto.direct map worked. It seems inconsistent to me to import auto.direct file contents since it does not have a mapping in the imported auto.master file. After all, autofs didn't consider /etc/auto.direct when running from the local files either, did it? # cat /etc/auto.master /- /etc/auto.direct /ipashare /etc/auto.pune # ipa automountlocation-import pune /etc/auto.master ipa: ERROR: key /- already exists Since the error message is key "/-" already exists by default I removed "/- /etc/auto.direct" key from /etc/auto.master and tried importing again. Since the location already had the direct map in it created by default I expect /etc/auto.direct to be imported automatically. Ok, the error here is that the contents of a map were ignored if the map already existed in IPA. We should make an exception for auto.direct since we pre-create it in each location. The error is not that a file not mentioned in auto.master was not imported. What if there are already some automountkeys in auto.direct if we add the exception? We would have to either overwrite the old automountkeys or ignore the colliding imported ones. I think the rule now (and we're hitting it) is to ignore duplicates. So if we only ignore /- as a duplicate I think we'll be ok. Note that there can be multiple /- in an auto.master, we should handle that too. master: e856310d7512cafbb394dfdf861658dc6a81d93d ipa-2-1: 2e9d614cabfb556aedb6ca805593dfcf3fa811cd Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause: When importing automaster maps auto.direct mounted on /- was ignored because it was considered a duplicate. Consequence: Direct maps needed to be manually added. Fix: An exception is made for the auto.direct map when importing so its keys can be added. Result: Importing direct maps works. Case 1: with "/- /etc/auto.direct" in /etc/auto.master [root@jetfire ~]# ipa automountlocation-add pune ------------------------------- Added automount location "pune" ------------------------------- Location: pune [root@jetfire ~]# ipa automountlocation-tofiles pune /etc/auto.master: /- /etc/auto.direct --------------------------- /etc/auto.direct: [root@jetfire ~]# [root@jetfire ~]# cat /etc/auto.master /- /etc/auto.direct /ipashare /etc/auto.pune [root@jetfire ~]# [root@jetfire ~]# cat /etc/auto.direct /share -rw,fsid=0,insecure,no_root_squash,sync,anonuid=65534,anongid=65534 bumblebee.lab.eng.pnq.redhat.com:/usr/share/man [root@jetfire ~]# [root@jetfire ~]# cat /etc/auto.pune * -rw,fsid=0,insecure,no_root_squash,sync,anonuid=65534,anongid=65534 bumblebee.lab.eng.pnq.redhat.com:/tmp [root@jetfire ~]# [root@jetfire ~]# [root@jetfire ~]# ipa automountlocation-import pune /etc/auto.master Imported maps: Added auto.pune Imported keys: Added /ipashare to auto.master Added * to auto.pune Added /share to auto.direct [root@jetfire ~]# ipa automountlocation-tofiles pune /etc/auto.master: /- /etc/auto.direct /ipashare /etc/auto.pune --------------------------- /etc/auto.direct: /share -rw,fsid=0,insecure,no_root_squash,sync,anonuid=65534,anongid=65534 bumblebee.lab.eng.pnq.redhat.com:/usr/share/man --------------------------- /etc/auto.pune: * -rw,fsid=0,insecure,no_root_squash,sync,anonuid=65534,anongid=65534 bumblebee.lab.eng.pnq.redhat.com:/tmp [root@jetfire ~]# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# Case 2: with multiple master maps "/-" [root@jetfire ~]# cat /etc/auto.master /- /etc/auto_test2_direct /- /etc/auto.direct /ipashare /etc/auto.pune [root@jetfire ~]# cat /etc/auto_test2_direct /etc/auto_test2_direct -rw,fsid=0,insecure,no_root_squash,sync,anonuid=65534,anongid=65534 bumblebee.lab.eng.pnq.redhat.com:/usr/share/man2 [root@jetfire ~]# cat /etc/auto.direct /share -rw,fsid=0,insecure,no_root_squash,sync,anonuid=65534,anongid=65534 bumblebee.lab.eng.pnq.redhat.com:/usr/share/man [root@jetfire ~]# cat /etc/auto.pune * -rw,fsid=0,insecure,no_root_squash,sync,anonuid=65534,anongid=65534 bumblebee.lab.eng.pnq.redhat.com:/tmp [root@jetfire ~]# ipa automountlocation-import pune /etc/auto.master Imported maps: Added auto_test2_direct Added auto.pune Imported keys: Added /- to auto.master Added /ipashare to auto.master Added * to auto.pune Added /etc/auto_test2_direct to auto_test2_direct Added /share to auto.direct [root@jetfire ~]# ipa automountlocation-tofiles pune /etc/auto.master: /- /etc/auto.direct /- /etc/auto_test2_direct /ipashare /etc/auto.pune --------------------------- /etc/auto.direct: /share -rw,fsid=0,insecure,no_root_squash,sync,anonuid=65534,anongid=65534 bumblebee.lab.eng.pnq.redhat.com:/usr/share/man --------------------------- /etc/auto_test2_direct: /etc/auto_test2_direct -rw,fsid=0,insecure,no_root_squash,sync,anonuid=65534,anongid=65534 bumblebee.lab.eng.pnq.redhat.com:/usr/share/man2 --------------------------- /etc/auto.pune: * -rw,fsid=0,insecure,no_root_squash,sync,anonuid=65534,anongid=65534 bumblebee.lab.eng.pnq.redhat.com:/tmp [root@jetfire ~]# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# Case 3: with already existing values in auto.direct map [root@jetfire ~]# ipa automountlocation-add pune ------------------------------- Added automount location "pune" ------------------------------- Location: pune [root@jetfire ~]# ipa automountkey-add pune Map: auto.direct Key: /shanks Mount information: -rw,fsid=0,insecure,no_root_squash,sync,anonuid=65534,anongid=65534 bumblebee.lab.eng.pnq.redhat.com:/home/shanks ----------------------------- Added automount key "/shanks" ----------------------------- Key: /shanks Mount information: -rw,fsid=0,insecure,no_root_squash,sync,anonuid=65534,anongid=65534 bumblebee.lab.eng.pnq.redhat.com:/home/shanks [root@jetfire ~]# ipa automountlocation-tofiles pune /etc/auto.master: /- /etc/auto.direct --------------------------- /etc/auto.direct: /shanks -rw,fsid=0,insecure,no_root_squash,sync,anonuid=65534,anongid=65534 bumblebee.lab.eng.pnq.redhat.com:/home/shanks [root@jetfire ~]# ipa automountlocation-import pune /etc/auto.master Imported maps: Added auto_test2_direct Added auto.pune Imported keys: Added /- to auto.master Added /ipashare to auto.master Added * to auto.pune Added /etc/auto_test2_direct to auto_test2_direct Added /share to auto.direct [root@jetfire ~]# ipa automountlocation-tofiles pune /etc/auto.master: /- /etc/auto.direct /- /etc/auto_test2_direct /ipashare /etc/auto.pune --------------------------- /etc/auto.direct: /shanks -rw,fsid=0,insecure,no_root_squash,sync,anonuid=65534,anongid=65534 bumblebee.lab.eng.pnq.redhat.com:/home/shanks /share -rw,fsid=0,insecure,no_root_squash,sync,anonuid=65534,anongid=65534 bumblebee.lab.eng.pnq.redhat.com:/usr/share/man --------------------------- /etc/auto_test2_direct: /etc/auto_test2_direct -rw,fsid=0,insecure,no_root_squash,sync,anonuid=65534,anongid=65534 bumblebee.lab.eng.pnq.redhat.com:/usr/share/man2 --------------------------- /etc/auto.pune: * -rw,fsid=0,insecure,no_root_squash,sync,anonuid=65534,anongid=65534 bumblebee.lab.eng.pnq.redhat.com:/tmp [root@jetfire ~]# Verified. Version: ipa-server-2.1.3-7.el6.x86_64 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. http://rhn.redhat.com/errata/RHSA-2011-1533.html |