Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

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

why are you returning?

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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...

Copy link
Contributor

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.

}

glog.Infof("Installing %q", opt.Name())
Expand Down