Page MenuHomeSoftware Heritage

Migrate the staging database server to bullseye
Closed, MigratedEdits Locked

Description

Dedicated task for the staging upgrade
Plan:
-stop the loaders and listers workers
-stop the indexers
-stop the scheduler runners *
-on db1:

  • connect to the serial console => swh-ceph-osd1-adm.inria.fr pass in the credential store (infra/db1.staging/idrac)
  • disable puppet
  • stop and disable postgresql
  • perform the last buster upgrade
  • reboot
  • perform the bullseye upgrade
  • reboot
  • restart and enable postgresql
  • restart puppet

-restart the scheduler runners
-restart the indexers
-restart the lister / loaders

Event Timeline

vsellier changed the task status from Open to Work in Progress.Dec 17 2021, 2:16 PM
vsellier triaged this task as Normal priority.
vsellier created this task.

workers:

Before the migration

root@pergamon:~# clush -b -w @staging-workers 'set -e; puppet agent --disable "T3812"; puppet agent --disable T3771; cd /etc/systemd/system/multi-user.target.wants; for unit in swh-worker@*; do systemctl disable $unit; done; systemctl stop --no-block swh-worker@*; sleep 300; systemctl kill swh-worker@* -s 9'

after the migration
(should be but the workers needed an additional reboot to activate their swap)

root@pergamon:~# clush -w @staging-workers 'set -e; systemctl default; puppet agent --enable; puppet agent --test'

scheduler0

root@scheduler0:/etc# puppet agent --disable T3813
root@scheduler0:/etc/systemd/system# systemctl stop swh*

After:

root@scheduler0:/etc/systemd/system# systemctl stop swh*
root@scheduler0:/etc/systemd/system# puppet agent --enable

db1

root@db1:~# puppet agent --disable T3813
root@db1:~# systemctl stop postgresql@12-main
root@db1:~# systemctl disable postgresql@12-main
root@db1:~# apt dist-upgrade
root@db1:~# apt autoremove
root@db1:~# reboot

root@db1:~# systemctl start postgresql@12-main
root@db1:~# systemctl enable postgresql@12-main

root@db1:~# git status
root@db1:~# git diff
root@db1:~# grep bullseye-security /etc/apt/sources.list.d/debian-security.list
root@db1:~# git add .
root@db1:~# git commit -m "$task: Migrate sources.list to bullseye"
root@db1:~# apt update

root@db1:~# sed -i -e 's/buster/bullseye/;s,bullseye/updates,bullseye-security,' /etc/apt/sources.list.d/*
root@db1:~# CMD="apt -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold"
root@db1:~# export DEBIAN_FRONTEND=noninteractive
root@db1:~# $CMD upgrade -y
root@db1:~# $CMD dist-upgrade -y

root@db1:~# reboot

root@db1:~# apt autoremove