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:
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.
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 charmhelpers/ contrib/ openstack/ utils.py charmhelpers/ contrib/ openstack/ utils.py memcache( source= None, release=None, package=None): codename_ install_ source( source)
index 837a167..f3dcecb 100644
--- a/hooks/
+++ b/hooks/
@@ -2012,7 +2012,7 @@ def enable_
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_
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.