Giter Club home page Giter Club logo

Comments (8)

leoarnold avatar leoarnold commented on September 24, 2024

Some observations here:

  • ipptool -c [...] exits 1, but claims successful-ok, but on STDERR. We have seen such strange behavior in #19 where it was caused by a patch to CUPS by the Debian team.
  • Because of #19 a fallback mechanism using ipptool -t [...] was added to the module (2.0.0 and above). This fallback, however, was skipped in your execution.
  • The returned 1: lpadmin: Success points to a new and unexpected behavior of CUPS - or maybe the dash in PK519-4 was not escaped properly when shelling out.

I'll try to confirm it in a Vagrant box.

from puppet-cups.

threepistons avatar threepistons commented on September 24, 2024

I missed the detail that types::files is supplied by ghoneycutt-types from the forge. It allows me to make files, packages, etc without having many stanzas in site.pp of the form:

$packages = lookup('packages')
$packages.each | $key, $value | {
  package {$key:
    * => $value
  }
}

from puppet-cups.

threepistons avatar threepistons commented on September 24, 2024

I attach my PPD, you will need to take .txt off the end of the file name.
KOC658UX.ppd.txt

from puppet-cups.

leoarnold avatar leoarnold commented on September 24, 2024

I have narrowed the problem down to the fact that all commands are issued correctly, but on the system you describe, all commands using encrypted communication (i.e. the -E in lpadmin -E) will exit 1 despite achieving success.

I have checked this behavior with PPD files from several vendors and - as to be expected, see #6 (comment) - this problem only seems to arise with PPD files from KonicaMinolta.

Your CUPS installation now seems to mind these aberrations more than before - at least when using encrypted communication. I have also run your configuration against Fedora 28 with CUPS 2.2.6 where the problems do not arise, so it was either introduced by CUPS 2.2.7 or a patch by the Debian / Ubuntu community.

While dropping the usage of the '-E' flag in lib/puppet/provider/cups_queue/cups.rb would solve your issue for now, it is merely a cure of the symptom, not of the underlying issue, so we're reluctant to do that. Also, lowering your security standards to overcome someone else's bug never seems to be a good idea. Nevertheless it would be a hot fix you could apply locally to your setup to get it running until there's a better option.

Let's keep this issue open to see how many users are actually affected. If the issue becomes big enough, we'll have to add more error handling to the module.

from puppet-cups.

threepistons avatar threepistons commented on September 24, 2024

I will try editing my PPD file. Thank you for the heads-up.

from puppet-cups.

threepistons avatar threepistons commented on September 24, 2024

I've updated to a more recent PPD and also stripped lines out of it based on #19. The queues are now forming consistently, thank you for the advice. I am now able to support printing at my site.

I still get

root@17dcompd454:/usr/share/cups/model# ipptool -t ipp://localhost/printers/USB_Building_Printing /usr/share/cups/ipptool/get-printer-attributes.test
"/usr/share/cups/ipptool/get-printer-attributes.test":
    Get printer attributes using Get-Printer-Attributes                  [FAIL]
        RECEIVED: 10361 bytes in response
        status-code = successful-ok (successful-ok)
        Duplicate "pwg-raster-document-type-supported" attribute in printer-attributes-tag group
        Duplicate "pwg-raster-document-resolution-supported" attribute in printer-attributes-tag group

(an Ubuntu/Debian bug?) and

Debug: IPP query 'ipptool -c ipp://localhost/printers/USB_Building_Printing /dev/stdin' failed.
EXITCODE: 1
STDIN:
            {
              OPERATION Get-Printer-Attributes
              GROUP operation
              ATTR charset attributes-charset utf-8
              ATTR language attributes-natural-language en
              ATTR uri printer-uri $uri
              STATUS successful-ok
              DISPLAY printer-make-and-model
            }

STDOUT:

STDERR:
successful-ok

when I run puppet agent -td.

I attach my new and amended PPD for testing and also in the hope that it will be useful for anyone else using Konica Minolta C759, C659, C658, C558, C458, C368, C308, C258, C287, C227, C3851, C3851FS, or C3351 and tearing their hair out.

from puppet-cups.

leoarnold avatar leoarnold commented on September 24, 2024

The duplicates in the IPP response stem from this Debian patch:
https://sources.debian.org/patches/cups/2.1.3-5/pwg-raster-attributes.patch/

The debug message comes from calling Puppet.debug in the rescue branch of

def self.query(resource, request)
QueryC.new(resource, request)
rescue QueryError => e
Puppet.debug(e.message) if defined? Puppet
QueryT.new(resource, request)
end

Maybe this should be replaced with a less noisy message.

from puppet-cups.

threepistons avatar threepistons commented on September 24, 2024

Maybe this should be replaced with a less noisy message.

It's apparent from the earlier issue with Konica PPDs that this will affect anyone with certain Konica models, and it seems unlikely that Konica are going to publish PPDs that pass cupstestppd in the foreseeable future.

Suggestion: If your module is able to detect that a PPD is from Konica (I'm guessing "yes" because the PPD says *Manufacturer: "KONICA MINOLTA" on line 8), maybe the error can say something about Konica PPDs being not compliant with RFC 2911 and directing them to #6 or a similar piece of documentation? It seems likely that queries like this will arise again because of Konica's dominance in the "pull printing" (ie authenticated job release) market: if the error message tells people what to do, you get fewer issues.

from puppet-cups.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.