Open stealthybox opened 5 years ago
Thanks for the well written issue!
Currently footloose only acts on a single cluster, the one described in the config file and that's indeed the main limitation here.
I can see a world where footloose queries back some state from either docker or a CRI runtime (the CRI interface has some provision to store metadata with each container). This way we would be able to list the clusters that have been created in the past and act on them.
This seems like a desirable behaviour in the future!
For this to behave any differently, we would either:
or
It might just be better to admit that footloose configs are declarative, but footloose commands for machine-management are imperative. I believe docker-compose has some similar behavior limitations.
Here's a detailed example:
If I create two groups of machines using the docker backend like so:
Then I edit one of the groups to use the ignite backend:
As soon as I've edited the file, footloose will orphan the machines running for that spec:
Let's try creating again in this state:
and deleting everything:
If we switch back to our first file that was only using docker, we can delete the orphaned container:
Should we do anything to change this?
Again, this may be fine for the constraints of our design, but we should document this behavior.
TODO:
Find best spot in the docs for this info.