fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fab-user] Sudo fails on Solaris hosts


From: Jacqueline Atkins
Subject: Re: [Fab-user] Sudo fails on Solaris hosts
Date: Wed, 18 Jan 2012 19:21:11 -0500

Hi Brandon;

Thank you so much for the reply!  I am new to Fabric and really trying
to get a solid grasp about the way it works.  I so appreciate your
taking the time to assist me.

I did find a solution, and you are correct about the pathing.
However, I am a bit confused apparently about the way that Fabric
works and if you could shed some light, I would be very grateful.

I work in a heterogeneous environment which includes RHEL, Solaris,
FreeBSD, and AIX.  I am attempting to write code that is executable on
all platforms without additional overhead so, I am always trying to
avoid hard-coding paths if at all possible.  What I realized is that
on Solaris, both sudo and facter are installed in /usr/local/bin
instead of /usr/bin.  So, I created links on the target machines and
this corrected the issue.

However, I am confused about the default path that fabric is using, in
this case it appears to be /usr/local/bin?  is this correct?  I am not
sure where/how this is set.

Again, thank you, thank you!  I really appreciate your feedback!

Have a great evening!
Jackie




On Wed, Jan 18, 2012 at 7:11 PM, Brandon Whaley <address@hidden> wrote:
> Hello Jacqueline,
>
> The return code of 127 you're getting means that the command was not
> found.  I suspect the path to this command is being included in your
> path by the shell environment, so when you use "shell=False" you're
> excluding that from your path.  Try using the full path to that
> executable (use `which facter` to find it) and your should not have
> further issues.
>
> --Brandon
>
> On Wed, Jan 18, 2012 at 4:30 PM, Jacqueline Atkins
> <address@hidden> wrote:
>> Actually, I was not clear when describing the issue.  The problem is
>> not sudo but rather with the shell.
>>
>> When I use the following, shell= True, this works as expected on Solaris.
>> run('facter|grep serial', shell=True)
>>
>> However, I work in a heterogeneous environment that includes AIX and
>> if I do not set shell=False, the output from AIX contains control
>> characters, etc.
>>
>> Any ideas would be greatly appreciated!!
>>
>> Thank you
>>
>> On Wed, Jan 18, 2012 at 4:13 PM, Jacqueline Atkins
>> <address@hidden> wrote:
>>> Hi Everyone;
>>>
>>> I have run into a peculiar issue that  is stumping me.
>>>
>>> When using sudo to execute a command on Solaris hosts, I get the
>>> following error:
>>>
>>> [blvm-client3] out: bash: sudo: command not found
>>> Warning: sudo() encountered an error (return code 127) while executing
>>> 'facter serialnumber'
>>>
>>> Here is the code in my fabfile:
>>>  sudo('facter serialnumber', shell=False)
>>>
>>> However, the command is executable locally.
>>>
>>>
>>> Any advice would be greatly appreciated!
>>> Thank you in advance!
>>>
>>> --
>>> Jacqueline G. Atkins
>>>
>>> "To whom much is given, much will be required..."  Luke 12:48
>>>
>>> "“People, even more than things, have to be restored, renewed,
>>> revived, reclaimed, and redeemed; never throw out anyone.” Audrey
>>> Hepburn
>>>
>>> "....I am not going to be unnecessarily buoyed or depressed by someone
>>> else's experience.  I have my own fight to fight" ..... Elizabeth
>>> Edwards
>>
>>
>>
>> --
>> Jacqueline G. Atkins
>>
>> "To whom much is given, much will be required..."  Luke 12:48
>>
>> "“People, even more than things, have to be restored, renewed,
>> revived, reclaimed, and redeemed; never throw out anyone.” Audrey
>> Hepburn
>>
>> "....I am not going to be unnecessarily buoyed or depressed by someone
>> else's experience.  I have my own fight to fight" ..... Elizabeth
>> Edwards
>>
>> _______________________________________________
>> Fab-user mailing list
>> address@hidden
>> https://lists.nongnu.org/mailman/listinfo/fab-user



-- 
Jacqueline G. Atkins

"To whom much is given, much will be required..."  Luke 12:48

"“People, even more than things, have to be restored, renewed,
revived, reclaimed, and redeemed; never throw out anyone.” Audrey
Hepburn

"....I am not going to be unnecessarily buoyed or depressed by someone
else's experience.  I have my own fight to fight" ..... Elizabeth
Edwards



reply via email to

[Prev in Thread] Current Thread [Next in Thread]