Skip to content
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

[dockerutil] logs info if Dockerless #3657

Merged
merged 5 commits into from
Feb 14, 2018
Merged

[dockerutil] logs info if Dockerless #3657

merged 5 commits into from
Feb 14, 2018

Conversation

ian28223
Copy link
Contributor

@ian28223 ian28223 commented Feb 5, 2018

What does this PR do?

Logs an INFO message instead of an ERROR when the host is deemed as Dockerless.
Basically, if there was no docker_daemon.yaml file detected, assume that a running Docker instance will use a default socket file /var/run/docker.sock. If both the yaml file and the socket file do not exist, then the host is Dockerless; raise an INFO instead of an ERROR so as not to alarm customers.

Motivation

A question often asked by (new) support engineers and customers.

@ian28223 ian28223 requested a review from hkaj February 7, 2018 02:40
"will fail. Will retry %s time(s). Error: %s" % (self.left_init_retries, str(ex)))
# No docker_daemon.yaml + no existing Docker socket file = Dockerless
if self._no_conf_file and not os.path.isfile(DEFAULT_SOCK_PATH):
log.info("No docker_daemon conf and no Docker instance detected.")
Copy link
Member

Choose a reason for hiding this comment

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

Should we add the # of retries left to the message? Something like "No docker_daemon conf and no Docker instance detected, will retry %s time(s) before disabling docker features" % self.left_init_retries

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could but, without the docker_daemon conf, it will always retry 0 times right? What if we go ahead and say that Docker features have been disabled.
"No docker_daemon conf and no Docker instance detected. Docker features disabled."

@ian28223
Copy link
Contributor Author

All good?

Copy link
Member

@hkaj hkaj left a comment

Choose a reason for hiding this comment

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

lgtm

@ian28223 ian28223 merged commit c608802 into master Feb 14, 2018
@ian28223 ian28223 deleted the ian/dockerless_conf branch February 14, 2018 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants