[chef] Re: What kind of limit am I hitting to?


Chronological Thread 
  • From: Sam Pointer < >
  • To:
  • Subject: [chef] Re: What kind of limit am I hitting to?
  • Date: Wed, 30 Jan 2013 22:52:09 +0000

Hey.

Everything points of the limits.conf changes not being effective for the chef-client process. But, you've taken care to do this before starting the client.
If you can absolutely rule out node[:abcattr][:user] being a sane user with a sane unreserved uid, and that the new limits are effective, the only outside punt I can think of is, from the setuid(2) manpage:
"Linux has the concept of the file system user ID, normally equal to the effective user ID.  The setuid() call also sets the file system user ID of the calling process.  See setfsuid(2)."
There's nothing weird about either your working directory at that point, or any kind of mounted volume that you might encounter?
Do you have an strace of the client following the child process?

S.

On Tue, Jan 29, 2013 at 11:16 PM, Andrey Brindeyev < " target="_blank"> > wrote:
Hi everybody,

I got following trace while trying to execute a bash block:
Mixlib::ShellOut::ShellCommandFailed: bash[copy-to-pickup] (xyzcookbook::default line 56) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of "bash"  "/tmp/chef-script20130129-19058-1ltcctd-0" ----
STDOUT:
STDERR: /usr/lib/ruby/gems/1.8/gems/mixlib-shellout-1.1.0/lib/mixlib/shellout/unix.rb:93:in `uid=': Resource temporarily unavailable (Errno::EAGAIN)
        from /usr/lib/ruby/gems/1.8/gems/mixlib-shellout-1.1.0/lib/mixlib/shellout/unix.rb:93:in `set_user'
        from /usr/lib/ruby/gems/1.8/gems/mixlib-shellout-1.1.0/lib/mixlib/shellout/unix.rb:226:in `fork_subprocess'
        from /usr/lib/ruby/gems/1.8/gems/mixlib-shellout-1.1.0/lib/mixlib/shellout/unix.rb:222:in `fork'
        from /usr/lib/ruby/gems/1.8/gems/mixlib-shellout-1.1.0/lib/mixlib/shellout/unix.rb:222:in `fork_subprocess'
        from /usr/lib/ruby/gems/1.8/gems/mixlib-shellout-1.1.0/lib/mixlib/shellout/unix.rb:35:in `run_command'
        from /usr/lib/ruby/gems/1.8/gems/mixlib-shellout-1.1.0/lib/mixlib/shellout.rb:222:in `run_command'
        from /usr/lib/ruby/gems/1.8/gems/chef-10.18.0/bin/../lib/chef/mixin/shell_out.rb:30:in `shell_out'
        from /usr/lib/ruby/gems/1.8/gems/chef-10.18.0/bin/../lib/chef/mixin/shell_out.rb:35:in `shell_out!'
        from /usr/lib/ruby/gems/1.8/gems/chef-10.18.0/bin/../lib/chef/provider/execute.rb:62:in `action_run'
        from /usr/lib/ruby/gems/1.8/gems/chef-10.18.0/bin/../lib/chef/mixin/why_run.rb:52:in `call'
        from /usr/lib/ruby/gems/1.8/gems/chef-10.18.0/bin/../lib/chef/mixin/why_run.rb:52:in `add_action'
        from /usr/lib/ruby/gems/1.8/gems/chef-10.18.0/bin/../lib/chef/provider.rb:152:in `converge_by'
        from /usr/lib/ruby/gems/1.8/gems/chef-10.18.0/bin/../lib/chef/provider/execute.rb:61:in `action_run'

Contents of that bash block is:
bash "copy-to-pickup" do
    code "cp -f #{xyz_filename} #{pickup_filename}"
    user node[:abcattr][:user]
    group node[:abcattr][:group]
    action :run
end

I've increased nproc and nofile limits in /etc/security/limits.conf file __before__ starting and is doesn't resolve my problem:
# grep userid /etc/security/limits.conf 
userid - nproc 4096
userid - nofile 4096

# ps -eLF | grep userid | wc -l
1756

I have a plenty of disk space available on that host.

What else to check?

Andrey.




Archive powered by MHonArc 2.6.16.

§