oracle / mysql-operator

Create, operate and scale self-healing MySQL clusters in Kubernetes
870 stars 235 forks source link

Failed to get the cluster status: exit status 1 #293

Closed nataz77 closed 5 years ago

nataz77 commented 5 years ago

Is this a BUG REPORT or FEATURE REQUEST?

BUG REPORT

Versions

MySQL Operator Version: 0.3.0

Environment:

What happened?

I was trying to create a new cluster, but wherever the first pod starts, the agent throws an error and won't work correctly.

E1029 17:10:27.196303 1 cluster_manager.go:126] Failed to get the cluster status: exit status 1 getting cluster status from group seeds github.com/oracle/mysql-operator/pkg/controllers/cluster/manager.(ClusterManager).getClusterStatus /go/src/github.com/oracle/mysql-operator/pkg/controllers/cluster/manager/cluster_manager.go:106 github.com/oracle/mysql-operator/pkg/controllers/cluster/manager.(ClusterManager).Sync /go/src/github.com/oracle/mysql-operator/pkg/controllers/cluster/manager/cluster_manager.go:122 github.com/oracle/mysql-operator/cmd/mysql-agent/app.Run /go/src/github.com/oracle/mysql-operator/cmd/mysql-agent/app/mysql_agent.go:108 main.main /go/src/github.com/oracle/mysql-operator/cmd/mysql-agent/main.go:51 runtime.main /usr/local/go/src/runtime/proc.go:195 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:2337

What you expected to happen?

The correct startup of the cluster

How to reproduce it (as minimally and precisely as possible)?

1) kubectl create ns dgitest 2)

cat <<EOF | kubectl create -f -
apiVersion: mysql.oracle.com/v1alpha1
kind: Cluster
metadata:
  name: mysql
  namespace: dgitest
spec:
  imagePullPolicy: Always
  members: 1
  rootPasswordSecret:
    name: mysql-root-user-secret
  volumeClaimTemplate:
    metadata:
      name: data
    spec:
      storageClassName: sc-9899q
      accessModes:
        - ReadWriteMany
      resources:
        requests:
          storage: 10Gi
EOF

Anything else we need to know?

The storage class is based on GlusterFS and Heketi, and it's currenty able to provision new volumes correctly. Whenever I run the command above to deploy the cluster it creates the PVC correctly.

daniel-sullivan commented 5 years ago

Experiencing the same issue here. Did you end up having any luck with it?

nataz77 commented 5 years ago

Unfortunately not, still trying to work around it.

daniel-sullivan commented 5 years ago

Apologies for the delay from my end - actually got it working! Turns out that if your rootPasswordSecret contains any interesting characters (I'm guessing a "$"?) it fails like that (I troubleshot by going back to the most simple config and re-adding attributes until it failed)

nataz77 commented 5 years ago

There was a $ indeed in the password; removing that everything went fine! Thank you @daniel-sullivan !

imranrazakhan commented 4 years ago

I have plain text for password and still getting error, Infact i am able to login to mysql container and run queries

bweston92 commented 4 years ago

@imranrazakhan what version of Kubernetes are you running? Are the MySQL pods there?

imranrazakhan commented 4 years ago

@bweston92 I have kubernetes 1.17.3 and yes Pods are available, i have to edit stateful apiversion to make it work for 1.17.3