Bug 499018 - ipa host-mod: modifying host's location just keeps adding more location attributes
Summary: ipa host-mod: modifying host's location just keeps adding more location attr...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: freeIPA
Classification: Retired
Component: ipa-admintools
Version: 2.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: v2 release
Assignee: Dmitri Pal
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Depends On:
Blocks: 431020
TreeView+ depends on / blocked
 
Reported: 2009-05-04 20:16 UTC by Jenny Severance
Modified: 2015-01-04 23:38 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-28 09:28:54 UTC
Embargoed:


Attachments (Terms of Use)
apache error_log (957.48 KB, application/octet-stream)
2009-05-05 11:50 UTC, Jenny Severance
no flags Details

Description Jenny Severance 2009-05-04 20:16:16 UTC
Description of problem:
Instead of modifying the existing localityname attribute, ipa host-mod --locality keeps adding more localityname attributes.  

On a side note: Probably shouldn't be multi-valued.  The host can only physically be in one place :-)

[root@jennyv2 schema]# ipa host-show jennyv4.bos.redhat.com
  cn: jennyv4.bos.redhat.com
  description: this is a very interesting description
  localityname: Mountain View, CA
  nshardwareplatform: i686
  nshostlocation: IDM Westford lab 3
  nsosversion: redhat 5.3 Tikanga

[root@jennyv2 schema]# ipa host-mod --locality="Brookline, NH" jennyv4.bos.redhat.com
Host updated

[root@jennyv2 schema]# ipa host-show jennyv4.bos.redhat.com
  cn: jennyv4.bos.redhat.com
  description: this is a very interesting description
  localityname: Mountain View, CA
  localityname: Brookline, NH
  nshardwareplatform: i686
  nshostlocation: IDM Westford lab 3
  nsosversion: redhat 5.3 Tikanga

[root@jennyv2 schema]# ipa host-mod --locality="Westford, MA" jennyv4.bos.redhat.com
Host updated

[root@jennyv2 schema]# ipa host-show jennyv4.bos.redhat.com
  cn: jennyv4.bos.redhat.com
  description: this is a very interesting description
  localityname: Mountain View, CA
  localityname: Brookline, NH
  localityname: Westford, MA
  nshardwareplatform: i686
  nshostlocation: IDM Westford lab 3
  nsosversion: redhat 5.3 Tikanga


Version-Release number of selected component (if applicable):
2.0

How reproducible:
always

Steps to Reproduce:
1. see above
2.
3.
  
Actual results:
each modification creates another localityname attribute

Expected results:
one localityname attribute - host-mod to replace the value.

Additional info:

Comment 1 Jenny Severance 2009-05-04 21:44:07 UTC
additonal info

ipa host-show FQDN on host with multiple localityname results in 
ipa: ERROR: an internal error has occured

Comment 2 Rob Crittenden 2009-05-04 21:48:59 UTC
The Apache error log should contain the backtrace hidden by this internal error output. Can you attach a tail -100 /var/log/httpd/error_log to the bug?

Comment 3 Jenny Severance 2009-05-05 11:50:31 UTC
Created attachment 342441 [details]
apache error_log

Comment 4 Pavel Zuna 2009-05-27 17:41:15 UTC
The problem is/was that LDAP had synonyms for its attributes. 'localityname' (used by the host plugin) is equivalent to 'l' and 'locality'. LDAP seems to prefer the shortest versions.

The LDAP backend(s) in IPA generate modlists (i.e. what should be modified) by comparing the new and old values of the attribute. But since the new value is stored under 'localityname' and the old value is returned from LDAP under 'l', there is no valid comparison going on.

I submitted a patch on freeipa-devel that should fix this issue in the host plugin, but we should be careful when creating new plugins, as there is no easy generic fix for this kind of bug.


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