Client Caching Of Negotiated Version

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].

Problem description

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.

Proposed change

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:

  • Using the dogpile.cache[1] caching system, a pre-existing library that is already included in global requirements[2]. It is currently used by os-client-config[3], which is used by openstackclient[4].

  • Storing the cached information in local file storage, using appdirs[5] to provide the correct location

  • Indexing the version information in an ironic-server:network-port pair (such as ‘’) so that multiple ironic servers running on the same IP address will be cached independently for each user invoking python-ironicclient

  • Having a default period of 5 minutes for caching version information for each ironic server

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.

Data model impact


State Machine Impact


REST API impact


Client (CLI) impact

This spec only affects the python-ironicclient, not ironic server.

RPC API impact


Driver API impact


Nova driver impact


Ramdisk impact


Security impact


Other end user impact


Scalability impact

This change potentially reduces network traffic between the client and server and hence aids scalability.

Performance Impact

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.

Other deployer impact


Developer impact




Primary assignee:

mrda - Michael Davies <>

Work Items

  • The implementation of this spec has already commenced - see [7]




Unit tests will be provided to verify this solution

Upgrades and Backwards Compatibility


Documentation Impact