canonical / microcloud

Automated private cloud based on LXD, Ceph and OVN
https://microcloud.is
GNU Affero General Public License v3.0
295 stars 47 forks source link

MicroCloud should validate API/Schema versions before clustering #166

Open masnax opened 1 year ago

masnax commented 1 year ago

Attempting to set up MicroCloud with services (LXD, MicroCeph, MicroOVN) that have mismatched API/Schema versions, the setup will happily move along and then fail during those services' own version validation when forming the cluster with the error or one like it:

Error: Peer "n2" failed to join the cluster: Failed to update cluster status of services: Failed to join "LXD" cluster: Failed to configure cluster: Failed request to add member: The joining server version doesn't match (expected 5.18 with API count 360)

MicroCloud should instead incorporate the API versions of each service into the mdns response so that the system doing the lookup (calling microcloud init) can properly ignore them with a syslog message reporting that the node was skipped due to a version mismatch.

roosterfish commented 2 weeks ago

@masnax I understand this is now fixed due to version enforcement?

masnax commented 2 weeks ago

Hmm, maybe not necessarily. If a cherry pick with an API extension is moved into the LTS without a patch version increase (like when using 5.21/edge vs 5.21/stable), we might still fail like this.

We should fetch the set of API extensions and schema updates and make sure they are the same across all members.