https://rancher.com/ logo
#elemental
Title
# elemental
s

sparse-monitor-30665

01/24/2023, 2:58 PM
Expected behaviour??? In Rancher Manager, if I delete a cluster created from Elemental Machines, the MachineInventory gets removed. Ideally I would want to reuse these machines to either re-create the cluster, or be used in other clusters. Currently I have been reinstalling to get it back. Is there a better way to go about this? Is this expected or am I doing something wrong (maybe I'm not waiting long enough?) When the cluster gets removed, is there steps taken on the machines to clean up the kube install and reset it, or is there a way I can add this in?
s

sticky-tailor-45974

01/24/2023, 3:14 PM
We are already thinking about how this should actually behave and polishing details that might be missing. What is kept after a cluster deletion is the MachineRegistration. You should be capable to register again the machine to Rancher Manager by running
elemental-register
command and it is expected to create the inventory again. In order to clean up a node one option would be reboot to recovery system and call
elemental --debug reset --reboot
and it will reinstall the image that was once installed. It will keep the /oem partition contents so it will automatically attempt to register again at boot.
elemental reset
also has the
--reset-persistent
to format the persistent partition in case you also want to cleanup these part for a new clean fresh start. Currently there is no automation or trigger based on Cluster deletion, we are aware about it, this is something that already raised within the engineering team.
s

sparse-monitor-30665

01/24/2023, 3:19 PM
Okay great, I will try those methods. Though it would be handy to have a button, or option to toggle during cluster removal, running a couple commands, or rebooting to recovery sounds good. Thanks for the tips, it will certainly work well enough for now while testing different scenarios. 🙂
5 Views