Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change UUID of a compute node #581

Open
YanChii opened this issue Apr 19, 2022 · 1 comment
Open

Change UUID of a compute node #581

YanChii opened this issue Apr 19, 2022 · 1 comment
Labels
SmartOS UX User experience design

Comments

@YanChii
Copy link
Contributor

YanChii commented Apr 19, 2022

Creating issue on behalf of @klebed from Gitter chat:

hi, everyone! We have changed motherboard on one of the servers. There is no tool that allows to change serial on this type of MB, so now node came online, but we can't collect data about it, because it tries to register new entry, but can't because nodename already there. In fact binding to serial number is very confusing in many ways. It's better to use nodename or UUID saved somewhere, rather than getting it from HW every time.

Can you advise what to do with that node to change it's UUID to the new one leaving all the machines on that node intact? I don't even know how to get new UUID of the node.

...

also. after MB change I had to make a complex transaction to set new UUID of the node.

BEGIN;
update vms_node SET uuid = 'e0334d7b-dad7-dd11-a4de-c860001bd8fa' where hostname = 'node01...';
update vms_nodestorage SET node_id = 'e0334d7b-dad7-dd11-a4de-c860001bd8fa' where node_id = 'c07b95ba-c1d7-dd11-8a3e-4e0b68d2380c';
update vms_vm SET node_id = 'e0334d7b-dad7-dd11-a4de-c860001bd8fa' where node_id = 'c07b95ba-c1d7-dd11-8a3e-4e0b68d2380c';
update vms_dcnode SET node_id = 'e0334d7b-dad7-dd11-a4de-c860001bd8fa' where node_id = 'c07b95ba-c1d7-dd11-8a3e-4e0b68d2380c';
update vms_backupdefine SET node_id = 'e0334d7b-dad7-dd11-a4de-c860001bd8fa' where node_id = 'c07b95ba-c1d7-dd11-8a3e-4e0b68d2380c';
update vms_backup SET node_id = 'e0334d7b-dad7-dd11-a4de-c860001bd8fa' where node_id = 'c07b95ba-c1d7-dd11-8a3e-4e0b68d2380c';
COMMIT;

if someone would have such case... Either do this transaction with proper uuids, or delete the node and add it from scratch.

And also update UUID in Zabbix.

@YanChii YanChii added SmartOS UX User experience design labels Apr 19, 2022
@YanChii
Copy link
Contributor Author

YanChii commented Apr 19, 2022

The UUID is a SmartOS thing received from sysinfo. There's a override_uuid=... bootparam:
https://github.com/TritonDataCenter/smartos-live/blob/release-20220407/src/sysinfo#L126
You can add it to /boot/loader.conf or /mnt/usbkey/boot/loader.conf in case of diskboot or usbboot respectively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SmartOS UX User experience design
Development

No branches or pull requests

1 participant