[VMWare Driver] When cluster name contains special characters like "/", the cluster can not be found

Bug #1412696 reported by Feng Xi Yan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Incomplete
Undecided
Unassigned
oslo.vmware
In Progress
Undecided
Unassigned

Bug Description

How to reprodue:
1) In vcenter, change the cluster name into "cluster01/1"
2) Change nova.conf
cluster_name=cluster01/1
3) Start nova-compute service, we will get following error logs:

2015-01-20 16:37:46.170 12489 CRITICAL nova [-] NotFound: All clusters specified ['cluster01/1'] were not found in the vCenter
2015-01-20 16:37:46.170 12489 TRACE nova Traceback (most recent call last):
2015-01-20 16:37:46.170 12489 TRACE nova File "/usr/bin/nova-compute", line 10, in <module>
2015-01-20 16:37:46.170 12489 TRACE nova sys.exit(main())
2015-01-20 16:37:46.170 12489 TRACE nova File "/usr/lib/python2.6/site-packages/nova/cmd/compute.py", line 72, in main
2015-01-20 16:37:46.170 12489 TRACE nova db_allowed=CONF.conductor.use_local)
2015-01-20 16:37:46.170 12489 TRACE nova File "/usr/lib/python2.6/site-packages/nova/service.py", line 275, in create
2015-01-20 16:37:46.170 12489 TRACE nova db_allowed=db_allowed)
2015-01-20 16:37:46.170 12489 TRACE nova File "/usr/lib/python2.6/site-packages/nova/service.py", line 148, in __init__
2015-01-20 16:37:46.170 12489 TRACE nova self.manager = manager_class(host=self.host, *args, **kwargs)
2015-01-20 16:37:46.170 12489 TRACE nova File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 639, in __init__
2015-01-20 16:37:46.170 12489 TRACE nova self.driver = driver.load_compute_driver(self.virtapi, compute_driver)
2015-01-20 16:37:46.170 12489 TRACE nova File "/usr/lib/python2.6/site-packages/nova/virt/driver.py", line 1439, in load_compute_driver
2015-01-20 16:37:46.170 12489 TRACE nova virtapi)
2015-01-20 16:37:46.170 12489 TRACE nova File "/usr/lib/python2.6/site-packages/nova/openstack/common/importutils.py", line 50, in import_object_ns
2015-01-20 16:37:46.170 12489 TRACE nova return import_class(import_value)(*args, **kwargs)
2015-01-20 16:37:46.170 12489 TRACE nova File "/usr/lib/python2.6/site-packages/nova/virt/vmwareapi/driver.py", line 241, in __init__
2015-01-20 16:37:46.170 12489 TRACE nova % self._cluster_names)
2015-01-20 16:37:46.170 12489 TRACE nova NotFound: All clusters specified ['cluster01/1'] were not found in the vCenter

Reason:
The VSphere API get the cluster name as a URI string. So the "/" will be transitioned into "%2f". So we can not fetch the cluster MOR by a cluster name "cluster01/1". If we change nova.conf to set cluster_name as "cluster01%2f1", it will be OK. But this is not user friendly.

Tags: vmware
Revision history for this message
Anthony Wong (anthonywong) wrote :

I am not familiar with virtualization. Is this a bug in VMWare vCenter or in nova-compute-vmware?

Revision history for this message
Feng Xi Yan (yanfengxi) wrote :

It's a bug of nova virt driver of VMWare VCenter.

Revision history for this message
Anthony Wong (anthonywong) wrote :

Thanks for the reply. I think you need to report the issue to VMWare as this is an issue of their product.

Revision history for this message
Feng Xi Yan (yanfengxi) wrote :

I don't think it is a bug of vmware.
It's very reasonable for vmware to return the value as a uri string.
I think it's better we change the driver to fit this.

I will do the fix.

Changed in ubuntukylin:
assignee: nobody → Feng Xi Yan (yanfengxi)
Revision history for this message
Anthony Wong (anthonywong) wrote :

Ok. For driver do you mean python-nova?

Which ubuntu kylin release are you using?

I noticed in your log it shows "/usr/lib/python2.6/site-packages/nova/virt/vmwareapi/driver.py", but python-nova in 14.04 and 14.10 only has "/usr/lib/python2.7/dist-packages/nova/virt/vmwareapi/driver.py".

Revision history for this message
Feng Xi Yan (yanfengxi) wrote :

Oh, sorry, actually, this log is coming from icehouse release(with python26).
I am trying to fix it in kilo first, and backport icehouse and juno later.

Revision history for this message
Feng Xi Yan (yanfengxi) wrote :
Feng Xi Yan (yanfengxi)
affects: ubuntukylin → nova
Changed in nova:
status: New → In Progress
tags: added: vmware
Changed in nova:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Feng Xi Yan (<email address hidden>) on branch: master
Review: https://review.openstack.org/148488

Revision history for this message
Feng Xi Yan (yanfengxi) wrote :
Eric Brown (ericwb)
Changed in oslo.vmware:
status: New → In Progress
Revision history for this message
Takashi Natsume (natsume-takashi) wrote :

This bug report has been 'In Progress' status for two years in Nova, but there is no activity in Nova.
So set it back to 'New' status and 'Undecided' importance.
This bug can be reopened (set back to "New") if someone reproduce the bug at newton, ocata or master.

Changed in nova:
status: In Progress → New
importance: Low → Undecided
Sean Dague (sdague)
Changed in nova:
assignee: Feng Xi Yan (yanfengxi) → nobody
Revision history for this message
Sean Dague (sdague) wrote :

This needs verification again

Changed in nova:
status: New → Incomplete
Sean Dague (sdague)
Changed in nova:
assignee: nobody → Feng Xi Yan (yanfengxi)
status: Incomplete → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on oslo.vmware (master)

Change abandoned by ChangBo Guo(gcb) (<email address hidden>) on branch: master
Review: https://review.openstack.org/187457
Reason: Please restore it if you want to continue working on this.

Revision history for this message
Sean Dague (sdague) wrote :

There are no currently open reviews on this bug, changing the status back to the previous state and unassigning. If there are active reviews related to this bug, please include links in comments.

Changed in nova:
status: In Progress → Incomplete
assignee: Feng Xi Yan (yanfengxi) → nobody
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.