hook failed: "certificates-relation-joined" due to InternalServerError

Bug #1982391 reported by Konstantinos Kaskavelis
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vault-charm
New
Undecided
Unassigned

Bug Description

We have a failed test run where in kubernetes-aws, vault/0 is in an error state due to:

hook failed: "certificates-relation-joined"

From the logs, we get:

2022-07-19 18:43:54 ERROR unit.vault/0.juju-log server.go:319 certificates:82: 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 1030, in create_certs
    bundle = vault_pki.generate_certificate(cert_type,
  File "/var/lib/juju/agents/unit-vault-0/charm/lib/charm/vault_pki.py", line 126, in generate_certificate
    response = client.write('{}/issue/{}'.format(CHARM_PKI_MP, role),
  File "/var/lib/juju/agents/unit-vault-0/.venv/lib/python3.8/site-packages/hvac/v1/__init__.py", line 189, in write
    response = self._adapter.post('/v1/{0}'.format(path), json=kwargs, wrap_ttl=wrap_ttl)
  File "/var/lib/juju/agents/unit-vault-0/.venv/lib/python3.8/site-packages/hvac/adapters.py", line 103, in post
    return self.request('post', url, **kwargs)
  File "/var/lib/juju/agents/unit-vault-0/.venv/lib/python3.8/site-packages/hvac/adapters.py", line 233, in request
    utils.raise_for_error(response.status_code, text, errors=errors)
  File "/var/lib/juju/agents/unit-vault-0/.venv/lib/python3.8/site-packages/hvac/utils.py", line 39, in raise_for_error
    raise exceptions.InternalServerError(message, errors=errors)
hvac.exceptions.InternalServerError: 1 error occurred:
        * unable to store certificate locally: invalid connection

Test run:

https://solutions.qa.canonical.com/testruns/testRun/717b405e-d3c0-4349-b764-5c35ea4bea5d

Logs:

https://oil-jenkins.canonical.com/artifacts/717b405e-d3c0-4349-b764-5c35ea4bea5d/index.html

Tags: cdo-qa
tags: added: cdo-qa
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.