Moving a cluster member/changing cluster member IP?

wasteground

Active Member
Aug 6, 2019
25
2
43
42
Hi!

I have a cluster with PMG, consisting of two nodes (both with community license). I'd like to move one of those nodes to a different location, which means changing the IP. The nodes are running in PVE, so no issues there, I will stop the VM, back it up, and restore it on the new PVE cluster. But what steps would be best inside PMG itself? I don't see anything obvious in the admin guide on how to handle that situation.

Should I remove it from the cluster first then re-add it later? The node I want to move is not the master, so I suspect this might be the easiest way?

I have some customisation with templates and scripts for Let's Encrypt/signatures and things, so I'd rather not do a fresh installation for the new node but rather just move the existing mode, but if making a new node is the officially recommended method I'll go with it :)

Thanks in advance for any tips or ideas!
 
In general I would say - just setup a fresh PMG and join it to your existing cluster - it's quite easy and should only copy the config+quarantine contents to the new node. That's certainly the cleanest and easiest solution.

I have some customisation with templates
If you mean the configuration templates from PMG - those get synced inside a cluster
scripts for Let's Encrypt/signatures and things,
with PMG 6.4 we have added Let's Encrypt support and made it easier to update the certificate fingerprints inside a cluster - just as a hint :)

That being said - it should be possible to move a node/change its IP - without testing it I think the steps needed would be:
* move the node, change it's IP, /etc/hosts, hostname, resolv.conf (the domainname of the node gets read from there)
* ssh from master to the node, and from the node to master (to get the ssh-host-keys stored)
* edit /etc/pmg/cluster.conf
* restart the node
* check `pmgcm status`

as said - this is only theoretical - if the steps don't work - please provide the logs of the systems

I hope this helps!