Skip to content

mysql-router-k8s in blocked status Missing relation: database #22

@jeffreychang911

Description

@jeffreychang911

Steps to reproduce

  1. bootstrap a juju 3.6.5 controller on canonical k8s 1.32
  2. deploy the bundle here
  3. check juju status

Expected behavior

mysql-router-k8s should be in active/idle state.

Actual behavior

App Version Status Scale Charm Channel Rev Address Exposed Message
istio-pilot blocked 1 istio-pilot 1.24/stable 1359 10.152.183.166 no Execution handled 2 errors. See logs for details.
mysql-k8s 8.0.41-0ubuntu0.22.04.1 active 1 mysql-k8s 8.0/stable 240 10.152.183.236 no
neighbor 8.0.41-0ubuntu0.22.04.1 blocked 1 mysql-router-k8s 8.0/stable 599 10.152.183.50 no Missing relation: database
target 9.5.3 active 1 grafana-k8s 1/stable 93 10.152.183.109 no
vault-k8s active 1 vault-k8s 1.16/stable 323 10.152.183.39 no

Versions

Operating system:
Juju CLI: 3,6,5
Juju agent: 3.6.5
mysql-k8s charm revision: 8.0/stable rev 240
mysql-router-k8s charm revision: 8.0/stable rev 599
canonical-k8s: 1.32

Log output

Juju debug log:

