fab-user
[Top][All Lists]
Advanced

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

Re: [Fab-user] fab sudo() doesn't seem to work


From: Jeff Forcier
Subject: Re: [Fab-user] fab sudo() doesn't seem to work
Date: Thu, 9 Oct 2008 17:23:05 -0400

My branch should handle that sort of thing better, given the
additional execution model it implements, but I haven't actually tried
using it with 'tail -f' or other never-ending processes. If the idea
were to tail a file _and_ do something else 'alongside it', that
wouldn't work well until we got an actual multithreaded version of
Fabric working. Right now it's serial only and doesn't execute
anything in parallel.

I actually don't see a -f in Shev's original email though -- am I
missing something or are you actually just running "tail X" which
should simply output the last 10 lines of X?

If you want to provide the full fab task and give us an idea of what
the remote environment is like, I can try and recreate it with either
Fabric 0.0.9 or my branch, and see if that helps speed up the
troubleshooting.

-Jeff

On Thu, Oct 9, 2008 at 5:13 PM, Christian Vest Hansen
<address@hidden> wrote:
> Fabric handles log tailing badly. If you log into multiple servers and
> tail a log file, you will only get output from the server that is
> listed first in the fab_hosts variable.
>
> What happens is that fabric will execute tail on the first server, and
> then wait for it to finish. Unfortunately, by nature of any tail -f
> command, the tail process will never terminate and this causes fabric
> to hang, and never proceed to execute tail on the other connected
> hosts.
>
> It might be that Jeff got something working in his experimental
> execution branch, but for mainline Fabric 0.0.9, tailing log files is
> something that fabric really sucks at.
>
> On Thu, Oct 9, 2008 at 5:53 PM,  <address@hidden> wrote:
>> Yes, fab logs in to the server - I use ssh keyfiles so there's no prompt.  I
>> tried a run('ls') before the sudo command and it works fine.  As for new
>> lines being appended to the log file, I don't think there were, but I'll
>> check.
>>
>> Any other suggestions/ideas?  Thank you!
>>
>>
>>
>> On Wed, Oct 8, 2008 at 7:06 PM, Christian Vest Hansen <address@hidden>
>> wrote:
>>>
>>> Did you get to log in to the server properly? As in, being prompted
>>> for a password and all that.
>>>
>>> What happens if you first do a run('echo hello') before the sudo()
>>> operation?
>>>
>>> Lastly, while you where sitting there waiting for something to happen,
>>> were there actually any new lines appended to that log file?
>>>
>>> On Thu, Oct 9, 2008 at 12:42 AM,  <address@hidden> wrote:
>>> > Whenever I use the fab sudo command, I see the command echoed on screen,
>>> > but
>>> > never see a password prompt; it just seems to hang.  Hitting CTRL-C
>>> > breaks
>>> > out of it with an error message like,
>>> >
>>> > Error: The sudo operation failed on myserver.com:
>>> >     <lambda>() takes no arguments (2 given)
>>> > [pickii.com] err: [sudo] password for some_user:
>>> >
>>> >
>>> > In this particular case, the fabfile command looks like,
>>> >
>>> > sudo('tail /var/log/apache2/error.log')
>>> >
>>> > Probably I'm doing something stupid, would appreciate any pointers,
>>> > thanks!
>>> >
>>> > Shev
>>> >
>>> > _______________________________________________
>>> > Fab-user mailing list
>>> > address@hidden
>>> > http://lists.nongnu.org/mailman/listinfo/fab-user
>>> >
>>> >
>>>
>>>
>>>
>>> --
>>> Venlig hilsen / Kind regards,
>>> Christian Vest Hansen.
>>
>>
>
>
>
> --
> Venlig hilsen / Kind regards,
> Christian Vest Hansen.
>
>
> _______________________________________________
> Fab-user mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/fab-user
>




reply via email to

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