From: Tom Hughes Date: Fri, 17 Nov 2017 16:21:21 +0000 (+0000) Subject: Disable mcelog on scorch X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/1cd8cc40ed031f2e5cb44460d040d0211b9f9d7a Disable mcelog on scorch The processor/chipset in scorch needs a new version than is available in 16.04 and refuses to start otherwise. --- diff --git a/cookbooks/hardware/attributes/default.rb b/cookbooks/hardware/attributes/default.rb index 393dd0317..fb19506f4 100644 --- a/cookbooks/hardware/attributes/default.rb +++ b/cookbooks/hardware/attributes/default.rb @@ -7,6 +7,8 @@ default[:hardware][:modules] = if node[:lsb][:release].to_f >= 16.04 default[:hardware][:grub][:cmdline] = %w[nomodeset] default[:hardware][:sensors] = {} +default[:hardware][:mcelog][:enabled] = true + if node[:dmi] && node[:dmi][:system] case node[:dmi][:system][:manufacturer] when "HP" diff --git a/cookbooks/hardware/recipes/default.rb b/cookbooks/hardware/recipes/default.rb index 472db1817..a18a293a0 100644 --- a/cookbooks/hardware/recipes/default.rb +++ b/cookbooks/hardware/recipes/default.rb @@ -200,20 +200,22 @@ service "lldpd" do supports :status => true, :restart => true, :reload => true end -package "mcelog" +if node[:hardware][:mcelog][:enabled] + package "mcelog" -%w[bus cache dimm iomca page socket-memory unknown].each do |trigger| - template "/etc/mcelog/#{trigger}-error-trigger.local" do - source "mcelog-trigger.erb" - owner "root" - group "root" - mode 0o755 + %w[bus cache dimm iomca page socket-memory unknown].each do |trigger| + template "/etc/mcelog/#{trigger}-error-trigger.local" do + source "mcelog-trigger.erb" + owner "root" + group "root" + mode 0o755 + end end -end -service "mcelog" do - action [:start, :enable] - supports :status => true, :restart => true, :reload => false + service "mcelog" do + action [:start, :enable] + supports :status => true, :restart => true, :reload => false + end end tools_packages = [] diff --git a/roles/scorch.rb b/roles/scorch.rb index b22c905f9..5c400300b 100644 --- a/roles/scorch.rb +++ b/roles/scorch.rb @@ -29,6 +29,11 @@ default_attributes( } } }, + :hardware => { + :mcelog => { + :enabled => false + } + }, :networking => { :interfaces => { :external_ipv4 => {