BoxUpp / Puppet-Modules

2 stars 4 forks source link

service { "iptables" } causes tomcat module to fail #1

Closed nalbion closed 10 years ago

nalbion commented 10 years ago

I'm experimenting with your Tomcat module from within a Vagrant box which doesn't have a firewall installed or enabled. When updating puppet agent I get the following error message:

Error: /Stage[main]/Tomcat/Service[iptables]/enable: 
    change from false to true failed: 
        Could not enable iptables: 
            Execution of '/sbin/chkconfig iptables on' returned 1: 
                iptables: unknown service

Note that service iptables status also says that iptables is an unknown service, although iptables v1.4.6 is installed on the agent.

I have commented out the service { "iptables": ...} section for now, but it would be good if the tomcat module could deal with this scenario.

BoxUpp commented 10 years ago

Thanks for pointing this out, Nicholas ! We're on it.

Meanwhile, could you please let us know some more details about the agent on which this failed, like OS flavour and other configurations.

nalbion commented 10 years ago

hardwaremodel => x86_64 kernel => Linux kernelrelease => 3.0.76-0.11-default kernelversion => 3.0.76 lsbdistcodename => n/a lsbdistdescription => SUSE Linux Enterprise Server 11 (x86_64) lsbdistid => SUSE LINUX lsbdistrelease => 11 lsbrelease => core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64:desktop-4.0-amd64:desktop-4.0-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4.0-noarch operatingsystem => SLES operatingsystemrelease => 11.3 processor0 => Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz processor1 => Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz processorcount => 2 ps => ps -ef puppetversion => 2.6.18 rubysitedir => /usr/lib64/ruby/site_ruby/1.8 rubyversion => 1.8.7 virtual => physical

...actually, I'm pretty sure that I had upgraded this VM to puppet 3.x, but have since ran vagrant destory; vagrant up...

BoxUpp commented 10 years ago

Hi Nicholas thanks for sharing the details this is an OS specific issue to start and stop firewall in SUSE the commands are different please refer the following link http://en.opensuse.org/Iptables This module is written and tested on Centos and Redhat well updating iptables part in the module as according to your OS will work for you.