Alon Bar-Lev has uploaded a new change for review.

Change subject: bootstrap: node id: consider bonding MAC addresses as well
......................................................................

bootstrap: node id: consider bonding MAC addresses as well

The node id is constructed using the lowest MAC address.

If bonding is applied after initial node id was taken, it may shade the
minimal address.

This change adds to the MAC addresses of bonding interfaces to the MAC
address addresses to consider.

Change-Id: I31ce43972fad77c716aff915d29d6589ba205280
Signed-off-by: Alon Bar-Lev <[email protected]>
---
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
1 file changed, 8 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/82/7582/1

diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
index 06fa80f..5fddb49 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
@@ -1400,7 +1400,14 @@
     @TypeConverterAttribute(String.class)
     @DefaultValueAttribute(
             "dmidecode | awk ' /UUID/{ print $2; } ' | tr '\n' '_' && " +
-            "cat /sys/class/net/*/address | sed -e '/00:00:00:00/d' -e '/^$/d' 
| " +
+            "(" +
+                "cat /sys/class/net/*/address;" +
+                "[ -d /proc/net/bonding ] && " +
+                    "find /proc/net/bonding -type f -exec cat '{}' \\; | " +
+                    "grep 'Permanent HW addr:' | " +
+                    "sed 's/.* //'" +
+            ") | " +
+            "sed -e '/00:00:00:00/d' -e '/^$/d' | " +
             "sort -u | head -n 1"
     )
     BootstrapNodeIDCommand(372),


--
To view, visit http://gerrit.ovirt.org/7582
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I31ce43972fad77c716aff915d29d6589ba205280
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to