Skip to content

Draft: bouture: Introduce slapos node bouture

This is related to https://lab.nexedi.com/nexedi/slapos.core/-/merge_requests/827 and https://lab.nexedi.com/nexedi/slapos/-/merge_requests/1918.

This provides slapos bouture commands to graft existing partitions from a node onto a new master.

slapos bouture graft

This command grafts partitions from an existing node onto a new master: it imports the compute node, the partition and the instance it contains into the new master, preserving instance parameters and node parameters such as computer id, partition id, partition IPs.

Instances opt-in by placing a bouture.json file at the root of their partition. This file contains the instance parameters to import in the new master: its software url and type, name, parameters, state, shared instances associated with it.

slapos bouture configure

This command generates a new node configuration file associated with the new slapos master, which can then be used to process the node as a bouture using slapos node instance --cfg NEW_NODE_CFG.

A new file is needed to unset options related to client certificates so as to disable client SSL, because it is unsupported by the proxy. This cannot be done by overriding arguments on the cli because there is no way to unset them from the cli.

slapos bouture failover

This command combines the standard slapos node instance with both of slapos bouture graft and slapos bouture configure to failover onto the alternate master when the original master is offline, and revert to the original when if comes back online. Changes made in offline mode are not preserved when returning to online mode.

The logic looks like:

  1. run slapos node instance with the original master
  2. use the result to determine whether the original master is online
  3. if the original master is offline:
    1. if the original master was online in the previous run:
      1. run slapos bouture graft onto the alternate master
      2. run slapos bouture configure to write a new configuration file
    2. run slapos node instance --cfg NEW_NODE_CFG
Edited by Romain Courteaud

Merge request reports