Comment 0 for bug 1715624

Revision history for this message
Corey Bryant (corey.bryant) wrote :

In upgrade testing for Pike we tripped over at least 3 scenarios so far where os_release() returns the old cached release after upgrade. For late release fixes, we've patched these issues int the calls to os_release, like this for example:

diff --git a/hooks/charmhelpers/contrib/openstack/utils.py b/hooks/charmhelpers/contrib/openstack/utils.py
index 837a167..f3dcecb 100644
--- a/hooks/charmhelpers/contrib/openstack/utils.py
+++ b/hooks/charmhelpers/contrib/openstack/utils.py
@@ -2012,7 +2012,7 @@ def enable_memcache(source=None, release=None, package=None):
     if release:
         _release = release
     else:
- _release = os_release(package, base='icehouse')
+ _release = os_release(package, base='icehouse', reset_cache=True)
     if not _release:
         _release = get_os_codename_install_source(source)

We should really fix this in os_release() so we never have to deal with this issue again in another call to os_release. os_release should be updated to detect if an upgrade has occurred and reset it's cache after upgrade.