Bug 1040022 - vdsm-tool configurre errors when installing vdsm package
Summary: vdsm-tool configurre errors when installing vdsm package
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: vdsm
Version: 3.3
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 3.3.4
Assignee: Yaniv Bronhaim
QA Contact: yeylon@redhat.com
URL:
Whiteboard: infra
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-10 14:22 UTC by Nir Soffer
Modified: 2016-04-18 06:46 UTC (History)
7 users (show)

Fixed In Version: ovirt-3.3.4-ga
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-03-31 12:28:44 UTC
oVirt Team: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 23334 0 None None None Never

Description Nir Soffer 2013-12-10 14:22:54 UTC
Description of problem:

vdsm-tool configuartion errors when installing vdsm package.

[root@dhcp-3-151 RPMS]# yum install --enablerepo=ovirt-beta x86_64/* noarch/vdsm-xml* noarch/vdsm-cli* noarch/vdsm-python-zombiereaper*
Loaded plugins: product-id, rhnplugin, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
This system is receiving updates from RHN Classic or RHN Satellite.
Setting up Install Process
Examining x86_64/vdsm-4.13.2-9.gitd18c9bc.el6.x86_64.rpm: vdsm-4.13.2-9.gitd18c9bc.el6.x86_64
Marking x86_64/vdsm-4.13.2-9.gitd18c9bc.el6.x86_64.rpm to be installed
Examining x86_64/vdsm-python-4.13.2-9.gitd18c9bc.el6.x86_64.rpm: vdsm-python-4.13.2-9.gitd18c9bc.el6.x86_64
Marking x86_64/vdsm-python-4.13.2-9.gitd18c9bc.el6.x86_64.rpm as an update to vdsm-python-4.13.0-204.gitc6b053c.el6.x86_64
Examining x86_64/vdsm-python-cpopen-4.13.2-9.gitd18c9bc.el6.x86_64.rpm: vdsm-python-cpopen-4.13.2-9.gitd18c9bc.el6.x86_64
Marking x86_64/vdsm-python-cpopen-4.13.2-9.gitd18c9bc.el6.x86_64.rpm to be installed
Examining noarch/vdsm-xmlrpc-4.13.2-9.gitd18c9bc.el6.noarch.rpm: vdsm-xmlrpc-4.13.2-9.gitd18c9bc.el6.noarch
Marking noarch/vdsm-xmlrpc-4.13.2-9.gitd18c9bc.el6.noarch.rpm as an update to vdsm-xmlrpc-4.13.0-204.gitc6b053c.el6.noarch
Examining noarch/vdsm-cli-4.13.2-9.gitd18c9bc.el6.noarch.rpm: vdsm-cli-4.13.2-9.gitd18c9bc.el6.noarch
Marking noarch/vdsm-cli-4.13.2-9.gitd18c9bc.el6.noarch.rpm as an update to vdsm-cli-4.13.0-204.gitc6b053c.el6.noarch
No package noarch/vdsm-python-zombiereaper* available.
Resolving Dependencies
--> Running transaction check
---> Package vdsm.x86_64 0:4.13.2-9.gitd18c9bc.el6 will be installed
---> Package vdsm-cli.noarch 0:4.13.0-204.gitc6b053c.el6 will be updated
---> Package vdsm-cli.noarch 0:4.13.2-9.gitd18c9bc.el6 will be an update
---> Package vdsm-python.x86_64 0:4.13.0-204.gitc6b053c.el6 will be updated
---> Package vdsm-python.x86_64 0:4.13.2-9.gitd18c9bc.el6 will be an update
---> Package vdsm-python-cpopen.x86_64 0:4.13.2-9.gitd18c9bc.el6 will be installed
---> Package vdsm-xmlrpc.noarch 0:4.13.0-204.gitc6b053c.el6 will be updated
---> Package vdsm-xmlrpc.noarch 0:4.13.2-9.gitd18c9bc.el6 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================================================================================
 Package                                     Arch                            Version                                             Repository                                                                   Size
===================================================================================================================================================================================================================
Installing:
 vdsm                                        x86_64                          4.13.2-9.gitd18c9bc.el6                             /vdsm-4.13.2-9.gitd18c9bc.el6.x86_64                                        4.1 M
 vdsm-python-cpopen                          x86_64                          4.13.2-9.gitd18c9bc.el6                             /vdsm-python-cpopen-4.13.2-9.gitd18c9bc.el6.x86_64                           34 k
Updating:
 vdsm-cli                                    noarch                          4.13.2-9.gitd18c9bc.el6                             /vdsm-cli-4.13.2-9.gitd18c9bc.el6.noarch                                    362 k
 vdsm-python                                 x86_64                          4.13.2-9.gitd18c9bc.el6                             /vdsm-python-4.13.2-9.gitd18c9bc.el6.x86_64                                 441 k
 vdsm-xmlrpc                                 noarch                          4.13.2-9.gitd18c9bc.el6                             /vdsm-xmlrpc-4.13.2-9.gitd18c9bc.el6.noarch                                 123 k

