ВН
Size: a a a
ВН
ВН
@
OpenNebula.exec_and_log
()def self.exec_and_log(command, message=nil, allowed_return_code=0)
ar/lib/one/remotes/vnm/802.1Q/vlan_tag_driver.rb т
ам найти create_vlan_dev в
нутри этой функции в параметры вызывающие функцию OpenNebula.exec_and_log
добавьте а
ргументы nil, 2@
Exit status is 0 if command was successful, and 1 if there is a syntax error. If an error was reported by the kernel exit status is 2.
@
@
@
SS
SS
@
/var/lib/one/remotes/vnm/802.1Q/vlan_tag_driver.rb
?61 OpenNebula.exec_and_log("#{command(:ip)} link add link"\
62 " #{@nic[:phydev]} name #{@nic[:vlan_dev]} #{mtu} type vlan id"\
63 " #{@nic[:vlan_id]} #{ip_link_conf}")
@
61 OpenNebula.exec_and_log("#{command(:ip)} link add link"\
62 " #{@nic[:phydev]} name #{@nic[:vlan_dev]} #{mtu} type vlan id"\
63 " #{@nic[:vlan_id]} #{ip_link_conf}", nil, 2)
SS
@
/var/lib/one/remotes/vnm/802.1Q/vlan_tag_driver.rb
которые отвечают за создание и «поднятие» интерфейса т.е.def create_vlan_dev
mtu = @nic[:mtu] ? "mtu #{@nic[:mtu]}" : "mtu #{CONF[:vlan_mtu]}"
ip_link_conf = ""
@nic[:ip_link_conf].each do |option, value|
case value
when true
value = "on"
when false
value = "off"
end
ip_link_conf << "#{option} #{value} "
end
OpenNebula.exec_and_log("#{command(:ip)} link add link"\
" #{@nic[:phydev]} name #{@nic[:vlan_dev]} #{mtu} type vlan id"\
" #{@nic[:vlan_id]} #{ip_link_conf}")
OpenNebula.exec_and_log("#{command(:ip)} link set #{@nic[:vlan_dev]} up")
end
eate_vlan_dev
mtu = @nic[:mtu] ? "mtu #{@nic[:mtu]}" : "mtu #{CONF[:vlan_mtu]}"
ip_link_conf = ""
@nic[:ip_link_conf].each do |option, value|
case value
when true
value = "on"
when false
value = "off"
end
ip_link_conf << "#{option} #{value} "
end
#OpenN
ebula.exec_and_log("#{command(:ip)} link add link"\
# "
#{@nic[:phydev]} name #{@nic[:vlan_dev]} #{mtu} type vlan id"\
# "
#{@nic[:vlan_id]} #{ip_link_conf}")
#OpenN
ebula.exec_and_log("#{command(:ip)} link set #{@nic[:vlan_dev]} up")SS
@
@
SS
@
@