-
-
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3399,6 +3399,11 @@ func (n *ovn) Rename(newName string) error { | |
// chassisEnabled checks the cluster config to see if this particular | ||
// member should act as an OVN chassis. | ||
func (n *ovn) chassisEnabled(ctx context.Context, tx *db.ClusterTx) (bool, error) { | ||
// If parent is "none", this network is standalone and should not act as a chassis. | ||
if n.config["parent"] == "none" { | ||
return false, nil | ||
} | ||
Comment on lines
+3402
to
+3405
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This check is incorrect. So you should change the check to:
|
||
|
||
// Get the member info. | ||
memberID := tx.GetNodeID() | ||
members, err := tx.GetNodes(ctx) | ||
|
@@ -3446,6 +3451,13 @@ func (n *ovn) Start() error { | |
|
||
reverter.Add(func() { n.setUnavailable() }) | ||
|
||
// 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 | ||
} | ||
Comment on lines
+3454
to
+3459
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
|
||
// Check that uplink network is available. | ||
if n.config["network"] != "" && n.config["network"] != "none" && !IsAvailable(api.ProjectDefaultName, n.config["network"]) { | ||
return fmt.Errorf("Uplink network %q is unavailable", n.config["network"]) | ||
|
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