2025-05-28T07:26:46.643Z [container-agent] 2025-05-28 07:26:46 DEBUG juju-log backend-database:14: ops 2.9.0 up and running.
2025-05-28T07:26:46.659Z [container-agent] 2025-05-28 07:26:46 DEBUG juju-log backend-database:14: Invalid Prometheus alert rules folder at /var/lib/juju/agents/unit-neighbor-0/charm/src/prometheus_alert_rules: directory does not exist
2025-05-28T07:26:46.664Z [container-agent] 2025-05-28 07:26:46 DEBUG juju-log backend-database:14: Invalid Loki alert rules folder at /var/lib/juju/agents/unit-neighbor-0/charm/src/loki_alert_rules: directory does not exist
2025-05-28T07:26:46.691Z [container-agent] 2025-05-28 07:26:46 DEBUG juju-log backend-database:14: no relation on 'tracing': tracing not ready
2025-05-28T07:26:46.705Z [container-agent] 2025-05-28 07:26:46 DEBUG juju-log backend-database:14: Emitting Juju event backend_database_relation_created.
2025-05-28T07:26:46.829Z [container-agent] 2025-05-28 07:26:46 DEBUG juju-log backend-database:14: Required key='endpoints' missing from databag for self._app_name='mysql-k8s' on self._endpoint_name='backend-database'
2025-05-28T07:26:46.896Z [container-agent] 2025-05-28 07:26:46 DEBUG juju-log backend-database:14: self._app_workload_container_version='neighbor-78d5b7d4f9' self._unit_workload_container_versions={'neighbor/0': 'neighbor-78d5b7d4f9'}
2025-05-28T07:26:46.946Z [container-agent] 2025-05-28 07:26:46 DEBUG juju-log backend-database:14: self._app_workload_container_version='neighbor-78d5b7d4f9' self._unit_workload_container_versions={'neighbor/0': 'neighbor-78d5b7d4f9'}
2025-05-28T07:26:46.951Z [container-agent] 2025-05-28 07:26:46 DEBUG juju-log backend-database:14: Setting self._current_versions={'charm': '1.2+fff0127-dirty', 'workload': '8.0.41'} in upgrade peer relation app databag
2025-05-28T07:26:46.961Z [container-agent] 2025-05-28 07:26:46 DEBUG juju-log backend-database:14: Set self._current_versions={'charm': '1.2+fff0127-dirty', 'workload': '8.0.41'} in upgrade peer relation app databag
2025-05-28T07:26:47.019Z [container-agent] 2025-05-28 07:26:47 DEBUG juju-log backend-database:14: Required key='endpoints' missing from databag for self._app_name='mysql-k8s' on self._endpoint_name='backend-database'
2025-05-28T07:26:47.063Z [container-agent] 2025-05-28 07:26:47 DEBUG juju-log backend-database:14: self._app_workload_container_version='neighbor-78d5b7d4f9' self.unit_workload_container_versions={'neighbor/0': 'neighbor-78d5b7d4f9'}
2025-05-28T07:26:47.077Z [container-agent] 2025-05-28 07:26:47 DEBUG juju-log backend-database:14: State of reconcile self.unit_lifecycle.authorized_leader=True, isinstance(workload, workload.AuthenticatedWorkload)=False, workload
.container_ready=True, self._database_requires.is_r
elation_breaking(event)=False, self._upgrade.in_progress=False, self._cos_relation.is_relation_breaking(event)=False
2025-05-28T07:26:47.112Z [container-agent] 2025-05-28 07:26:47 DEBUG juju-log backend-database:14: Required key='endpoints' missing from databag for self._app_name='mysql-k8s' on self._endpoint_name='backend-database'
2025-05-28T07:26:47.190Z [container-agent] 2025-05-28 07:26:47 DEBUG juju-log backend-database:14: self._app_workload_container_version='neighbor-78d5b7d4f9' self._unit_workload_container_versions={'neighbor/0': 'neighbor-78d5b7d4f9'}
2025-05-28T07:26:47.545Z [container-agent] 2025-05-28 07:26:47 DEBUG juju-log backend-database:14: Deleting TLS files
2025-05-28T07:26:47.558Z [container-agent] 2025-05-28 07:26:47 DEBUG juju-log backend-database:14: Deleted TLS files
2025-05-28T07:26:47.614Z [container-agent] 2025-05-28 07:26:47 DEBUG juju-log backend-database:14: self._app_workload_container_version='neighbor-78d5b7d4f9' self._unit_workload_container_versions={'neighbor/0': 'neighbor-78d5b7d4f9'}
2025-05-28T07:26:47.700Z [container-agent] 2025-05-28 07:26:47 DEBUG juju-log backend-database:14: self._app_workload_container_version='neighbor-78d5b7d4f9' self._unit_workload_container_versions={'neighbor/0': 'neighbor-78d5b7d4f9'}
2025-05-28T07:26:47.720Z [container-agent] 2025-05-28 07:26:47 DEBUG juju-log backend-database:14: self.partition=0, partition=0
2025-05-28T07:26:47.861Z [container-agent] 2025-05-28 07:26:47 DEBUG juju-log backend-database:14: self._app_workload_container_version='neighbor-78d5b7d4f9' self._unit_workload_container_versions={'neighbor/0': 'neighbor-78d5b7d4f9'}
2025-05-28T07:26:47.951Z [container-agent] 2025-05-28 07:26:47 DEBUG juju-log backend-database:14: Required key='endpoints' missing from databag for self._app_name='mysql-k8s' on self._endpoint_name='backend-database'
2025-05-28T07:26:48.003Z [container-agent] 2025-05-28 07:26:48 DEBUG juju-log backend-database:14: Set app status to BlockedStatus('Missing relation: database')
2025-05-28T07:26:48.029Z [container-agent] 2025-05-28 07:26:48 DEBUG juju-log backend-database:14: Required key='endpoints' missing from databag for self._app_name='mysql-k8s' on self._endpoint_name='backend-database'

Additional context

full juju debug log - https://radosgw.ps5.canonical.com/swift/v1/AUTH_f7786960f7b042b9b9e84bcf30e51d75/charm-qa/production/148054/juju-logs.tar.gz

bundle.yaml - https://radosgw.ps5.canonical.com/swift/v1/AUTH_f7786960f7b042b9b9e84bcf30e51d75/charm-qa/production/148054/generated-bundle.yaml

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions