Bug 879148 - vdsm 6.4: Register rhev-h to RHEV-M si 3.1 failed
vdsm 6.4: Register rhev-h to RHEV-M si 3.1 failed
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: vdsm (Show other bugs)
6.4
Unspecified Unspecified
urgent Severity urgent
: rc
: ---
Assigned To: Douglas Schilling Landgraf
Pavel Stehlik
infra
: Regression, TestBlocker
Depends On: 886644 894228
Blocks: 864352 915537
  Show dependency treegraph
 
Reported: 2012-11-22 03:19 EST by haiyang,dong
Modified: 2013-02-25 21:43 EST (History)
25 users (show)

See Also:
Fixed In Version: vdsm-4.10.2-1.1.el6
Doc Type: Bug Fix
Doc Text:
Previously, the vdsm package was blocking the libsemanage-python package from being included which resulted in an error when you tried to install the hypervisor on the manager. Red Hat Enterprise Virtualization Hypervisor installation to the Red Hat Enterprise Virtualization Manager failed when vdsm was involved. During boot-up, the vdsm-tool reported the error "Import Error: No module named semanage." A fix unblocks libsemanage-python package and the semanage module is now imported correctly with no error at boot time. This permits normal installation of Red Hat Enterprise Virtualization Hypervisor on Red Hat Enterprise Virtualization Manager.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-25 14:07:02 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
attached the vdsm-reg.log (260.54 KB, text/x-log)
2012-11-22 03:19 EST, haiyang,dong
no flags Details
20121212.1auto1332vdsm-reg.log (40.46 KB, text/plain)
2012-12-24 01:18 EST, shaochen
no flags Details
vdsm-reg.log (260.50 KB, text/plain)
2013-01-09 20:52 EST, Mike Burns
no flags Details

  None (edit)
Description haiyang,dong 2012-11-22 03:19:56 EST
Created attachment 649570 [details]
attached the vdsm-reg.log

Description of problem:
After Installed rhev-h,then configure network and 
register to rhevm, Although rhev-h shown that register into rhevm success,but in fact didn't register.The nic still named "breth0", not "rhevm", also can not display rhevh host in rhevm web admin portal.

At the same time, add rhev-h on rhevm side also failed.


Version-Release number of selected component (if applicable):
rhev-hypervisor6-6.4-20121120.0.el6
rhevm-3.1.0-31.el6ev

How reproducible:
100%

Steps to Reproduce:
1. Install rhev-hypervisor6-6.4-20121120.0.el6
2. Configure network for rhev-h
3. Register to rhevm.


Actual results:
After step3. Register to  rhevm failed.

Expected results:
Register to rhevm successfully and after approved rhev-h on rhevm side,rhev-h shows up in rhevm side.


Additional info:
no this issue on version rhev-hypervisor6-6.4-20121031.0.el6, so it's a regression bug.
Comment 4 haiyang,dong 2012-11-23 03:10:35 EST
Append vdsm version:
vdsm-4.10.2-1.0.el6
Comment 7 Douglas Schilling Landgraf 2012-12-11 15:43:30 EST
Reproduced the report.
Comment 9 Douglas Schilling Landgraf 2012-12-12 13:21:06 EST
Hi,

Just to clarify:

rhev-hypervisor6-6.4-20121031.0.el6 uses vdsm-4.9.6-39.0.el6_3 
rhev-hypervisor6-6.4-20121120.0.el6 or higher uses vdsm-4.10.2-1

The change between these two releases that affect the registration is the one that replace ifconfig function with python-ethtool calls [1]. However, looks like a problem with python-ethtool library version 0.6-2, below more info.

# cat /etc/redhat-release 
Red Hat Enterprise Virtualization Hypervisor release 6.4 (20121206.0)

# ifconfig 
breth0    Link encap:Ethernet  HWaddr 52:54:00:9C:72:7C  
          inet addr:192.168.122.156  Bcast:192.168.122.255  Mask:255.255.255.0
          inet6 addr: fe80::5054:ff:fe9c:727c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1460 errors:0 dropped:0 overruns:0 frame:0
          TX packets:332 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:107844 (105.3 KiB)  TX bytes:43120 (42.1 KiB)
<snip>

== Demo ==
import ethtool
devs = ethtool.get_interfaces_info('breth0')

for d in devs:
        print "*** Device: %s:" % d.device
        print "MAC Addr: %s" % d.mac_address
        print "IPv4: %s/%s Brd: %s" % (d.ipv4_address, d.ipv4_netmask, d.ipv4_broadcast)

# python pethtool.py 
*** Device: breth0:
MAC Addr: 52:54:00:9C:72:7C
IPv4: None/0 Brd: None   <---------------- None ?

IPv4 is None, affecting the registration since we collect such info from the same call in netinfo.py.

Here the stack
--------------
#1 vdsm_reg/vdsm-reg-setup will try to collect self.ovirtURL
================================
def __init__(self, ticket=""):
<snip> 
    self.ovirtURL = deployUtil.getMGTIP(self.vdsmDir, self.vdcName)
</snip>

#2 vdsm_reg/deployUtil.py let's get the IPv4 address
================================
def getMGTIP(vdsmDir, vdcHostName):
<snip>
    if strIface is not None:
        strReturn = netinfo.getaddr(strIface) <------- 
</snip>

