Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
6.4.14
-
None
-
kubernetes
-
MXS-SPRINT-203
Description
Here is my statefulset
apiVersion: apps/v1
|
kind: StatefulSet
|
metadata:
|
name: test1-mariadb-maxscale
|
namespace: test1-mariadb
|
...
|
spec:
|
replicas: 1
|
selector:
|
matchLabels:
|
app.kubernetes.io/instance: test1-mariadb-maxscale
|
app.kubernetes.io/name: maxscale
|
template:
|
metadata:
|
name: test1-mariadb-maxscale
|
namespace: test1-mariadb
|
creationTimestamp: null
|
labels:
|
app.kubernetes.io/instance: test1-mariadb-maxscale
|
app.kubernetes.io/name: maxscale
|
spec:
|
volumes:
|
- name: config
|
secret:
|
secretName: test1-mariadb-maxscale-config
|
defaultMode: 420
|
containers:
|
- name: maxscale
|
image: mariadb/maxscale:23.08
|
command:
|
- maxscale
|
args:
|
- '--config'
|
- /etc/config/maxscale.cnf
|
- '-dU'
|
- maxscale
|
- '-l'
|
- stdout
|
ports:
|
- name: admin
|
containerPort: 8989
|
protocol: TCP
|
resources: {}
|
volumeMounts:
|
- name: storage
|
mountPath: /var/lib/maxscale
|
- name: config
|
mountPath: /etc/config
|
livenessProbe:
|
httpGet:
|
path: /
|
port: 8989
|
scheme: HTTP
|
initialDelaySeconds: 20
|
timeoutSeconds: 5
|
periodSeconds: 10
|
successThreshold: 1
|
failureThreshold: 3
|
readinessProbe:
|
httpGet:
|
path: /
|
port: 8989
|
scheme: HTTP
|
initialDelaySeconds: 20
|
timeoutSeconds: 5
|
periodSeconds: 10
|
successThreshold: 1
|
failureThreshold: 3
|
terminationMessagePath: /dev/termination-log
|
terminationMessagePolicy: File
|
imagePullPolicy: IfNotPresent
|
restartPolicy: Always
|
terminationGracePeriodSeconds: 30
|
dnsPolicy: ClusterFirst
|
serviceAccountName: test1-mariadb-maxscale
|
serviceAccount: test1-mariadb-maxscale
|
automountServiceAccountToken: false
|
securityContext: {}
|
schedulerName: default-scheduler
|
volumeClaimTemplates:
|
- kind: PersistentVolumeClaim
|
apiVersion: v1
|
metadata:
|
name: storage
|
creationTimestamp: null
|
spec:
|
accessModes:
|
- ReadWriteOnce
|
resources:
|
requests:
|
storage: 100Mi
|
volumeMode: Filesystem
|
serviceName: test1-mariadb-maxscale-internal
|
podManagementPolicy: Parallel
|
updateStrategy:
|
type: RollingUpdate
|
revisionHistoryLimit: 10
|
And here is the log output:
2024-02-13 13:53:51 notice : MaxScale will be run in the terminal process.
|
2024-02-13 13:53:51 notice : /etc/config/..2024_02_13_13_53_43.4123823925/maxscale.cnf.d does not exist, not reading.
|
2024-02-13 13:53:51 notice : /var/lib/maxscale/maxscale.cnf.d does not exist, not reading.
|
2024-02-13 13:53:51 notice : Using up to 2.29GiB of memory for query classifier cache
|
2024-02-13 13:53:51 notice : syslog logging is disabled.
|
2024-02-13 13:53:51 notice : maxlog logging is enabled.
|
2024-02-13 13:53:51 error : Failed to create directory '/var/lib/maxscale/maxscale.cnf.d': 13, Permission denied
|
2024-02-13 13:53:51 alert : Can't access '/var/lib/maxscale/maxscale.cnf.d'.: No such file or directory
|
So please modify the entrypoint script to do the chown before maxscale starts.
I also created an issue here: https://github.com/mariadb-operator/mariadb-operator/issues/381 but I think this problem is not related to the operator but the docker image.