Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always retry mongo-on-update on failure #320

Merged
merged 3 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
- "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`.
- 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)
- We make sure that the automatic cleanup job only runs before deployment (instead of cron schedule cleanup).
- Previously it was possible MongoDB replica set and users were left randomly uninitialised after a deployment. MongoDB initialisation container now retries on failure.
- On some machines 'file' utility was not preinstalled causing provision to fail. We now install the utility if it doesn't exist.

### Breaking changes

Expand Down
5 changes: 4 additions & 1 deletion infrastructure/docker-compose.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,11 @@ services:
labels:
- traefik.enable=false
replicas: 1
# If this doesn't get run successfully, both the replica set in mongo and
# the user schema remains uninitialized.
restart_policy:
condition: none
condition: on-failure
delay: 10s
environment:
- REPLICAS=1
- MONGODB_ADMIN_USER=${MONGODB_ADMIN_USER}
Expand Down
7 changes: 7 additions & 0 deletions infrastructure/server-setup/tasks/swap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
tags:
- swap.file.permissions

- name: Ensure 'file' utility is installed
ansible.builtin.package:
name: file
state: present
tags:
- swap.file.mkswap

- name: 'Check swap file type'
command: file {{ swap_file_path }}
register: swapfile
Expand Down