-
Notifications
You must be signed in to change notification settings - Fork 36
Port: add propagationUplinkStatus field #641
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 4 commits
6901189
4d21547
f4abfe6
7112a07
87a3ecf
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 |
|---|---|---|
|
|
@@ -185,6 +185,12 @@ type PortResourceSpec struct { | |
| // +kubebuilder:validation:MaxLength=36 | ||
| // +optional | ||
| HostID string `json:"hostID,omitempty"` | ||
|
|
||
| // propagateUplinkStatus represents the uplink status propagation of | ||
| // the port. | ||
| // +optional | ||
| // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="propagateUplinkStatus is immutable" | ||
| PropagateUplinkStatus *bool `json:"propagateUplinkStatus,omitempty"` | ||
|
Collaborator
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. We've discussed this privately already, after you brought the issue to my attention: gophercloud implements the |
||
| } | ||
|
|
||
| type PortResourceStatus struct { | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -86,3 +86,4 @@ spec: | |
| projectRef: port-create-full | ||
| macAddress: fa:16:3e:23:fd:d7 | ||
| hostID: devstack | ||
| propagateUplinkStatus: false | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -52,10 +52,19 @@ type NetworkExt struct { | |||||
| provider.NetworkProviderExt | ||||||
| } | ||||||
|
|
||||||
| // NOTE(winiciusallan): This is a temporary extension struct to | ||||||
| // workaround a missing pointer on Gophercloud and must be | ||||||
| // removed in future releases. | ||||||
| // See https://github.com/gophercloud/gophercloud/issues/3605 | ||||||
| type PortTmpExt struct { | ||||||
| PropagateUplinkStatusPtr *bool `json:"propagate_uplink_status,omitempty"` | ||||||
| } | ||||||
|
|
||||||
| type PortExt struct { | ||||||
| ports.Port | ||||||
| portsecurity.PortSecurityExt | ||||||
| portsbinding.PortsBindingExt | ||||||
| PortTmpExt //nolint:govet | ||||||
|
||||||
| PortTmpExt //nolint:govet | |
| PropagateUplinkStatusPtr *bool `json:"propagate_uplink_status,omitempty"` |
See this small test.
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.
In 87a3ecf I added the Unmarshal function that we discussed in DM, but I had to change the logic for ListPort because it was not able to unmarshal ports when importing from OpenStack.
Just to be clear, I had a little help from Claude :)
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Interesting, the dalmatian job still failed?
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.
Yep. I don't know the why, but there is two extensions - one for enable the field, and one for make it mutable. In dalmatian, the devstack configuration enable just the first one, so the jobs are failing on
port-updatetest.For reference, compare these two [1][2]
Since we're making this field immutable, this wouldn't be a problem for now.
[1] https://github.com/openstack/neutron/blob/master/devstack/lib/uplink_status_propagation
[2] https://github.com/openstack/neutron/blob/stable/2024.2/devstack/lib/uplink_status_propagation
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.
Gotcha, thanks for the explanation.
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.
So according to the commit in neutron, openstack/neutron@498be54 we'll need neutron-lib >= v3.16.0, which we don't have in Dalmatian. I believe we'll have to make the field immutable until we drop support for Dalmatian.
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.
Gazpacho will be released in the end of march, so will take a little long to remove Dalmatian from the CI, it worth to merge this with this field as immutable indeed.
I'll re-changed things.