]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
Fix severe installation hang on jessie.
authorfsdef <g5256812@trbvm.com>
Sun, 14 Jun 2015 16:05:30 +0000 (19:05 +0300)
committerfsdef <fsdef@dev512.com>
Mon, 15 Jun 2015 13:45:50 +0000 (16:45 +0300)
On jessie iptables-persistent pops up debconf to ask if the current firewall setup should be saved which leads to puppet hanging and 99% of the time half configured firewall and ssh lockout.

This patch sets the value to false before the install so that debconf doesnt pop up - iptables rules shouldn't be saved automatically since they will be overridden by puppet'.

manifests/linux/debian.pp

index 87ec123dfc4cda3f94eebf840749651d1295cf97..d7941e21d35599187c3077b9c26e2a133ddd3d95 100644 (file)
@@ -21,8 +21,14 @@ class firewall::linux::debian (
 ) inherits ::firewall::params {
 
   if $package_name {
+    #Fixes hang while installing iptables-persistent on debian 8
+    exec {'iptables-persistent-debconf':
+        command     => "/bin/echo \"${package_name} ${package_name}/autosave_v4 boolean false\" | /usr/bin/debconf-set-selections && /bin/echo \"${package_name} ${package_name}/autosave_v6 boolean false\" | /usr/bin/debconf-set-selections",
+        refreshonly => true
+    }
     package { $package_name:
-      ensure => present,
+      ensure  => present,
+      require => Exec['iptables-persistent-debconf']
     }
   }