medic / cht-core

The CHT Core Framework makes it faster to build responsive, offline-first digital health apps that equip health workers to provide better care in their communities. It is a central resource of the Community Health Toolkit.
https://communityhealthtoolkit.org
GNU Affero General Public License v3.0
439 stars 207 forks source link

CHT Upgrade failing in docker helper 4.x #9235

Open sugat009 opened 2 months ago

sugat009 commented 2 months ago

Describe the bug

I tried upgrading a 4.x CHT docker helper instance of CHT version 4.6.0 to 4.9.0 and the upgrade failed. The browser shows the 502 Bad Gateway page whereas the containers have been stopped if you look into the terminal.

To Reproduce

Steps to reproduce the behavior:

  1. Start a CHT docker helper 4.x instance
  2. Start the upgrade
  3. Reload page
  4. Check docker containers

Environment

Additional context

I'm not sure which logs to put here so I haven't put anything. Please request the necessary information as required.

garethbowen commented 1 month ago

Also found on the forum: https://forum.communityhealthtoolkit.org/t/error-while-updating-cht-from-4-5-to-4-9/3766

mrjones-plip commented 1 month ago

Upgrades should work! I have done this many times in the past and just now deployed a 4.1.1 version in docker helper and successfully upgraded it to 4.2.4. Docker Helper deploys a 1:1 dir-cht-upgrade-service for each local CHT deployment specifically to enable in place upgrades.

Here's a list of services running for my test upgrade just now:

➜  ~ docker ps  --format '{{ .Names }}'
test_4_1_1_to_4_2_0_upgrade-nginx-1
test_4_1_1_to_4_2_0_upgrade-sentinel-1
test_4_1_1_to_4_2_0_upgrade-api-1
test_4_1_1_to_4_2_0_upgrade-haproxy-1
test_4_1_1_to_4_2_0_upgrade-healthcheck-1
test_4_1_1_to_4_2_0_upgrade-couchdb-1
test_4_1_1_to_4_2_0_upgrade-dir-cht-upgrade-service-1

so, this ticket is great to capture that upgrades at some point stopped working in helper.