Transaction Summary
===================================================================================================================================================================================================================
Install       2 Package(s)
Upgrade       3 Package(s)

Total size: 5.0 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : vdsm-python-4.13.2-9.gitd18c9bc.el6.x86_64                                                                                                                                                      1/8 
  Installing : vdsm-python-cpopen-4.13.2-9.gitd18c9bc.el6.x86_64                                                                                                                                               2/8 
  Updating   : vdsm-xmlrpc-4.13.2-9.gitd18c9bc.el6.noarch                                                                                                                                                      3/8 
  Installing : vdsm-4.13.2-9.gitd18c9bc.el6.x86_64                                                                                                                                                             4/8 
Traceback (most recent call last):
  File "/usr/bin/vdsm-tool", line 143, in <module>
    sys.exit(main())
  File "/usr/bin/vdsm-tool", line 125, in main
    load_modules()
  File "/usr/bin/vdsm-tool", line 74, in load_modules
    module = imp.load_module(mod_name, mod_fobj, mod_absp, mod_desc)
  File "/usr/lib64/python2.6/site-packages/vdsm/tool/configurator.py", line 25, in <module>
    from .. import utils
ValueError: Attempted relative import in non-package
Traceback (most recent call last):
  File "/usr/bin/vdsm-tool", line 143, in <module>
    sys.exit(main())
  File "/usr/bin/vdsm-tool", line 125, in main
    load_modules()
  File "/usr/bin/vdsm-tool", line 74, in load_modules
    module = imp.load_module(mod_name, mod_fobj, mod_absp, mod_desc)
  File "/usr/lib64/python2.6/site-packages/vdsm/tool/configurator.py", line 25, in <module>
    from .. import utils
ValueError: Attempted relative import in non-package
  Updating   : vdsm-cli-4.13.2-9.gitd18c9bc.el6.noarch                                                                                                                                                         5/8 
  Cleanup    : vdsm-cli-4.13.0-204.gitc6b053c.el6.noarch                                                                                                                                                       6/8 
  Cleanup    : vdsm-xmlrpc-4.13.0-204.gitc6b053c.el6.noarch                                                                                                                                                    7/8 
  Cleanup    : vdsm-python-4.13.0-204.gitc6b053c.el6.x86_64                                                                                                                                                    8/8 
  Verifying  : vdsm-4.13.2-9.gitd18c9bc.el6.x86_64                                                                                                                                                             1/8 
  Verifying  : vdsm-python-cpopen-4.13.2-9.gitd18c9bc.el6.x86_64                                                                                                                                               2/8 
  Verifying  : vdsm-cli-4.13.2-9.gitd18c9bc.el6.noarch                                                                                                                                                         3/8 
  Verifying  : vdsm-python-4.13.2-9.gitd18c9bc.el6.x86_64                                                                                                                                                      4/8 
  Verifying  : vdsm-xmlrpc-4.13.2-9.gitd18c9bc.el6.noarch                                                                                                                                                      5/8 
  Verifying  : vdsm-cli-4.13.0-204.gitc6b053c.el6.noarch                                                                                                                                                       6/8 
  Verifying  : vdsm-python-4.13.0-204.gitc6b053c.el6.x86_64                                                                                                                                                    7/8 
  Verifying  : vdsm-xmlrpc-4.13.0-204.gitc6b053c.el6.noarch                                                                                                                                                    8/8 

Installed:
  vdsm.x86_64 0:4.13.2-9.gitd18c9bc.el6                                                             vdsm-python-cpopen.x86_64 0:4.13.2-9.gitd18c9bc.el6                                                            

Updated:
  vdsm-cli.noarch 0:4.13.2-9.gitd18c9bc.el6                           vdsm-python.x86_64 0:4.13.2-9.gitd18c9bc.el6                           vdsm-xmlrpc.noarch 0:4.13.2-9.gitd18c9bc.el6                          

Complete!


How reproducible:
Tried once

Steps to Reproduce:
1. Install vdsm from master
2. Install vdsm from ovirt-3.3 branch

Actual results:

Installation succeeded with errors - not clear what is the machine state.

Expected results:

Installation should succeeds without errors. If error happened, installation should fail.

Comment 1 Nir Soffer 2013-12-10 14:32:51 UTC
After the installation error, vdsm will not start:

[root@dhcp-3-151 RPMS]# service vdsmd start
initctl: Job is already running: libvirtd
vdsm: Running run_init_hooks
vdsm: Running gencerts
vdsm: Running reconfigure_sanlock
vdsm: Running reconfigure_libvirt
libvirt is already configured for vdsm
vdsm: Running syslog_available
vdsm: Running nwfilter
libvir: XML-RPC error : authentication failed: authentication failed

