-
-
Notifications
You must be signed in to change notification settings - Fork 327
Handle parent=none for physical networks #2073
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
base: main
Are you sure you want to change the base?
Conversation
I'm going to be looking into this one next. |
@@ -459,6 +459,11 @@ func networksPost(d *Daemon, r *http.Request) response.Response { | |||
// A targetNode was specified, let's just define the node's network without actually creating it. | |||
// Check that only NodeSpecificNetworkConfig keys are specified. | |||
for key := range req.Config { | |||
// Special-case: allow "parent=none". Used to indicate that this node should not act as a gateway chassis. |
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.
parent is a node-specific config, so this change isn't needed
// Skip full start logic if parent=none. | ||
if n.config["parent"] == "none" { | ||
n.logger.Info("Skipping OVN Start due to parent=none", logger.Ctx{"project": n.project, "name": n.name}) | ||
n.setAvailable() | ||
return nil | ||
} |
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.
That looks wrong. You're skipping everything in the function which includes a lot of bits that are actually needed.
I think you should instead modify startUplinkPort
to skip when the uplink network is of type physical
and has a parent
property set to none
.
// If parent is "none", this network is standalone and should not act as a chassis. | ||
if n.config["parent"] == "none" { | ||
return false, nil | ||
} |
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.
This check is incorrect. n.config
here refers to the config of the OVN network when the parent
check needs to be done on the uplink network instead.
So you should change the check to:
- Check that we have an uplink network at all
d.config["network"] != "none"
- Check that the uplink network is of type
physical
- Check if the
parent
property on the uplink network is set tonone
Moving this back to draft as this doesn't actually fix the issue at all. |
These are the following steps I took to handle the issue. Please let me know if there are any problems or changes I should implement. Thank you!
Part (1): Skip uplink IP allocation when parent == "none"
Part (2): Avoid startUplinkPort() when parent == "none"
Part (3): Avoid joining chassis group when parent == "none"