Draft: bouture: Introduce slapos node bouture
This is related to !827 (merged) and slapos!1918 (merged).
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:
- run
slapos node instancewith the original master - use the result to determine whether the original master is online
- if the original master is offline:
- if the original master was online in the previous run:
- run
slapos bouture graftonto the alternate master - run
slapos bouture configureto write a new configuration file
- run
- run
slapos node instance --cfg NEW_NODE_CFG
- if the original master was online in the previous run: