-
Notifications
You must be signed in to change notification settings - Fork 680
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
[sonic_installer] don't print errors when installing an image not sup… #1719
Merged
qiluo-msft
merged 1 commit into
sonic-net:master
from
stepanblyschak:fix-errors-in-log-when-downgrading
Aug 3, 2021
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why you need this check? If the DOCKER_CTL_SCRIPT could not be
stop
more than once, it's a bug. #ClosedThere 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.
@qiluo-msft This check prevents doing "stop" in case we haven't done "start" at line 351
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 know your intention. My point here is that a service script in general should allow stop a stopped service and return 0. So I think this is a bug inside
/usr/lib/docker/docker.sh
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.
It is not like it cannot stop it if it is stopped already. Here we added a check - if DOCKER_CTL_SCRIPT exists or not. If it exists then we continue the flow and start docker, if not we return from the function but a cleanup is still required. In case DOCKER_CTL_SCRIPT is missing this line will fail and print error. So a check is added "if docker_started", if it was started DOCKER_CTL_SCRIPT exists and we can execute this line, if not - not even needed to execute stop.
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 checked
files/docker/docker
, and it is usingstart-stop-daemon --stop --pidfile "$DOCKER_SSD_PIDFILE" --retry 10
in the stop branch. I think the option--oknodo
will treat noop as success.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.
@qiluo-msft It is not what I fix in this PR. The intention is to not call DOCKER_CTL_SCRIPT stop in case DOCKER_CTL_SCRIPT is missing.
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!