Failed to launch instance in vcenter configured with non default port

Bug #1600710 reported by Johnson koil raj
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Expired
Medium
Unassigned

Bug Description

Description
===========

One of my environment I have configured my vCenter to listen on non default port ( eg: 1400 ). By default vCenter will listen on 443. In this Instances are failed to boot. From the log I came to copy of images from glance to datastore which happens through the ESXi servers fails because ESXi servers are Listening on default port. Image copying method creating the URL which uses the port of vCenter not the ESXi host.

Steps to reproduce
==================
* Configure vCenter to listen on port 1400 ( other than 443 )
* Boot a instance

Expected result
===============
Instance launch should be successful

Actual result
=============
But instance launch will fail with below error

2016-07-01 05:10:04.480 29447 DEBUG oslo_vmware.rw_handles [req-e12d5f3a-fa5f-44f3-9c5b-7350a9760c20 33f0250cb0db41a8a17bf240b81406b7 63fcf407f5bc492996c3a9afc93f7b42] Creating HTTP connection to write to file with size = 18808832 and URL = https://1.1.2.3:1400/folder/vmware_temp/d22ddfc3-7fbd-42b9-82e5-f45b0e7313ec/8b33e6a9-2da4-46df-8c7a-71d70bbbb0e4/tmp-sparse.vmdk?dsName=ds-37&dcPath=ha-datacenter. _create_write_connection /opt/stack/venv/nova-20160628T001806Z/lib/python2.7/site-packages/oslo_vmware/rw_handles.py:126

....

2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [req-e12d5f3a-fa5f-44f3-9c5b-7350a9760c20 33f0250cb0db41a8a17bf240b81406b7 63fcf407f5bc492996c3a9afc93f7b42] [instance: d7f6f84c-024d-481e-b41d-5f416ff94305] Instance failed to spawn
2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [instance: d7f6f84c-024d-481e-b41d-5f416ff94305] Traceback (most recent call last):
2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [instance: d7f6f84c-024d-481e-b41d-5f416ff94305] File "/opt/stack/venv/nova-20160628T001806Z/lib/python2.7/site-packages/nova/compute/manager.py", line 2220, in _build_resources
2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [instance: d7f6f84c-024d-481e-b41d-5f416ff94305] yield resources
2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [instance: d7f6f84c-024d-481e-b41d-5f416ff94305] File "/opt/stack/venv/nova-20160628T001806Z/lib/python2.7/site-packages/nova/compute/manager.py", line 2066, in _build_and_run_instance
2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [instance: d7f6f84c-024d-481e-b41d-5f416ff94305] block_device_info=block_device_info)
2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [instance: d7f6f84c-024d-481e-b41d-5f416ff94305] File "/opt/stack/venv/nova-20160628T001806Z/lib/python2.7/site-packages/nova/virt/vmwareapi/hp_driver.py", line 66, in spawn
2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [instance: d7f6f84c-024d-481e-b41d-5f416ff94305] power_on=False)
2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [instance: d7f6f84c-024d-481e-b41d-5f416ff94305] File "/opt/stack/venv/nova-20160628T001806Z/lib/python2.7/site-packages/nova/virt/vmwareapi/vmops.py", line 751, in spawn
2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [instance: d7f6f84c-024d-481e-b41d-5f416ff94305] self._fetch_image_if_missing(context, vi)
2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [instance: d7f6f84c-024d-481e-b41d-5f416ff94305] File "/opt/stack/venv/nova-20160628T001806Z/lib/python2.7/site-packages/nova/virt/vmwareapi/vmops.py", line 614, in _fetch_image_if_missing
2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [instance: d7f6f84c-024d-481e-b41d-5f416ff94305] image_fetch(context, vi, tmp_image_ds_loc)
2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [instance: d7f6f84c-024d-481e-b41d-5f416ff94305] File "/opt/stack/venv/nova-20160628T001806Z/lib/python2.7/site-packages/nova/virt/vmwareapi/vmops.py", line 405, in _fetch_image_as_file
2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [instance: d7f6f84c-024d-481e-b41d-5f416ff94305] cookies=cookies)
2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [instance: d7f6f84c-024d-481e-b41d-5f416ff94305] File "/opt/stack/venv/nova-20160628T001806Z/lib/python2.7/site-packages/nova/virt/vmwareapi/images.py", line 236, in fetch_image
2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [instance: d7f6f84c-024d-481e-b41d-5f416ff94305] host, port, dc_name, ds_name, cookies, file_path, file_size)
2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [instance: d7f6f84c-024d-481e-b41d-5f416ff94305] File "/opt/stack/venv/nova-20160628T001806Z/lib/python2.7/site-packages/oslo_vmware/rw_handles.py", line 272, in __init__
2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [instance: d7f6f84c-024d-481e-b41d-5f416ff94305] ssl_thumbprint=thumbprint)
2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [instance: d7f6f84c-024d-481e-b41d-5f416ff94305] File "/opt/stack/venv/nova-20160628T001806Z/lib/python2.7/site-packages/oslo_vmware/rw_handles.py", line 142, in _create_write_connection
2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [instance: d7f6f84c-024d-481e-b41d-5f416ff94305] conn.endheaders()
2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [instance: d7f6f84c-024d-481e-b41d-5f416ff94305] File "/usr/lib/python2.7/httplib.py", line 997, in endheaders
2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [instance: d7f6f84c-024d-481e-b41d-5f416ff94305] self._send_output(message_body)
2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [instance: d7f6f84c-024d-481e-b41d-5f416ff94305] File "/usr/lib/python2.7/httplib.py", line 850, in _send_output
2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [instance: d7f6f84c-024d-481e-b41d-5f416ff94305] self.send(msg)
2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [instance: d7f6f84c-024d-481e-b41d-5f416ff94305] File "/usr/lib/python2.7/httplib.py", line 812, in send
2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [instance: d7f6f84c-024d-481e-b41d-5f416ff94305] self.connect()
2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [instance: d7f6f84c-024d-481e-b41d-5f416ff94305] File "/opt/stack/venv/nova-20160628T001806Z/lib/python2.7/site-packages/urllib3/connection.py", line 217, in connect
2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [instance: d7f6f84c-024d-481e-b41d-5f416ff94305] conn = self._new_conn()
2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [instance: d7f6f84c-024d-481e-b41d-5f416ff94305] File "/opt/stack/venv/nova-20160628T001806Z/lib/python2.7/site-packages/urllib3/connection.py", line 146, in _new_conn
2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [instance: d7f6f84c-024d-481e-b41d-5f416ff94305] self, "Failed to establish a new connection: %s" % e)
2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [instance: d7f6f84c-024d-481e-b41d-5f416ff94305] NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7fa775d72b10>: Failed to establish a new connection: [Errno 110] ETIMEDOUT
2016-07-01 05:12:11.757 29447 ERROR nova.compute.manager [instance: d7f6f84c-024d-481e-b41d-5f416ff94305]

