Description of problem: Negative test, ipa host-mod --setattr on fqdn returned ambiguous error message. Version-Release number of selected component (if applicable): ipa-server-1.91-0.2010080617git830910d.fc12.i686 ipa-admintools-1.91-0.2010080617git830910d.fc12.i686 How reproducible: always Steps to Reproduce: 1. add a new host 2. attempt to set the host's fqdn # ipa host-mod --setattr fdqn=mynewfqdn 3. Actual results: ipa: ERROR: an internal error has occurred Expected results: ipa: ERROR: no modifications to be performed Additional info: The expected results are based on results of attempting to add and set ipa defined schema attributes. It is probably preferable to return a message saying it is not allowed - rather than no modification performed.
Ticket https://fedorahosted.org/freeipa/ticket/230
Traceback for all scenarios producing internal errors with setattr and addaddr 1. ################################################################################ [Wed Sep 15 14:05:48 2010] [error] ipa: INFO: Created connection context.ldap2 [Wed Sep 15 14:05:48 2010] [error] ipa: DEBUG: raw: host_mod(u'nightcrawler.bos.redhat.com', addattr=(u'fqdn=newfqdn',), all=False, raw=False) [Wed Sep 15 14:05:48 2010] [error] ipa: INFO: host_mod(u'nightcrawler.bos.redhat.com', addattr=(u'fqdn=newfqdn',), all=False, raw=False) [Wed Sep 15 14:05:48 2010] [error] ipa: ERROR: non-public: KeyError: 'fqdn' [Wed Sep 15 14:05:48 2010] [error] Traceback (most recent call last): [Wed Sep 15 14:05:48 2010] [error] File "/usr/lib/python2.6/site-packages/ipaserver/rpcserver.py", line 206, in wsgi_execute [Wed Sep 15 14:05:48 2010] [error] result = self.Command[name](*args, **options) [Wed Sep 15 14:05:48 2010] [error] File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 401, in __call__ [Wed Sep 15 14:05:48 2010] [error] ret = self.run(*args, **options) [Wed Sep 15 14:05:48 2010] [error] File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 669, in run [Wed Sep 15 14:05:48 2010] [error] return self.execute(*args, **options) [Wed Sep 15 14:05:48 2010] [error] File "/usr/lib/python2.6/site-packages/ipalib/plugins/baseldap.py", line 441, in execute [Wed Sep 15 14:05:48 2010] [error] if type(entry_attrs[attr]) in (tuple,list): [Wed Sep 15 14:05:48 2010] [error] KeyError: 'fqdn' [Wed Sep 15 14:05:48 2010] [error] ipa: INFO: response: InternalError: an internal error has occurred [Wed Sep 15 14:05:48 2010] [error] ipa: INFO: Destroyed connection context.ldap2 ################################################################################ 2. ################################################################################ [Wed Sep 15 14:05:56 2010] [error] ipa: INFO: Created connection context.ldap2 [Wed Sep 15 14:05:56 2010] [error] ipa: DEBUG: raw: host_mod(u'nightcrawler.bos.redhat.com', addattr=(u'krbPrincipalName=host/NIGHTCRAWLER.bos.redhat.com.COM',), all=False, raw=False) [Wed Sep 15 14:05:56 2010] [error] ipa: INFO: host_mod(u'nightcrawler.bos.redhat.com', addattr=(u'krbPrincipalName=host/NIGHTCRAWLER.bos.redhat.com.COM',), all=False, raw=False) [Wed Sep 15 14:05:56 2010] [error] ipa: ERROR: non-public: KeyError: 'krbprincipalname' [Wed Sep 15 14:05:56 2010] [error] Traceback (most recent call last): [Wed Sep 15 14:05:56 2010] [error] File "/usr/lib/python2.6/site-packages/ipaserver/rpcserver.py", line 206, in wsgi_execute [Wed Sep 15 14:05:56 2010] [error] result = self.Command[name](*args, **options) [Wed Sep 15 14:05:56 2010] [error] File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 401, in __call__ [Wed Sep 15 14:05:56 2010] [error] ret = self.run(*args, **options) [Wed Sep 15 14:05:56 2010] [error] File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 669, in run [Wed Sep 15 14:05:56 2010] [error] return self.execute(*args, **options) [Wed Sep 15 14:05:56 2010] [error] File "/usr/lib/python2.6/site-packages/ipalib/plugins/baseldap.py", line 441, in execute [Wed Sep 15 14:05:56 2010] [error] if type(entry_attrs[attr]) in (tuple,list): [Wed Sep 15 14:05:56 2010] [error] KeyError: 'krbprincipalname' [Wed Sep 15 14:05:56 2010] [error] ipa: INFO: response: InternalError: an internal error has occurred [Wed Sep 15 14:05:56 2010] [error] ipa: INFO: Destroyed connection context.ldap2 ################################################################################ 3. ################################################################################ [Wed Sep 15 14:06:04 2010] [error] ipa: INFO: Created connection context.ldap2 [Wed Sep 15 14:06:04 2010] [error] ipa: DEBUG: raw: host_mod(u'nightcrawler.bos.redhat.com', addattr=(u'nsHostLocation=jupiter',), all=False, raw=False) [Wed Sep 15 14:06:04 2010] [error] ipa: INFO: host_mod(u'nightcrawler.bos.redhat.com', addattr=(u'nsHostLocation=jupiter',), all=False, raw=False) [Wed Sep 15 14:06:04 2010] [error] ipa: ERROR: non-public: KeyError: 'nshostlocation' [Wed Sep 15 14:06:04 2010] [error] Traceback (most recent call last): [Wed Sep 15 14:06:04 2010] [error] File "/usr/lib/python2.6/site-packages/ipaserver/rpcserver.py", line 206, in wsgi_execute [Wed Sep 15 14:06:04 2010] [error] result = self.Command[name](*args, **options) [Wed Sep 15 14:06:04 2010] [error] File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 401, in __call__ [Wed Sep 15 14:06:04 2010] [error] ret = self.run(*args, **options) [Wed Sep 15 14:06:04 2010] [error] File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 669, in run [Wed Sep 15 14:06:04 2010] [error] return self.execute(*args, **options) [Wed Sep 15 14:06:04 2010] [error] File "/usr/lib/python2.6/site-packages/ipalib/plugins/baseldap.py", line 441, in execute [Wed Sep 15 14:06:04 2010] [error] if type(entry_attrs[attr]) in (tuple,list): [Wed Sep 15 14:06:04 2010] [error] KeyError: 'nshostlocation' [Wed Sep 15 14:06:04 2010] [error] ipa: INFO: response: InternalError: an internal error has occurred [Wed Sep 15 14:06:04 2010] [error] ipa: INFO: Destroyed connection context.ldap2 ################################################################################ 4. ################################################################################ [Wed Sep 15 14:06:07 2010] [error] ipa: INFO: Created connection context.ldap2 [Wed Sep 15 14:06:07 2010] [error] ipa: DEBUG: raw: host_mod(u'nightcrawler.bos.redhat.com', addattr=(u'l=moonside',), all=False, raw=False) [Wed Sep 15 14:06:07 2010] [error] ipa: INFO: host_mod(u'nightcrawler.bos.redhat.com', addattr=(u'l=moonside',), all=False, raw=False) [Wed Sep 15 14:06:07 2010] [error] ipa: ERROR: non-public: KeyError: 'l' [Wed Sep 15 14:06:07 2010] [error] Traceback (most recent call last): [Wed Sep 15 14:06:07 2010] [error] File "/usr/lib/python2.6/site-packages/ipaserver/rpcserver.py", line 206, in wsgi_execute [Wed Sep 15 14:06:07 2010] [error] result = self.Command[name](*args, **options) [Wed Sep 15 14:06:07 2010] [error] File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 401, in __call__ [Wed Sep 15 14:06:07 2010] [error] ret = self.run(*args, **options) [Wed Sep 15 14:06:07 2010] [error] File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 669, in run [Wed Sep 15 14:06:07 2010] [error] return self.execute(*args, **options) [Wed Sep 15 14:06:07 2010] [error] File "/usr/lib/python2.6/site-packages/ipalib/plugins/baseldap.py", line 441, in execute [Wed Sep 15 14:06:07 2010] [error] if type(entry_attrs[attr]) in (tuple,list): [Wed Sep 15 14:06:07 2010] [error] KeyError: 'l' [Wed Sep 15 14:06:07 2010] [error] ipa: INFO: response: InternalError: an internal error has occurred [Wed Sep 15 14:06:07 2010] [error] ipa: INFO: Destroyed connection context.ldap2 ################################################################################ 5. ################################################################################ [Wed Sep 15 14:06:11 2010] [error] ipa: INFO: Created connection context.ldap2 [Wed Sep 15 14:06:11 2010] [error] ipa: DEBUG: raw: host_mod(u'nightcrawler.bos.redhat.com', addattr=(u'nsOsVersion=RHEL5',), all=False, raw=False) [Wed Sep 15 14:06:11 2010] [error] ipa: INFO: host_mod(u'nightcrawler.bos.redhat.com', addattr=(u'nsOsVersion=RHEL5',), all=False, raw=False) [Wed Sep 15 14:06:11 2010] [error] ipa: ERROR: non-public: KeyError: 'nsosversion' [Wed Sep 15 14:06:11 2010] [error] Traceback (most recent call last): [Wed Sep 15 14:06:11 2010] [error] File "/usr/lib/python2.6/site-packages/ipaserver/rpcserver.py", line 206, in wsgi_execute [Wed Sep 15 14:06:11 2010] [error] result = self.Command[name](*args, **options) [Wed Sep 15 14:06:11 2010] [error] File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 401, in __call__ [Wed Sep 15 14:06:11 2010] [error] ret = self.run(*args, **options) [Wed Sep 15 14:06:11 2010] [error] File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 669, in run [Wed Sep 15 14:06:11 2010] [error] return self.execute(*args, **options) [Wed Sep 15 14:06:11 2010] [error] File "/usr/lib/python2.6/site-packages/ipalib/plugins/baseldap.py", line 441, in execute [Wed Sep 15 14:06:11 2010] [error] if type(entry_attrs[attr]) in (tuple,list): [Wed Sep 15 14:06:11 2010] [error] KeyError: 'nsosversion' [Wed Sep 15 14:06:11 2010] [error] ipa: INFO: response: InternalError: an internal error has occurred [Wed Sep 15 14:06:11 2010] [error] ipa: INFO: Destroyed connection context.ldap2 ################################################################################ 6. ################################################################################ [Wed Sep 15 14:06:23 2010] [error] ipa: INFO: Created connection context.ldap2 [Wed Sep 15 14:06:23 2010] [error] ipa: DEBUG: raw: host_mod(u'nightcrawler.bos.redhat.com', addattr=(u'description=newer',), all=False, raw=False) [Wed Sep 15 14:06:23 2010] [error] ipa: INFO: host_mod(u'nightcrawler.bos.redhat.com', addattr=(u'description=newer',), all=False, raw=False) [Wed Sep 15 14:06:23 2010] [error] ipa: ERROR: non-public: KeyError: 'description' [Wed Sep 15 14:06:23 2010] [error] Traceback (most recent call last): [Wed Sep 15 14:06:23 2010] [error] File "/usr/lib/python2.6/site-packages/ipaserver/rpcserver.py", line 206, in wsgi_execute [Wed Sep 15 14:06:23 2010] [error] result = self.Command[name](*args, **options) [Wed Sep 15 14:06:23 2010] [error] File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 401, in __call__ [Wed Sep 15 14:06:23 2010] [error] ret = self.run(*args, **options) [Wed Sep 15 14:06:23 2010] [error] File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 669, in run [Wed Sep 15 14:06:23 2010] [error] return self.execute(*args, **options) [Wed Sep 15 14:06:23 2010] [error] File "/usr/lib/python2.6/site-packages/ipalib/plugins/baseldap.py", line 441, in execute [Wed Sep 15 14:06:23 2010] [error] if type(entry_attrs[attr]) in (tuple,list): [Wed Sep 15 14:06:23 2010] [error] KeyError: 'description' [Wed Sep 15 14:06:23 2010] [error] ipa: INFO: response: InternalError: an internal error has occurred [Wed Sep 15 14:06:23 2010] [error] ipa: INFO: Destroyed connection context.ldap2 ################################################################################
I can't reproduce this. Note that this isn't an LDAP error but a python one, complaining that the attribute we're trying to update isn't available. I can produce a similar error when trying to use set/addattr on a non-existent hostname. Can you still produce this error message and does the host nightcrawler.bos.redhat.com exist in IPA?
Hi Rob: current version installed ipa-server-1.91-0.2010092500git65b455e.fc12.i686 This looks good: [root@dhcp-100-3-186 ipa-group-cli]# ipa host-mod --setattr fqdn=mynewfqdn nightcrawler.bos.redhat.com ipa: ERROR: Operation not allowed on RDN: This looks good: [root@dhcp-100-3-186 ipa-group-cli]# ipa host-mod --setattr fqdn=mynewfqdn badhost.bos.redhat.com ipa: ERROR: badhost.bos.redhat.com: host not found This not so good ... [root@dhcp-100-3-186 ipa-group-cli]# ipa host-mod --addattr fqdn=mynewfqdn badhost.bos.redhat.com ipa: ERROR: an internal error has occurred This should error .... [root@dhcp-100-3-186 ipa-group-cli]# ipa host-mod --addattr fqdn=mynewfqdn nightcrawler.bos.redhat.com ------------------------------------------- Modified host "nightcrawler.bos.redhat.com" ------------------------------------------- Host name: nightcrawler.bos.redhat.com, mynewfqdn Principal name: host/nightcrawler.bos.redhat.com@TESTRELM
This is what I'm seeing as well. If you look in the Apache error log you'll see an error about attr_list for the last failure. I don't think a host can have more than on FQDN. This really should return the equivalent of 'Operation not allowed on RDN' though in a nicer way.
master: dff2ff830073c638582c3708cec422c47994f36a