Remove the compiled python bytecode
upgrade-charm could previously fail because of compiled bytecode remaining behind. This change makes the upgrade-charm hook remove any such compiled bytecode files Closes-Bug: 1628322 Change-Id: I3886b514b47d6fc9fdfb350e2b3a2296472e40f6
This commit is contained in:
parent
6ba551b13e
commit
0dd383d351
|
@ -446,7 +446,7 @@ def mon_relation():
|
|||
log('mon cluster has not yet provided conf')
|
||||
|
||||
|
||||
@hooks.hook('upgrade-charm')
|
||||
@hooks.hook('upgrade-charm.real')
|
||||
@harden()
|
||||
def upgrade_charm():
|
||||
if get_fsid() and get_auth():
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
ceph_hooks.py
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
# Wrapper to ensure that old python bytecode isn't hanging around
|
||||
# after we upgrade the charm with newer libraries
|
||||
rm -rf **/*.pyc
|
||||
|
||||
exec ./hooks/upgrade-charm.real
|
|
@ -0,0 +1 @@
|
|||
ceph_hooks.py
|
Loading…
Reference in New Issue