Bug 987813

Summary: [RFE] report BOOTPROTO, BONDING_OPTS, GATEWAY, and IPADDR independent of netdevice.cfg
Product: [Retired] oVirt Reporter: Sandro Bonazzola <sbonazzo>
Component: vdsmAssignee: Ondřej Svoboda <osvoboda>
Status: CLOSED CURRENTRELEASE QA Contact: Michael Burman <mburman>
Severity: high Docs Contact:
Priority: medium    
Version: unspecifiedCC: bazulay, bugs, danken, dougsland, iheim, mburman, mgoldboi, myakove, osvoboda, rbalakri
Target Milestone: ---Keywords: FutureFeature
Target Release: 3.6.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: network
Fixed In Version: ovirt-3.5.0-beta2 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 1070613 (view as bug list) Environment:
Last Closed: 2015-11-04 13:45:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1070613, 1107803    
Attachments:
Description Flags
host-deploy logs
none
supervdsm logs from host
none
vdsm logs from host
none
engine log none

Description Sandro Bonazzola 2013-07-24 08:12:50 UTC
Description of problem:
Adding a newly installed host with Fedora 19 to the engine: failed to configure management network on host: 'ovirtmgmt'
The system has only 1 nic, em1, configured with boot=dhcp.

Version-Release number of selected component (if applicable):
Fedora 19, ovirt-engine 3.3 nightly - git0c5620a, adding to 3.3 cluster

It's different from bug #895080 because host-deploy exit with success.

I'll attach the host-deploy log.

Comment 1 Sandro Bonazzola 2013-07-24 08:14:10 UTC
Created attachment 777647 [details]
host-deploy logs

Comment 2 Sandro Bonazzola 2013-07-24 08:28:00 UTC
after some investigation I've seen that the failing seems due to missing ifcfg-em1 file in network-scripts directory.
The interface was up thanks to networkmanager but the file for the legacy network script was not there.

creating the ifcfg-em1 file allow to add the host without failures.

Comment 3 Sandro Bonazzola 2013-07-24 10:28:53 UTC
On the host there is vdsm-4.12.0-0.1.rc3.fc19.x86_64 from ovirt-beta repo

Comment 4 Sandro Bonazzola 2013-07-24 10:33:16 UTC
Created attachment 777714 [details]
supervdsm logs from host

Comment 5 Sandro Bonazzola 2013-07-24 10:33:54 UTC
Created attachment 777715 [details]
vdsm logs from host

Comment 6 Sandro Bonazzola 2013-07-24 10:34:36 UTC
Created attachment 777716 [details]
engine log

Comment 7 Moti Asayag 2013-07-24 12:54:49 UTC
Looking at the first getVdsCaps reveals that the cfg{} element is empty, while the engine uses to read the boot protocol information from it:

'nics': {'em1': {'netmask': '255.255.255.0', 'addr': '192.168.1.107', 'hwaddr': 'b8:ca:3a:76:9a:43', 'cfg': {}, 'ipv6addrs': ['fe80::baca:3aff:fe76:9a43/64'], 'speed': 1000, 'mtu': '1500'}},

