auth_url for [ironic] section should be rendered with /v3 for yoga
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
OpenStack Nova Cloud Controller Charm |
Fix Committed
|
High
|
Unassigned | |||
OpenStack Nova Compute Charm | Status tracked in Trunk | |||||
2023.1 |
Fix Committed
|
Undecided
|
Unassigned | |||
Trunk |
Fix Released
|
Undecided
|
Unassigned | |||
Yoga |
Fix Committed
|
Undecided
|
Unassigned | |||
Zed |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
OpenStack Yoga on Focal
Charm channel yoga/stable
Charm revision 606
nova version 25.0.1
auth_url for [ironic] section is incorrectly rendered in nova.conf with suffix /v2.0 instead of /v3, e.g.:
```
[ironic]
auth_url = https:/
```
As a result, an Ironic bare metal node cannot be created and the following error is reported in nova-compute.log (on the nova-compute unit configured with "virt-type: ironic"):
```
2022-11-05 22:42:04.211 25369 ERROR nova.virt.
2022-11-05 22:42:04.211 25369 WARNING nova.compute.
```
Bare metal node cannot be created because nova resource tracker was not able to report bare metal nodes to Placement service. As a result, Placement was not able to find any nodes with resource class related to baremetal node, i.e. the following command returns no results (but it should):
```
openstack allocation candidate list --resource CUSTOM_
```
Replacing /v2.0 to /v3 in nova.conf (on the nova-compute unit configured with "virt-type: ironic") and restarting nova-compute service fixes the problem. The fix is temporary until the charm re-renders nova.conf.
no longer affects: | charm-nova-cloud-controller/trunk |
Thanks for the bug report. It's a curious one, this, as it really ought to render as v3 and not v2.0, so it may be that something's up elsewhere in the cloud.
If possible, please could you add the supporting information from https:/ /docs.openstack .org/charm- guide/latest/ community/ software- bug.html# essential- information (e.g. juju show-unit for the nova-compute unit would be really useful, but it does contain passwords so may need sanitising!)
The config is rendered from this part:
{% if virt_type == 'ironic' and auth_host and ironic_api_ready -%} protocol} }://{{auth_ host}}: {{auth_ port}}/ {{auth_ ver}}
{% if api_version and api_version == "3" -%}
{% set auth_ver = "v3" -%}
{% else -%}
{% set auth_ver = "v2.0" -%}
{% endif -%}
[ironic]
auth_type = password
auth_url = {{auth_
project_name = {{ admin_tenant_name }}
username = {{ admin_user }}
password = {{ admin_password }}
project_domain_name = {{ admin_domain_name }}
user_domain_name = {{ admin_domain_name }}
{% endif -%}
So api_version is most likely *not* '3' when rendering this section; it would be useful to see what the nova.conf is being rendered at, particularly whether the auth_url is correct elsewhere.