Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix underlay configuration for preseed.yaml #394

Merged
merged 6 commits into from
Oct 4, 2024

Conversation

masnax
Copy link
Contributor

@masnax masnax commented Sep 6, 2024

The logic for detecting the OVN underlay configuration for preseed was not correct, it was relying on c.state which contains the resources available and already set up on existing cluster members, as well as new cluster members. It is used in interactive setup to manage additional configuration being supplied to the existing systems.

In preseed, we don't populate it yet because we only want to apply the precise recipe that is defined in the preseed, and not change any other cluster information implicitly (in interactive setup we can ask the user).

Additionally, the input parsing was not correct, since it expected a CIDR per system however the ovn encap configuration wants an IP.

So this addresses that by instead using the list of systems parsed from the yaml itself in p.Systems, and uses the same set of interfaces that were detected for the internal ceph cluster network, since they have the same restrictions. Also, rather than specifying a CIDR per system, instead we can specify the encap IP directly, and validate that it fits in one of the available subnets.

Preseed tests have also been updated for the new key, which is prefixed with ovn_ now to be clear what it affects. The cephfs key has also been moved into the global ceph configuration because it's not system-specific.

@masnax masnax force-pushed the preseed-underlay branch 2 times, most recently from 23435d5 to 2f2af31 Compare September 6, 2024 22:58
roosterfish
roosterfish previously approved these changes Sep 9, 2024
Copy link
Contributor

@roosterfish roosterfish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Only some minor comments but they can also be addressed later.

cmd/microcloud/main_init_preseed.go Show resolved Hide resolved
cmd/microcloud/main_init_preseed.go Outdated Show resolved Hide resolved
cmd/microcloud/main_init_preseed.go Show resolved Hide resolved
Copy link
Contributor

@roosterfish roosterfish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, there is only one warning about usage of Println instead of Printf.

gabrielmougard
gabrielmougard previously approved these changes Sep 26, 2024
Copy link
Contributor

@gabrielmougard gabrielmougard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good!

Copy link
Contributor

@roosterfish roosterfish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only two smaller comments, rest still looks good.

cmd/microcloud/main_init_preseed.go Show resolved Hide resolved
cmd/microcloud/main_init.go Show resolved Hide resolved
roosterfish
roosterfish previously approved these changes Oct 2, 2024
@masnax
Copy link
Contributor Author

masnax commented Oct 2, 2024

Looks like SupportsFeature still doesn't work because we haven't added the fix to a tagged release yet.

@masnax masnax merged commit abe0514 into canonical:main Oct 4, 2024
27 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants