Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

K8s: Disabling RUN_MYSQL should also not deploy the mysql init job #1017

Open
waza-ari opened this issue Mar 17, 2024 · 1 comment
Open

K8s: Disabling RUN_MYSQL should also not deploy the mysql init job #1017

waza-ari opened this issue Mar 17, 2024 · 1 comment

Comments

@waza-ari
Copy link
Contributor

Bug description

When trying to run tutor with an external MYSQL database, we're setting RUN_MYSQL to false which prevents the pod to be created. It does however still create the MySQL init job, which is doing nothing else than creating the database for openedx.

We'd prefer not to specify root credentials here, but instead specify credentials directly using:

tutor config save --set RUN_MYSQL=false
tutor config save --set MYSQL_HOST=mysql.database.svc.cluster.local
tutor config save --set OPENEDX_MYSQL_DATABASE=openedx_dev_dev
tutor config save --set OPENEDX_MYSQL_USERNAME=openedx_dev_dev
tutor config save --set OPENEDX_MYSQL_PASSWORD=XXX

Use case would be a centrally operated database, in our environment using a database operator within k8s.

How to reproduce
When trying to bring up the platform, it will fail with the following error message:

kubectl apply --kustomize /Users/dherrman/Coding/ArgoProjects/openedx-dev/tutor/env --selector app.kubernetes.io/name=mysql-job-20240317133311
job.batch/mysql-job-20240317133311 created
Job mysql-job-20240317133311 is running. To view the logs from this job, run:

    kubectl logs --namespace=openedx-dev --follow $(kubectl get --namespace=openedx-dev pods --selector=job-name=mysql-job-20240317133311 -o=jsonpath="{.items[0].metadata.name}")

Waiting for job completion...
Error: Job mysql-job-20240317133311 failed. View the job logs to debug this issue.

Either RUN_MYSQL should also prevent the job from being created, or we may want to introduce another variable to achieve that.

Environment
Mac OS Sonoma 14.2.1
Tutor version tutor, version 17.0.2

@DawoudSheraz DawoudSheraz moved this from Pending Triage to Backlog in Tutor project management Mar 19, 2024
@regisb
Copy link
Contributor

regisb commented Mar 26, 2024

Ditching the mysql init job entirely seems rather drastic, so I'm not sure that's the actual solution to your problem. Can you please provide us with the logs from the mysql init job to understand why it's failing? (be careful not to share production credentials from these logs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants