[node-patches] Change in ovirt-node[master]: network: Create non-default rules file for NICs

fabiand at fedoraproject.org fabiand at fedoraproject.org
Thu Oct 4 10:45:58 UTC 2012


Fabian Deutsch has uploaded a new change for review.

Change subject: network: Create non-default rules file for NICs
......................................................................

network: Create non-default rules file for NICs

Previously all NIC related udev rules were kept in the default
70-persistent-net.rules file. Because of a race between ovirt-early and
udev, this file was changed on each boot.
The initial rules file is now copied into a new file to keep the initial
NIC names and prevent a race.

rhbz#773495

Change-Id: I5fb9787275a85bd1c3052a50debc0c6397345f32
Signed-off-by: Fabian Deutsch <fabiand at redhat.com>
---
M scripts/ovirtnode/network.py
1 file changed, 15 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/52/8352/1

diff --git a/scripts/ovirtnode/network.py b/scripts/ovirtnode/network.py
index e503c27..b6bd7ac 100644
--- a/scripts/ovirtnode/network.py
+++ b/scripts/ovirtnode/network.py
@@ -366,8 +366,21 @@
                                "/files/etc/sysconfig/network/NETWORKING", "yes")
         _functions.ovirt_store_config("/etc/sysconfig/network")
         _functions.ovirt_store_config("/etc/hosts")
-        _functions.ovirt_store_config("/etc/udev/rules.d/" + \
-                                      "70-persistent-net.rules")
+
+        # Copy the initial net rules to a file that get's not
+        # overwritten at each boot, rhbz#773495
+        system_closefds("cp /etc/udev/rules.d/70-persistent-net.rules" +
+                        " /etc/udev/rules.d/71-persistent-node-net.rules" +
+                        " >> /var/log/ovirt.log");
+        _functions.ovirt_store_config("/etc/udev/rules.d/" +
+                                      "71-persistent-node-net.rules")
+
+	# Eventully it makes sense to rename the NICs
+        #system_closefds("sed -ic 's/NAME=\"eth/NAME=\"eth00/' " +
+        #                 "/etc/udev/rules.d/71-persistent-node-net.rules")
+
+
+
         logger.info("Network configured successfully")
         if net_configured == 1:
             logger.info("Stopping Network services")


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5fb9787275a85bd1c3052a50debc0c6397345f32
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>



More information about the node-patches mailing list