canonical / mysql-k8s-operator

A Charmed Operator for running MySQL on Kubernetes
https://charmhub.io/mysql-k8s
Apache License 2.0
8 stars 16 forks source link

Stuck on "Initialising mysqld": `RuntimeError: No active exception to reraise` #390

Closed IsaacJT closed 5 months ago

IsaacJT commented 8 months ago

Steps to reproduce

  1. Install the Kubeflow charm as per https://charmed-kubeflow.io/docs/get-started-with-charmed-kubeflow

Expected behavior

The katia-db/0 charm (mysql-k8s) initialises correctly.

Actual behavior

mysql-k8s charm gets stuck while initialising and repeatedly outputs the following error without any meaningful messages (No active exception to reraise):

unit-katib-db-0: 10:55:09 DEBUG unit.katib-db/0.juju-log ops 2.9.0 up and running.
unit-katib-db-0: 10:55:09 DEBUG unit.katib-db/0.juju-log Emitting Juju event mysql_pebble_ready.
unit-katib-db-0: 10:55:10 DEBUG unit.katib-db/0.juju-log Memory constrained to 2Gi from resource limit
unit-katib-db-0: 10:55:10 INFO unit.katib-db/0.juju-log Setting up the logrotate configurations
unit-katib-db-0: 10:55:10 DEBUG unit.katib-db/0.juju-log Creating the logrotate config file
unit-katib-db-0: 10:55:10 DEBUG unit.katib-db/0.juju-log Writing the logrotate config file to the workload container
unit-katib-db-0: 10:55:10 DEBUG unit.katib-db/0.juju-log Initializing instance
unit-katib-db-0: 10:55:10 DEBUG unit.katib-db/0.juju-log Data directory ownership: mysql:mysql
unit-katib-db-0: 10:55:13 ERROR unit.katib-db/0.juju-log Exited with code 1. Stderr:
unit-katib-db-0: 10:55:13 DEBUG unit.katib-db/0.juju-log Unable to configure instance:
unit-katib-db-0: 10:55:13 ERROR unit.katib-db/0.juju-log Uncaught exception while in charm code:
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-katib-db-0/charm/./src/charm.py", line 786, in <module>
    main(MySQLOperatorCharm)
  File "/var/lib/juju/agents/unit-katib-db-0/charm/venv/ops/main.py", line 436, in main
    _emit_charm_event(charm, dispatcher.event_name)
  File "/var/lib/juju/agents/unit-katib-db-0/charm/venv/ops/main.py", line 144, in _emit_charm_event
    event_to_emit.emit(*args, **kwargs)
  File "/var/lib/juju/agents/unit-katib-db-0/charm/venv/ops/framework.py", line 351, in emit
    framework._emit(event)
  File "/var/lib/juju/agents/unit-katib-db-0/charm/venv/ops/framework.py", line 853, in _emit
    self._reemit(event_path)
  File "/var/lib/juju/agents/unit-katib-db-0/charm/venv/ops/framework.py", line 942, in _reemit
    custom_handler(event)
  File "/var/lib/juju/agents/unit-katib-db-0/charm/./src/charm.py", line 590, in _on_mysql_pebble_ready
    raise
RuntimeError: No active exception to reraise
unit-katib-db-0: 10:55:13 ERROR juju.worker.uniter.operation hook "mysql-pebble-ready" (via hook dispatching script: dispatch) failed: exit status 1
unit-katib-db-0: 10:55:13 ERROR juju.worker.uniter pebble poll failed for container "mysql": failed to send pebble-ready event: hook failed
$ juju status katib-db
Model     Controller  Cloud/Region      Version  SLA          Timestamp
kubeflow  uk8sx       my-k8s/localhost  3.1.7    unsupported  10:56:37Z

App       Version  Status   Scale  Charm      Channel     Rev  Address        Exposed  Message
katib-db           waiting      1  mysql-k8s  8.0/stable  113  10.152.183.65  no       installing agent

Unit         Workload     Agent      Address       Ports  Message
katib-db/0*  maintenance  executing  10.1.142.191         Initialising mysqld

Versions

Operating system: Ubuntu 22.04.4 LTS

Juju CLI: 3.1.7-genericlinux-amd64

Juju agent: 3.1.7

Charm revision: 113

microk8s: 1.29

Log output

The log is simply what I posted above repeatedly.

github-actions[bot] commented 8 months ago

https://warthogs.atlassian.net/browse/DPE-3795

paulomach commented 5 months ago

Unable to reproduce on current stable (rev127). If occurs again, please reopen