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

Martin Basti mbasti at redhat.com
Thu Sep 4 14:45:01 UTC 2014


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


-- 
Martin Basti

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


More information about the Freeipa-devel mailing list