-
Notifications
You must be signed in to change notification settings - Fork 33
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
Error: Could not prefetch printer provider 'cups': undefined method `include?' for nil:NilClass #44
Comments
Hiya kbotnen, I think the failure is due to the way options handling was changed (I'll check your linked files to double check). iirc I was whitelisting allowed options before, and only scraping the output for those options. I then changed it to allowing any option and now it explodes. |
… inject instead of each. Switch beaker testing nodesets to use other boxes from hashicorp atlas, since puppetlabs boxes seem slightly out of date. Switch default beaker box to ubuntu precise, because that's the biggest use case outside of osx. Ignore beaker log and junit output. Note about switching nodesets in README.md Remove TODOs about i18n, since puppet is supposed to set LC_LANG Replaced Regexp matching with simple splits where possible, because a pattern match was unnecessary. FIX: #44 Undefined method include? for nil. Not checking whether resource[:options] exists before calling include? on it. Add more debug output for each stage of the prefetch, mostly for my own use. Remove redundant call to lpadmin for vendor options.
Hi kbotnen, please check with latest HEAD branch. |
Hi, It fixed the original problem on precise, but now I get a error on my trusty-box when i do vagrant up
(the longer debug output is here: https://gist.github.com/kbotnen/eb016d159865acac09e6) When I do a new vagrant provision it works:
|
Hiya kbotnen. Can you verify the status of the cups service after vagrant up? I can't see much wrong with the commands being executed. |
I am seeing this issue as well with the following code. printer { "UPS_Printer":
ensure => present,
shared => true,
uri => $shipping_printer,
description => "shipping label printer",
model => "raw",
}
printer { "PT9800PCN":
ensure => present,
shared => true,
uri => $label_printer,
description => "Label Printer",
model => "raw",
} I get the error.
If I comment out one of the resources so I am only declaring one printer at a time the problem goes away. I checked out master and am on commit
|
Interesting, I'll add a test similar to your manifest and see if i can replicate it. |
The issue has been replicated and I'm working on a fix. |
@timdaman This issue is related to trying to fetch PPD options for the 'raw' model which is actually impossible, since theres no PPD. |
…row exception. Some test fixtures werent being cleaned up after tests.
Hei,
I updated code to newest master, and Now I get the following error:
Error: Could not prefetch printer provider 'cups': undefined method `include?' for nil:NilClass
It worked without this in an earlier version.
Working version: https://gist.github.com/kbotnen/8c52f7b99e759da152a8
Errorenous version: https://gist.github.com/kbotnen/2270d4a8857d657145e6
Despite the error the printers show up on lpstat -v.
If I try to remove a printer I get more errors
==> precise-gui: Error: Could not prefetch printer provider 'cups': undefined method `include?' for nil:NilClass
==> precise-gui: Notice: /Stage[main]/App::Print/Printer[IT_Print_Ricoh]/ensure: removed
==> precise-gui: Debug: Executing '/usr/sbin/lpadmin -x IT_Print_Ricoh'
==> precise-gui: Error: /Stage[main]/App::Print/Printer[IT_Print_Ricoh]: Could not evaluate: Execution of '/usr/sbin/lpadmin -x IT_Print_Ricoh' returned 1: lpadmin: The printer or class does not exist.
It looks like it try to remove the printer even if its not there (which it doesnt know since the prefetch step failed?).
All behaviour observed in a vagrant environment, with a Ubuntu 12.04 box.
The text was updated successfully, but these errors were encountered: