For a single-unit deployment of MySQL, the MySQL unit reports green active status but the MySQL server is in read-only mode when attempting writes to MySQL.
I deployed the MySQL using the mysql-k8s-operator as part of the deployment of a single-node OpenStack deployment on top of Microk8s. Juju reported the deployment as completing successfully, and I was able to complete some starting configuration tasks that would require writes to the MySQL database for the OpenStack cluster.
However, when I tried to interact with OpenStack maybe 30 minutes later I found that OpenStack was reporting the database was in read-only mode and throwing an exception. OpenStack was not functional because of this issue.
After some investigation, I found that the MySQL pod had been terminated with error 137 and recreated. I did not see any OOM kills on my host server, however.
My OpenStack Canonical team mates asked me to share my experience here alongside their own similar experiences with MySQL entering read-only mode after a pod restart.
I have included my logs and information from Juju and Kubernetes. I don't have the error logs from OpenStack anymore unfortunately.
Bug Description
For a single-unit deployment of MySQL, the MySQL unit reports green active status but the MySQL server is in read-only mode when attempting writes to MySQL.
I deployed the MySQL using the mysql-k8s-operator as part of the deployment of a single-node OpenStack deployment on top of Microk8s. Juju reported the deployment as completing successfully, and I was able to complete some starting configuration tasks that would require writes to the MySQL database for the OpenStack cluster.
However, when I tried to interact with OpenStack maybe 30 minutes later I found that OpenStack was reporting the database was in read-only mode and throwing an exception. OpenStack was not functional because of this issue.
After some investigation, I found that the MySQL pod had been terminated with error 137 and recreated. I did not see any OOM kills on my host server, however.
My OpenStack Canonical team mates asked me to share my experience here alongside their own similar experiences with MySQL entering read-only mode after a pod restart.
I have included my logs and information from Juju and Kubernetes. I don't have the error logs from OpenStack anymore unfortunately.
To Reproduce
Follow the steps listed in the guide at https://discourse.ubuntu.com/t/install-and-configure-microstack-sunbeam-single-node/32157.
I installed the Microstack snap from the sunbeam/edge/jamespage channel instead of the sunbeam/beta channel as recommended in that guide.
Environment
I'm running Juju 3.0/stable.
Microk8s version 1.25.3; revision 4127; tracking 1.25-dtrict/stable
Microstack version xena; revision 303; tracking sunbeam/edge/jamespage
Processor: Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz RAM: 8GB
Relevant log output
Additional context
Similar issue to the following existing issues: https://github.com/canonical/mysql-k8s-operator/issues/107 https://github.com/canonical/mysql-k8s-operator/issues/96