Compare commits

...

6 Commits

Author SHA1 Message Date
2b142ac3fb Fix delegate_to 2023-08-30 00:51:50 -04:00
6d4d3acd10 Ignore errors in Patroni restart handler 2023-08-29 23:02:28 -04:00
ef00a0743f Ensure confold force during install 2023-08-29 21:57:26 -04:00
57b2f9adcf Add comments to script steps 2023-08-29 21:47:07 -04:00
426887bbc1 Ignore errors in Patroni
Required during upgrades as the service may be masked.
2023-08-29 21:30:36 -04:00
3f034327d1 Make D10->D12 upgrade steps noninteractive 2023-08-29 21:17:18 -04:00
4 changed files with 23 additions and 9 deletions

View File

@ -224,15 +224,28 @@
mode: 0755
content: |
#!/usr/bin/env bash
exec 1>/tmp/upgrade-d10.log
exec 2>&1
set -o xtrace
export DEBIAN_FRONTEND=noninteractive
apt-get --download-only install libcrypt1
echo "Forcibly update libcrypt1 and libc6 to avoid conflicts"
apt-get --download-only install --yes libcrypt1
dpkg --force-all --install /var/cache/apt/archives/{libcrypt1,libpam0g,libc6}*.deb
apt --fix-broken install
apt-get --no-install-recommends install apt dpkg dpkg-dev base-files zstd
apt-get --no-install-recommends install ca-certificates
apt-get --no-install-recommends --option Dpkg::Options::="--force-confold" install sudo
apt-get --no-install-recommends --option Dpkg::Options::="--force-confnew" upgrade
apt-get --no-install-recommends --option Dpkg::Options::="--force-confnew" dist-upgrade
echo "Fix broken packages"
apt --fix-broken --option Dpkg::Options::="--force-confold" install --yes
echo "Upgrade core apt packages (forcing confold)"
apt-get --no-install-recommends --option Dpkg::Options::="--force-confold" install --yes apt dpkg dpkg-dev base-files zstd
echo "Upgrade ca-certificates (forcing confold)"
apt-get --no-install-recommends --option Dpkg::Options::="--force-confold" install --yes ca-certificates
echo "Upgrade sudo (forcing confold)"
apt-get --no-install-recommends --option Dpkg::Options::="--force-confold" install --yes sudo
echo "Upgrade core PVC packages (forcing confold)"
apt-get --no-install-recommends --option Dpkg::Options::="--force-confold" install --yes ceph-osd ceph-mds ceph-mon ceph-mgr radosgw zookeeper zookeeper-bin patroni libvirt-daemon-system frr
echo "Perform main upgrade (forcing confnew)"
apt-get --no-install-recommends --option Dpkg::Options::="--force-confnew" upgrade --yes
echo "Perform main dist-upgrade (forcing confnew)"
apt-get --no-install-recommends --option Dpkg::Options::="--force-confnew" dist-upgrade --yes
echo "Restart SSH so Ansible can continue"
systemctl restart ssh
- name: run script to perform safe d10->d12 upgrade (will take a long time)

View File

@ -19,6 +19,7 @@
service:
name: patroni
state: restarted
ignore_errors: yes
# Restart services one-at-a-time
# Ideally, this would be accomplished by a serial=1, but Ansible doesn't support that and

View File

@ -89,8 +89,7 @@
- name: set first node as primary coordinator on first install
command: "pvc node primary --wait"
run_once: yes
delegate_to: "{{ item }}"
loop: "{{ ansible_play_hosts[0] }}"
delegate_to: "{{ ansible_play_hosts[0] }}"
when: newhost is defined and newhost
tags: always

View File

@ -107,6 +107,7 @@
name: "{{ item }}"
state: started
enabled: no
ignore_errors: yes
with_items:
- patroni