Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debian: configure start-stop-daemon to not go into background #21343

Merged

Conversation

spinscale
Copy link
Contributor

On ubuntu 14.04, which uses upstart, where as our debian package uses
sysvinit, there is no stdout/stderr message printed when starting up,
because the start-stop-daemon swallows it.

As Elasticsearch is started to daemonize, we can remove the background
flag from the start-stop-daemon and thus see, if the system does not have
enough memory for starting up - something that happens often on VMs, since
Elasticsearch 5.0 uses 2gb by default instead of one.

Relates #21300
Relates #12716

I'd appreciate few more hints of what could go wrong with this approach that I may be missing.

On ubuntu 14.04, which uses upstart, where as our debian package uses
sysvinit, there is no stdout/stderr message printed when starting up,
because the start-stop-daemon swallows it.

As Elasticsearch is started to daemonize, we can remove the background
flag from the start-stop-daemon and thus see, if the system does not have
enough memory for starting up - something that happens often on VMs, since
Elasticsearch 5.0 uses 2gb by default instead of one.

Relates elastic#21300
Relates elastic#12716
@spinscale spinscale added the :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts label Nov 4, 2016
@jasontedor
Copy link
Member

The change looks good to me, I don't see any ill consequences of it, but I would like to test it before this is merged. I will test right now.

@jasontedor
Copy link
Member

@spinscale With this change when you start the service, it prints the output to the console; that's really helpful and way better than what we had before. I'm surprised that it doesn't print the output to /var/log/upstart/elasticsearch.log. Can anything be done here?

@spinscale
Copy link
Contributor Author

spinscale commented Nov 7, 2016

Not really, because in /usr/sbin/service upstart is completely ignored with the our current package. Due to the package not having an /etc/init/elasticsearch.conf file, there is a fallback at the end of the shell script to just run exec on the good old init script.

@jasontedor
Copy link
Member

Okay, thanks for the explanation and for this PR.

Copy link
Member

@jasontedor jasontedor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @spinscale.

@spinscale spinscale merged commit 5413efc into elastic:master Nov 7, 2016
spinscale added a commit that referenced this pull request Nov 7, 2016
…21343)

On ubuntu 14.04, which uses upstart, where as our debian package uses
sysvinit, there is no stdout/stderr message printed when starting up,
because the start-stop-daemon swallows it.

As Elasticsearch is started to daemonize, we can remove the background
flag from the start-stop-daemon and thus see, if the system does not have
enough memory for starting up - something that happens often on VMs, since
Elasticsearch 5.0 uses 2gb by default instead of one.

Relates #21300
Relates #12716
spinscale added a commit that referenced this pull request Nov 7, 2016
…21343)

On ubuntu 14.04, which uses upstart, where as our debian package uses
sysvinit, there is no stdout/stderr message printed when starting up,
because the start-stop-daemon swallows it.

As Elasticsearch is started to daemonize, we can remove the background
flag from the start-stop-daemon and thus see, if the system does not have
enough memory for starting up - something that happens often on VMs, since
Elasticsearch 5.0 uses 2gb by default instead of one.

Relates #21300
Relates #12716
@clintongormley clintongormley changed the title Packaging Deb: configure start-stop-daemon to not go into background Debian: configure start-stop-daemon to not go into background Nov 7, 2016
@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts Team:Delivery Meta label for Delivery team v5.0.1 v5.1.1 v6.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants