← Back to team overview

launchpad-dev team mailing list archive

Re: rabbit, where art thou?

 

On Thu, Jun 16, 2011 at 7:46 AM, Gavin Panella
<gavin.panella@xxxxxxxxxxxxx> wrote:
> On 14 June 2011 12:06, Gavin Panella <gavin.panella@xxxxxxxxxxxxx> wrote:
> [...]
>> After your suggestion of looking at http://bugs.python.org/issue1652 I
>> am now running a branch through ec2 to reset the SIGPIPE handler when
>> spawning:
>>
>>  https://code.launchpad.net/~allenap/launchpad/rabbit-fixture-sigpipe/+merge/64531
>>
>> Let's see if this works!
>
> It didn't.
>
> However, I had some success today. I patched TestRabbitFixture to run
> test_start_check_shutdown 1000 times. In ec2 it failed about 1 time in
> 100 with:
>
>  Cookie file /.../.erlang.cookie must be accessible by owner only
>
> This looks like a race! However, it isn't the same error as outlined
> in bug 788557... but it's similar enough that perhaps fixing this
> would fix both.
>
> When the RabbitMQ daemon is spawned, the parent process immediately
> starts checking the daemon's state by calling `rabbitmqctl -n
> ... status`, and thereafter a few times every second. The first
> invocation of rabbitmqctl is likely racing with the daemon to create
> the cookie file.
>
> I patched up the fixture code - http://paste.ubuntu.com/627585/ - to
> check for the cookie before running rabbitmqctl and ran the test
> (again, 1000 times) in ec2 with no errors. \o/
>
> It struck me that a simpler fix might simply be to run `rabbitmqctl -n
> ... status` at least once before starting the daemon. I'll prepare a
> branch to do that in the morning.

\o/

Thats awesome news. Thanks!

-Rob


Follow ups

References