diff --git a/recipes/eucanetd.rb b/recipes/eucanetd.rb index b841d40..4cc24c3 100644 --- a/recipes/eucanetd.rb +++ b/recipes/eucanetd.rb @@ -48,7 +48,7 @@ if node["eucalyptus"]["network"]["mode"] != "VPCMIDO" execute "Configure kernel parameters from 70-eucanetd.conf" do command "/usr/lib/systemd/systemd-sysctl 70-eucanetd.conf" - notifies :run, "execute[Ensure bridge modules loaded into the kernel on NC]", :before + notifies :run, "execute[Run systemd-modules-load to load modules in 70-eucalyptus-node.conf on NC]", :before end end end diff --git a/recipes/install-source.rb b/recipes/install-source.rb index c36b1ff..ea94f9e 100644 --- a/recipes/install-source.rb +++ b/recipes/install-source.rb @@ -343,3 +343,14 @@ command 'modprobe kvm_intel' only_if { ::File.exist? "/usr/lib/udev/rules.d/80-kvm.rules" } end + +if Chef::VersionConstraint.new("~> 7.0").include?(node['platform_version']) + exp_run_list = node['expanded_run_list'] + exp_run_list.each do |listitem| + if listitem.include? "node-controller" + execute "Run systemd-modules-load to load modules in 70-eucalyptus-node.conf on NC" do + command '/usr/lib/systemd/systemd-modules-load' + end + end + end +end diff --git a/recipes/node-controller.rb b/recipes/node-controller.rb index c923996..0bb8be6 100644 --- a/recipes/node-controller.rb +++ b/recipes/node-controller.rb @@ -131,7 +131,7 @@ ## Setup Bridge EDGE mode only execute "network-restart" do - command "service network restart" + command "systemctl restart network.service" action :nothing end @@ -166,6 +166,7 @@ # Do not attach bridge to physical NIC in VPCMIDO mode (Issue #314) if node["eucalyptus"]["network"]["mode"] != "VPCMIDO" + execute "Copy existing interface config to bridge config" do command "cp #{bridged_nic_file} #{bridge_file}" not_if "ls #{bridge_file}" @@ -196,9 +197,9 @@ ## use a different notifier to setup bridge in VPCMIDO mode if node["eucalyptus"]["network"]["mode"] != "VPCMIDO" - if Chef::VersionConstraint.new("~> 7.3").include?(node['platform_version']) - execute "Ensure bridge modules loaded into the kernel on NC" do - command "modprobe bridge" + if Chef::VersionConstraint.new("~> 7.0").include?(node['platform_version']) + execute "Run systemd-modules-load to load modules in 70-eucalyptus-node.conf on NC" do + command '/usr/lib/systemd/systemd-modules-load' notifies :run, "execute[network-restart]", :immediately notifies :run, "execute[brctl setfd]", :delayed notifies :run, "execute[brctl sethello]", :delayed