nova compute crashes if you do not have any hosts in your cluster

Bug #1197041 reported by Tracy Jones
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Gary Kotton
Havana
Fix Released
Medium
Gary Kotton

Bug Description

I forgot to add a host to my cluster and brought up nova-compute. I get the following crash on startup. A controlled exit with a proper warning message would have saved me some time

\\File "/opt/stack/nova/nova/virt/vmwareapi/host.py", line 156, in __init__
   self.update_status()
 File "/opt/stack/nova/nova/virt/vmwareapi/host.py", line 169, in update_status
   host_mor = vm_util.get_host_ref(self._session, self._cluster)
 File "/opt/stack/nova/nova/virt/vmwareapi/vm_util.py", line 663, in get_host_ref
   if not host_ret.ManagedObjectReference:
AttributeError: 'Text' object has no attribute 'ManagedObjectReference'
Removing descriptor: 6

Tags: vmware
Tracy Jones (tjones-i)
Changed in nova:
assignee: nobody → Tracy Jones (tjones-i)
tags: added: vmware
Revision history for this message
Sabari Murugesan (smurugesan) wrote :

Fix for bug https://bugs.launchpad.net/nova/+bug/1190515

will fix this issue.

Review can be found at

https://review.openstack.org/#/c/33100

Michael Still (mikal)
Changed in nova:
status: New → Triaged
importance: Undecided → Low
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/43621

Changed in nova:
assignee: Tracy Jones (tjones-i) → Gary Kotton (garyk)
status: Triaged → In Progress
Gary Kotton (garyk)
Changed in nova:
importance: Low → High
milestone: none → havana-rc1
Changed in nova:
importance: High → Medium
tags: added: havana-rc-potential
Changed in nova:
milestone: havana-rc1 → none
Gary Kotton (garyk)
tags: added: grizzly-backport-potential
Gary Kotton (garyk)
Changed in nova:
milestone: none → havana-rc1
Changed in nova:
milestone: havana-rc1 → none
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/43621
Committed: http://github.com/openstack/nova/commit/89e18d8c64b11630d2f21563c95b01452057a897
Submitter: Jenkins
Branch: master

commit 89e18d8c64b11630d2f21563c95b01452057a897
Author: Gary Kotton <email address hidden>
Date: Sun Aug 25 04:55:40 2013 -0700

    VMware: Handle cases when there are no hosts in cluster

    When there are no hosts defined in a cluster the host value will be an empty
    string. For example:

        obj_context: (RetrieveResult){
           objects[] =
              (ObjectContent){
                 obj =
                    (obj){
                       value = "domain-c185"
                       _type = "ClusterComputeResource"
                    }
                 propSet[] =
                    (DynamicProperty){
                       name = "host"
                       val = ""
                    },
              },
         }

    This causes an data access exception.

    The code will now raise an NoValidHost exception.

    Fixes bug: 1197041

    Change-Id: I75b1f069e0b27eebd63c280e36533354c04e246a

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
tags: added: havana-backport-potential
removed: havana-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/55505

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

Reviewed: https://review.openstack.org/55505
Committed: http://github.com/openstack/nova/commit/cf1fb26def9d1e7c0cde79927333bbda36619bf8
Submitter: Jenkins
Branch: stable/havana

commit cf1fb26def9d1e7c0cde79927333bbda36619bf8
Author: Gary Kotton <email address hidden>
Date: Sun Aug 25 04:55:40 2013 -0700

    VMware: Handle cases when there are no hosts in cluster

    When there are no hosts defined in a cluster the host value will be an empty
    string. For example:

        obj_context: (RetrieveResult){
           objects[] =
              (ObjectContent){
                 obj =
                    (obj){
                       value = "domain-c185"
                       _type = "ClusterComputeResource"
                    }
                 propSet[] =
                    (DynamicProperty){
                       name = "host"
                       val = ""
                    },
              },
         }

    This causes an data access exception.

    The code will now raise an NoValidHost exception.

    Fixes bug: 1197041

    Change-Id: I75b1f069e0b27eebd63c280e36533354c04e246a
    (cherry picked from commit 89e18d8c64b11630d2f21563c95b01452057a897)

tags: added: in-stable-havana
Changed in nova:
milestone: none → icehouse-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Alan Pevec (apevec)
tags: removed: havana-backport-potential in-stable-havana
Alan Pevec (apevec)
tags: removed: grizzly-backport-potential
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-1 → 2014.1
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.