]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/networking/recipes/default.rb
Ignore failures starting shorewall
[chef.git] / cookbooks / networking / recipes / default.rb
index fa3f97d00f6a6230416101d88a0f230c3c1119d6..eba2208f5cf4f631ccd59fd13eada9b9ca9f55fb 100644 (file)
@@ -342,9 +342,14 @@ template "/etc/systemd/resolved.conf.d/99-chef.conf" do
   notifies :restart, "service[systemd-resolved]", :immediately
 end
 
+if node[:filesystem][:by_mountpoint][:"/etc/resolv.conf"]
+  execute "umount-resolve-conf" do
+    command "umount -c /etc/resolv.conf"
+  end
+end
+
 link "/etc/resolv.conf" do
   to "../run/systemd/resolve/stub-resolv.conf"
-  not_if { ENV["TEST_KITCHEN"] }
 end
 
 zones = {}
@@ -442,12 +447,14 @@ if node[:networking][:firewall][:enabled]
     action [:enable, :start]
     supports :restart => true
     status_command "shorewall status"
+    ignore_failure true
   end
 else
   service "shorewall" do
     action [:disable, :stop]
     supports :restart => true
     status_command "shorewall status"
+    ignore_failure true
   end
 end
 
@@ -583,12 +590,14 @@ unless node.interfaces(:family => :inet6).empty?
       action [:enable, :start]
       supports :restart => true
       status_command "shorewall6 status"
+      ignore_failure true
     end
   else
     service "shorewall6" do
       action [:disable, :stop]
       supports :restart => true
       status_command "shorewall6 status"
+      ignore_failure true
     end
   end