Skip to content

Conversation

@adskyiproger
Copy link
Contributor

@adskyiproger adskyiproger commented Oct 9, 2025

Description

PR addresses issue: opencrvs/opencrvs-core#10204

Official documentation: https://docs.ansible.com/ansible/latest/collections/ansible/builtin/apt_module.html#parameter-dpkg_options

Minor fix to k8s implementation and few additional tests: opencrvs/infrastructure#116

Testing

All tests were performed on farajaland-v19-beta-staging

Before running any tests make sure provision script is not broken: https://github.com/opencrvs/opencrvs-farajaland/actions/runs/18375887375/job/52349718950
image

Downgrade openssh-server version

Following command performs downgrade:

sudo apt install openssh-server=1:9.6p1-3ubuntu13.11 \
openssh-client=1:9.6p1-3ubuntu13.11 \
openssh-sftp-server=1:9.6p1-3ubuntu13.11 \
--allow-downgrades -y

Make sure rollback was successful:

apt search openssh-server

Output example:
image

Run upgrade manually and make sure confirmation dial pop-up:

sudo apt upgrade -y

Output:
image

In confirmation dialog choose Keep local file version

Rollback again and don't sing out (stay connected over ssh):

sudo apt install openssh-server=1:9.6p1-3ubuntu13.11 \
openssh-client=1:9.6p1-3ubuntu13.11 \
openssh-sftp-server=1:9.6p1-3ubuntu13.11 \
--allow-downgrades -y

Run provision workflow to make sure you are able to brake environment: https://github.com/opencrvs/opencrvs-farajaland/actions/runs/18376153829

image image

Once script failed, try to open new ssh session:

Fix broken environment manually:
image

Rollback to previous state:

sudo apt install openssh-server=1:9.6p1-3ubuntu13.11 \
openssh-client=1:9.6p1-3ubuntu13.11 \
openssh-sftp-server=1:9.6p1-3ubuntu13.11 \
--allow-downgrades -y

Verify openssh-server still require upgrade:

apt search openssh-server

Output example:
image

Run provision workflow from branch with fix: https://github.com/opencrvs/opencrvs-farajaland/actions/runs/18376592357/job/52352188725
image

Make sure openssh-server package was upgraded without any issues:
image

Checklist

  • I have linked the correct Github issue under "Development"
  • I have tested the changes locally, and written appropriate tests
  • I have tested beyond the happy path (e.g. edge cases, failure paths)
  • I have updated the changelog with this change (if applicable)
  • I have updated the GitHub issue status accordingly

@github-actions

This comment has been minimized.

@adskyiproger adskyiproger changed the title fix: Avoid editing default configuration files with ansible while provision fix: Allow non-interactive upgrades with apt Oct 9, 2025
@adskyiproger adskyiproger merged commit 4ff41fb into develop Oct 10, 2025
2 checks passed
@adskyiproger adskyiproger deleted the ocrvs-10204 branch October 10, 2025 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants