Skip to content

Commit b4edf2d

Browse files
authored
Merge pull request #760 from stackhpc/yoga-rl9-in-place-docs
yoga rl9 in place docs
2 parents c156c76 + 31b0c40 commit b4edf2d

File tree

1 file changed

+121
-3
lines changed

1 file changed

+121
-3
lines changed

doc/source/operations/rocky-linux-9.rst

Lines changed: 121 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,125 @@ Wazuh manager
602602

603603
TODO
604604

605-
In-place migrations
606-
===================
605+
In-place upgrades
606+
=================
607607

608-
TODO
608+
Sometimes it is necessary to upgrade a system in-place.
609+
This may be the case for the seed hypervisor or Ansible control host which are often installed manually onto bare metal.
610+
This procedure is not officially recommended, and can be risky, so be sure to back up all critical data and ensure serial console access is available (including password login) in case of getting locked out.
611+
612+
The procedure is performed in two stages:
613+
614+
1. Migrate from CentOS Stream 8 to Rocky Linux 8
615+
2. Upgrade from Rocky Linux 8 to Rocky Linux 9
616+
617+
Potential issues
618+
----------------
619+
620+
Full procedure
621+
--------------
622+
623+
- Inspect existing DNF packages and determine whether they are really required.
624+
625+
- Use the `migrate2rocky.sh
626+
<https://raw.githubusercontent.com/rocky-linux/rocky-tools/main/migrate2rocky/migrate2rocky.sh>`__
627+
script to migrate to Rocky Linux 8.
628+
629+
- Disable all DNF modules - they're no longer used.
630+
631+
.. code-block:: console
632+
633+
sudo dnf module disable "*"
634+
635+
- Migrate to NetworkManager. This can be done using a manual process or with Kayobe.
636+
637+
The manual process is as follows:
638+
639+
- Ensure that all network interfaces are managed by Network Manager:
640+
641+
.. code:: console
642+
643+
sudo sed -i -e 's/NM_CONTROLLED=no/NM_CONTROLLED=yes/g' /etc/sysconfig/network-scripts/*
644+
645+
- Enable and start NetworkManager:
646+
647+
.. code:: console
648+
649+
sudo systemctl enable NetworkManager
650+
sudo systemctl start NetworkManager
651+
652+
- Migrate Ethernet connections to native NetworkManager configuration:
653+
654+
.. code:: console
655+
656+
sudo nmcli connection migrate
657+
658+
- Manually migrate non-Ethernet (bonds, bridges & VLAN subinterfaces) network interfaces to native NetworkManager.
659+
660+
- Look out for lost DNS configuration after migration to NetworkManager. This may be manually restored using something like this:
661+
662+
.. code:: console
663+
664+
nmcli con mod System\ brextmgmt.3003 ipv4.dns "10.41.4.4 10.41.4.5 10.41.4.6"
665+
666+
The following Kayobe process for migrating to NetworkManager has not yet been tested.
667+
668+
- Set ``interfaces_use_nmconnection: true`` as a host/group variable for the relevant hosts
669+
670+
- Run the appropriate host configure command. For example, for the seed hypervisor:
671+
672+
.. code:: console
673+
674+
kayobe seed hypervisor host configure -t network -kt none
675+
676+
- Make sure there are no funky udev rules left in
677+
``/etc/udev/rules.d/70-persistent-net.rules`` (e.g. from cloud-init run on
678+
Rocky 9.1).
679+
680+
- Inspect networking configuration at this point, ideally reboot to validate correctness.
681+
682+
- Upgrade to Rocky Linux 9
683+
684+
.. https://forums.rockylinux.org/t/dnf-warning-message-after-upgrade-from-rocky-8-to-rocky-9/8319/2
685+
686+
- Install Rocky Linux 9 repositories and GPG keys:
687+
688+
.. code:: console
689+
690+
sudo dnf install -y https://download.rockylinux.org/pub/rocky/9/BaseOS/x86_64/os/Packages/r/rocky-gpg-keys-9.2-1.6.el9.noarch.rpm \
691+
https://download.rockylinux.org/pub/rocky/9/BaseOS/x86_64/os/Packages/r/rocky-release-9.2-1.6.el9.noarch.rpm \
692+
https://download.rockylinux.org/pub/rocky/9/BaseOS/x86_64/os/Packages/r/rocky-repos-9.2-1.6.el9.noarch.rpm
693+
694+
- Remove the RedHat logos package:
695+
696+
.. code:: console
697+
698+
sudo rm -rf /usr/share/redhat-logos
699+
700+
- Synchronise all packages with current versions
701+
702+
.. code:: console
703+
704+
sudo dnf --releasever=9 --allowerasing --setopt=deltarpm=false distro-sync -y
705+
706+
- Rebuild RPB database:
707+
708+
.. code:: console
709+
710+
sudo rpm --rebuilddb
711+
712+
- Make a list of EL8 packages to remove:
713+
714+
.. code:: console
715+
716+
sudo rpm -qa | grep el8 > el8-packages
717+
718+
- Inspect the ``el8-packages`` list and ensure only expected packages are included.
719+
720+
- Remove the EL8 packages:
721+
722+
.. code:: console
723+
724+
cat el8-packages | xargs sudo dnf remove -y
725+
726+
- You will need to re-create *all* virtualenvs afterwards due to system Python version upgrade.

0 commit comments

Comments
 (0)