Will will not work with a command


#1

Hi,

I am havihng a severe issue with chef executing a command.

If I manually execute this command after fail the I can boot strap.
But even in a prior recipe I execute this command

execute “thes” do
command "echo ‘ip_conntrack’ >> /etc/modules"
action :run
end

chef fails with this error. When I load a template and execute sysctl
-p /etc/sysctl.conf

---- Begin output of sysctl -p /etc/sysctl.conf ----
STDOUT: net.ipv4.tcp_tw_recycle = 0
net.ipv4.tcp_tw_reuse = 0
net.ipv4.tcp_orphan_retries = 1
net.ipv4.tcp_fin_timeout = 25
net.ipv4.tcp_max_orphans = 8192
net.ipv4.ip_local_port_range = 32768 61000
STDERR: error: “net.ipv4.netfilter.ip_conntrack_max” is an unknown key
---- End output of sysctl -p /etc/sysctl.conf ----
Ran sysctl -p /etc/sysctl.conf returned 255
^Z
[1]+ Stopped tail -f chef_bootstrap.out

From the command line I execute echo ‘ip_conntrack’ >> /etc/modules

Then I rerun and it works.

Why will not chef work?


#2

This isn’t a chef problem, it’s a module problem.

You are probably missing nf_conntrack module. (nf = netfilter)

BTW - search engines are really good at finding these answers.

On Wed, Oct 10, 2012 at 6:36 AM, David Montgomery
davidmontgomery@gmail.com wrote:

Hi,

I am havihng a severe issue with chef executing a command.

If I manually execute this command after fail the I can boot strap.
But even in a prior recipe I execute this command

execute “thes” do
command "echo ‘ip_conntrack’ >> /etc/modules"
action :run
end

chef fails with this error. When I load a template and execute sysctl
-p /etc/sysctl.conf

---- Begin output of sysctl -p /etc/sysctl.conf ----
STDOUT: net.ipv4.tcp_tw_recycle = 0
net.ipv4.tcp_tw_reuse = 0
net.ipv4.tcp_orphan_retries = 1
net.ipv4.tcp_fin_timeout = 25
net.ipv4.tcp_max_orphans = 8192
net.ipv4.ip_local_port_range = 32768 61000
STDERR: error: “net.ipv4.netfilter.ip_conntrack_max” is an unknown key
---- End output of sysctl -p /etc/sysctl.conf ----
Ran sysctl -p /etc/sysctl.conf returned 255
^Z
[1]+ Stopped tail -f chef_bootstrap.out

From the command line I execute echo ‘ip_conntrack’ >> /etc/modules

Then I rerun and it works.

Why will not chef work?


#3

I’ve a similar problem with my sybase cookbook. As Mike said, this is a
specific error related to modules.

You must load related kernel modules before apply sysctl’s tunables.

2012/10/10 Mike miketheman@gmail.com

This isn’t a chef problem, it’s a module problem.

You are probably missing nf_conntrack module. (nf = netfilter)

BTW - search engines are really good at finding these answers.

On Wed, Oct 10, 2012 at 6:36 AM, David Montgomery
davidmontgomery@gmail.com wrote:

Hi,

I am havihng a severe issue with chef executing a command.

If I manually execute this command after fail the I can boot strap.
But even in a prior recipe I execute this command

execute “thes” do
command "echo ‘ip_conntrack’ >> /etc/modules"
action :run
end

chef fails with this error. When I load a template and execute sysctl
-p /etc/sysctl.conf

---- Begin output of sysctl -p /etc/sysctl.conf ----
STDOUT: net.ipv4.tcp_tw_recycle = 0
net.ipv4.tcp_tw_reuse = 0
net.ipv4.tcp_orphan_retries = 1
net.ipv4.tcp_fin_timeout = 25
net.ipv4.tcp_max_orphans = 8192
net.ipv4.ip_local_port_range = 32768 61000
STDERR: error: “net.ipv4.netfilter.ip_conntrack_max” is an unknown key
---- End output of sysctl -p /etc/sysctl.conf ----
Ran sysctl -p /etc/sysctl.conf returned 255
^Z
[1]+ Stopped tail -f chef_bootstrap.out

From the command line I execute echo ‘ip_conntrack’ >> /etc/modules

Then I rerun and it works.

Why will not chef work?