Comment 18 for bug 1839616

Revision history for this message
Frode Nordahl (fnordahl) wrote :

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.