prometheus-k8s-operator icon indicating copy to clipboard operation
prometheus-k8s-operator copied to clipboard

"certificates-relation-changed" hook failed during deployment

Open jeffreychang911 opened this issue 5 months ago • 3 comments

Bug Description

SolQA deploy cos-lite bundle, and found prometheus unit error out with hook failed: "certificates-relation-changed" And logs shows unit-prometheus-0: 2024-02-02 13:16:59 ERROR juju.worker.uniter.operation hook "certificates-relation-changed" (via hook dispatching script: dispatch) failed: creating secrets: Regular expression is invalid: nothing to repeat

Testrun - https://solutions.qa.canonical.com/testruns/a26eac10-e2de-4fdd-b1b8-c96c0cb1e34c

To Reproduce

Deploy COS-lite bundle on top of mk8s

Environment

COS apps and channels as follow

App Version Status Scale Charm Channel Rev Address Exposed Message alertmanager 0.25.0 active 2 alertmanager-k8s stable 96 10.152.183.185 no
avalanche active 2 avalanche-k8s edge 37 10.152.183.233 no
ca active 1 self-signed-certificates edge 72 10.152.183.240 no
catalogue active 1 catalogue-k8s stable 33 10.152.183.79 no
external-ca active 1 self-signed-certificates edge 72 10.152.183.130 no
grafana 9.2.1 active 1 grafana-k8s stable 93 10.152.183.56 no
loki 2.7.4 active 1 loki-k8s stable 105 10.152.183.124 no
prometheus 2.47.2 waiting 1 prometheus-k8s stable 159 10.152.183.123 no installing agent traefik 2.10.4 active 1 traefik-k8s stable 166 10.246.167.216 no

Relevant log output

unit-prometheus-0: 2024-02-02 13:16:59 DEBUG juju.kubernetes.provider opening model "cos".
model-bb62bdfc-3c5b-4df0-8d33-a2ffc81faced: 2024-02-02 13:16:59 DEBUG juju.worker.muxhttpserver received tls client hello for server name modeloperator.cos.svc
model-bb62bdfc-3c5b-4df0-8d33-a2ffc81faced: 2024-02-02 13:16:59 DEBUG juju.worker.caasadmission received admission request for cmuemhnmp25aiuiqasvg-1 of /v1, Kind=Secret in namespace cos
unit-prometheus-0: 2024-02-02 13:16:59 ERROR juju.worker.uniter.context cannot apply changes: creating secrets: Regular expression is invalid: nothing to repeat
model-bb62bdfc-3c5b-4df0-8d33-a2ffc81faced: 2024-02-02 13:16:59 DEBUG juju.worker.caasadmission received admission request for unit-prometheus-0 of /v1, Kind=ServiceAccount in namespace cos
model-bb62bdfc-3c5b-4df0-8d33-a2ffc81faced: 2024-02-02 13:16:59 DEBUG juju.worker.caasadmission received admission request for unit-prometheus-0 of /v1, Kind=ServiceAccount in namespace cos
model-bb62bdfc-3c5b-4df0-8d33-a2ffc81faced: 2024-02-02 13:16:59 DEBUG juju.worker.caasadmission received admission request for unit-prometheus-0 of rbac.authorization.k8s.io/v1, Kind=Role in namespace cos
model-bb62bdfc-3c5b-4df0-8d33-a2ffc81faced: 2024-02-02 13:16:59 DEBUG juju.worker.caasadmission received admission request for unit-prometheus-0 of rbac.authorization.k8s.io/v1, Kind=RoleBinding in namespace cos
unit-prometheus-0: 2024-02-02 13:16:59 DEBUG juju.kubernetes.provider opening model "cos".
unit-prometheus-0: 2024-02-02 13:16:59 ERROR juju.worker.uniter.operation hook "certificates-relation-changed" (via hook dispatching script: dispatch) failed: creating secrets: Regular expression is invalid: nothing to repeat
unit-prometheus-0: 2024-02-02 13:16:59 DEBUG juju.machinelock created rotating log file "/var/log/juju/machine-lock.log" with max size 10 MB and max backups 5
unit-prometheus-0: 2024-02-02 13:16:59 DEBUG juju.machinelock machine lock "machine-lock" released for prometheus/0 uniter (run relation-changed (31; app: ca) hook)
unit-prometheus-0: 2024-02-02 13:16:59 DEBUG juju.worker.uniter.operation lock released for prometheus/0
unit-prometheus-0: 2024-02-02 13:16:59 INFO juju.worker.uniter awaiting error resolution for "relation-changed" hook
unit-prometheus-0: 2024-02-02 13:16:59 DEBUG juju.worker.uniter [AGENT-STATUS] error: hook failed: "certificates-relation-changed"

Additional context

No response

jeffreychang911 avatar Feb 05 '24 16:02 jeffreychang911