Skip to content

Commit 733b69d

Browse files
authored
Always retry mongo-on-update on failure (#320)
1 parent dd3cf02 commit 733b69d

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
- "Publish release" pipeline now correctly uses the "Branch to build from" value as the branch to be tagged. Previously it tried tagging "master". "Release tag" is also now used as the release version as is instead of it being read from `package.json`.
1414
- Backup process now doesn't require internet connection to download docker images thus working more reliably when internet connections are unreliable. Previously non-active images were cleaned nightly, now we only do it as part of deployment. [#7896](https://github.com/opencrvs/opencrvs-core/issues/7896)
1515
- We make sure that the automatic cleanup job only runs before deployment (instead of cron schedule cleanup).
16+
- Previously it was possible MongoDB replica set and users were left randomly uninitialised after a deployment. MongoDB initialisation container now retries on failure.
17+
- On some machines 'file' utility was not preinstalled causing provision to fail. We now install the utility if it doesn't exist.
1618

1719
### Breaking changes
1820

infrastructure/docker-compose.deploy.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,11 @@ services:
226226
labels:
227227
- traefik.enable=false
228228
replicas: 1
229+
# If this doesn't get run successfully, both the replica set in mongo and
230+
# the user schema remains uninitialized.
229231
restart_policy:
230-
condition: none
232+
condition: on-failure
233+
delay: 10s
231234
environment:
232235
- REPLICAS=1
233236
- MONGODB_ADMIN_USER=${MONGODB_ADMIN_USER}

infrastructure/server-setup/tasks/swap.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@
1414
tags:
1515
- swap.file.permissions
1616

17+
- name: Ensure 'file' utility is installed
18+
ansible.builtin.package:
19+
name: file
20+
state: present
21+
tags:
22+
- swap.file.mkswap
23+
1724
- name: 'Check swap file type'
1825
command: file {{ swap_file_path }}
1926
register: swapfile

0 commit comments

Comments
 (0)