config.get_cache_expiration_time() function missing in 1.31.0 release

Bug #1768813 reported by Yang Zhang
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
os-client-config
Fix Committed
Critical
Monty Taylor

Bug Description

Our code has a dependency on python-neutronclient which will always install the latest version of os-client-config as a dependency. After 1.31.0 version of os-client-config was released couple of hours ago and hence installed in our later deployment, our code encountered a failure as following:

2018-05-03 09:10:16,543 INFO cache_expiration_time = config.get_cache_expiration_time()
2018-05-03 09:10:16,543 INFO AttributeError: 'OpenStackConfig' object has no attribute 'get_cache_expiration_time'

Could you make sure the config.py in new release(s) is backward compatible? And please let me know if this is as per design of new code and we have to change our own code to fit the new way to invoke get_cache_expiration_time().

Thanks!

Yang

Revision history for this message
Yang Zhang (bjzyang) wrote :

The config.get_cache_expiration_time() function exists in both 1.29.0 and 1.30.0 releases.
And I think this concern applies to many other functions which existed in releases prior to 1.31.0.

Thanks!

Revision history for this message
Yang Zhang (bjzyang) wrote :

i.e. If any application code uses os-client-config to retrieve openstack configuration and has been working properly with os-client-config 1.30.0 or 1.29.0 or earlier, it may encounter "function not found" problems after the os-client-config being upgraded to 1.31.0 release.

Revision history for this message
Dale Bewley (dlbewley) wrote :

This is affecting my use of ansible when shade pulled in the newer version. I worked around it like this:

virtualenv -p python2 --system-site-packages pyenv
. pyenv/bin/activate
pip install --upgrade setuptools
pip install os-client-config==1.30.0 shade

Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :

For me the error happens in the openstack inventory script provided by ansible here:

https://github.com/ansible/ansible/blob/devel/contrib/inventory/openstack.py#L193-L204

The patch causing the issues seems to be https://review.openstack.org/549307 which removes almost all code from os-client-config and makes it only a wrapper, but obviously drops a couple of functions in the process. Nothing one would expect from a minor release.

Revision history for this message
David Shrewsbury (dshrews) wrote :
Revision history for this message
Monty Taylor (mordred) wrote :

Yah - sorry - working on a fix and will get a release cut asap.

Revision history for this message
Monty Taylor (mordred) wrote :

Landed a fix and it should be in 1.31.1. Sorry for the inconvenience.

Changed in os-client-config:
importance: Undecided → Critical
status: New → Fix Committed
assignee: nobody → Monty Taylor (mordred)
Revision history for this message
Monty Taylor (mordred) wrote :

https://review.openstack.org/#/c/566322 is the patch for the record.

Revision history for this message
Yang Zhang (bjzyang) wrote :

@Monty Cool! Thanks for your quick fix! :)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.