medic / upgrade-service-kubernetes

Upgrade service for k8s
0 stars 0 forks source link

Clustered CouchDb upgrades only upgrade one CouchDb deployment #14

Closed dianabarsan closed 7 months ago

dianabarsan commented 7 months ago

Describe the bug When upgrading a deployment that has a multi-node CouchDb, only one of the CouchDb deployments are actually upgraded to the correct version.

To Reproduce

Steps to reproduce the behavior:

  1. Deploy 4.4.0 with clustered CouchDb.
  2. Check deployment image tags (in this example my namespace is called dev):
    kubectl get deployment -n dev -o wide                                                                                                                                                       
    NAME                      READY   UP-TO-DATE   AVAILABLE   AGE   CONTAINERS                IMAGES                                               SELECTOR
    upgrade-service           1/1     1            1           17m   upgrade-service           medicmobile/upgrade-service:0.31                     cht.service=upgrade-service
    cht-couchdb-3             1/1     1            1           17m   cht-couchdb-3             public.ecr.aws/medic/cht-couchdb:4.4.0               cht.service=couchdb-3
    cht-couchdb-1             1/1     1            1           17m   cht-couchdb-1             public.ecr.aws/medic/cht-couchdb:4.4.0               cht.service=couchdb-1
    cht-couchdb-2             1/1     1            1           17m   cht-couchdb-2             public.ecr.aws/medic/cht-couchdb:4.4.0               cht.service=couchdb-2
    cht-sentinel              1/1     1            1           17m   cht-sentinel              public.ecr.aws/medic/cht-sentinel:4.4.0              cht.service=sentinel
    cht-api                   1/1     1            1           17m   cht-api                   public.ecr.aws/medic/cht-api:4.4.0                   cht.service=api
    cht-haproxy-healthcheck   1/1     1            1           17m   cht-haproxy-healthcheck   public.ecr.aws/medic/cht-haproxy-healthcheck:4.4.0   cht.service=healthcheck
    cht-haproxy               1/1     1            1           17m   cht-haproxy               public.ecr.aws/medic/cht-haproxy:4.4.0               cht.service=haproxy
  3. Open the Admin Upgrade page and upgrade to another version - for example 4.5.2
  4. Wait for the upgrade to complete and check deployments again:
    kubectl get deployment -n dev -o wide                                                                                                                                                        
    NAME                      READY   UP-TO-DATE   AVAILABLE   AGE   CONTAINERS                IMAGES                                               SELECTOR
    upgrade-service           1/1     1            1           19m   upgrade-service           medicmobile/upgrade-service:0.31                     cht.service=upgrade-service
    cht-couchdb-1             1/1     1            1           19m   cht-couchdb-1             public.ecr.aws/medic/cht-couchdb:4.4.0               cht.service=couchdb-1
    cht-couchdb-2             1/1     1            1           19m   cht-couchdb-2             public.ecr.aws/medic/cht-couchdb:4.4.0               cht.service=couchdb-2
    cht-api                   0/1     1            0           19m   cht-api                   public.ecr.aws/medic/cht-api:4.5.2                   cht.service=api
    cht-haproxy-healthcheck   1/1     1            1           19m   cht-haproxy-healthcheck   public.ecr.aws/medic/cht-haproxy-healthcheck:4.5.2   cht.service=healthcheck
    cht-haproxy               1/1     1            1           19m   cht-haproxy               public.ecr.aws/medic/cht-haproxy:4.5.2               cht.service=haproxy
    cht-couchdb-3             0/1     1            0           19m   cht-couchdb-3             public.ecr.aws/medic/cht-couchdb:4.5.2               cht.service=couchdb-3
    cht-sentinel              1/1     1            1           19m   cht-sentinel              public.ecr.aws/medic/cht-sentinel:4.5.2              cht.service=sentinel
  5. Only one of the CouchDb nodes is on 4.5.2, while the others are still on 4.4.0.

Expected behavior All CouchDb nodes should be upgraded.

Logs No errors.

Environment

dianabarsan commented 7 months ago

Merged and deployed in v 0.32