-
Notifications
You must be signed in to change notification settings - Fork 443
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
#957 RPM with killTimeout
#960
Conversation
Hi @mr-git, Thank you for your contribution! We really value the time you've taken to put this together. Before we proceed with reviewing this pull request, please sign the Lightbend Contributors License Agreement: |
Thanks for your lightning fast pull request 🚀 The For more information on how to run the tests locally see the developer guide: https://github.com/sbt/sbt-native-packager/wiki/Developer-Guide |
hm.. it failed with My change is in How change in start template could affect RPM spec file which contains RPM setup instructions? Could it be that Test expects (there are tabs):
But packager generates (no tabs):
|
BTW, there are no tests that check the startup script, at least I didn't find any. Is there a way to run those CI tests on |
@mr-git you are awesome!
I removed all traces of tabs in the bash scripts this weekend, but didn't mind the tests. Thanks a lot for fixing my mess I did on the weekend. 02519e1 wasn't the best commit I ever made 😕
That's very likely. I still haven't had time to figure out a good way to inspect these scripts. ATM I'm playing around with |
I am still trying to figure out all places :( I hope last commit will make it better, though |
https://travis-ci.org/sbt/sbt-native-packager/jobs/220865842:
What does it mean? Is there a way to restart the build? |
yay, it is green! |
Yes. Travis CI crashes 1 out of 20 times. Sorry, I didn't see this earlier.
✨ ✨ awesome! Thanks for fixing my mess I left on the weekend. You're awesome ❤️ |
You are welcome! |
This is my first pull request - how this will get merged? Will you do the merge or should I somehow init/request it? |
@@ -86,7 +86,7 @@ start() { | |||
|
|||
stop() { | |||
echo -n $"Stopping $prog: " | |||
killproc -p $PIDFILE $prog | |||
killproc -p $PIDFILE -d ${{kill_timeout}} $prog |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find any documentation of the -d
parameter. Do you have any resources for that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://gist.github.com/edouard-lopez/4d1c1d007156b662c64e#file-functions-centos-sh-L284 - this is for functions.centos.sh
https://bash.cyberciti.biz/guide//etc/init.d/functions - here search for killproc
- it has line:
Usage: killproc [-p pidfile] [ -d delay] {program} [-signal]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on our centos servers in /etc/init.d/functions
there is:
#...
# A function to stop a program.
killproc() {
local RC killlevel= base pid pid_file= delay try binary=
RC=0; delay=3; try=0
# Test syntax.
if [ "$#" -eq 0 ]; then
echo $"Usage: killproc [-p pidfile] [ -d delay] {program} [-signal]"
return 1
fi
#...
if [ "$1" = "-d" ]; then
delay=$(echo $2 | awk -v RS=' ' -v IGNORECASE=1 '{if($1!~/^[0-9.]+[smhd]?$/) exit 1;d=$1~/s$|^[0-9.]*$/?1:$1~/m$/?60:$1~/h$/?60*60:$1~/d$/?24*60*60:-1;if(d==-1) exit 1;delay+=d*$1} END {printf("%d",delay+0.5)}')
if [ "$?" -eq 1 ]; then
echo $"Usage: killproc [-p pidfile] [ -d delay] {program} [-signal]"
return 1
fi
shift 2
fi
#...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clarification. I guess this will be okay.
I'll try to push it this week. I originally planned to fix one other issue, but won't have the time.
I'll do the merging :) Github has a pretty nice interface for doing this directly on the PR. No work from you side required :) |
Thanks for all your work and the positive communication :) Hope you'll continue doing great open source stuff 👍 |
@mr-git release in |
No description provided.