mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-24 21:34:01 +03:00
B #-: FC hooks iterate over all NICs (#855)
Firecracker hooks (pre and clean) should only process those NICs whose VN driver matches the driver that actually calls the hook. Signed-off-by: Ricardo Diaz <rdiaz@opennebula.io>
This commit is contained in:
parent
5359b5c548
commit
9bd455a82c
@ -39,7 +39,9 @@ def command(cmd)
|
||||
cmd_str
|
||||
end
|
||||
|
||||
XPATH_NICS = '//TEMPLATE/NIC'
|
||||
vnmad = File.basename(File.expand_path('..', File.dirname(__FILE__)))
|
||||
|
||||
XPATH_NICS = "//TEMPLATE/NIC[VN_MAD='#{vnmad}']"
|
||||
XPATH_HV = '//HISTORY/VM_MAD'
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
@ -35,7 +35,9 @@ def command(cmd)
|
||||
cmd_str
|
||||
end
|
||||
|
||||
XPATH_NICS = '//TEMPLATE/NIC'
|
||||
vnmad = File.basename(File.expand_path('..', File.dirname(__FILE__)))
|
||||
|
||||
XPATH_NICS = "//TEMPLATE/NIC[VN_MAD='#{vnmad}']"
|
||||
XPATH_HV = '//HISTORY/VM_MAD'
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
@ -86,4 +88,4 @@ template.elements.each(XPATH_NICS) do |nic_element|
|
||||
break unless rc.success?
|
||||
end
|
||||
|
||||
exit(-1) unless rc.success?
|
||||
exit(-1) unless rc.nil? || rc.success?
|
||||
|
Loading…
Reference in New Issue
Block a user