VMware driver: Nova boot fails when there is a datacenter with no datastore associated with it.

Bug #1302482 reported by Chinmaya Bharadwaj
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Chinmaya Bharadwaj
Havana
Fix Released
Low
Gary Kotton
Icehouse
Fix Released
Low
Gary Kotton

Bug Description

when there is a Datacenter in the vCenter with no datastore associated with it, nova boot fails even though there are data-centers configured properly.

The log error trace

Error from last host: devstack (node domain-c162(Demo-1)): [u'Traceback (most recent call last):\n', u' File "/opt/stack/nova/nova/compute/manager.py", line 1322, in _build_instance\n set_access_ip=set_access_ip)\n', u' File "/opt/stack/nova/nova/compute/manager.py", line 399, in decorated_function\n return function(self, context, *args, **kwargs)\n', u' File "/opt/stack/nova/nova/compute/manager.py", line 1734, in _spawn\n LOG.exception(_(\'Instance failed to spawn\'), instance=instance)\n', u' File "/opt/stack/nova/nova/openstack/common/excutils.py", line 68, in __exit__\n six.reraise(self.type_, self.value, self.tb)\n', u' File "/opt/stack/nova/nova/compute/manager.py", line 1731, in _spawn\n block_device_info)\n', u' File "/opt/stack/nova/nova/virt/vmwareapi/driver.py", line 619, in spawn\n admin_password, network_info, block_device_info)\n', u' File "/opt/stack/nova/nova/virt/vmwareapi/vmops.py", line 211, in spawn\n dc_info = self.get_datacenter_ref_and_name(data_store_ref)\n', u' File "/opt/stack/nova/nova/virt/vmwareapi/vmops.py", line 1715, in get_datacenter_ref_and_name\n self._update_datacenter_cache_from_objects(dcs)\n', u' File "/opt/stack/nova/nova/virt/vmwareapi/vmops.py", line 1693, in _update_datacenter_cache_from_objects\n datastore_refs = p.val.ManagedObjectReference\n', u"AttributeError: 'Text' object has no attribute 'ManagedObjectReference'\n"]
2014-04-04 03:05:41.629 WARNING nova.scheduler.driver [req-cc690e5a-2bf3-4566-a697-30ca882df815 nova service] [instance: f0abb23a-943a-475d-ac63-69d2563362cb] Setting instance to ERROR state.

Tags: vmware
Changed in nova:
assignee: nobody → Chinmaya Bharadwaj (acbharadwaj)
summary: - Nova boot fails when there is a Dummy datacenter in the vCenter
+ Nova boot fails when there is an empty datacenter in the vCenter
summary: - Nova boot fails when there is an empty datacenter in the vCenter
+ VMware driver: Nova boot fails when there is an empty datacenter in the
+ vCenter
Changed in nova:
status: New → In Progress
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/85956

summary: - VMware driver: Nova boot fails when there is an empty datacenter in the
- vCenter
+ VMware driver: Nova boot fails when there is a datacenter with no
+ datastore associated with it.
description: updated
description: updated
Tracy Jones (tjones-i)
Changed in nova:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/85956
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=529e7d14a716fcc1264b2e8053be3c842afd2153
Submitter: Jenkins
Branch: master

commit 529e7d14a716fcc1264b2e8053be3c842afd2153
Author: chinmay <email address hidden>
Date: Tue Apr 8 14:27:19 2014 +0530

    VMware: Add check for datacenter with no datastore

    When there is a datacenter with no datastore in it,
    nova boot fails.

    This patch addresses the issue by adding a check
    and ignoring the empty datacenter.

    Change-Id: I3c8242767f5991d4aeffab09c763a21493fc363e
    closes-bug: #1302482

Changed in nova:
status: In Progress → Fix Committed
Gary Kotton (garyk)
tags: added: havana-backport-potential icehouse-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/97013

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/97098

Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-1
status: Fix Committed → Fix Released
Alan Pevec (apevec)
tags: removed: icehouse-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/icehouse)

Reviewed: https://review.openstack.org/97013
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=8d7de91500949a28e36c4c93868705445c1ca5ff
Submitter: Jenkins
Branch: stable/icehouse

commit 8d7de91500949a28e36c4c93868705445c1ca5ff
Author: chinmay <email address hidden>
Date: Tue Apr 8 14:27:19 2014 +0530

    VMware: Add check for datacenter with no datastore

    When there is a datacenter with no datastore in it,
    nova boot fails.

    This patch addresses the issue by adding a check
    and ignoring the empty datacenter.

    closes-bug: #1302482
    (cherry picked from commit 529e7d14a716fcc1264b2e8053be3c842afd2153)

    Conflicts:
     nova/tests/virt/vmwareapi/test_vmops.py

    Change-Id: I3c8242767f5991d4aeffab09c763a21493fc363e

Alan Pevec (apevec)
tags: removed: havana-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/havana)

Reviewed: https://review.openstack.org/97098
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=9d3d947f802a8beb6438d2cf911ee78c820f3555
Submitter: Jenkins
Branch: stable/havana

commit 9d3d947f802a8beb6438d2cf911ee78c820f3555
Author: chinmay <email address hidden>
Date: Tue Apr 8 14:27:19 2014 +0530

    VMware: Add check for datacenter with no datastore

    When there is a datacenter with no datastore in it,
    nova boot fails.

    This patch addresses the issue by adding a check
    and ignoring the empty datacenter.

    closes-bug: #1302482
    (cherry picked from commit 529e7d14a716fcc1264b2e8053be3c842afd2153)

    Conflicts:

     nova/tests/virt/vmwareapi/test_vmops.py

    Change-Id: I3c8242767f5991d4aeffab09c763a21493fc363e

Thierry Carrez (ttx)
Changed in nova:
milestone: juno-1 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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