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

Jan Cholasta jcholast at redhat.com
Thu Sep 4 15:12:52 UTC 2014


Dne 4.9.2014 v 16:45 Martin Basti napsal(a):
> On 04/09/14 16:36, Jan Cholasta wrote:
>> Hi,
>>
>> Dne 4.9.2014 v 16:13 Martin Basti napsal(a):
>>> 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.
>>
>> NACK, the assert needs to be inside the if, otherwise old clients will
>> fail on it.
>>
>> Honza
>>
> Thanks
>
> Updated patch attached
>
>

Thanks, ACK.

-- 
Jan Cholasta




More information about the Freeipa-devel mailing list