product_version is missing from software_version on xcp-xapi

Bug #1033933 reported by Mate Lakat
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Mate Lakat

Bug Description

Using devstack with on an XCP-XAPI enabled Precise, nova-compute fails to start. I am using xenapi.XenAPIDriver:

stack@DevStackOSDomU:~/nova$ cat /etc/nova/nova.conf | grep compute_driver
compute_driver=xenapi.XenAPIDriver

stack@DevStackOSDomU:~/nova$ cd /opt/stack/nova && sg libvirtd /opt/stack/nova/bin/nova-compute
...
2012-08-07 11:12:21 TRACE nova Traceback (most recent call last):
2012-08-07 11:12:21 TRACE nova File "/opt/stack/nova/bin/nova-compute", line 46, in <module>
2012-08-07 11:12:21 TRACE nova server = service.Service.create(binary='nova-compute')
2012-08-07 11:12:21 TRACE nova File "/opt/stack/nova/nova/service.py", line 492, in create
2012-08-07 11:12:21 TRACE nova periodic_fuzzy_delay=periodic_fuzzy_delay)
2012-08-07 11:12:21 TRACE nova File "/opt/stack/nova/nova/service.py", line 387, in __init__
2012-08-07 11:12:21 TRACE nova self.manager = manager_class(host=self.host, *args, **kwargs)
2012-08-07 11:12:21 TRACE nova File "/opt/stack/nova/nova/compute/manager.py", line 288, in __init__
2012-08-07 11:12:21 TRACE nova importutils.import_object_ns('nova.virt', compute_driver),
2012-08-07 11:12:21 TRACE nova File "/opt/stack/nova/nova/openstack/common/importutils.py", line 51, in import_object_ns
2012-08-07 11:12:21 TRACE nova return import_class(import_value)(*args, **kwargs)
2012-08-07 11:12:21 TRACE nova File "/opt/stack/nova/nova/virt/xenapi/driver.py", line 146, in __init__
2012-08-07 11:12:21 TRACE nova self._session = XenAPISession(url, username, password)
2012-08-07 11:12:21 TRACE nova File "/opt/stack/nova/nova/virt/xenapi/driver.py", line 595, in __init__
2012-08-07 11:12:21 TRACE nova self._get_product_version_and_brand()
2012-08-07 11:12:21 TRACE nova File "/opt/stack/nova/nova/virt/xenapi/driver.py", line 644, in _get_product_version_and_brand
2012-08-07 11:12:21 TRACE nova software_version['product_version'].split('.'))
2012-08-07 11:12:21 TRACE nova KeyError: 'product_version'
2012-08-07 11:12:21 TRACE nova

The problem is, that the software_version dictionary does not contain the product_version key.
Here is the dumped software_version reported by xcp-xapi:

{'build_number': '0',
 'date': '2012-08-03',
 'hostname': 'komainu',
 'linux': '3.2.0-27-generic',
 'network_backend': 'bridge',
 'platform_name': 'XCP_Kronos',
 'platform_version': '1.6.0',
 'xapi': '1.3',
 'xen': '4.1.2',
 'xencenter_max': '1.10',
 'xencenter_min': '1.10'}

A more generic solution would be to implement bug 1025216.

Mate Lakat (mate-lakat)
Changed in nova:
assignee: nobody → Mate Lakat (mate-lakat)
tags: added: xcp-xapi xenserver
Changed in nova:
status: New → In Progress
Mate Lakat (mate-lakat)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/11337

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/11337
Committed: http://github.com/openstack/nova/commit/ff17c6fd898403da58c30672fe0276be75f410e3
Submitter: Jenkins
Branch: master

commit ff17c6fd898403da58c30672fe0276be75f410e3
Author: Mate Lakat <email address hidden>
Date: Tue Aug 14 14:50:50 2012 +0100

    XCP-XAPI version fix

    Fixes bug 1033933.

    On an Kronos installation (Ubuntu + XCP-XAPI), the reported
    software_version dictionary did not contain both product_version and
    product_brand. This caused a KeyError. With this fix, the session's
    product_version and product_brand will default to None in such cases.
    The resize operation's name in these cases will default to VDI.resize.

    Change-Id: Ic0db4128a7b27c08c24461562423bcecd1373e58

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
importance: Undecided → Medium
Thierry Carrez (ttx)
Changed in nova:
milestone: none → folsom-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: folsom-rc1 → 2012.2
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.