-
Notifications
You must be signed in to change notification settings - Fork 4.7k
treat missing .docker/config.json as a warning, not an error #20955
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bparees The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
New changes are detected. LGTM label has been removed. |
/retest |
@@ -75,7 +75,8 @@ func (opt *installReadyDockerConfigSecret) Install(dockerClient dockerhelper.Int | |||
|
|||
dockerConfigJsonBytes, err := ioutil.ReadFile(path.Join(home, ".docker", "config.json")) | |||
if err != nil { | |||
return fmt.Errorf("Error reading $HOME/.docker/config.json: %v", err) | |||
glog.Warningf("Error reading $HOME/.docker/config.json: %v, imagestream import credentials will not be setup", err) | |||
return nil |
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 are you returning?
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.
because if we can't read the config.json we can't create the import secret from the config.json.
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.
You shouldn't be returning here.
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.
the idea here is to throw the warning and then proceed w/ installing the imagestreams anyway (which may or may not import successfully) rather than fail the whole startup.
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.
returning will won't continue to install the things...
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 see, this is installing the secret.
https://bugzilla.redhat.com/show_bug.cgi?id=1627669