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

B #6759: finalize the SG rules on sg rule error #6760

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/vnm_mad/remotes/lib/sg_driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ def activate(do_all = false)
end

# Process the rules for each NIC
sg_error = 0
process do |nic|
next if attach_nic_id && attach_nic_id != nic[:nic_id]

Expand All @@ -124,9 +125,8 @@ def activate(do_all = false)
sg.process_rules
sg.run!
rescue StandardError => e
unlock
deactivate(do_all)
raise e
sg_error = e
break
end
end

Expand All @@ -142,6 +142,10 @@ def activate(do_all = false)

unlock

unless sg_error == 0
raise sg_error
end

0
end

Expand Down