Bug 39095 - AD Takeover only works with primary interfaces eth[0,1,2,3]
AD Takeover only works with primary interfaces eth[0,1,2,3]
Status: CLOSED WORKSFORME
Product: UCS
Classification: Unclassified
Component: AD Takeover
UCS 4.2
Other Linux
: P5 normal (vote)
: ---
Assigned To: Felix Botner
Fathan Vidjaja
:
Depends on: 38729
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-06 15:43 CEST by Felix Botner
Modified: 2023-03-25 06:47 CET (History)
8 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.171
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2018030221000418, 2017112921000801, 2016091921003332, 2017021021000988, 2017072721000591
Bug group (optional): External feedback
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Botner univentionstaff 2015-08-06 15:43:41 CEST
+++ This bug was initially created as a clone of Bug #38729 +++

2015061821000399

If the DC master doesn't use eth[1,2,3,4] as primary interface, the AD takepover won't work because of the usage of an unreferenced variable new_interface.

See /usr/share/pyshared/univention/management/console/modules/adtakeover/takeover.py:

l1585ff. def create_virtual_IP_alias()

If you have a brief look you can see, that this only works with eth[1,2,3,4] - at the customer system, a bonding configuraiton with br0 was used - the takeover failed with:
"new_interface: variable referenced before assignment"


Since UCS 4.0 br0 is default when using bridged scenarios (for example each UVMM host). More not so important side effects:
- wlan?
- ipv6


We should improve the whole function.
Comment 1 Felix Botner univentionstaff 2015-08-06 16:05:55 CEST
takeover with bonding interface bond1 (not ethx)

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/adtakeover/__init__.py", line 60, in _background
    result = func(self, request)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/adtakeover/__init__.py", line 119, in take_over_domain
    takeover.take_over_domain(self.progress)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/adtakeover/takeover.py", line 346, in take_over_domain
    takeover_final.create_reverse_DNS_records()
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/adtakeover/takeover.py", line 1661, in create_reverse_DNS_records
    p = subprocess.Popen(["univention-ipcalc6", "--ip", self.ad_server_ip, "--netmask", self.ucr["interfaces/%s/netmask" % self.primary_interface], "--output", "pointer", "--calcdns"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
AttributeError: AD_Takeover_Finalize instance has no attribute 'primary_interface'

=> initialize  primary_interface = None 
=> add if self.primary_interface before "p = subprocess.Popen(["un ..."
Comment 2 Florian Best univentionstaff 2016-03-21 06:10:37 CET
This has also been reported via traceback feedback, 4.1-1 errata136 (Vahr).

Remark:
Nach WIndows-Domain übernahme

Die Ausführung des Kommandos 'take_over_domain' ist fehlgeschlagen:

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/modules/adtakeover/__init__.py", line 60, in _background
    result = func(self, request)
  File "%PY2.7%/univention/management/console/modules/adtakeover/__init__.py", line 119, in take_over_domain
    takeover.take_over_domain(self.progress)
  File "%PY2.7%/univention/management/console/modules/adtakeover/takeover.py", line 349, in take_over_domain
    takeover_final.create_reverse_DNS_records()
  File "%PY2.7%/univention/management/console/modules/adtakeover/takeover.py", line 1664, in create_reverse_DNS_records
    p = subprocess.Popen(["univention-ipcalc6", "--ip", self.ad_server_ip, "--netmask", self.ucr["interfaces/%s/netmask" % self.primary_interface], "--output", "pointer", "--calcdns"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
AttributeError: AD_Takeover_Finalize instance has no attribute 'primary_interface'
Comment 3 Florian Best univentionstaff 2016-09-20 12:32:26 CEST
Reported again, 4.1-3 errata268 (Vahr)
Comment 4 Florian Best univentionstaff 2017-02-23 11:31:15 CET
Reported again, 4.1-4 errata389 (Vahr)
Comment 5 Florian Best univentionstaff 2017-08-04 16:21:54 CEST
Reported again, 4.2-1 errata118 (Lesum)
Comment 6 Johannes Keiser univentionstaff 2017-12-11 16:27:59 CET
Reported again: Version: 4.2-3 errata231 (Lesum)

Remark: Simply AD takeover after a fresh install
Comment 7 Johannes Keiser univentionstaff 2018-03-16 13:34:06 CET
Reported again: Version: 4.3-0 errata0 (Neustadt)

Remark: Pre UCS 4.3 Tests
Comment 8 Stefan Gohmann univentionstaff 2018-03-16 13:40:15 CET
(In reply to Johannes Keiser from comment #7)
> Reported again: Version: 4.3-0 errata0 (Neustadt)
> 
> Remark: Pre UCS 4.3 Tests

This should now be fixed though Bug #46105.
Comment 9 Fathan Vidjaja univentionstaff 2018-03-22 11:03:51 CET
Bugfix confirmed. AD Takeover worked in manual test with new network interface not named eth[1,2,3,4]. Joining a client on the old Windows AD IP was also tested and was succesful.