[rabbitmq-discuss] Weird ansible-playbook behaviour when trying to start rabbitmq-server 2.8.2

Cosmin Luță q4break at gmail.com
Thu May 17 07:12:30 BST 2012


On Wed, May 16, 2012 at 3:27 PM, Simon MacMullen <simon at rabbitmq.com> wrote:
>
>
> We changed a couple of things in the init script, mainly using
> start-stop-daemon instead of su to change the user, and using lsb-base
> functions instead of echo.
>
> I can't reproduce what Michael DeHaan says over in the other thread:
>
>> Ok, so the rabbitmq script sounds like it cares very much about the
>> current directory, and when the current directory is gone, it blows
>> up.   Please take this up with whoever maintains the distro init
>> script, because it's doing stupid things
>> and it should not care anything about the directory you first ran
>> /sbin/service in.
>
>
> I tried this from a deleted directory:
>
> $ sudo service rabbitmq-server stop
> sudo: cannot get working directory
> sh: getcwd() failed: No such file or directory
>  * Stopping message broker rabbitmq-server            [ OK ]
>
> $ sudo service rabbitmq-server start
> sudo: cannot get working directory
> sh: getcwd() failed: No such file or directory
>  * Starting message broker rabbitmq-server            [ OK ]
>
> ...and it worked fine. So I am not sure what's up here. If we are doing
> stupid things I would like to fix them, but I'm not sure we are.
>

I tried something similar and wasn't able to reproduce it; it must be
something that ansible is doing which, in combination with rabbitmq's
init script causes that weird bug. I'll look into this when I have
some spare time and I'll get back to you if I find something.

Best regards,
Cosmin


More information about the rabbitmq-discuss mailing list