Via change [1], ironicclient began to use endpoint_filter in the
version negotiation code path, whereas it was previously unused if a
fully-qualified endpoint had already been determined. Suddenly it was
important that the `interface` part of this endpoint_filter be correct.
Prior to ironicclient change [2], there was no way to pass an
appropriate `interface` value through ironicclient's initialization, so
the ironicclient used from nova would always end up with the default
value, `public`, in the endpoint_filter. This would break in clouds
lacking a public ironic API endpoint (see the referenced bug).
With this change, we pass the value of the (standard, per ksa)
`valid_interfaces` ironic config option into the ironicclient
initialization, where (if and only if the ironicclient fix [2] is also
present) it eventually gets passed through to the ksa Adapter
initialization (which is set up to accept values from exactly that conf
option) to wind up in the endpoint_filter.
The effect is that nova's ironicclient will actually be using the
interface from nova.conf throughout. (Because `valid_interfaces` is also
used in recommended configuration setups - i.e. those that use the
service catalog to determine API endpoints - to construct the
endpoint_override used to initialize the ironicclient, the value used
during version negotiation should be in sync with that used for regular
API calls.)
Reviewed: https:/ /review. openstack. org/643098 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=d4cea970c2d 56ef8ff813473cd 5ba0e38e3f04fd
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit d4cea970c2d56ef 8ff813473cd5ba0 e38e3f04fd
Author: Guang Yee <email address hidden>
Date: Mon Mar 4 13:30:09 2019 -0800
pass endpoint interface to Ironic client
Via change [1], ironicclient began to use endpoint_filter in the
version negotiation code path, whereas it was previously unused if a
fully-qualified endpoint had already been determined. Suddenly it was
important that the `interface` part of this endpoint_filter be correct.
Prior to ironicclient change [2], there was no way to pass an
appropriate `interface` value through ironicclient's initialization, so
the ironicclient used from nova would always end up with the default
value, `public`, in the endpoint_filter. This would break in clouds
lacking a public ironic API endpoint (see the referenced bug).
With this change, we pass the value of the (standard, per ksa) interfaces` ironic config option into the ironicclient
`valid_
initialization, where (if and only if the ironicclient fix [2] is also
present) it eventually gets passed through to the ksa Adapter
initialization (which is set up to accept values from exactly that conf
option) to wind up in the endpoint_filter.
The effect is that nova's ironicclient will actually be using the override used to initialize the ironicclient, the value used
interface from nova.conf throughout. (Because `valid_interfaces` is also
used in recommended configuration setups - i.e. those that use the
service catalog to determine API endpoints - to construct the
endpoint_
during version negotiation should be in sync with that used for regular
API calls.)
[1] I42b66daea1f439 7273a3f4eb1638a bafb3bb28ce 621690aca88b2ae e25670f0262
[2] I610836e5038774
Change-Id: I5f78d21c39ed2f d58d2a0f3649116 e39883d5a2c 5576801e0c89ef1 fe771681ed)
closes-bug: 1818295
(cherry picked from commit e082bdc166cb821