-
Notifications
You must be signed in to change notification settings - Fork 814
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
Conversation
utils/dockerutil.py
Outdated
"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.") |
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.
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
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.
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."
All good? |
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
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.