Ehm, I think the closing out of this bug was an error and this still occurs. The original intent for this bug was to track spurious hook errors caused by connectivity issues with the snap store and how the layer and/or the charms should handle this better.
Just now from the Vault snap:
2020-09-09 15:55:58 ERROR juju-log Installation failed cmd="['snap', 'install', '--channel=stable', 'core']" returncode=1 output="b'error: cannot perform the following tasks:\n- Download snap "core" (9804) from channel "stable" (received an unexpected http response code (408) when trying to download https://canonical-bos01.cdn.snapcraft.io/download-origin/canonical-lgw01/99T7MUlRhtI3U0QFgl5mXXESAiSwt776_9804.snap?interactive=1&token=1599678000_ef78e027e7a1f418499d0512263b926f2890670c)\n'"
2020-09-09 15:55:58 ERROR juju-log Hook error:
Traceback (most recent call last):
File "/var/lib/juju/agents/unit-vault-0/.venv/lib/python3.8/site-packages/charms/reactive/__init__.py", line 74, in main
bus.dispatch(restricted=restricted_mode)
File "/var/lib/juju/agents/unit-vault-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 390, in dispatch
_invoke(other_handlers)
File "/var/lib/juju/agents/unit-vault-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 359, in _invoke
handler.invoke()
File "/var/lib/juju/agents/unit-vault-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 181, in invoke
self._action(*args)
File "/var/lib/juju/agents/unit-vault-0/charm/reactive/vault_handlers.py", line 140, in snap_install
snap.install('core')
File "lib/charms/layer/snap.py", line 64, in install
_install_store(snapname, **kw)
File "lib/charms/layer/snap.py", line 345, in _install_store
out = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.8/subprocess.py", line 512, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['snap', 'install', '--channel=stable', 'core']' returned non-zero exit status 1.
Ehm, I think the closing out of this bug was an error and this still occurs. The original intent for this bug was to track spurious hook errors caused by connectivity issues with the snap store and how the layer and/or the charms should handle this better.
Just now from the Vault snap: /canonical- bos01.cdn. snapcraft. io/download- origin/ canonical- lgw01/99T7MUlRh tI3U0QFgl5mXXES AiSwt776_ 9804.snap? interactive= 1&token= 1599678000_ ef78e027e7a1f41 8499d0512263b92 6f2890670c)\n'" juju/agents/ unit-vault- 0/.venv/ lib/python3. 8/site- packages/ charms/ reactive/ __init_ _.py", line 74, in main dispatch( restricted= restricted_ mode) juju/agents/ unit-vault- 0/.venv/ lib/python3. 8/site- packages/ charms/ reactive/ bus.py" , line 390, in dispatch other_handlers) juju/agents/ unit-vault- 0/.venv/ lib/python3. 8/site- packages/ charms/ reactive/ bus.py" , line 359, in _invoke invoke( ) juju/agents/ unit-vault- 0/.venv/ lib/python3. 8/site- packages/ charms/ reactive/ bus.py" , line 181, in invoke _action( *args) juju/agents/ unit-vault- 0/charm/ reactive/ vault_handlers. py", line 140, in snap_install install( 'core') layer/snap. py", line 64, in install store(snapname, **kw) layer/snap. py", line 345, in _install_store check_output( cmd, stderr= subprocess. STDOUT) python3. 8/subprocess. py", line 411, in check_output python3. 8/subprocess. py", line 512, in run ror(retcode, process.args, CalledProcessEr ror: Command '['snap', 'install', '--channel=stable', 'core']' returned non-zero exit status 1.
2020-09-09 15:55:58 ERROR juju-log Installation failed cmd="['snap', 'install', '--channel=stable', 'core']" returncode=1 output="b'error: cannot perform the following tasks:\n- Download snap "core" (9804) from channel "stable" (received an unexpected http response code (408) when trying to download https:/
2020-09-09 15:55:58 ERROR juju-log Hook error:
Traceback (most recent call last):
File "/var/lib/
bus.
File "/var/lib/
_invoke(
File "/var/lib/
handler.
File "/var/lib/
self.
File "/var/lib/
snap.
File "lib/charms/
_install_
File "lib/charms/
out = subprocess.
File "/usr/lib/
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/
raise CalledProcessEr
subprocess.