Univention Bugzilla – Bug 30763
traceback by purge_s4_computer.py removing a slave in two sites
Last modified: 2013-11-19 06:42:05 CET
I tried to move of a DC Slave from one AD site to another just by changing the UCR setting of the site and rejoin the slave. In the AD tools the slave was in both sites (in the default site and in the new one), so I tried to remove the host using purge_s4_computer.py which results in the following traceback: root@dcm:~# /usr/share/univention-samba4/scripts/purge_s4_computer.py --computername=slave01 Really remove slave01 from Samba 4? [y/N]: y If you are really sure type YES and hit enter: YES Ok, continuing as requested. Removing location '0 100 88 slave01.s4sites.local.' from dns/srv_record _kerberos._tcp via UDM Removing location '0 100 88 slave01.s4sites.local.' from dns/srv_record _kerberos._udp via UDM Removing location '0 100 88 slave01.s4sites.local.' from dns/srv_record _kerberos._tcp.dc._msdcs via UDM Removing location '0 100 88 slave01.s4sites.local.' from dns/srv_record _kerberos._tcp.Default-First-Site-Name._sites via UDM Removing location '0 100 88 slave01.s4sites.local.' from dns/srv_record _kerberos._tcp.Default-First-Site-Name._sites.dc._msdcs via UDM Removing location '0 100 88 slave01.s4sites.local.' from dns/srv_record _kerberos._tcp.site01._sites via UDM Traceback (most recent call last): File "/usr/share/univention-samba4/scripts/purge_s4_computer.py", line 323, in <module> purge_computer_with_DC_objects(ucr, binddn, bindpw, opts.computername) File "/usr/share/univention-samba4/scripts/purge_s4_computer.py", line 237, in purge_computer_with_DC_objects purge_s4_dns_records(ucr, binddn, bindpw, computername, NTDS_objectGUID, Domain_GUID, site_list) File "/usr/share/univention-samba4/scripts/purge_s4_computer.py", line 131, in purge_s4_dns_records obj["location"] = filtered_location_list File "/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py", line 214, in __setitem__ raise univention.admin.uexceptions.valueRequired, _('The property %s is required') % self.descriptions[key].short_description univention.admin.uexceptions.valueRequired: The property Location is required
This also happens if you move a dc from one site to another and rejoin it afterwards.
I removed the master on a backup: root@backup152:~# /usr/share/univention-samba4/scripts/purge_s4_computer.py --computername=master151 Really remove master151 from Samba 4? [y/N]: y If you are really sure type YES and hit enter: YES Ok, continuing as requested. Removing dns/alias 'cad105b2-04df-4adc-9c7d-cc60fa61d0a0._msdcs' from Univention Directory Manager Removing location '0 100 88 master151.deadlock15.local.' from dns/srv_record _kerberos._tcp via UDM Removing location '0 100 88 master151.deadlock15.local.' from dns/srv_record _kerberos._udp via UDM Removing location '0 100 88 master151.deadlock15.local.' from dns/srv_record _kerberos._tcp.dc._msdcs via UDM Removing location '0 100 88 master151.deadlock15.local.' from dns/srv_record _kerberos._tcp.Default-First-Site-Name._sites via UDM Removing location '0 100 88 master151.deadlock15.local.' from dns/srv_record _kerberos._tcp.Default-First-Site-Name._sites.dc._msdcs via UDM Removing location '0 100 464 master151.deadlock15.local.' from dns/srv_record _kpasswd._tcp via UDM Removing location '0 100 464 master151.deadlock15.local.' from dns/srv_record _kpasswd._udp via UDM Removing location '0 100 389 master151.deadlock15.local.' from dns/srv_record _ldap._tcp via UDM Removing location '0 100 389 master151.deadlock15.local.' from dns/srv_record _ldap._tcp.dc._msdcs via UDM Removing location '0 100 389 master151.deadlock15.local.' from dns/srv_record _ldap._tcp.be3d3912-b3b3-4ed0-8a3a-c4fb051a2621.domains._msdcs via UDM Removing location '0 100 389 master151.deadlock15.local.' from dns/srv_record _ldap._tcp.pdc._msdcs via UDM Traceback (most recent call last): File "/usr/share/univention-samba4/scripts/purge_s4_computer.py", line 323, in <module> purge_computer_with_DC_objects(ucr, binddn, bindpw, opts.computername) File "/usr/share/univention-samba4/scripts/purge_s4_computer.py", line 237, in purge_computer_with_DC_objects purge_s4_dns_records(ucr, binddn, bindpw, computername, NTDS_objectGUID, Domain_GUID, site_list) File "/usr/share/univention-samba4/scripts/purge_s4_computer.py", line 131, in purge_s4_dns_records obj["location"] = filtered_location_list File "/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py", line 214, in __setitem__ raise univention.admin.uexceptions.valueRequired, _('The property %s is required') % self.descriptions[key].short_description univention.admin.uexceptions.valueRequired: The property Location is required root@backup152:~#
This seems to be caused by the same situation as reported in Bug 32592. I adjusted the code accordingly but this needs to be tested yet.
Changelog entry added.
I still get the following error: root@backup192:~# /usr/share/univention-samba4/scripts/purge_s4_computer.py --computername=master191 Really remove master191 from Samba 4? [y/N]: y If you are really sure type YES and hit enter: YES Ok, continuing as requested. Removing dns/alias 'ddeb51b4-4558-4bab-b792-aca7110b9b4a._msdcs' from Univention Directory Manager Removing location '0 100 88 master191.deadlock19.local.' from dns/srv_record _kerberos._tcp via UDM Removing location '0 100 88 master191.deadlock19.local.' from dns/srv_record _kerberos._udp via UDM Removing location '0 100 88 master191.deadlock19.local.' from dns/srv_record _kerberos._tcp.dc._msdcs via UDM Removing location '0 100 88 master191.deadlock19.local.' from dns/srv_record _kerberos._tcp.Default-First-Site-Name._sites via UDM Removing location '0 100 88 master191.deadlock19.local.' from dns/srv_record _kerberos._tcp.Default-First-Site-Name._sites.dc._msdcs via UDM Removing location '0 100 464 master191.deadlock19.local.' from dns/srv_record _kpasswd._tcp via UDM Removing location '0 100 464 master191.deadlock19.local.' from dns/srv_record _kpasswd._udp via UDM Removing location '0 100 389 master191.deadlock19.local.' from dns/srv_record _ldap._tcp via UDM Removing location '0 100 389 master191.deadlock19.local.' from dns/srv_record _ldap._tcp.dc._msdcs via UDM Removing location '0 100 389 master191.deadlock19.local.' from dns/srv_record _ldap._tcp.7e4be6c6-6b90-4aef-a198-e417c4cd244f.domains._msdcs via UDM Traceback (most recent call last): File "/usr/share/univention-samba4/scripts/purge_s4_computer.py", line 331, in <module> purge_computer_with_DC_objects(ucr, binddn, bindpw, opts.computername) File "/usr/share/univention-samba4/scripts/purge_s4_computer.py", line 245, in purge_computer_with_DC_objects purge_s4_dns_records(ucr, binddn, bindpw, computername, NTDS_objectGUID, Domain_GUID, site_list) File "/usr/share/univention-samba4/scripts/purge_s4_computer.py", line 139, in purge_s4_dns_records print "Removing dns/srv_record %s via UDM" % (target_location, srv_record_name) TypeError: not all arguments converted during string formatting root@backup192:~#
Fixed.
Package rebuilt with fixed python udm syntax.
backup2master test: OK site move test: OK changelog: OK code: OK
UCS 3.2 has been released: http://docs.univention.de/release-notes-3.2-en.html http://docs.univention.de/release-notes-3.2-de.html If this error occurs again, please use "Clone This Bug".