Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 725433 - automountmap gets added even though the return code is 1.
automountmap gets added even though the return code is 1.
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ipa (Show other bugs)
6.2
Unspecified Unspecified
high Severity unspecified
: rc
: ---
Assigned To: Rob Crittenden
Chandrasekar Kannan
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-25 09:29 EDT by Gowrishankar Rajaiyan
Modified: 2015-01-04 18:50 EST (History)
3 users (show)

See Also:
Fixed In Version: ipa-2.1.0-1.el6
Doc Type: Bug Fix
Doc Text:
Cause: Adding an indirect automount map to a mount point that already exists returns an error but the map is created anyway. Consequence: The map is not removeable using ipa tools. Fix: Adding an indirect map requires creating a key to store the mount point,. If adding the map fails because the key exists then remove the map. Result: The data is consistent.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-12-06 13:41:52 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1533 normal SHIPPED_LIVE Moderate: ipa security and bug fix update 2011-12-05 20:23:31 EST

  None (edit)
Description Gowrishankar Rajaiyan 2011-07-25 09:29:08 EDT
Description of problem:


Version-Release number of selected component (if applicable):
ipa-server-2.0.99-3.20110721T0516zgit8e8ad51.el6.x86_64

How reproducible:


Steps to Reproduce:
1. # ipa  automountlocation-add baltimore
------------------------------------
Added automount location "baltimore"
------------------------------------
  Location: baltimore

2. # ipa automountmap-add baltimore auto.share
--------------------------------
Added automount map "auto.share"
--------------------------------
  Map: auto.share

3. # ipa automountkey-add baltimore auto.master --key=/share --info=auto.share
---------------------------------
Added automount key "auto.master"
---------------------------------
  Key: /share
  Mount information: auto.share

4. # ipa automountmap-add-indirect baltimore auto.share2 --mount=/usr/share/man
---------------------------------
Added automount map "auto.share2"
---------------------------------
  Map: auto.share2

5. # ipa automountmap-add-indirect baltimore auto.share3 --mount=/usr/share/man
ipa: ERROR: key named /usr/share/man already exists
(as expected)

6. # echo $?
1

  
Actual results:
# /usr/bin/ldapsearch -LLL -x -h localhost -D "cn=Directory Manager" -w Secret123 -b dc=lab,dc=eng,dc=pnq,dc=redhat,dc=com "(&(objectclass=automountmap)(automountMapName=auto.share3))"
dn: automountmapname=auto.share3,cn=baltimore,cn=automount,dc=lab,dc=eng,dc=pn
 q,dc=redhat,dc=com
objectClass: automountmap
objectClass: top
automountMapName: auto.share3

Though the return code is 1, map gets created.

Expected results:
automountmap should not get created. 

Additional info:
Comment 1 Rob Crittenden 2011-07-25 09:40:58 EDT
https://fedorahosted.org/freeipa/ticket/1520
Comment 3 Rob Crittenden 2011-07-27 15:04:19 EDT
master: 62445b8673288212ab3cdc1f5b6d1d81457831ac

ipa-2-0: 7d91b33377f57fdd4d8275c472614daa64b77372
Comment 5 Gowrishankar Rajaiyan 2011-10-08 09:41:06 EDT
[root@bumblebee ~]# ipa  automountlocation-add baltimore
------------------------------------
Added automount location "baltimore"
------------------------------------
  Location: baltimore
[root@bumblebee ~]# ipa automountmap-add baltimore auto.share
--------------------------------
Added automount map "auto.share"
--------------------------------
  Map: auto.share
[root@bumblebee ~]# ipa automountkey-add baltimore auto.master --key=/share --info=auto.share
----------------------------
Added automount key "/share"
----------------------------
  Key: /share
  Mount information: auto.share
[root@bumblebee ~]# ipa automountmap-add-indirect baltimore auto.share2 --mount=/usr/share/man
---------------------------------
Added automount map "auto.share2"
---------------------------------
  Map: auto.share2
[root@bumblebee ~]# ipa automountmap-add-indirect baltimore auto.share3 --mount=/usr/share/man
ipa: ERROR: key named /usr/share/man already exists
[root@bumblebee ~]# echo $?
1

[root@bumblebee ~]# /usr/bin/ldapsearch  -LLL -x -h localhost -D "cn=Directory Manager" -w Secret123 -b dc=lab,dc=eng,dc=pnq,dc=redhat,dc=com "(&(objectclass=automountmap)(automountMapName=auto.share3))"
[root@bumblebee ~]# echo $?
0
[root@bumblebee ~]# 

Verified.
[root@bumblebee ~]# rpm -qi ipa-server
Name        : ipa-server                   Relocations: (not relocatable)
Version     : 2.1.2                             Vendor: Red Hat, Inc.
Release     : 2.el6                         Build Date: Fri 07 Oct 2011 05:09:04 PM EDT
Install Date: Sat 08 Oct 2011 07:36:33 AM EDT      Build Host: x86-001.build.bos.redhat.com
Group       : System Environment/Base       Source RPM: ipa-2.1.2-2.el6.src.rpm
Size        : 3363225                          License: GPLv3+
Signature   : (none)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL         : http://www.freeipa.org/
Summary     : The IPA authentication server
Comment 6 Rob Crittenden 2011-10-31 17:14:29 EDT
    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: Adding an indirect automount map to a mount point that already exists returns an error but the map is created anyway.
Consequence: The map is not removeable using ipa tools.
Fix: Adding an indirect map requires creating a key to store the mount point,. If adding the map fails because the key exists then remove the map.
Result: The data is consistent.
Comment 7 errata-xmlrpc 2011-12-06 13:41:52 EST
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

Note You need to log in before you can comment on or make changes to this bug.