You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the solution you'd like
CAPO currently writes InternalIP and ExternalIP records to OpenStackMachine.Status.Addresses. However, it does not write InternalDNS. It should write an InternalDNS record containing the hostname of the machine.
This is useful information for other controllers consuming CAPI. Specifically, it is required by OpenShift's machine approver to automatically approve CSRs generated by a node for the target machine.
Anything else you would like to add:
InternalDNS should match the hostname as reported to the server by the metadata service. This is available in the OS-EXT-SRV-ATTR:hostname server attribute, but unfortunately this was admin-only until microversion 2.90. However, the way nova generates the hostname is relatively simple: it mangles the server name with sanitize_hostname, defined here: https://github.com/openstack/nova/blob/87d4807848bb9546c1fca972da2eb2eda13eb08d/nova/utils.py#L356-L389. It is probably a more pragmatic approach to re-implement this utility function in CAPO than bump to such a relatively recent microversion.
See the discussion in #1691 as to why that approach doesn't work. I think we should do what I described in #1691 (comment). That will most likely want to build on microversion support proposed in #1567.
/kind feature
Describe the solution you'd like
CAPO currently writes
InternalIP
andExternalIP
records toOpenStackMachine.Status.Addresses
. However, it does not writeInternalDNS
. It should write anInternalDNS
record containing the hostname of the machine.This is useful information for other controllers consuming CAPI. Specifically, it is required by OpenShift's machine approver to automatically approve CSRs generated by a node for the target machine.
Anything else you would like to add:
InternalDNS should match the hostname as reported to the server by the metadata service. This is available in the
OS-EXT-SRV-ATTR:hostname
server attribute, but unfortunately this was admin-only until microversion 2.90. However, the way nova generates the hostname is relatively simple: it mangles the server name withsanitize_hostname
, defined here: https://github.com/openstack/nova/blob/87d4807848bb9546c1fca972da2eb2eda13eb08d/nova/utils.py#L356-L389. It is probably a more pragmatic approach to re-implement this utility function in CAPO than bump to such a relatively recent microversion.cc @stephenfin
The text was updated successfully, but these errors were encountered: