Skip to content
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

Cleaning up OVS bridge #1545

Merged
merged 1 commit into from
Aug 22, 2023
Merged

Cleaning up OVS bridge #1545

merged 1 commit into from
Aug 22, 2023

Conversation

pdumais
Copy link
Contributor

@pdumais pdumais commented Aug 21, 2023

After creating a lab with OVS ports, the bridge shows:

$ sudo ovs-vsctl show
f14a79eb-4405-49c6-af9a-7f2c7254b96a
    Bridge ovsbr1
        Port ovsp80
            Interface ovsp80
        Port ovsp81
            Interface ovsp81
        Port ovsbr1
            Interface ovsbr1
                type: internal
    ovs_version: "2.17.7"

But after destroying the lab, it would show:

$ sudo ovs-vsctl show
f14a79eb-4405-49c6-af9a-7f2c7254b96a
    Bridge ovsbr1
        Port ovsp80
            Interface ovsp80
                error: "could not open network device ovsp80 (No such device)"
        Port ovsp81
            Interface ovsp81
                error: "could not open network device ovsp81 (No such device)"
        Port ovsbr1
            Interface ovsbr1
                type: internal
    ovs_version: "2.17.7"

We can see that the interfaces were deleted from the kernel but the ports were not deleted from the OVSDB.

This change cleans that up. The following is observed after destroying the lab with the new changes

$ sudo ovs-vsctl show
f14a79eb-4405-49c6-af9a-7f2c7254b96a
    Bridge ovsbr1
        Port ovsbr1
            Interface ovsbr1
                type: internal
    ovs_version: "2.17.7"

@codecov
Copy link

codecov bot commented Aug 21, 2023

Codecov Report

Merging #1545 (04b4d3c) into main (b5dda3d) will increase coverage by 0.08%.
Report is 1 commits behind head on main.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #1545      +/-   ##
==========================================
+ Coverage   47.75%   47.83%   +0.08%     
==========================================
  Files         131      131              
  Lines       12624    12632       +8     
==========================================
+ Hits         6028     6043      +15     
+ Misses       5862     5861       -1     
+ Partials      734      728       -6     
Files Changed Coverage Δ
nodes/ovs/ovs.go 1.29% <0.00%> (-0.22%) ⬇️

... and 6 files with indirect coverage changes

@hellt hellt merged commit d96ed77 into srl-labs:main Aug 22, 2023
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants