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

add rsyslog entrypoint #1964

Merged
merged 2 commits into from
Mar 21, 2017
Merged

add rsyslog entrypoint #1964

merged 2 commits into from
Mar 21, 2017

Conversation

riuvshin
Copy link

What does this PR do?

add entrypoint to rsyslog image where we kill pid file if it exist before start rsyslog, that may happen on force restart container and rsyslog wount be able to start.

What issues does this PR fix or reference?

fixes #1940

Changelog

add rsyslog entrypoint

Copy link
Contributor

@dmytro-ndp dmytro-ndp left a comment

Choose a reason for hiding this comment

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

Works properly in CentOS 7.2 with docker 1.12.6.

Before:

[vagrant@dev ~]$ sudo docker ps -a
76cc9de37e3c        codenvy/rsyslog:nightly      "rsyslogd -n"            3 days ago          Restarting (1) 53 seconds ago   0.0.0.0:5140->514/tcp                                codenvy_rsyslog_1
[vagrant@dev ~]$ sudo docker logs codenvy_rsyslog_1
rsyslogd: pidfile '/var/run/rsyslogd.pid' and pid 1 already exist.
If you want to run multiple instances of rsyslog, you need to specify
different pid files for them (-i option).
rsyslogd: run failed with error -3000 (see rsyslog.h or try http://www.rsyslog.com/e/3000 to learn what that number means)

After this fix rsyslog container was restarted correctly without errors:

f012ef111e99        codenvy/rsyslog:nightly   "/entrypoint.sh"         10 minutes ago      Up 14 seconds       0.0.0.0:5140->514/tcp                                codenvy_rsyslog_1

@@ -0,0 +1,14 @@
#!/bin/sh
# Copyright (c) 2016 Codenvy, S.A.
Copy link
Contributor

Choose a reason for hiding this comment

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

if you can bump the date of the copyright to 2017

Copy link
Author

Choose a reason for hiding this comment

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

sure

@riuvshin riuvshin merged commit b146eb9 into master Mar 21, 2017
@riuvshin riuvshin deleted the rsyslogentypoint branch March 21, 2017 14:35
@riuvshin riuvshin added this to the 5.6.0 milestone Mar 23, 2017
@JamesDrummond JamesDrummond mentioned this pull request Apr 2, 2017
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Swarm container became inaccessible after rebooting computer with Codenvy
3 participants