[node-patches] Change in ovirt-node[master]: Apply default disable on network details page

rbarry at redhat.com rbarry at redhat.com
Wed May 7 15:43:43 UTC 2014


Ryan Barry has uploaded a new change for review.

Change subject: Apply default disable on network details page
......................................................................

Apply default disable on network details page

We should check for the value being "none" in case of users
manually selection the "Disabled" checkbox as well as None in case
they never picked it at all. This way, we can avoid a situation
where users leave auto/dhcp enabled by failing to make a selection
for that field and saving the page.

Change-Id: I406f250e7cd2f3718d063826dcbe48cb1cbd57ef
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1094552
Signed-off-by: Ryan Barry <rbarry at redhat.com>
---
M dracut/ovirt-cleanup.sh
M src/ovirt/node/setup/core/network_page.py
2 files changed, 8 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/80/27480/1

diff --git a/dracut/ovirt-cleanup.sh b/dracut/ovirt-cleanup.sh
index 29b700e..63da811 100755
--- a/dracut/ovirt-cleanup.sh
+++ b/dracut/ovirt-cleanup.sh
@@ -150,6 +150,7 @@
         sed -i "s/locking_type =.*/locking_type = 0/" /etc/lvm/lvm.conf
     fi
     sdevs=$(lvm vgs -o pv_name,tags | grep storage_domain | while read line; do echo $line | awk '{print $1}'; done)
+    dev_uuid=$(lvm pvs -o pv_uuid --noheading ${device})
 
     IFS=$oldIFS
     for i in $(lvm pvs --noheadings -o pv_name,vg_name --separator=, $device 2>/dev/null); do
@@ -172,6 +173,11 @@
                     exit 1
                     fi
                 done
+                ipv_uuid = $(lvm pvs -o pv_uuid --noheading ${ipv})
+                if [ $dev_uuid = $ipv_uuid ]; then
+                    # Multipath device showing up multiple times
+                    imach = 1
+                fi
                 if [ $imach -eq 0 ]; then
                     fatal "LV '$ipv' is a member of VG '$vg' and must be included in \$storage_init"
                     fatal "Not all member PVs of '$vg' are given in the storage_init parameter, exiting"
diff --git a/src/ovirt/node/setup/core/network_page.py b/src/ovirt/node/setup/core/network_page.py
index 9bb11d0..bdbec11 100644
--- a/src/ovirt/node/setup/core/network_page.py
+++ b/src/ovirt/node/setup/core/network_page.py
@@ -404,7 +404,7 @@
         model = defaults.Network()
         ipv6model = defaults.IPv6()
 
-        if bootproto == "none":
+        if bootproto == "none" or bootproto is None:
             self.logger.debug("Configuring no networking")
             model.configure_no_networking(iface)
         elif bootproto == "dhcp":
@@ -419,7 +419,7 @@
         # A hack to also set the BOOTIF when IPv6 is used in a second
         enable_bootif = lambda: model.update(iface=iface, vlanid=vlanid)
 
-        if ipv6_bootproto == "none":
+        if ipv6_bootproto == "none" or ipv6_bootproto is None:
             self.logger.debug("Configuring no ipv6 networking")
             ipv6model.disable()
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I406f250e7cd2f3718d063826dcbe48cb1cbd57ef
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>



More information about the node-patches mailing list