Bug 28562 - Join should store all IP- and MAC-addresses - currently uses wrong MAC for DHCP
Join should store all IP- and MAC-addresses - currently uses wrong MAC for DHCP
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: Join (univention-join)
UCS 3.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS maintainers
:
: 10977 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-17 10:28 CEST by Tobias Scherer
Modified: 2017-08-08 07:08 CEST (History)
3 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?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): IPv6, Large environments, Usability
Max CVSS v3 score:
hahn: Patch_Available+


Attachments
Reister all MAC and IP addresses + cleanup (81.58 KB, patch)
2013-12-12 09:23 CET, Philipp Hahn
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Scherer univentionstaff 2012-09-17 10:28:08 CEST
aufgefallen an Ticket#2012090721000811

Ein DC Slave dessen Interfaces eth0, eth1 mittels Bonding zusammengefasst sind und dessen eth4 das primäre Interface mit der Domänen IP Adresse sein soll, schlugen während das Joinvorgang die Joinskripte univention-bind und univention-ldap-server fehl.

Im LDAP war daraufhin außerdem die MAC Adresse von eth0 mit der IP Adresse von eth4 hinterlegt.
Comment 1 Philipp Hahn univentionstaff 2012-09-18 08:36:54 CEST
Seit Bug #26058 (UCS-3.1) ist es möglich, auch ein anderes Interface als eth0 über die UCR-Variable "interface/primary" als Haupt-Interface festzulegen.
Das univention-join nur eth0 übermittelt ist bereits in Bug #16807 angesprochen und in Bug #10977 beanstandet.
Von daher eigentlich ein Duplikat von den 3 Bugs.
Comment 2 Philipp Hahn univentionstaff 2013-03-18 10:34:28 CET
*** Bug 10977 has been marked as a duplicate of this bug. ***
Comment 3 Philipp Hahn univentionstaff 2013-11-27 12:32:54 CET
univention-join uses the "default_address", but always uses the address of the first interface. This breaks DHCP, as the interface order may be random for each boot.

univention-join:494
> mac_addr="$(LC_ALL=C ip link show | sed -rne 's|.*link/ether ([0-9a-fA-F:]+) brd .*|\1|p' | head -n1)"
> if [ -n "$mac_addr" ]; then
> »···args+=(-mac "$mac_addr")
> fi

At a customer site that became a problem, as the first interface was not the interfaces used for DHCP and thus the wrong DHCP-Host-entry was created.

IMHO during join at least all MAC- and IP-addresses should be stored in LDAP (UMC supports this).
If DNS and DHCP entries should be created for them all is a different issue (IMHO: yes).
Comment 4 Philipp Hahn univentionstaff 2013-12-12 09:10:07 CET
Encountered once more at a customer: Only a random interface and the wrong IP was registered, overwriting the already correctly registered IP- and MAC-address in UDM. This each time broke the next run of a fully-automatic UCS-3.2 network installation.

(The problem is that through univention-join "udm computers/$role --set ip=... --set mac=..." is called, which updates the existing "dhcpZoneEntry" to match the new IP and MAC addresses). This is quiet unfortunately, as DHCP entries would only be created for new "managed-" and "mobile-clients", but they are no longer supported since UCS-3.0. So the current implementation destroys the setup explicitly entered by the admin from before the join.)

I have a patch to register all MAC and IP addresses...
Comment 5 Philipp Hahn univentionstaff 2013-12-12 09:23:42 CET
Created attachment 5694 [details]
Reister all MAC and IP addresses + cleanup

Tested only with a 3.2 member server for join and re-join.

Please re-check for correctness before applying:
* "Remove password from commandline": There might still be tools not handling --bindpwdfile...
* Refacture SSL CA copying": A DC-Slave now fails if "/etc/ldap-backup.secret" can not be copied.
* Handling for "Client and Mobile Client" in univention-join could be removed, as those roles are no longer supported since UCS-3.0. Also the code is now equal to that for "Memberserver".
Comment 6 Philipp Hahn univentionstaff 2013-12-13 16:29:33 CET
I noticed a problem with bonding: bonding changes the MAC-address of the slave interfaces, so if such a host is joined, not all "native" MAC-addresses are registered, but only those of the chosen primary.

Also notice that when testing with QEMU/kvm, the MAC-addresses are not reset when the VM reboots, but only when it's turned off and on again.
Comment 7 Stefan Gohmann univentionstaff 2017-06-16 20:40:26 CEST
This issue has been filed against UCS 3. UCS 3 is out of the normal maintenance and many UCS components have vastly changed in UCS 4.

If this issue is still valid, please change the version to a newer UCS version otherwise this issue will be automatically closed in the next weeks.
Comment 8 Florian Best univentionstaff 2017-06-28 14:52:35 CEST
There is a Customer ID set so I set the flag "Enterprise Customer affected".
Comment 9 Stefan Gohmann univentionstaff 2017-08-08 07:08:30 CEST
This issue has been filed against UCS 3.0.

UCS 3.0 is out of maintenance and many UCS components have vastly changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen this issue. In this case please provide detailed information on how this issue is affecting you.