IPs address changed after restore from backup - how can I fix everything to point to new IPs?

The nodes are running in Amazon EC2 and the primary interface gets assigned an internal IP that AWS assigns at the instance start time and can’t be changed.

How can I reconfigure LXD so everything points to the new IPs and not the old ones? Currently, everything is in a broken state.

Do you mean the LXD instance IPs or the cluster IPs?

If the LXD cluster IPs, take a look at

https://documentation.ubuntu.com/lxd/en/stable-5.21/howto/cluster_recover/#recover-cluster-members-with-changed-addresses

Thanks for the reply @tomp .

I looked at that link and tried the command sudo lxd cluster edit but it didn’t respond. What I found was that when you have a 3 node LXD cluster and they can’t connect to each other then you can’t do anything at all. Seemed to me like raft wants a minimum of 2 nodes for consensus and because it can’t then all the lxc and lxd commands I tried to run wouldn’t work at all.

In the end, I did fix the problem which took a long time and I can’t remember all the steps but it was something like this:

  • Went back to the original servers rather than the restored backup with the different IPs.
  • Reinitialized the primary node to make a 1 node cluster which got the main containers running again.
  • Reinitialized the second node and joined the cluster losing all the container data I had on node 2
  • Through many zpool and zfs commands and the help of ChatGPT, I somehow managed to restore all the containers back into node 2.

So all good now but not a fun experience.

1 Like