Closed token47 closed 2 years ago
Ok, I got it working after completely removing LXD (snap remove) and reinstalling. Then the original preseed worked (with the size parameter in the storagepool itself and not as a member_config).
I had read in the documentation (or maybe discord?) that you could just init again over and it would replace everything. I even wiped all possible configs using [1]. Seems like all that is not enough.
Is this expected behavior? There was something left behind that was causing the issue, even after completely wiping the storage part. This seems wrong (or at least very unintuitive) to me.
Anyway, this can be closed if it seems like expected behavior.
Thank you
[1] - https://github.com/lxc/lxd/blob/master/scripts/empty-lxd.sh
Ah yeah, empty-lxd
will not un-cluster, there is no real way to undo the clustering step in LXD other than a reinstall.
The empty-lxd
script most likely did a good job at wiping everything clean except for the cluster state, which then caused the error.
If you need to script it, you could do:
Which should let you effectively wipe all of LXD clean without actually reinstalling LXD or rebooting.
Thank you!
Issue description
Cannot preseed a lxd init for cluster and having a storage_pool at the same time.
Steps to reproduce
The generated preseed will be something like:
NOTE: this was automatically generated and has no editing on my part.
Then when you try to use this later, you get:
If I remove the "size" parameter from the storage pool section, and move it to the "member_config" section using something like:
Then it instead complains:
Which also does not make any sense because I have not initialized the cluster yet.
What is the correct way of doing it? And why does the produced preseed does not work, is it a bug?
Here is the "lxc info":