nova-compute-xen fails to contact XCP

Bug #909373 reported by Thomas Goirand
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned

Bug Description

After I finished the packaging of XCP in Debian SID (you can try it, it's available right now), I'm now trying to have it to run with Openstack (current version in Experimental: 2012.1~e2+git508-gcff2ddc-2). Here's the trouble. I'm following this howto:

http://wiki.openstack.org/XenServerDevelopment

and when checking if Openstack can connect to XCP, here's what I get:

root@GPLHost:os>_ ~# nova-manage shell python
Python 2.7.2+ (default, Dec 17 2011, 16:58:10)
[GCC 4.6.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import XenAPI
>>> import nova.virt.xenapi_conn
>>> nova.virt.xenapi_conn.XenAPI = XenAPI
>>> x = nova.virt.xenapi_conn.XenAPIConnection("https://<hostname>", "root", "<password>")
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/nova/virt/xenapi_conn.py", line 174, in __init__
    self._product_version = self._session.get_product_version()
  File "/usr/lib/python2.7/dist-packages/nova/virt/xenapi_conn.py", line 473, in get_product_version
    return tuple(int(part) for part in product_version.split('.'))
  File "/usr/lib/python2.7/dist-packages/nova/virt/xenapi_conn.py", line 473, in <genexpr>
    return tuple(int(part) for part in product_version.split('.'))
ValueError: invalid literal for int() with base 10: ''

I know the authentication part already worked, since I get a different reply if I type a wrong root password.

Please let me know and CC me if possible (my email: <email address hidden>).

Cheers,

Thomas

Ken Pepple (ken-pepple)
Changed in nova:
status: New → Confirmed
Revision history for this message
Ken Pepple (ken-pepple) wrote :

Your XCP installation is not returning it's version in xx.xx.xx format that get_production_version wants.

While this is a problem with your version of XCP, it's also a problem with XenAPISession:get_product_version as it should be trapping the

      return tuple(int(part) for part in product_version.split('.'))

with if it doesn't split properly.

I would propose that if the product_version.split('.') doesn't work correctly, we should return a standard value or error. Looking at the codebase, it appears that the path of least interruption would be to set it to something like 0.0.0 , but I'm not familiar enough with XenAPI to make this call.

Comments or Suggestions ?

Revision history for this message
Thomas Goirand (thomas-goirand) wrote : Re: [Bug 909373] Re: nova-compute-xen fails to contact XCP

On 02/10/2012 01:23 PM, Ken Pepple wrote:
> Your XCP installation is not returning it's version in xx.xx.xx format
> that get_production_version wants.
>
> While this is a problem with your version of XCP, it's also a problem
> with XenAPISession:get_product_version as it should be trapping the
>
> return tuple(int(part) for part in product_version.split('.'))
>
> with if it doesn't split properly.
>
> I would propose that if the product_version.split('.') doesn't work
> correctly, we should return a standard value or error. Looking at the
> codebase, it appears that the path of least interruption would be to set
> it to something like 0.0.0 , but I'm not familiar enough with XenAPI to
> make this call.
>
> Comments or Suggestions ?

Hi,

I'm the Debian maintainer for XCP.

First of all, Ubuntu guys should upgrade to version 1.3-16, since it
corrects issues.

Then, in XCP, there's something to override the version. The way to do
it is:

echo 6.0.0 >/etc/xcp/xapi_version_override

then restart the xcp-xapi daemon. This is documented in the Debian
package for the package nova-xcp-plugin, shipped in Debian. The README
file is called debian/README.xcp_and_openstack in Debian, and I believe
this should also be documented in Ubuntu, because it's the kind of
obscure things that would take a long time to discover.

I believe this bug report should be closed, or retitled and set as
wishlist for more documentation.

BTW, I'm currently working on packaging the new version of XCP in
Debian, which will be needed to run XCP + Openstack (otherwise, both
network and console wont be working correctly).

Cheers,

Thomas Goirand (zigo)

Ken Pepple (ken-pepple)
Changed in nova:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.