Comment 8 Dan Kenigsberg 2013-07-26 08:34:09 UTC
Vdsm still requires ifcfg-based host configuration to function properly, and I do not see this changing for ovirt-3.3  :-(

Comment 9 Assaf Muller 2013-10-13 06:35:57 UTC
I'm confused - Why is this an RFE?

Isn't this a bug? Does anyone know why the ifcfg file wasn't created during the initial setupNetworks, as it should have?

Comment 10 Dan Kenigsberg 2013-11-19 13:08:15 UTC
Some flavors of Fedora installation make without the legacy ifcfg files. We've never claimed to support something like that, hence the "RFE".

We should make without the ifcfg, too, and report the values from the system (that's easier for BONDING_OPTS, a bit harder for BOOTPROTO).

Comment 12 Douglas Schilling Landgraf 2014-01-24 13:45:59 UTC
*** Bug 1057390 has been marked as a duplicate of this bug. ***

Comment 13 Itamar Heim 2014-02-13 21:26:59 UTC
is this still targeted for 3.4?

Comment 14 Dan Kenigsberg 2014-02-14 00:17:30 UTC
No, it's not done yet.

Comment 15 Antoni Segura Puimedon 2014-06-11 14:35:07 UTC
bootproto4 should be reported for all devices. Gateway should also be reported just like 'addr' and 'netmask' are.

Comment 16 Meni Yakove 2015-07-13 08:11:56 UTC
How should we verify it?

Comment 17 Michael Burman 2015-08-23 07:56:44 UTC
How this should be verified ?

Comment 18 Dan Kenigsberg 2015-08-23 14:21:30 UTC
(In reply to Michael Burman from comment #17)
> How this should be verified ?

Install Vdsm on a host with networking - but no ifcfg files, as suggested in comment 0, or even by removing ifcfg files and restarting vdsm.

Vdsm should keep reporting sane values in getVdsCaps, and Engine should be happy with the state of the host.

Comment 19 Michael Burman 2015-08-23 15:03:50 UTC
Dan, and what about reboots ? 
It should survive reboots? in such case..? because i'm getting this -->

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/vdsm/netinfo.py", line 461, in _getNetInfo
    data.update({'ports': ports(iface),
  File "/usr/lib/python2.7/site-packages/vdsm/netinfo.py", line 187, in ports
    return os.listdir('/sys/class/net/' + bridge + '/brif')
OSError: [Errno 2] No such file or directory: '/sys/class/net/net-3/brif'
restore-net::INFO::2015-08-23 17:52:04,002::netinfo::482::root::(_getNetInfo) Obtaining info for net net-2.
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/vdsm/netinfo.py", line 461, in _getNetInfo
    data.update({'ports': ports(iface),
  File "/usr/lib/python2.7/site-packages/vdsm/netinfo.py", line 187, in ports
    return os.listdir('/sys/class/net/' + bridge + '/brif')
OSError: [Errno 2] No such file or directory: '/sys/class/net/net-2/brif'
restore-net::INFO::2015-08-23 17:52:04,003::netinfo::482::root::(_getNetInfo) Obtaining info for net net-1.
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/vdsm/netinfo.py", line 461, in _getNetInfo
    data.update({'ports': ports(iface),
  File "/usr/lib/python2.7/site-packages/vdsm/netinfo.py", line 187, in ports
    return os.listdir('/sys/class/net/' + bridge + '/brif')
OSError: [Errno 2] No such file or directory: '/sys/class/net/net-1/brif'


Traceback (most recent call last):
  File "/usr/share/vdsm/network/api.py", line 890, in setupNetworks
    configurator=configurator)
  File "/usr/share/vdsm/network/api.py", line 397, in _delBrokenNetwork
    implicitBonding=False, _netinfo=_netinfo)
  File "/usr/share/vdsm/network/api.py", line 219, in wrapped
    ret = func(**attrs)
  File "/usr/share/vdsm/network/api.py", line 486, in _delNetwork
    net_ent_to_remove.remove()
  File "/usr/share/vdsm/network/models.py", line 188, in remove
    self.configurator.removeBridge(self)
  File "/usr/share/vdsm/network/configurators/ifcfg.py", line 182, in removeBridge
    bridge.port.remove()
  File "/usr/share/vdsm/network/models.py", line 100, in remove
    self.configurator.removeNic(self)
  File "/usr/share/vdsm/network/configurators/ifcfg.py", line 231, in removeNic
    self.configApplier.removeNic(nic.name)
  File "/usr/share/vdsm/network/configurators/ifcfg.py", line 644, in removeNic
    with open(cf) as nicFile:
IOError: [Errno 2] No such file or directory: u'/etc/sysconfig/network-scripts/ifcfg-ens1f1'


- All networks without ifcfg-* are missing after reboot..host is down in rhev-M..
Isn't the fix for restore networks much earlier resolve such cases?
I'm a bit confused here..

Comment 20 Dan Kenigsberg 2015-08-23 15:41:06 UTC
(In reply to Michael Burman from comment #19)
> Dan, and what about reboots ? 

Reboots are unrealated to this bug. If 3.6's vdsm does not recover ifcfg, it's a material for another bug. In comment 18 I was only attempting to recreate a similar scenario to that of comment 0.

Comment 21 Michael Burman 2015-08-24 07:59:13 UTC
Verified on -  3.6.0-0.12.master.el6 with vdsm-4.17.3-1.el7ev.noarch

Comment 22 Sandro Bonazzola 2015-11-04 13:45:10 UTC
oVirt 3.6.0 has been released on November 4th, 2015 and should fix this issue.
If problems still persist, please open a new BZ and reference this one.