-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Shorthand method for service.restart() #1918
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
Conversation
I think I've got some unrelated test failures on Jenkins:
|
Yeah, sadly that test is hit or miss on 17.06 - don't worry about it. |
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.
Code LGTM, but not sure about the method's name.
docker/models/services.py
Outdated
service_mode, | ||
fetch_current_spec=True) | ||
|
||
def restart(self): |
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 think restart
doesn't accurately represent the operation that's being performed here. In the Docker ecosystem, restart
usually means "take the existing containers with their configuration and stop them then start them again". The same idea exists in other common software like nginx with the reload
vs restart
distinction.
To my understanding. in this case, the containers for the service will actually be recreated with the same configuration - maybe force_update
or reload
is a more accurate name?
Thanks again, @shin- ! I've also snuck in another change: the It would be great if you could give the change another look because of these extras. Thank you! |
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.
LGTM, thank you!
If you could just squash those commits into one, I can go ahead and merge it. |
Signed-off-by: Viktor Adam <rycus86@gmail.com>
d6079f5
to
e54e8f4
Compare
Sure, it's done now, thanks a lot! |
This PR would add a new shorthand method to restart a service, similarly to the recently added
scale
method.Usage:
Thanks!