(snipped repeated errors)

libvir: XML-RPC error : authentication failed: authentication failed
Traceback (most recent call last):
  File "/usr/bin/vdsm-tool", line 143, in <module>
    sys.exit(main())
  File "/usr/bin/vdsm-tool", line 140, in main
    return tool_command[cmd]["command"](*args[1:])
  File "/usr/lib64/python2.6/site-packages/vdsm/tool/nwfilter.py", line 35, in main
    conn = libvirtconnection.get(None, False)
  File "/usr/lib64/python2.6/site-packages/vdsm/libvirtconnection.py", line 132, in get
    conn = utils.retry(libvirtOpenAuth, timeout=10, sleep=0.2)
  File "/usr/lib64/python2.6/site-packages/vdsm/utils.py", line 903, in retry
    return func()
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 102, in openAuth
    if ret is None:raise libvirtError('virConnectOpenAuth() failed')
libvirt.libvirtError: authentication failed: authentication failed
vdsm: failed to execute nwfilter, error code 1
vdsm start                                                 [FAILED]

Tried to configure:

[root@dhcp-3-151 RPMS]# vdsm-tool libvirt-configure
libvirt is already configured for vdsm
[root@dhcp-3-151 RPMS]# vdsm-tool libvirt-configure-services-restart

Evevrything is seems to be ok - but vdsm will not start.

Comment 2 Nir Soffer 2013-12-10 14:36:12 UTC
And it will not start even after reboot.

Comment 3 Nir Soffer 2013-12-10 14:58:15 UTC
The machine needed some updates - I ran yum updated and 140M of updates later, vdsm still does not work.

Comment 4 Nir Soffer 2013-12-10 15:10:23 UTC
Libvirt version:

[root@dhcp-3-151 nsoffer]# rpm -qa | grep libvirt
libvirt-client-0.10.2-29.el6.1.x86_64
libvirt-lock-sanlock-0.10.2-29.el6.1.x86_64
libvirt-0.10.2-29.el6.1.x86_64
libvirt-python-0.10.2-29.el6.1.x86_64

Checking libvirt-guests

[root@dhcp-3-151 nsoffer]# service libvirt-guests status
stopped, with no saved guests
[root@dhcp-3-151 nsoffer]# echo $?
3

Looks like a duplicate of bug 1011981, but it should fixed long time ago.

Ovirt 3.3 branch was fine 2 weeks ago, must be some of the recent changes.

Comment 5 Nir Soffer 2013-12-10 16:42:13 UTC
Workaround:
1. remove non-working vdsm built from ovirt-3.3
2. reinstall ovirt-3.3.

Seems that vdsm upgrade does not work when previous version is from master, leaving the system in bad state.

Lowering severety because it affects only developers.

Comment 7 Yaniv Bronhaim 2014-01-14 14:01:07 UTC
This is a wrong flow that is not suppose to happened. 

You are running vdsm-4.13.0 which WAS the master (3.4 - newer than 3.3), and you are actually upgrade this version to 4.13.2 which is older (ovirt-3.3 version). 

In this scenario you are using the old(/newer) spec that uses "vdsm-tool configure" after the upgrade. Which is odd, because it should use the 4.13.2 spec and call the old "vdsm-tool libvirt-configure" if I understand specs currently .

Anyhow, when it calls to "vdsm-tool configure" which imports utils, it fails as vdsm-python was already updated and contains the new(/older) code.

I hope this clear enough, I verified that the normal upgrade (4.13.2 to 4.14) is working as expected. not sure this specific case is worth handling.
Although I'm still concern how this upgrade section works.. what spec version does it use during the upgrade? I'm trying to understand it and reply with the answers soon.

If to response to comment #1, its obvious that the configure didn't apply because vdsm tried to use the new configure verb.

Comment 8 Yaniv Bronhaim 2014-01-14 16:15:59 UTC
Apparently, during upgrade the scriptlet of the old spec preun section is running, and not of the new spec, although it uses the updated code..

This will be a BIG issue when the upgrade will be between 4.13.2 to 4.14.0, as the upgrade script needs to use the new vdsm-tool verbs and in 4.13.2 it uses the previous verbs. 

As far as I see, we will need to have deprecated vdsm-tool verbs in 4.14.0 to make this works. But I'll try to check more what alternatives we have.

Comment 9 Yaniv Bronhaim 2014-01-15 15:01:47 UTC
The fix related to 3.3.3 as this is the script that will run during the upgrade to 3.3.z or 3.4. (%postun sections runs the old spec script after upgrading the code).

On both version we have '/sbin/service vdsmd reconfigure' verb which calls the current version's vdsm-tool api to configure external modules.

Comment 10 Sandro Bonazzola 2014-03-31 12:28:44 UTC
This is an automated message. Moving to Closed CURRENTRELEASE since oVirt 3.3.4 has been released.


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