[2.0] VMware power type error: __init__() takes 1 positional argument but 2 were given
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Undecided
|
Unassigned | ||
python-pyvmomi (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
python-pyvmomi in xenial is outdated and does not allow connecting to vsphere with TLS validation. Updating to 6.5 fixes this and probably a few other issues.
[Test case]
For example,
>>> from pyVim.connect import SmartConnect
>>> import ssl
>>> context = ssl.SSLContext(
>>> context.verify_mode = ssl.CERT_NONE
>>> si = SmartConnect(
should work.
This is basically a HWE type scenario.
[Regression potential]
Compatibility with vSphere 4.1 is not guaranteed anymore. Some bug fixes; and otherwise it's mostly just new data types and methods, so low likelihood of regressions on that side. As a bonus point, we won't have any changes to bionic.
[Original bug report]
When adding VMware power type in 2.0.0 beta7:
Failed to query node's BMC - __init__() takes 1 positional argument but 2 were given
The same VMware details (UUID, vCenter IP address, username/password, etc.) worked in an earlier version of the maas server, which was Ubuntu 14.04 / maas 1.9.
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Architecture Description
+++-===
ii maas 2.0.0~beta7+
ii maas-cli 2.0.0~beta7+
un maas-cluster-
ii maas-common 2.0.0~beta7+
ii maas-dhcp 2.0.0~beta7+
ii maas-dns 2.0.0~beta7+
ii maas-proxy 2.0.0~beta7+
ii maas-rack-
ii maas-region-api 2.0.0~beta7+
ii maas-region-
un maas-region-
un python-django-maas <none> <none> (no description available)
un python-maas-client <none> <none> (no description available)
un python-
ii python3-django-maas 2.0.0~beta7+
ii python3-maas-client 2.0.0~beta7+
ii python3-
tags: | added: oil |
description: | updated |
Changed in python-pyvmomi (Ubuntu Xenial): | |
status: | New → In Progress |
tags: | added: id-5ab313632c871df80bdd551d |
Thanks for bringing this bug to our attention.
Unfortunately, I don't see the exception reported in the error message anywhere in the log, so it's difficult to know what the exact issue is here.
Can you check to ensure that the python3-pyvmomi package is installed on the rack controller, and let me know what its version is?
Also, which VMware product are you connecting to and what version is it?
I have heard reports that the new version of the pyvmomi API is strict regarding validation of SSL certificates. You may need to download the certificate from the VMware server and ensure the rack controller considers it to be trusted. (I think placing it in /etc/ssl/certs and running "update- ca-certificates " would do it.)
It may help us get a better error message if you try the power query from a Python shell on the rack controller, such as:
python3 ver.drivers. hardware import vmware as vmware power_query_ vmware( "vmware- host", "username", "password", "vm_name", "uuid", port=None, protocol=None)
from provisioningser
vmware.
You could try port=443 and protocol="https" as well. Replace the other quoted strings the your power information for the node.