[chef] Re: Execute resource and sudo


Chronological Thread 
  • From: Tristan Sloughter < >
  • To: Adam Jacob < >
  • Cc:
  • Subject: [chef] Re: Execute resource and sudo
  • Date: Fri, 11 Mar 2011 16:00:22 -0600
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=HuESgkliAzc5pJJtwLLm1q0GYdAyFwGoXM4ljRQv6fuq1vvi4Mir+23S+zDyUScsbc OPI+yZrCwRrIbp5STVQ3DcTbRWlZ8Z3hjVhUJx2vo90iB3YJT30OhBZCwn6GKcSUPhqf U3AMM2UB1CMmkwqAqjEZu7YfjyJ3/aweAGcSg=

So it appears to be a cwd problem actually. I didn't expect the commands to rely on that.

Thanks for the debug_level suggestion :). I will hopefully no longer forget to use that first when I run into a problem.

=ERROR REPORT==== 11-Mar-2011::15:58:53 ===
file:path_eval([".","/home/tsloughter"],".erlang"): permission denied

=ERROR REPORT==== 11-Mar-2011::15:58:53 ===
ERROR: {error,
                                    "Error when reading /home/tsloughter/.erlang.cookie: eacces"} - []
epmd was not running, attempting to start it...
=ERROR REPORT==== 11-Mar-2011::15:58:54 ===
ERROR: {error,
                                    "Error when reading /home/tsloughter/.erlang.cookie: eacces"} - []
ERROR: net_kernel start failure: {error,
                                  {shutdown,
                                   {child,undefined,net_sup_dynamic,
                                    {erl_distribution,start_link,
                                     [['__admin_7502',longnames]]},
                                    permanent,1000,supervisor,
                                    [erl_distribution]}}}STDERR: 

On Fri, Mar 11, 2011 at 3:57 PM, Tristan Sloughter < "> > wrote:
To be exact I run the client by 'sudo chef-client'.

I'll get the logs shortly.

Tristan

On Fri, Mar 11, 2011 at 3:46 PM, Adam Jacob < " target="_blank"> > wrote:
Tristan, do you have debug logs? (Run the chef-client with --log-level debug)

Also, are you running the client as root?

Adam

On Fri, Mar 11, 2011 at 1:35 PM, Tristan Sloughter
< " target="_blank"> > wrote:
> I've run into a problem where I'm using the execute resource and using the
> 'user' attribute. But the command exits with a 1 (not much other information
> is given).
> However, if I instead append 'sudo su - user' to the command in the command
> attribute and do not use the attribute it works fine...
> Tristan



--
Opscode, Inc.
Adam Jacob, Chief Product Officer
T: (206) 619-7151 E: " target="_blank">





Archive powered by MHonArc 2.6.16.

§