I’m planning to create RFE; however, I’d like to know if someone has raised this topic for discussion. I couldn’t find a related discussion in the LXD forums.
Currently, the LXD cluster can only start an instance on the same node where it was deployed. This restriction is valid if the instance was deployed on the local storage.
If the instance was deployed to shared storage (ceph), all cluster members have access to that storage and objects in it. So, any cluster member can start any instance from that storage.
However, the current LXD implementation requires an explicit “moving” instance from the node where it was deployed to another specific node before it can be started on that node. In my understanding, the move command instructs lxd to update the link between a cluster node and the instance deployed in shared storage in the cluster database, and it does not make any “physical” move of the instance.
I propose adding additional logic and flags to “lxc start” and “lxc restart” commands to improve the user experience:
- "lxc start --target "; It should implicitly do following steps: "lxc move --target && lxc start ";
- "lxc start --target-auto; This command should identify less loaded node (as lxd does for “init” and “launch” commands and do the steps defined above.
- "lxc restart --target "; lxc should stop the instance, and then it should make the same steps as defined in "lxc start --target " command above.
- “lxc restart --target-auto”; lxc should stop the instance, and then it should make the same steps as defined in “lxc start --target auto” command above.