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 mode: 0755
content: | content: |
#!/usr/bin/env bash #!/usr/bin/env bash
exec 1>/tmp/upgrade-d10.log
exec 2>&1
set -o xtrace
export DEBIAN_FRONTEND=noninteractive 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 dpkg --force-all --install /var/cache/apt/archives/{libcrypt1,libpam0g,libc6}*.deb
apt --fix-broken install echo "Fix broken packages"
apt-get --no-install-recommends install apt dpkg dpkg-dev base-files zstd apt --fix-broken --option Dpkg::Options::="--force-confold" install --yes
apt-get --no-install-recommends install ca-certificates echo "Upgrade core apt packages (forcing confold)"
apt-get --no-install-recommends --option Dpkg::Options::="--force-confold" install sudo apt-get --no-install-recommends --option Dpkg::Options::="--force-confold" install --yes apt dpkg dpkg-dev base-files zstd
apt-get --no-install-recommends --option Dpkg::Options::="--force-confnew" upgrade echo "Upgrade ca-certificates (forcing confold)"
apt-get --no-install-recommends --option Dpkg::Options::="--force-confnew" dist-upgrade 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 systemctl restart ssh
- name: run script to perform safe d10->d12 upgrade (will take a long time) - name: run script to perform safe d10->d12 upgrade (will take a long time)

View File

@ -19,6 +19,7 @@
service: service:
name: patroni name: patroni
state: restarted state: restarted
ignore_errors: yes
# Restart services one-at-a-time # Restart services one-at-a-time
# Ideally, this would be accomplished by a serial=1, but Ansible doesn't support that and # 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 - name: set first node as primary coordinator on first install
command: "pvc node primary --wait" command: "pvc node primary --wait"
run_once: yes run_once: yes
delegate_to: "{{ item }}" delegate_to: "{{ ansible_play_hosts[0] }}"
loop: "{{ ansible_play_hosts[0] }}"
when: newhost is defined and newhost when: newhost is defined and newhost
tags: always tags: always

View File

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