Bug 725433 - automountmap gets added even though the return code is 1.
Summary: automountmap gets added even though the return code is 1.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ipa
Version: 6.2
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: ---
Assignee: Rob Crittenden
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-25 13:29 UTC by Gowrishankar Rajaiyan
Modified: 2015-01-04 23:50 UTC (History)
3 users (show)

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.
Clone Of:
Environment:
Last Closed: 2011-12-06 18:41:52 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System 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-06 01:23:31 UTC

Description Gowrishankar Rajaiyan 2011-07-25 13:29:08 UTC
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 13:40:58 UTC
https://fedorahosted.org/freeipa/ticket/1520

Comment 3 Rob Crittenden 2011-07-27 19:04:19 UTC
master: 62445b8673288212ab3cdc1f5b6d1d81457831ac

ipa-2-0: 7d91b33377f57fdd4d8275c472614daa64b77372

Comment 5 Gowrishankar Rajaiyan 2011-10-08 13:41:06 UTC
[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 21:14:29 UTC
    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 18:41:52 UTC
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.