Skip to content

Migrate bojimans (netbox) to bullseye

Migrate the inventory (netbox) server to bullseye.

Plan:

  • Check in vagrant everything is fine...

  • Point of attention, netbox service relies on python3-venv, so we need to rebuild the venv after the upgrade

  • Actual migration [1]

  • Recreate the venv with the new python3 version (3.9) and ensure the netbox service starts ok

  • Fix whatever is broken (puppet agent --test is failing after reboot for some reasons)

  • Inventory update for that node

  • [1]

task=#3802
puppet agent --test
cd /etc
git add .
git commit -m "Commit left-over change prior to trigger dist-upgrade to bullseye"
# finally disable puppet
puppet agent --disable "$task: dist-upgrade to bullseye"
$CMD install -y python3  # keep python3.7 around during migration
sed -i -e 's/buster/bullseye/;s,bullseye/updates,bullseye-security,' /etc/apt/sources.list.d/*
git status
git diff
grep bullseye-security /etc/apt/sources.list.d/debian-security.list
git add .
git commit -m "$task: Migrate sources.list to bullseye"
apt update
CMD="apt -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold"
export DEBIAN_FRONTEND=noninteractive
$CMD upgrade -y
$CMD dist-upgrade -y
rm -rf /opt/netbox/.upgrade_done
/opt/netbox/upgrade.sh  # will rebuild the venv
systemctl status netbox  # should still be ok
reboot

Migrated from T3802 (view on Phabricator)

Edited by Phabricator Migration user
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information