Skip to content

fix: deploy.sh and postgres/monitoring SSH-host install reliability - #108

Open
tkipkurgat wants to merge 1 commit into
mainfrom
fix/deploy-ssh-host-reliability
Open

tkipkurgat wants to merge 1 commit into
mainfrom
fix/deploy-ssh-host-reliability

Conversation

@tkipkurgat

Copy link
Copy Markdown
Collaborator

Summary

  • deploy.sh: added DEBIAN_FRONTEND=noninteractive and grub-pc install_devices debconf pre-seeding for the controller's own apt runs, via boot-disk auto-detection (lsblk/findmnt). Removed --upgrade from the routine community.general collection install, which was unintentionally upgrading collections (and their pinned module behavior) on every deploy run.
  • postgres/tasks/ssh.yml and monitoring/tasks/ssh.yml: SSH-connected hosts install packages over SSH too and were missing the same grub-pc pre-seed already applied elsewhere. On QEMU/KVM VMs this debconf question can be genuinely unanswered until a kernel-related update pulls grub-pc in as a dependency - DEBIAN_FRONTEND=noninteractive alone doesn't help then, and grub-install fails outright instead of proceeding. Retries on the pre-seed itself since a freshly-booted VM's own cloud-init/unattended-upgrades can still be holding debconf's lock.
  • postgresql-db.yml: trivial task-name capitalization fix for consistency with the rest of the role.

Test plan

  • Fresh deploy against an SSH-connected postgres host on a QEMU/KVM VM - confirm no grub-pc/debconf failures
  • Fresh deploy against an SSH-connected monitoring host - same
  • Confirm deploy.sh no longer upgrades installed Ansible collections on a routine run

- deploy.sh: added DEBIAN_FRONTEND=noninteractive and grub-pc
  install_devices debconf pre-seeding for the controller's own apt
  runs, via boot-disk auto-detection (lsblk/findmnt). Removed
  --upgrade from the routine community.general collection install,
  which was unintentionally upgrading collections on every run.

- postgres/tasks/ssh.yml and monitoring/tasks/ssh.yml: SSH-connected
  hosts install packages over SSH too and were missing the same
  grub-pc pre-seed. On QEMU/KVM VMs this debconf question can be
  genuinely unanswered until a kernel-related update pulls grub-pc in
  as a dependency, and DEBIAN_FRONTEND=noninteractive alone doesn't
  help then - grub-install fails outright ("/multiselect does not
  exist") instead of proceeding. Retries on the pre-seed itself since
  a freshly-booted VM's own cloud-init/unattended-upgrades can still
  be holding debconf's lock.

- postgresql-db.yml: trivial task-name capitalization fix
  ("creating..." -> "Creating...") for consistency with the rest of
  the role.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant