Bug 38729 - 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 FIXED
Product: UCS
Classification: Unclassified
Component: AD Takeover
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.0-2-errata
Assigned To: Drees Dormann
Felix Botner
:
: 32078 38979 (view as bug list)
Depends on:
Blocks: 39095
  Show dependency treegraph
 
Reported: 2015-06-19 10:18 CEST by Tim Petersen
Modified: 2017-04-20 16:49 CEST (History)
6 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 Tim Petersen univentionstaff 2015-06-19 10:18:20 CEST
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 Tim Petersen univentionstaff 2015-06-19 10:19:00 CEST
I ment eth[0,1,2,3] of course ;)
Comment 2 Drees Dormann univentionstaff 2015-08-04 11:05:31 CEST
AD takover should now use all kind of interfaces referenced in ucr to find the primary interface (including br*, wlan*, etc)
Comment 3 Drees Dormann univentionstaff 2015-08-04 11:06:30 CEST
*** Bug 38979 has been marked as a duplicate of this bug. ***
Comment 4 Arvid Requate univentionstaff 2015-08-04 20:49:13 CEST
Please also merge to UCS 4.1-0
Comment 5 Drees Dormann univentionstaff 2015-08-05 10:57:30 CEST
merged
Comment 6 Felix Botner univentionstaff 2015-08-06 15:10:48 CEST
OK - takeover with bonding interface

With eth5 and eth5.1 (vlan) i got a new virt interface eth5.1:1 
This seems not correct. We should somehow ignore virt and vlan interfaces here. 

Also, iInterface in

  elif ip_version == 6:
    if "interfaces/%s/ipv6/default/address" % iInterface in self.ucr:

is "referenced before assignment".

Please revert the patch, but leave the "new_interface = None" at the beginning to avoid the "new_interface: variable referenced before assignment" error during takeover.

With that, takeover with bonding interfaces succeeds but without the virt interface for the ip of the old ad. But this is better than an aborted takeover.
Comment 7 Felix Botner univentionstaff 2015-08-06 16:07:33 CEST
OK - YAML

OK - normal ad takeover (eth0)

FAIL - takeover with bonding => see Bug #39095
 
OK - reverted in 4.1-0
OK - reverted in 4.0-3
Comment 8 Janek Walkenhorst univentionstaff 2015-08-06 17:49:50 CEST
<http://errata.univention.de/ucs/4.0/279.html>
Comment 9 Arvid Requate univentionstaff 2017-04-20 16:49:33 CEST
*** Bug 32078 has been marked as a duplicate of this bug. ***