yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #42052
[Bug 1521458] Re: ParaVirtualSCSI adapter type string doesn't match the one in the constants.py
** Changed in: nova
Status: New => Invalid
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1521458
Title:
ParaVirtualSCSI adapter type string doesn't match the one in the
constants.py
Status in OpenStack Compute (nova):
Invalid
Bug description:
The user is trying to do a single server provision using a basic RHEL
template, but the flavor has an ephemeral disk defined. Provision the
same flavor without an ephemeral disk doesn't have problem.
The VMWare server is ESXi 5.5.0 2143827, vCenter is 5.5.0.20000 Build
2063318
Error from vCenter:
Create virtual disk
A specified parameter was not correct. paraVirtualscsi
Based on the API:
http://pubs.vmware.com/vsphere-55/index.jsp#com.vmware.wssdk.apiref.doc/vim.VirtualDiskManager.VirtualDiskAdapterType.html
There is no paraVirtualscsi Constant, so it is rejected by the API as "A specified parameter was not correct".
in nova/virt/vmwareapi/vm_util.py:
def get_vmdk_adapter_type(adapter_type):
"""Return the adapter type to be used in vmdk descriptor.
Adapter type in vmdk descriptor is same for LSI-SAS, LSILogic & ParaVirtual
because Virtual Disk Manager API does not recognize the newer controller
types.
"""
if adapter_type in [constants.ADAPTER_TYPE_LSILOGICSAS,
constants.ADAPTER_TYPE_PARAVIRTUAL]:
vmdk_adapter_type = constants.DEFAULT_ADAPTER_TYPE
else:
vmdk_adapter_type = adapter_type
return vmdk_adapter_type
in nova/virt/vmwareapi/constants.py
DEFAULT_ADAPTER_TYPE = "lsiLogic"
...
ADAPTER_TYPE_BUSLOGIC = "busLogic"
ADAPTER_TYPE_IDE = "ide"
ADAPTER_TYPE_LSILOGICSAS = "lsiLogicsas"
ADAPTER_TYPE_PARAVIRTUAL = "paraVirtual"
It appears as though the original authors were well aware that the newer controller types aren't supported by the CreateVirtualDisk_Task and attempted to mitigate the problem by returning the default adapter type instead of the paraVirtualSCSI or LSILogicSAS which they knew would result in an error.
The problem is that the value of "adapter_type" is not what they
expected.
In this instance adapter_type is being returned as "paraVirtualscsi"
and this does not match constants.ADAPTER_TYPE_PARAVIRTUAL which is
defined in constants.py as: ADAPTER_TYPE_PARAVIRTUAL = "paraVirtual"
The "scsi" at the end has been dropped and therefore no match is made
and the adapter_type is passed straight through to the vmware API
resulting in an error.
The intent seems to be that a match would have been made, and that
constants.DEFAULT_ADAPTER_TYPE is returned instead which is defined in
constants.py as: DEFAULT_ADAPTER_TYPE = "lsiLogic"
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1521458/+subscriptions
References