In this URL
https://1.1.2.3:1400/folder/vmware_temp/d22ddfc3-7fbd-42b9-82e5-f45b0e7313ec/8b33e6a9-2da4-46df-8c7a-71d70bbbb0e4/tmp-sparse.vmdk?dsName=ds-37&dcPath=ha-datacenter

1.1.2.3 is ESXi host ipaddress
1400 is vCenter Listening port

Tags: vmware
Revision history for this message
Matt Riedemann (mriedem) wrote :

Which version/release of nova are you using? master (newton)? mitaka, liberty, other?

Changed in nova:
importance: High → Medium
Revision history for this message
Matt Riedemann (mriedem) wrote :

What's the value of the host_port option in the [vmware] section of nova.conf?

Changed in nova:
status: New → Incomplete
Revision history for this message
Johnson koil raj (jjohnsonkoilraj) wrote :

Release newton & mitaka.

[vmware]
host_port=1400

I have corrected the typo in bug description.

description: updated
Revision history for this message
Johnson koil raj (jjohnsonkoilraj) wrote :

https://review.openstack.org/#/c/135625/ change introduced way to copy images through ESXi host to datastore.

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

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/341816

Changed in nova:
status: Incomplete → 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/342786

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (stable/mitaka)

Change abandoned by Matt Riedemann (<email address hidden>) on branch: stable/mitaka
Review: https://review.openstack.org/341816

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Michael Still (<email address hidden>) on branch: master
Review: https://review.openstack.org/342786
Reason: This patch has been sitting unchanged for more than 12 weeks. I am therefore going to abandon it to keep the nova review queue sane. Please feel free to restore the change if you're still working on it.

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: Johnson koil raj (jjohnsonkoilraj) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for OpenStack Compute (nova) because there has been no activity for 60 days.]

Changed in nova:
status: Incomplete → Expired
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.