diff --git a/src/vnm_mad/remotes/lib/sg_driver.rb b/src/vnm_mad/remotes/lib/sg_driver.rb index 62e3e3cd87..0927178c45 100644 --- a/src/vnm_mad/remotes/lib/sg_driver.rb +++ b/src/vnm_mad/remotes/lib/sg_driver.rb @@ -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] @@ -124,9 +125,8 @@ def activate(do_all = false) sg.process_rules sg.run! rescue StandardError => e - unlock - SGIPTables.nic_post(@vm, nic) - raise e + sg_error = e + break end end @@ -142,6 +142,10 @@ def activate(do_all = false) unlock + unless sg_error == 0 + raise sg_error + end + 0 end