-
Notifications
You must be signed in to change notification settings - Fork 456
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: Resolve issue with skipped execution of sg annotations #3700
Fix: Resolve issue with skipped execution of sg annotations #3700
Conversation
f3d438d
to
d242555
Compare
It's a draft pr.
|
|
d242555
to
c184810
Compare
} else { | ||
sgList := strings.Split(securityGroups, ",") | ||
if _, err := c.SetLogicalSwitchPortSecurityGroup(lsp, "add", sgList...); err != nil { | ||
klog.Errorf("set logical switch port %s security groups %s: %v", lsp.Name, securityGroups, err) |
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.
return err
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.
The code has been updated to another style.
c184810
to
dc210d5
Compare
dc210d5
to
e36a9c7
Compare
There are lint issues should be fixed |
e36a9c7
to
34d363d
Compare
Happy Chinese new year! I just returned to my apartment in BJ. Updated. |
The problem causing ineffective application of sg annotations is that, during virtual machine restart, the logical switch port is intentionally not deleted.(I guess). When sg annotations are added and the VM is restarted, the create logical switch port logic is skipped as it detects the existing lsp. Consequently, the annotation fails to attach to the lsp. Even when we sync lsp for sg, it has no effect. A simple fix is to update the existing lsp during lsp creation if it already exists. This approach ensures correct annotation attachment and addresses the skipped execution issue. Signed-off-by: wfnuser <[email protected]>
34d363d
to
41bfe81
Compare
@wfnuser Thanks! |
The problem causing ineffective application of sg annotations is that, during virtual machine restart, the logical switch port is intentionally not deleted.(I guess). When sg annotations are added and the VM is restarted, the create logical switch port logic is skipped as it detects the existing lsp. Consequently, the annotation fails to attach to the lsp. Even when we sync lsp for sg, it has no effect. A simple fix is to update the existing lsp during lsp creation if it already exists. This approach ensures correct annotation attachment and addresses the skipped execution issue. Signed-off-by: wfnuser <[email protected]>
The problem causing ineffective application of sg annotations is that, during virtual machine restart, the logical switch port is intentionally not deleted.(I guess). When sg annotations are added and the VM is restarted, the create logical switch port logic is skipped as it detects the existing lsp. Consequently, the annotation fails to attach to the lsp. Even when we sync lsp for sg, it has no effect. A simple fix is to update the existing lsp during lsp creation if it already exists. This approach ensures correct annotation attachment and addresses the skipped execution issue. Signed-off-by: wfnuser <[email protected]>
The problem causing ineffective application of sg annotations is that, during virtual machine restart, the logical switch port is intentionally not deleted.(I guess).
When sg annotations are added and the VM is restarted, the create logical switch port logic is skipped as it detects the existing lsp. Consequently, the annotation fails to attach to the lsp. Even when we sync lsp for sg, it has no effect.
A simple fix is to update the existing lsp during lsp creation if it already exists. This approach ensures correct annotation attachment and addresses the skipped execution issue.
Pull Request
What type of this PR
Examples of user facing changes:
Which issue(s) this PR fixes
Fixes #3581