stable/2023.1: vault fails to deploy due to lack of chown

Bug #2040266 reported by Matt Verran
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Snap
Status tracked in 2023.2
2023.1
Triaged
High
Unassigned
2023.2
Fix Released
High
Unassigned

Bug Description

$ snap list openstack
Name Version Rev Tracking Publisher Notes
openstack 2023.1 274 2023.1/stable canonical✓ -

On activating vault (sunbeam enable vault) it fails due to the below:-

unit-vault-0: 11:44:36 ERROR unit.vault/0.juju-log Uncaught exception while in charm code:
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-vault-0/charm/venv/ops/pebble.py", line 1491, in _request_raw
    response = self.opener.open(request, timeout=self.timeout)
  File "/usr/lib/python3.10/urllib/request.py", line 525, in open
    response = meth(req, response)
  File "/usr/lib/python3.10/urllib/request.py", line 634, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.10/urllib/request.py", line 563, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.10/urllib/request.py", line 643, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: Bad Request

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-vault-0/charm/./src/charm.py", line 209, in <module>
    main(VaultCharm)
  File "/var/lib/juju/agents/unit-vault-0/charm/venv/ops/main.py", line 441, in main
    _emit_charm_event(charm, dispatcher.event_name)
  File "/var/lib/juju/agents/unit-vault-0/charm/venv/ops/main.py", line 149, in _emit_charm_event
    event_to_emit.emit(*args, **kwargs)
  File "/var/lib/juju/agents/unit-vault-0/charm/venv/ops/framework.py", line 354, in emit
    framework._emit(event)
  File "/var/lib/juju/agents/unit-vault-0/charm/venv/ops/framework.py", line 830, in _emit
    self._reemit(event_path)
  File "/var/lib/juju/agents/unit-vault-0/charm/venv/ops/framework.py", line 919, in _reemit
    custom_handler(event)
  File "/var/lib/juju/agents/unit-vault-0/charm/./src/charm.py", line 108, in _on_config_changed
    self._patch_storage_ownership()
  File "/var/lib/juju/agents/unit-vault-0/charm/./src/charm.py", line 182, in _patch_storage_ownership
    self._container.exec(command=command)
  File "/var/lib/juju/agents/unit-vault-0/charm/venv/ops/model.py", line 2356, in exec
    return self._pebble.exec(
  File "/var/lib/juju/agents/unit-vault-0/charm/venv/ops/pebble.py", line 2210, in exec
    resp = self._request('POST', '/v1/exec', body=body)
  File "/var/lib/juju/agents/unit-vault-0/charm/venv/ops/pebble.py", line 1458, in _request
    response = self._request_raw(method, path, query, headers, data)
  File "/var/lib/juju/agents/unit-vault-0/charm/venv/ops/pebble.py", line 1502, in _request_raw
    raise APIError(body, code, status, message)
ops.pebble.APIError: exec: "chown": executable file not found in $PATH

Revision history for this message
Matt Verran (mv-2112) wrote :

Feels like it might be related to changes in vault-k8s-operator around using ROCK based image instead of docker image?

https://github.com/canonical/vault-k8s-operator/pull/42/files/462653c743f676914a32f3df774fd83dca2a9677

Revision history for this message
Matt Verran (mv-2112) wrote :

For noting, this appears to be fixed in 2023.2/edge, at least with sunbeam enable secrets.

Definitely broken in 2023.1/stable

Revision history for this message
James Page (james-page) wrote :

The current 2023.1/stable channel of the snap deploys r11 of the vault-k8s charm which has this issue; edge channels deploy a much later revision (32) which does not suffer from the same problem.

We'll need to get this resolved into stable.

summary: - Vault fails to deploy due to lack of chown
+ stable/2023.1: vault fails to deploy due to lack of chown
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.