Skip to content

Change UUID of a compute node #581

@YanChii

Description

@YanChii

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    SmartOSUXUser experience design

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions