-
Notifications
You must be signed in to change notification settings - Fork 50
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
microcloud: Subnet sharing warning should check interfaces not IPs #522
base: main
Are you sure you want to change the base?
microcloud: Subnet sharing warning should check interfaces not IPs #522
Conversation
8e01972
to
3c0887c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for moving the existing check from IPs to interfaces. Please have a look at my last comment, I think we should check the other two remaining ifaces as well.
9cec54a
to
eb8c057
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just one suggestion to reduce complexity & prevent having lots of extra fields & types.
eb8c057
to
a9f6ca7
Compare
@masnax @roosterfish I reworked the approach based on #522 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, just saw I never submitted the review. Please have a look when you find time.
Also requires a rebase now due to the recent CLI changes. |
Thanks for the feedback! |
a9f6ca7
to
e93d076
Compare
@roosterfish updated |
9f57467
to
1a8b231
Compare
1a8b231
to
94488b6
Compare
94488b6
to
a3b5fb2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding the test cases!
The validation still seems to be outputting something else in case of single node MicroCloud. Please have a look at my comments.
673c61f
to
2a49acf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, looks good already, only a few more smaller comments. Let's have a chat tomorrow morning to go through the details and especially around the verbosity.
4da155f
to
0e3a8c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for applying the changes we have discussed last week. This looks good to me and resolves the issue about being too verbose and implying something is off.
In my comments there is another small remark on askAddress
, some comments on the output formatting (to be in line with the other outputs) and a hint on how to check for the preseed mode during validation.
cmd/microcloud/main_init.go
Outdated
} | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for differentiating between interactive/preseed.
Instead of passing another bool you can just check for c.autoSetup == true
to indicate if we are in preseed mode.
We also use this pattern at other places in the code to check whether or not we should output something.
Having said this when in preseed mode the collision warning shouldn't be printed anymore. It isn't consistent and was the reason for logging #516.
2d08734
to
dfdebd6
Compare
Linter errors should disappear after #632 got merged. |
Can now be rebased. |
This type will be used to store a variety of subnet informations and which local network interface they will use. This will be used both for configuring MicroCloud but for running validation as well (e.g, interface collisions within a member, subnet collisions between members of a cluster) Signed-off-by: Gabriel Mougard <[email protected]>
This will be needed to get a network interface info from a CIDR subnet notation (e.g, mostly in the case of configuring MicroCloud internal and public networks) Signed-off-by: Gabriel Mougard <[email protected]>
* This introduce the `OVNGeneveNetwork`, `MicroCephPublicNetwork`, `MicroCephInternalNetwork` and `MicroCloudInternalNetwork` instead of `OVNGeneveAddr`, `MicroCephPublicNetworkSubnet`, `MicroCephInternalNetworkSubnet` and MicroCloud internal network information. Signed-off-by: Gabriel Mougard <[email protected]>
This function detect the local shared network interfaces and the global shared subnets. Signed-off-by: Gabriel Mougard <[email protected]>
Signed-off-by: Gabriel Mougard <[email protected]>
… are in preseed or interactive mode * If we are not in preseed, the call the `detectSharedNetworks` that output advanced network info (shared nics within a system for different services, shared subnet accross a cluster, i.e same subnet in multiple machines used for different services) * Else, we use the former approach: check if the OVN underlay and Ceph cluster network is a valid CIDR subnet notation and output a warning if the subnets are shared. Signed-off-by: Gabriel Mougard <[email protected]>
dfdebd6
to
2057603
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, ran through another set of tests. The formatting of the messages now follows the general standard, thanks.
Those are my open findings:
- The list of selected cluster members is now missing an address of the node who runs the initialization
Verify the fingerprint c4e78dfa47ef is displayed on joining systems.
Selected micro01 at
Selected micro02 at 10.87.144.136
Selected micro03 at 10.87.144.215
Gathering system information ...
- The MicroCloud internal network from the joiners doesn't show up in the network detection (even though addresses from the same network are used).
I was under the impression this should be covered by the newly addedpopulateMicroCloudNetworkFromState
func. But there seems to be a problem. Maybe related to 4), see below, I'll shortly add a PR to address this.
Also the OVN underlay doesn't show up but it's using the same network:
What subnet (IPv4/IPv6 CIDR) would you like your Ceph internal traffic on? [default=10.87.144.0/24]: 10.87.144.0/24
What subnet (either IPv4 or IPv6 CIDR notation) would you like your Ceph public traffic on? [default=10.87.144.0/24]: 10.87.144.0/24
Configure distributed networking? (yes/no) [default=yes]: yes
Using enp6s0 on micro01 for OVN uplink
Using enp6s0 on micro02 for OVN uplink
Using enp6s0 on micro03 for OVN uplink
Specify the IPv4 gateway (CIDR) on the uplink network (empty to skip IPv4): 10.1.2.1/24
Specify the first IPv4 address in the range to use on the uplink network: 10.1.2.10
Specify the last IPv4 address in the range to use on the uplink network: 10.1.2.100
Specify the IPv6 gateway (CIDR) on the uplink network (empty to skip IPv6):
Specify the DNS addresses (comma-separated IPv4 / IPv6 addresses) for the distributed network [default=10.1.2.1]: 10.1.2.1
Configure dedicated OVN underlay networking? (yes/no) [default=no]: yes
Using "10.87.144.24" for OVN underlay traffic on "micro01"
Using "10.87.144.136" for OVN underlay traffic on "micro02"
Using "10.87.144.215" for OVN underlay traffic on "micro03"
Checking network configuration ...
Ceph cluster network, Ceph public network, MicroCloud internal network, OVN underlay network sharing network interface enp5s0 on micro01
Ceph cluster network, Ceph public network, OVN underlay network sharing network interface enp5s0 on micro02
Ceph cluster network, Ceph public network, OVN underlay network sharing network interface enp5s0 on micro03
Ceph cluster network, Ceph public network, MicroCloud internal network sharing subnet 10.87.144.24/24
-
When running
microcloud add
there isn't any network sharing message. I thought we agreed on only printing it for new cluster members as getting the used networks from already existing members should be another story as it's not straightforward. Has something changed in this regard? -
The subnet sharing warning prints an IP from the network instead of the actual network address:
Ceph cluster network, Ceph public network, MicroCloud internal network sharing subnet 10.87.144.24/24
. But we can fix this separately from your PR as it's falsely populated inaskAddress
anyway so no blocker.
I have the feeling the PR is almost there it just requires some more testing for consistency.
To address comment 4) from above #634. |
Requires a rebase now. |
closes #516