IP address changed after moving the Automation Suite cluster

Why did the IP address change after moving the Automation Suite cluster from one resource group to another?

Issue Description:

IP address changed after moving the Automation Suite cluster from one resource group to another.

Resolution:

1.If only one Machines IP changed, that machine should be removed and re-added.

2.Stop the rke2-services (done on all nodes)

  • rke2-killall.sh

3.Remount the etcd DB (done on all nodes. May not be required on newer versions)

  • mkdir -p /var/lib/rancher/rke2/server/db/
  • systemctl restart var-lib-rancher-rke2-server-db.mount

4.Backup etcd (Done on all nodes).

  • tar -cvpzf rke2-db-backup.tar.gz -C /var/lib/rancher/rke2/server db/

5.To restore

  • tar -xvpzf rke2-db-backup.tar.gz -C /var/lib/rancher/rke2/server

6.If the hostname changed, we need to hard code the original hostname in the config.yaml

  • Open: /etc/rancher/rke2/config.yaml
  • Add the node-name: flag.
  • If node ip is defined that needs to be updated to.
  • Make sure the server field that maps to port 9345 is correct

7.Run the reset:

  • rke2 server --cluster-reset

8.When this is done start the node: systemctl rke2-server

9.Go to the remaining nodes and run: rm -rf /var/lib/rancher/rke2/server/db/*

10.On the remaining nodes restart the service: systemctl restart rke2-server