#3 vdsm/netinfo.py return None as IPv4 address
========================
def getaddr(dev):
    dev_info_list = ethtool.get_interfaces_info(dev.encode('utf8'))
    addr = dev_info_list[0].ipv4_address  <-----------
    if addr is None:
        addr = ''
    return addr

#4 vdsm_reg/vdsm-reg-setup will return False since there is no ipv4 address
==============================
def validateData(self):
    if self.ovirtURL == None or self.ovirtURL == "" or self.ovirtURL == "None" \
self.ovirtName  == None or self.ovirtName == "" or self.ovirtName == "None":
            fReturn = False
        return fReturn


To resolve the issue
=========================
Since the last python-ethtool available package for el6 is 0.6-2 I have downgrade[2] it in the node.
# mount -o remount,rw /
# rpm -Uvh --oldpackage python-ethtool-0.6-1.el6.x86_64.rpm

Now the IPv4 appears:
# python pethtool.py 
*** Device: breth0:
MAC Addr: 52:54:00:9C:72:7C
IPv4: 192.168.122.156/24 Brd: 192.168.122.255

After the downgrade, I could register RHEV-H node against RHEV-M.

[1]
commit 44ef2cecb541d3bdab6a36bfc45f1bf3b6fdd690
Date:   Fri Apr 6 17:23:38 2012 +0800

    replace ifconfig cmdline with ethtool and sysfs in netinfo

[2] https://brewweb.devel.redhat.com/buildinfo?buildID=158631
Comment 10 Douglas Schilling Landgraf 2012-12-14 10:58:11 EST
Patch available for review:
https://gerrit.eng.lab.tlv.redhat.com/#/c/3747/
Comment 11 shaochen 2012-12-24 01:13:34 EST
Test version:
rhev-hypervisor6-6.4-20121212.1.auto1332.el6.
vdsm-4.10.2-2.0.el6.x86_64
rhevm-3.1.0-34.el6ev

Register RHEV-H to RHEVM si build still failed.

After register to RHEV-M:
In RHEV-H side, the bridge name show as "ovirtmgmt".
In RHEV-M side: Host localhost.localdomain does not comply with the cluster cshao networks, the following networks are missing on host: 'rhevm'


libvir: Network Config error : Network not found: no network with matching name 'vdsm-ovirtmgmt'
Comment 12 shaochen 2012-12-24 01:18:25 EST
Created attachment 668329 [details]
20121212.1auto1332vdsm-reg.log

rhevh-6.4-20121212.1.auto1332.el6-vdsm-reg.log
Comment 15 Mike Burns 2013-01-09 20:52:28 EST
Created attachment 675978 [details]
vdsm-reg.log

vdsm-4.10.2-1.1.el6
python-ethtool-0.6-3.el6

This includes the patch from this bug, but registration now doesn't even create ovirtmgmt bridge, it fails completely. 

vdsm-reg attached.
Comment 20 haiyang,dong 2013-01-15 02:43:24 EST
Test version:
rhev-hypervisor6-6.4-20130114.0.el6
vdsm-4.10.2-1.1.el6
python-ethtool-0.6-3.el6

registration doesn't even create ovirtmgmt bridge, so Register RHEV-H to RHEVM si build still failed.

Attachment error info for vdsm-reg.log here:

Traceback (most recent call last):
  File "/usr/lib64/python2.6/runpy.py", line 122, in _run_module_as_main
  File "/usr/lib64/python2.6/runpy.py", line 34, in _run_code
  File "/usr/share/vdsm/configNetwork.py", line 1462, in <module>
  File "/usr/share/vdsm/configNetwork.py", line 1437, in main
  File "/usr/share/vdsm/configNetwork.py", line 1045, in delNetwork
  File "/usr/lib64/python2.6/site-packages/vdsm/netinfo.py", line 410, in __init__
  File "/usr/lib64/python2.6/site-packages/vdsm/netinfo.py", line 290, in get
  File "/usr/lib64/python2.6/site-packages/vdsm/netinfo.py", line 90, in networks
  File "/usr/lib64/python2.6/site-packages/vdsm/libvirtconnection.py", line 116, in get
  File "/usr/lib64/python2.6/site-packages/vdsm/utils.py", line 934, in retry
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 102, in openAuth
libvirt.libvirtError: Cannot write data: Broken pipe

ret=255
MainThread::DEBUG::2013-01-15 07:41:21,057::deployUtil::1054::root::makeBridge return.
MainThread::ERROR::2013-01-15 07:41:21,057::vdsm-reg-setup::86::root::renameBridge Failed to rename existing bridge!
MainThread::DEBUG::2013-01-15 07:41:21,057::vdsm-reg-setup::110::root::renameBridge return.
MainThread::DEBUG::2013-01-15 07:41:21,057::vdsm-reg-setup::187::root::execute: after renameBridge: False
MainThread::DEBUG::2013-01-15 07:41:21,058::vdsm-reg-setup::206::root::Registration status: False
Comment 24 haiyang,dong 2013-01-18 05:05:24 EST
Test version:
rhev-hypervisor6-6.4-20130116.3.0.el6
vdsm-4.10.2-1.1.el6
python-ethtool-0.6-3.el6
rhevm-3.1.0-41.el6ev

1. Register rhev-h to RHEV-M si 3.1  pass
2. Add rhev-h on rhevm si 3.1 side also pass.

So change the status into "VERIFIED".
Comment 26 errata-xmlrpc 2013-02-25 14:07:02 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0555.html

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