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

Fix error messages from docker facts if docker not running #325

Merged
merged 1 commit into from
Sep 11, 2018

Conversation

stdietrich
Copy link
Contributor

If the docker packages are installed on a machine, but the docker daemon is not running, the docker and docker_server_version fact print error messages:

# puppet agent -t
.....
Error: Facter: error while resolving custom fact "docker": A JSON text must at least contain two octets!
Error: Facter: error while resolving custom fact "docker_server_version": undefined method `[]' for nil:NilClass

The server values are not present in the json output.

This PR changes this, so that the JSON error messages are suppressed.

@davejrt
Copy link
Contributor

davejrt commented Sep 11, 2018

Can you ensure your unit tests are passing?

@stdietrich
Copy link
Contributor Author

I have updated my PR with the small change and unit tests are now passing.

@davejrt
Copy link
Contributor

davejrt commented Sep 11, 2018

LGTM

@davejrt davejrt merged commit 942f859 into puppetlabs:master Sep 11, 2018
@stdietrich stdietrich deleted the fact_fix branch September 11, 2018 21:58
@Ramesh7 Ramesh7 added the bugfix label Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants