[Freeipa-devel] [PATCH 0119] Fix dnsrecord-mod, regression in 4.x

Martin Basti mbasti at redhat.com
Thu Sep 4 14:13:22 UTC 2014


Regression is caused by different output types for dnsrecord-mod and 
dnsrecord-del.
dnsrecord-mod internally calls remove record, if there is no more 
records in owner name, which cause output validation error.


[root at vm-035 git]# ipa dnsrecord-mod ipa.example ds --ns-rec=
ipa: ERROR: an internal error has occurred

ipa: ERROR: non-public: TypeError: dnsrecord_mod.validate_output() => 
PrimaryKey.validate():
   output['value']: need <class 'ipapython.dnsutil.DNSName'>; got <type 
'list'>: [<DNS name ds>]
Traceback (most recent call last):
   File "/usr/lib/python2.7/site-packages/ipaserver/rpcserver.py", line 
348, in wsgi_execute
     result = self.Command[name](*args, **options)
   File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 451, 
in __call__
     self.validate_output(ret, options['version'])
   File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 944, 
in validate_output
     o.validate(self, value, version)
   File "/usr/lib/python2.7/site-packages/ipalib/output.py", line 126, 
in validate
     types[0], type(value), value))
TypeError: dnsrecord_mod.validate_output() => PrimaryKey.validate():
   output['value']: need <class 'ipapython.dnsutil.DNSName'>; got <type 
'list'>: [<DNS name ds>]
ipa: INFO: [jsonserver_session] admin at IPA.EXAMPLE: dnsrecord_mod(<DNS 
name ipa.example.>, <DNS name ds>, nsrecord=None, rights=False, 
structured=False, all=False, raw=False, version=u'2.102'): TypeError


Patch attached.

-- 
Martin Basti

-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-mbasti-0119-Fix-dnsrecord-mod-raise-error-if-last-record-attr-is.patch
Type: text/x-patch
Size: 2232 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20140904/2c29d85b/attachment.bin>


More information about the Freeipa-devel mailing list