I have an environment setup (thanks to victorvavan) where I can reproduce the issue.
When installing maas via snap, even if you 'apt install python3-novaclient' the problem
won't go away because of snap confinement, in practice maas cannot see the installed package.
I've installed maas via debs. If the python3-novaclient is present, the message
"Power control software is missing from the rack controller 'maas.maas'. To proceed, install the python3-novaclient package."
goes away but it still fails.
The authentication will happen automatically at the first call to the server, but the call
to the novaclient.Client() need to be modified like this:
diff --git a/src/provisioningserver/drivers/power/nova.py b/src/provisioningserver/drivers/power/nova.py
index 039195317..12934947c 100644
--- a/src/provisioningserver/drivers/power/nova.py
+++ b/src/provisioningserver/drivers/power/nova.py
@@ -73,7 +73,7 @@ class NovaPowerDriver(PowerDriver):
if not self.try_novaapi_import():
raise PowerToolError("Missing the python3-novaclient package.")
nova = self.nova_api.Client(
- 2, os_username, os_password, os_tenantname, os_authurl
+ version="2", username="os_username", password="os_password", project_id=os_tenantname, auth_url=os_authurl, user_domain_name=<user-domain-name>
)
Hardcoding the the user_domain_name for my environment, the "check power" does not throw errors.
At this point, I see 2 problems:
1. Authentication related
To authenticate we need the user_domain_name. I am not an openstack expert and I'm not sure if we can avoid it, but if we can't
that would imply further changes to maas (and maas ui) for the user to provide the user_domain_name.
2. Commissioning
Even if we go past the power on errors, when it gets to the commissioning stage it seems it gets stuck.
I have an environment setup (thanks to victorvavan) where I can reproduce the issue.
When installing maas via snap, even if you 'apt install python3-novaclient' the problem
won't go away because of snap confinement, in practice maas cannot see the installed package.
I've installed maas via debs. If the python3-novaclient is present, the message
"Power control software is missing from the rack controller 'maas.maas'. To proceed, install the python3-novaclient package."
goes away but it still fails.
It turns out that, maas openstack driver was written a while back and the novaclient api has changed. /git.launchpad. net/maas/ tree/src/ provisioningser ver/drivers/ power/nova. py?h=3. 1#n81
The problem is in this line :
https:/
nova.authenticate()
This method has been deprecated.
The authentication will happen automatically at the first call to the server, but the call
to the novaclient.Client() need to be modified like this:
diff --git a/src/provision ingserver/ drivers/ power/nova. py b/src/provision ingserver/ drivers/ power/nova. py .12934947c 100644 ingserver/ drivers/ power/nova. py ingserver/ drivers/ power/nova. py (PowerDriver) : novaapi_ import( ): "Missing the python3-novaclient package.") api.Client( "os_username" , password= "os_password" , project_ id=os_tenantnam e, auth_url= os_authurl, user_domain_ name=<user- domain- name>
index 039195317.
--- a/src/provision
+++ b/src/provision
@@ -73,7 +73,7 @@ class NovaPowerDriver
if not self.try_
raise PowerToolError(
nova = self.nova_
- 2, os_username, os_password, os_tenantname, os_authurl
+ version="2", username=
)
Hardcoding the the user_domain_name for my environment, the "check power" does not throw errors.
At this point, I see 2 problems:
1. Authentication related
To authenticate we need the user_domain_name. I am not an openstack expert and I'm not sure if we can avoid it, but if we can't
that would imply further changes to maas (and maas ui) for the user to provide the user_domain_name.
2. Commissioning
Even if we go past the power on errors, when it gets to the commissioning stage it seems it gets stuck.