This isn't a bug with salt, it is just blocking while waiting for output
from your command's stdout. I suspect you can fix your logstash init
script problem by specifying a place to send the logs (logstash defaults
to stdout). Try this in your init script:
java -jar /opt/logstash/logstash.jar agent -f /opt/logstash/indexer.conf
--log /var/log/logstash.log
For any other homegrown init scripts, you should handle stdout/stderr
appropriately, either by redirecting each to a file or, as you
mentioned, closing them with 2>&- 3>&-
--
Dave
On 6/25/13 6:13 AM,
maartens...@opencredo.com wrote:
> We've been experiencing a similar problem, which I think is worth
> reporting in more detail. We're currently using Salt v. 0.15.3 on
> CentOS 6.3 and CentOS 6.4.
>
> Two things happen. The service command hangs, and a zombie process
> appears. I can reproduce the problem with for instance the logstash
> client and this command:
>
> java -jar /opt/logstash/logstash.jar agent -f /opt/logstash/indexer.conf &
> I think that we have an issue where scripts with an & in one of
> the commands will block, I resolved this a long time ago but it
> may have resurfaced somewhere else in the code. Is there any way
> to start the service in daemon mode and not with a &?
>
> Thomas S. Hatch | Founder, CTO
>
>
> 5272 South College Drive, Suite 301 | Murray, UT 84123
>
tha...@saltstack.com <javascript:> |
www.saltstack.com
> <
http://saltstack.com/>
>
>
> On Fri, May 3, 2013 at 1:15 AM, Alan Ooi <
ayo...@gmail.com
> <javascript:>> wrote:
>
> Thanks for replying.
>
> The script is running a process using something very close to
> runuser -l -s /bin/bash -c "insert looong cmd line here" &
>
> I'll be honest, my experience with startup scripts is pretty
> basic and I don't really know the implications of how this may
> or may not effect salt's ability to tell when the script has
> finished running.
> So my answer your question is an unfortunate "maybe".
>
> However, I do know that when I run the script using "service
> scriptName start|stop|restart|status|etc" that it will run
> perfectly fine.
>
> Do you have any recommendations for a way around this? I've
> been looking into replacing the runuser command and seeing if
> that will change anything but have yet to get around to
> attempting this.
>
> Cheers,
>
>
> On Fri, May 3, 2013 at 1:52 AM, Thomas S Hatch
> <
that...@gmail.com <javascript:>> wrote:
>
> This was resolved, is there a chance the scipt itself is
> blocking?
>
> Thomas S. Hatch | Founder, CTO
>
>
> 5272 South College Drive, Suite 301 | Murray, UT 84123
>
tha...@saltstack.com <javascript:> |
www.saltstack.com
> <
http://saltstack.com/>
> <
http://www.google.com> > /tmp/pinggoogle &"
> <
http://www.google.com> 2>&1 ) &"
>
salt-users+...@googlegroups.com <javascript:>.
> <
https://groups.google.com/groups/opt_out>.
> <
https://groups.google.com/d/topic/salt-users/wymM8NrslNw/unsubscribe?hl=en-US>.
> To unsubscribe from this group and all its topics, send an
> email to
salt-users+...@googlegroups.com <javascript:>.
> <
https://groups.google.com/groups/opt_out>.
>
>
>
>
>
> --
> - Alan Ooi
> --
> You received this message because you are subscribed to the
> Google Groups "Salt-users" group.
> To unsubscribe from this group and stop receiving emails from
> it, send an email to
salt-users+...@googlegroups.com
> <javascript:>.
> <
https://groups.google.com/groups/opt_out>.