Comment 5 for bug 2007587

Revision history for this message
Diko Parvanov (dparv) wrote : Re: Upgrading vault from charmstore stable to 1.7/stable fails

And one more thing here is that upgrade-charm hook fails to 1.7/stable and even from 1.7/stable to 1.8/stable with:

unit-vault-0: 06:48:27 WARNING unit.vault/0.upgrade-charm File "/var/lib/juju/agents/unit-vault-0/charm/lib/charms/layer/snap.py", line 421, in _refresh_store
unit-vault-0: 06:48:27 WARNING unit.vault/0.upgrade-charm out = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
unit-vault-0: 06:48:27 WARNING unit.vault/0.upgrade-charm File "/usr/lib/python3.10/subprocess.py", line 420, in check_output
unit-vault-0: 06:48:27 WARNING unit.vault/0.upgrade-charm return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
unit-vault-0: 06:48:27 WARNING unit.vault/0.upgrade-charm File "/usr/lib/python3.10/subprocess.py", line 524, in run
unit-vault-0: 06:48:27 WARNING unit.vault/0.upgrade-charm raise CalledProcessError(retcode, process.args,
unit-vault-0: 06:48:27 WARNING unit.vault/0.upgrade-charm subprocess.CalledProcessError: Command '['snap', 'refresh', '--amend', '--channel=1.8/stable', 'vault']' returned non-zero exit status 1.
unit-vault-0: 06:48:27 ERROR juju.worker.uniter.operation hook "upgrade-charm" (via explicit, bespoke hook script) failed: exit status 1

so the charm needs to stop the vault services first to change the snap channel. So that's a charm bug for sure.