Bug 30763 - traceback by purge_s4_computer.py removing a slave in two sites
traceback by purge_s4_computer.py removing a slave in two sites
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Samba4
UCS 3.1
Other Linux
: P5 normal (vote)
: UCS 3.2
Assigned To: Arvid Requate
Stefan Gohmann
: interim-3
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-12 22:16 CET by Ingo Steuwer
Modified: 2013-11-19 06:42 CET (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ingo Steuwer univentionstaff 2013-03-12 22:16:00 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
Comment 1 Tim Petersen univentionstaff 2013-04-16 10:00:06 CEST
This also happens if you move a dc from one site to another and rejoin it afterwards.
Comment 2 Stefan Gohmann univentionstaff 2013-09-06 07:23:57 CEST
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:~#
Comment 3 Arvid Requate univentionstaff 2013-09-16 18:33:35 CEST
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.
Comment 4 Arvid Requate univentionstaff 2013-10-14 19:55:27 CEST
Changelog entry added.
Comment 5 Stefan Gohmann univentionstaff 2013-10-25 13:59:33 CEST
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:~#
Comment 6 Arvid Requate univentionstaff 2013-10-28 17:19:39 CET
Fixed.
Comment 7 Arvid Requate univentionstaff 2013-10-30 18:25:01 CET
Package rebuilt with fixed python udm syntax.
Comment 8 Stefan Gohmann univentionstaff 2013-10-31 07:54:35 CET
backup2master test: OK

site move test: OK

changelog: OK

code: OK
Comment 9 Stefan Gohmann univentionstaff 2013-11-19 06:42:05 CET
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".