Hide Forgot
Description of problem: Version-Release number of selected component (if applicable): ipa-server-2.0.99-5.20110728T0521zgit1b09ca5.el6.x86_64 How reproducible: Always Steps to Reproduce: 1. # ipa automountlocation-tofiles pune /etc/auto.master: /- /etc/auto.direct --------------------------- /etc/auto.direct: 2. I do not have "/- /etc/auto.direct" in auto.master since it gets created by default while adding an automountlocation. # cat /etc/auto.master | grep -v "#" /ipashare /etc/auto.pune # 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 # cat /etc/auto.pune * -rw,fsid=0,insecure,no_root_squash,sync,anonuid=65534,anongid=65534 bumblebee.lab.eng.pnq.redhat.com:/tmp 3. # ipa automountlocation-import pune /etc/auto.master Imported maps: Added auto.pune Imported keys: Added /ipashare to auto.master Added * to auto.pune Actual results: Importing /etc/auto.master does not detect and import /etc/auto.direct # ipa automountlocation-tofiles pune /etc/auto.master: /- /etc/auto.direct /ipashare /etc/auto.pune --------------------------- /etc/auto.direct: <<<<<<<<<<<< --------------------------- /etc/auto.pune: * -rw,fsid=0,insecure,no_root_squash,sync,anonuid=65534,anongid=65534 bumblebee.lab.eng.pnq.redhat.com:/tmp Expected results: Should detect and import /etc/auto.direct Additional info: The only work-around I could figure out is # ipa automountkey-del pune auto.master --key="/-" --info=auto.direct -------------------------- Deleted automount key "/-" -------------------------- # ipa automountmap-del pune auto.direct ----------------------------------- Deleted automount map "auto.direct" ----------------------------------- # cat /etc/auto.master | grep -v "#" /- /etc/auto.direct /ipashare /etc/auto.pune # ipa automountlocation-import pune /etc/auto.master Imported maps: Added auto.direct Added auto.pune Imported keys: Added /- to auto.master Added /ipashare to auto.master Added * to auto.pune Added /share to auto.direct <<<<<<<<<<<< # 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
https://fedorahosted.org/freeipa/ticket/1551
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