Bug 987813 - [RFE] report BOOTPROTO, BONDING_OPTS, GATEWAY, and IPADDR independent of netdevice.cfg
[RFE] report BOOTPROTO, BONDING_OPTS, GATEWAY, and IPADDR independent of netd...
Status: CLOSED CURRENTRELEASE
Product: oVirt
Classification: Community
Component: vdsm (Show other bugs)
unspecified
x86_64 Linux
medium Severity high
: ---
: 3.6.0
Assigned To: Ondřej Svoboda
Michael Burman
network
: FutureFeature
: 1057390 (view as bug list)
Depends On:
Blocks: VDSM_use_NetworkManager 1070613
  Show dependency treegraph
 
Reported: 2013-07-24 04:12 EDT by Sandro Bonazzola
Modified: 2016-02-10 14:37 EST (History)
10 users (show)

See Also:
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 08:45:10 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Network
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
host-deploy logs (232.67 KB, text/x-log)
2013-07-24 04:14 EDT, Sandro Bonazzola
no flags Details
supervdsm logs from host (33.82 KB, application/x-gzip)
2013-07-24 06:33 EDT, Sandro Bonazzola
no flags Details
vdsm logs from host (177.15 KB, application/x-gzip)
2013-07-24 06:33 EDT, Sandro Bonazzola
no flags Details
engine log (48.26 KB, application/x-gzip)
2013-07-24 06:34 EDT, Sandro Bonazzola
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 23098 None None None Never
oVirt gerrit 24456 master MERGED netinfo: Report current system values for bonding options Never
oVirt gerrit 25170 None MERGED netinfo: bootproto4 is now 'dhcp'/'none' instead of a boolean Never
oVirt gerrit 28592 master MERGED netinfo: Add 'bootproto4' to all devices Never
oVirt gerrit 28845 master MERGED netinfo: Report bonding options as a dictionary of strings Never

  None (edit)
Description Sandro Bonazzola 2013-07-24 04:12:50 EDT
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 04:14:10 EDT
Created attachment 777647 [details]
host-deploy logs
Comment 2 Sandro Bonazzola 2013-07-24 04:28:00 EDT
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 06:28:53 EDT
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 06:33:16 EDT
Created attachment 777714 [details]
supervdsm logs from host
Comment 5 Sandro Bonazzola 2013-07-24 06:33:54 EDT
Created attachment 777715 [details]
vdsm logs from host
Comment 6 Sandro Bonazzola 2013-07-24 06:34:36 EDT
Created attachment 777716 [details]
engine log
Comment 7 Moti Asayag 2013-07-24 08:54:49 EDT
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 04:34:09 EDT
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 02:35:57 EDT
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 08:08:15 EST
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 08:45:59 EST
*** Bug 1057390 has been marked as a duplicate of this bug. ***
Comment 13 Itamar Heim 2014-02-13 16:26:59 EST
is this still targeted for 3.4?
Comment 14 Dan Kenigsberg 2014-02-13 19:17:30 EST
No, it's not done yet.
Comment 15 Antoni Segura Puimedon 2014-06-11 10:35:07 EDT
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 04:11:56 EDT
How should we verify it?
Comment 17 Michael Burman 2015-08-23 03:56:44 EDT
How this should be verified ?
Comment 18 Dan Kenigsberg 2015-08-23 10:21:30 EDT
(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 11:03:50 EDT
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 11:41:06 EDT
(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 03:59:13 EDT
Verified on -  3.6.0-0.12.master.el6 with vdsm-4.17.3-1.el7ev.noarch
Comment 22 Sandro Bonazzola 2015-11-04 08:45:10 EST
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.

Note You need to log in before you can comment on or make changes to this bug.