Description of problem: VDSM rewrites ovirtmgmt file during the boot with configuration that doesn't match the one previously set using "vdsClient 0 setupNetworks". Version-Release number of selected component (if applicable): Name : vdsm Version : 4.17.0 Release : 1240.git487a19e.fc22 How reproducible: 100% Steps to Reproduce: 1. (stop ovirt engine if it is running) on the host: 2. delete '# Generated by VDSM version ...' header from /etc/sysconfig/network-scripts/ifcfg-ovirtmgmt if present 3. $ sudo vdsClient -s 0 setupNetworks 'networks={ovirtmgmt:{nic:eth0,bootproto:dhcp,blockingdhcp:true,bridged:true,stp:false,defaultRoute:false}}' 4. $ sudo reboot after the reboot: Actual results: ovirtmgmt doesn't have ip address BOOTPROTO statement is missing from /etc/sysconfig/network-scripts/ifcfg-ovirtmgmt /etc/sysconfig/network-scripts/ifcfg-ovirtmgmt contains '# Generated by VDSM version' header 'vdsClient 0 getVdsCapabilities' reports intended configuration: bridges = {'ovirtmgmt': {'addr': '', 'cfg': {'BOOTPROTO': 'dhcp', Expected results: /etc/sysconfig/network-scripts/ifcfg-ovirtmgmt contains statement 'BOOTPROTO=dhcp' and ovirtmgmt interface has ip address Additional info: * if 'BOOTPROTO=dhcp' is manually added into ifcfg-ovirtmgmt, it is removed during machine restart Environment: Host runs in virt-manager vm Fedora 22
Created attachment 1061576 [details] vdsm.log
Created attachment 1061577 [details] vds capabilities after restart
Created attachment 1061579 [details] ifcfg-ovirtmgmt after restart
vdsm restores the last network configuration and marked as 'safe' by the user. This is done via a call to setSafeNetworkConfig. the results are stored under /var/lib/vdsm/persistence/netconf/ . So, after you have restarted, vdsm probably went back to it's prior network definition. If this configuration was incorrect somehow, you would not get an ip. Btw, if there is not bootproto parameter in the setupNetwork API call, here would not be one in the ifcfg file. * would you attach supervdsm.log ? * can you add the contents of /var/lib/vdsm/persistence/netconf/ ?
Created attachment 1069654 [details] logs.zip vdsm.log and supervdsm.log of following procedure: 1. system reboot 2. newly booted system with bad network configuration, new configuration set: DEVICE=ovirtmgmt TYPE=Bridge DELAY=0 STP=off ONBOOT=yes BOOTPROTO=dhcp MTU=1500 DEFROUTE=yes NM_CONTROLLED=no IPV6INIT=no 3. system rebooted again, it again started with bad configuration
Created attachment 1069655 [details] netconf.zip original content of /var/lib/vdsm/persistence/netconf/ and content of this directory after I set network properly and called 'vdsClient 0 setSafeNetworkConfig'.
(In reply to jniederm from comment #6) > Created attachment 1069655 [details] > netconf.zip > > original content of /var/lib/vdsm/persistence/netconf/ and content of this > directory after I set network properly and called 'vdsClient 0 > setSafeNetworkConfig'. as you can see, the original (persisted) rhevm network (under netconf/nets) doesn't have a bootproto: { "nic": "eth0", "STP": "no", "bridged": "true", "mtu": "1500" } This is also visible in supervdsm.log: restore-net::INFO::2015-09-03 04:00:55,353::netconfpersistence::60::root::(setNetwork) Adding network ovirtmgmt({u'nic': u'eth0', u'STP': u'no', u'bridged': u'true', u'mtu': u'1500'}) This line is writtten doing the loading of the persistence from the disk.
I edited file /var/lib/vdsm/persistence/netconf/nets/ovirtmgmt according documentation of vdsm/network/api.py:setupNetworks in order to look like this: { "nic": "eth0", "STP": "no", "bridged": "true", "mtu": "1500", "bootproto": "dhcp", "defaultRoute": "true" } and now my system boots with proper network configuration. Thank you for guidance.