Change in vdsm[master]: api: make _should_keep_bridge robust against missing running...

osvoboda at redhat.com osvoboda at redhat.com
Fri Feb 27 17:48:56 UTC 2015


Ondřej Svoboda has posted comments on this change.

Change subject: api: make _should_keep_bridge robust against missing running/persistent cfg
......................................................................


Patch Set 1: Verified+1

>From the GUI I was now able to apply the desired configuration (ovirtmgmt bridge on eth0) without an "Unexpected exception" that I somehow caused by wiping unified persistence for the network.



 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:15,831::supervdsmServer::104::SuperVdsm.ServerCallback::(wrapper) call setupNetworks with ({'ovirtmgmt': {'nic': 'eth0', 'custom': {'ipv6gateway': '4321:1234:1234:1234:1234:1234:1234:4321/64', 'ipv6addr': '4321:1234:1234:1234:1234:1234:1234:1234/64', 'ipv6autoconf': '0'}, 'bootproto': 'dhcp', 'STP': 'no', 'bridged': 'true', 'mtu': '1500', 'defaultRoute': True}}, {}, {'connectivityCheck': 'true', 'connectivityTimeout': 120}) {}
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:15,831::api::818::setupNetworks::(setupNetworks) Setting up network according to configuration: networks:{'ovirtmgmt': {'nic': 'eth0', 'custom': {'ipv6gateway': '4321:1234:1234:1234:1234:1234:1234:4321/64', 'ipv6addr': '4321:1234:1234:1234:1234:1234:1234:1234/64', 'ipv6autoconf': '0'}, 'bootproto': 'dhcp', 'STP': 'no', 'bridged': 'true', 'mtu': '1500', 'defaultRoute': True}}, bondings:{}, options:{'connectivityCheck': 'true', 'connectivityTimeout': 120}
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:15,832::api::822::root::(setupNetworks) Validating configuration
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:15,837::utils::623::root::(execCmd) /usr/libexec/vdsm/hooks/before_network_setup/50_ipv6 (cwd None)
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:15,899::utils::643::root::(execCmd) SUCCESS: <err> = ''; <rc> = 0
 MainProcess|Thread-13::INFO::2015-02-27 18:36:15,900::hooks::100::root::(_runHooksDir) 
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:15,906::libvirtconnection::162::root::(get) trying to connect libvirt
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:15,964::netinfo::426::root::(_dhcp_used) There is no VDSM network configured on ovirtmgmt.
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:15,964::netinfo::426::root::(_dhcp_used) There is no VDSM network configured on ovirtmgmt.
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:15,964::netinfo::648::root::(_get_gateway) The gateway 10.34.63.254 is duplicated for the device ovirtmgmt
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:15,971::netinfo::648::root::(_get_gateway) The gateway 10.34.63.254 is duplicated for the device ovirtmgmt
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:15,971::api::832::setupNetworks::(setupNetworks) Applying...
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:15,972::api::837::setupNetworks::(setupNetworks) Removing network u'ovirtmgmt'
 MainProcess|Thread-13::INFO::2015-02-27 18:36:15,972::api::474::root::(_delNetwork) Removing network ovirtmgmt with vlan=None, bonding=None, nics=['eth0'],keep_bridge=True options={}
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:15,972::utils::623::root::(execCmd) /sbin/ip link set dev eth0 nomaster (cwd None)
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:15,975::utils::643::root::(execCmd) FAILED: <err> = 'Error: either "dev" is duplicate, or "nomaster" is a garbage.\n'; <rc> = 255
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:15,976::utils::623::root::(execCmd) /usr/sbin/brctl delif ovirtmgmt eth0 (cwd None)
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,001::utils::643::root::(execCmd) SUCCESS: <err> = ''; <rc> = 0
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,003::ifcfg::329::root::(_atomicNetworkBackup) Backed up ovirtmgmt
 MainProcess|Thread-13::INFO::2015-02-27 18:36:16,008::api::505::root::(_delNetwork) Removing network entity eth0
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,010::utils::623::root::(execCmd) /sbin/ifdown eth0 (cwd None)
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,326::utils::643::root::(execCmd) SUCCESS: <err> = "device eth0 is not a slave of ovirtmgmt\nbridge ovirtmgmt is still up; can't delete it\n"; <rc> = 0
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,326::ifcfg::380::root::(_atomicBackup) Backed up /etc/sysconfig/network-scripts/ifcfg-eth0
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,328::utils::623::root::(execCmd) /sbin/ifup eth0 (cwd None)
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,491::utils::643::root::(execCmd) SUCCESS: <err> = ''; <rc> = 0
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,492::utils::623::root::(execCmd) /sbin/tc filter del dev eth0 pref 5000 (cwd None)
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,495::utils::643::root::(execCmd) FAILED: <err> = 'RTNETLINK answers: Operation not supported\nWe have an error talking to the kernel\n'; <rc> = 2
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,495::utils::623::root::(execCmd) /sbin/tc qdisc show dev eth0 (cwd None)
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,498::utils::643::root::(execCmd) SUCCESS: <err> = ''; <rc> = 0
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,498::utils::623::root::(execCmd) /sbin/tc class del dev eth0 classid 0:1388 (cwd None)
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,501::utils::643::root::(execCmd) FAILED: <err> = 'RTNETLINK answers: No such file or directory\n'; <rc> = 2
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,501::utils::623::root::(execCmd) /sbin/tc class show dev eth0 parent 0: (cwd None)
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,504::utils::643::root::(execCmd) SUCCESS: <err> = ''; <rc> = 0
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,504::utils::623::root::(execCmd) /sbin/tc qdisc del dev eth0 root (cwd None)
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,507::utils::643::root::(execCmd) FAILED: <err> = 'RTNETLINK answers: No such file or directory\n'; <rc> = 2
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,507::utils::623::root::(execCmd) /sbin/tc qdisc del dev eth0 ingress (cwd None)
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,510::utils::643::root::(execCmd) FAILED: <err> = 'RTNETLINK answers: Invalid argument\n'; <rc> = 2
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,510::netconfpersistence::58::root::(removeNetwork) Network ovirtmgmt not found for removal
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,518::netinfo::648::root::(_get_gateway) The gateway 10.34.63.254 is duplicated for the device ovirtmgmt
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,525::netinfo::648::root::(_get_gateway) The gateway 10.34.63.254 is duplicated for the device ovirtmgmt
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,532::netinfo::648::root::(_get_gateway) The gateway 10.34.63.254 is duplicated for the device ovirtmgmt
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,532::api::694::setupNetworks::(_add_missing_networks) Adding network u'ovirtmgmt'
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,532::api::284::root::(_addNetwork) validating network...
 MainProcess|Thread-13::INFO::2015-02-27 18:36:16,533::api::304::root::(_addNetwork) Adding network ovirtmgmt with vlan=None, bonding=None, nics=[u'eth0'], bondingOptions=None, mtu=1500, bridged=True, defaultRoute=True,options={u'bootproto': u'dhcp', u'STP': u'no', 'implicitBonding': True, u'custom': {u'ipv6gateway': u'4321:1234:1234:1234:1234:1234:1234:4321/64', u'ipv6addr': u'4321:1234:1234:1234:1234:1234:1234:1234/64', u'ipv6autoconf': u'0'}}
 MainProcess|Thread-13::INFO::2015-02-27 18:36:16,533::api::321::root::(_addNetwork) Bridge ovirtmgmt already exists.
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,533::ifcfg::380::root::(_atomicBackup) Backed up /etc/sysconfig/network-scripts/ifcfg-ovirtmgmt
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,533::ifcfg::461::root::(_persistentBackup) backing up ifcfg-ovirtmgmt: DEVICE=ovirtmgmt
 ONBOOT=yes
 TYPE=Bridge
 DELAY=0
 STP=off
 BOOTPROTO=dhcp
 DEFROUTE=yes
 NM_CONTROLLED=no
 HOTPLUG=no
 MTU=1500
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,534::ifcfg::318::root::(writeBackupFile) Persistently backed up /var/lib/vdsm/netconfback/ifcfg-ovirtmgmt (until next 'set safe config')
 MainProcess|Thread-13::INFO::2015-02-27 18:36:16,534::api::334::root::(_addNetwork) Configuring device eth0
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,542::netinfo::648::root::(_get_gateway) The gateway 10.34.63.254 is duplicated for the device ovirtmgmt
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,543::ifcfg::548::root::(writeConfFile) Writing to file /etc/sysconfig/network-scripts/ifcfg-eth0 configuration:
 # Generated by VDSM version 4.17.0-469.git91807e0.el6
 DEVICE=eth0
 HWADDR=80:c1:6e:6b:be:f8
 BRIDGE=ovirtmgmt
 ONBOOT=yes
 MTU=1500
 NM_CONTROLLED=no
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,698::utils::623::root::(execCmd) /sbin/ifdown eth0 (cwd None)
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,979::utils::643::root::(execCmd) SUCCESS: <err> = "device eth0 is not a slave of ovirtmgmt\nbridge ovirtmgmt is still up; can't delete it\n"; <rc> = 0
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:16,979::utils::623::root::(execCmd) /sbin/ifup eth0 (cwd None)
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:17,098::utils::643::root::(execCmd) SUCCESS: <err> = ''; <rc> = 0
 MainProcess|Thread-13::INFO::2015-02-27 18:36:17,190::netconfpersistence::51::root::(setNetwork) Adding network ovirtmgmt({u'ipv6autoconf': u'0', 'nic': u'eth0', u'mtu': u'1500', u'bootproto': u'dhcp', u'STP': u'no', u'bridged': u'true', u'ipv6addr': u'4321:1234:1234:1234:1234:1234:1234:1234/64', u'custom': {u'ipv6gateway': u'4321:1234:1234:1234:1234:1234:1234:4321/64', u'ipv6addr': u'4321:1234:1234:1234:1234:1234:1234:1234/64', u'ipv6autoconf': u'0'}, u'ipv6gateway': u'4321:1234:1234:1234:1234:1234:1234:4321/64', u'defaultRoute': True})
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:17,197::netinfo::648::root::(_get_gateway) The gateway 10.34.63.254 is duplicated for the device ovirtmgmt
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:17,197::api::712::setupNetworks::(_check_connectivity) Checking connectivity...
 MainProcess|Thread-13::INFO::2015-02-27 18:36:18,198::netconfpersistence::172::root::(_clearDisk) Clearing /var/run/vdsm/netconf/nets/ and /var/run/vdsm/netconf/bonds/
 MainProcess|Thread-13::INFO::2015-02-27 18:36:18,199::netconfpersistence::120::root::(save) Saved new config RunningConfig({u'ovirtmgmt': {u'ipv6autoconf': u'0', 'nic': u'eth0', u'mtu': u'1500', u'bootproto': u'dhcp', u'STP': u'no', u'bridged': u'true', u'ipv6addr': u'4321:1234:1234:1234:1234:1234:1234:1234/64', u'custom': {u'ipv6gateway': u'4321:1234:1234:1234:1234:1234:1234:4321/64', u'ipv6addr': u'4321:1234:1234:1234:1234:1234:1234:1234/64', u'ipv6autoconf': u'0'}, u'ipv6gateway': u'4321:1234:1234:1234:1234:1234:1234:4321/64', u'defaultRoute': True}}, {}) to /var/run/vdsm/netconf/nets/ and /var/run/vdsm/netconf/bonds/
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:18,200::utils::623::root::(execCmd) /usr/libexec/vdsm/hooks/after_network_setup/30_ethtool_options (cwd None)
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:18,354::utils::643::root::(execCmd) SUCCESS: <err> = ''; <rc> = 0
 MainProcess|Thread-13::INFO::2015-02-27 18:36:18,354::hooks::100::root::(_runHooksDir) 
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:18,355::supervdsmServer::111::SuperVdsm.ServerCallback::(wrapper) return setupNetworks with None
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:20,247::supervdsmServer::104::SuperVdsm.ServerCallback::(wrapper) call setSafeNetworkConfig with () {}
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:20,247::utils::623::root::(execCmd) /usr/share/vdsm/vdsm-store-net-config unified (cwd None)
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:20,262::utils::643::root::(execCmd) SUCCESS: <err> = ''; <rc> = 0
 MainProcess|Thread-13::DEBUG::2015-02-27 18:36:20,262::supervdsmServer::111::SuperVdsm.ServerCallback::(wrapper) return setSafeNetworkConfig with None

-- 
To view, visit https://gerrit.ovirt.org/38239
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I13a225f406e6140463e1ded2008de8444fc4e9e0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda <osvoboda at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Ondřej Svoboda <osvoboda at redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: No


More information about the vdsm-patches mailing list