openshift-labs / lab-build-your-own-operator

Build your own Kubernetes Operator
Apache License 2.0
7 stars 5 forks source link

Etcd cluster upgrade not working? #10

Open ryanj opened 5 years ago

ryanj commented 5 years ago

In the "Scale the Etcd Cluster" section, there is a step that instructs the user to update the spec.version setting to upgrade the datastore from release v3.1.10 to v3.2.13:

oc patch etcdcluster example-etcd-cluster --type='json' -p '[{"op": "replace", "path": "/spec/version", "value":3.2.13}]'

Expected: The following text is provided for the user: "This will take a while, but we will see pods being stopped and created as the version of the cluster is being upgraded."

Observed: The cluster kept running version v3.1.10. I didn't see any of the pods being stopped or restarted by the operator in order to perform the upgrade to v3.2.13

madorn commented 5 years ago

I can't replicate this issue...

When I patch the CR, the pods update to 3.2.13:

example-etcd-cluster-9dhk8rxp7v   1/1       Running   0         11m
example-etcd-cluster-9dhk8rxp7v   0/1       Running   1         11m
example-etcd-cluster-b26tpqj7zt   1/1       Running   0         10m
example-etcd-cluster-b26tpqj7zt   0/1       Running   1         10m
example-etcd-cluster-9dhk8rxp7v   1/1       Running   1         11m
example-etcd-cluster-b26tpqj7zt   1/1       Running   1         10m
example-etcd-cluster-c4w24r9v4j   1/1       Running   0         10m
example-etcd-cluster-c4w24r9v4j   0/1       Running   1         10m
example-etcd-cluster-c4w24r9v4j   1/1       Running   1         11m
example-etcd-cluster-hb9pqgcwr9   1/1       Running   0         11m
example-etcd-cluster-hb9pqgcwr9   0/1       Running   1         11m
example-etcd-cluster-hb9pqgcwr9   1/1       Running   1         11m
example-etcd-cluster-w2xsrgq9bw   1/1       Running   0         10m
example-etcd-cluster-w2xsrgq9bw   0/1       Running   1         10m
$ oc get pod -l etcd_cluster=example-etcd-cluster -o yaml | grep "image: quay.io"
      image: quay.io/coreos/etcd:v3.2.13
      image: quay.io/coreos/etcd:v3.2.13
      image: quay.io/coreos/etcd:v3.2.13
      image: quay.io/coreos/etcd:v3.2.13
      image: quay.io/coreos/etcd:v3.2.13
      image: quay.io/coreos/etcd:v3.2.13
      image: quay.io/coreos/etcd:v3.2.13
      image: quay.io/coreos/etcd:v3.2.13
      image: quay.io/coreos/etcd:v3.2.13
      image: quay.io/coreos/etcd:v3.2.13