Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Silence queue enumeration "normal" errors #252

Closed
wants to merge 2 commits into from

Conversation

tequeter
Copy link
Contributor

This Pull Request silences ipptool errors when the module tries to enumerate queues from a stopped CUPS service. See #251 for more info.

This is what I added/changed/removed and why I did it ...

  1. I caught and redirected to the debug log the PuppetX::Cups::Ipp::QueryError when trying to enumerate classes and printers. Querying CUPS at this point cannot be guaranteed to succeed, but generates big noisy "normal" errors.
  2. I updated the documentation accordingly.
  3. I added an acceptance test for it. You can reproduce the issue easily by checking out the first commit.

Legal statement:

By committing to this project I transfer the full copyright for my contributions
to the current project maintainer as per the project's LICENSE file.

@leoarnold
Copy link
Owner

I can see where you are going with this, but silent fails have been and always will be a road to making troubleshooting unnecessarily hard and frustrating.

If you desire to have silent fails, please work with your own fork. For the general purpose, the underlying cause should be identified and dealt with.

@tequeter
Copy link
Contributor Author

Hm, fair point.

What if I checked that I can connect to TCP localhost:631 before trying to call ipptool, instead?

@leoarnold leoarnold closed this Apr 21, 2021
@leoarnold leoarnold deleted the branch leoarnold:master April 21, 2021 12:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants