nova/nova/virt/ironic
Guang Yee e082bdc166 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)
`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.)

[1] I42b66daea1f4397273a3f4eb1638abafb3bb28ce
[2] I610836e5038774621690aca88b2aee25670f0262

Change-Id: I5f78d21c39ed2fd58d2a0f3649116e39883d5a2c
closes-bug: 1818295
2019-03-12 19:08:38 +00:00
..
__init__.py Import Ironic Driver & supporting files - part 1 2014-09-05 19:00:12 -04:00
client_wrapper.py pass endpoint interface to Ironic client 2019-03-12 19:08:38 +00:00
driver.py Merge "ironic: check fresh data when sync_power_state doesn't line up" 2019-03-02 02:36:41 +00:00
ironic_states.py virt/ironic: Implement rescue and unrescue 2018-07-13 01:56:13 +00:00
patcher.py Pushing image traits to ironic node 2018-05-18 18:05:25 -07:00