https://bugs.launchpad.net/ironic/+bug/1526411
This adds support for caching the version negotiated by the ironicclient, between itself and the ironic server. This is supplementary to the ‘api microversion’ spec approved in the Kilo release[0].
When the ironicclient talks to the ironic server, there may be a mismatch in supported API versions. The client and server negotiate a version to be used in communicating, but since the ironicclient can be used as a user interactive client, this process of negotiation would be repeated for each command line invocation.
It would be useful, for each ironic server that the ironicclient talks to, to cache the version agreed upon for communication, so that each conversation between client and server does not require renegotiation.
This version caching would need to be per user, for each ironic server (host, network port pair specific) and would be time-bound (say 5 minutes), so any future upgrade of the client or server would benefit from supporting newer available versions.
The proposed implementation consists of caching the negotiated version information between an ironicclient and ironic server in local file storage for use by future invocations of the ironicclient.
This information would be cached for a specific period of time, before becoming stale and ignored.
Specifically, we are proposing:
Storing the version information in a well-known, standardised, local file storage location means that, if the user wants to, they can remove the cached version information manually triggering a renegotiation of the version to be used in communication between the client and server.
An alternative file-based solution was proposed[6], but rejected in favour of using dogpile.cache.
The suggestion to move to dogpile.cache was made both in the code review[9] and was discussed in IRC[8].
Reasons for using dogpile.cache included: commonality with existing file caching libraries used elsewhere in OpenStack, and use of tested common libraries typically means less bugs.
None
None
None
This spec only affects the python-ironicclient, not ironic server.
None
None
None
N/A
None
None
This change potentially reduces network traffic between the client and server and hence aids scalability.
This change potentially reduces network traffic between the client and server and hence improves latency between when a request is made to ironic and when the response is received.
None
None
None
Unit tests will be provided to verify this solution
None
None
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.