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

Failure to add IPP Everywhere queue #436

Open
jamesps-ebi opened this issue Nov 12, 2021 · 4 comments
Open

Failure to add IPP Everywhere queue #436

jamesps-ebi opened this issue Nov 12, 2021 · 4 comments

Comments

@jamesps-ebi
Copy link

Given: Ubuntu 20.04, Puppet 6.24, cups 2.3.1, leoarnold-cups 2.0.3
When: I apply the below manifest with the given hiera data

class hg_workstation::profile::common
{

  # CUPS printer configuration
  include cups

}
---
cups::default_queue: 'Follow_You'
cups::web_interface: true
cups::resources:
  Follow_You:
    ensure: 'printer'
    uri: 'ipps://example.com:9164/printers/follow_you'
    model: 'everywhere'
    enabled: true
    accepting: true
    options:
      - auth-info-required: 'username,password'

In order to: add a new IPP everywhere network printer.
Then: I get the below error.

info	//ubu20-n-495753433f.ebi.ac.uk/Puppet	Applying configuration version '1636725815'
err	//laptop-01/Puppet	Execution of '/usr/sbin/lpadmin -E -p Follow_You -m everywhere' returned 1: lpadmin: Printer drivers are deprecated and will stop working in a future version of CUPS.
lpadmin: Unable to copy PPD file.
err	//laptop-01//Stage[main]/Cups::Queues::Resources/Cups_queue[Follow_You]/ensure	change from absent to printer failed: Execution of '/usr/sbin/lpadmin -E -p Follow_You -m everywhere' returned 1: lpadmin: Printer drivers are deprecated and will stop working in a future version of CUPS.
lpadmin: Unable to copy PPD file.
notice	//laptop-01//Stage[main]/Cups::Queues::Default/Exec[cups::queues::default]	Dependency Cups_queue[Follow_You] has failures: true

Running the lpadmin command from the error message produces the same error about printer driver deprecation.
However, that command seems to be missing some parameters that were specified in hiera.

The following command is what I would expect to be run:
lpadmin -p 'Follow_You' -m 'everywhere' -v 'ipps://example.com:9164/printers/follow_you' -E -o auth-info-required=username,password
The above command, when run manually, correctly adds the printer with the required settings.

@leoarnold
Copy link
Owner

This may be an unforeseen edge case with the lpadmin binary. My hunch is that

lpadmin -E -p 'Follow_You' -m 'everywhere'

fails, while

lpadmin -E -p 'Follow_You' -m 'everywhere' -v 'ipps://example.com:9164/printers/follow_you'

passes because a destination was provided. @jamesps-ebi Could you please confirm?

@leoarnold
Copy link
Owner

I think lpadmin is trying to contact the print server synchronously in order to fetch the configuration data. And in this is /dev/null due to how the module currently works:

# Create a minimal raw queue first, then adapt it
lpadmin('-p', name, '-v', 'file:///dev/null')
run_parameter_setter(:model, :ppd)

A first cursory investigation suggests that -m and -v parameters must appear in the same commandline invocation, or else lpadmin will fail.

@jamesps-ebi
Copy link
Author

This may be an unforeseen edge case with the lpadmin binary. My hunch is that

lpadmin -E -p 'Follow_You' -m 'everywhere'

fails, while

lpadmin -E -p 'Follow_You' -m 'everywhere' -v 'ipps://example.com:9164/printers/follow_you'

passes because a destination was provided. @jamesps-ebi Could you please confirm?

Yes, testing both of those commands in my environment, lpadmin -E -p 'Follow_You' -m 'everywhere' fails, while lpadmin -E -p 'Follow_You' -m 'everywhere' -v 'ipps://example.com:9164/printers/follow_you' is successful.

So specifying the URL for the printer in the same command seems to be required, at least while using the 'everywhere' driver.

@jamesps-ebi
Copy link
Author

So is there a potential workaround for adding IPP Everywhere printers? Or is it impossible to add a printer like this with the current module?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants