Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-10410

package fails on openjdk with non-boolean status string

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Won't Do
    • Affects Version/s: PUP 6.14.0
    • Fix Version/s: None
    • Component/s: Language
    • Labels:
      None
    • Environment:

      All tested environments and builds

    • Template:
      PUP Bug Template
    • Master Config:
      Monolithic
    • Agent OS:
      RHEL 7 (x86_64)
    • Master OS:
      RHEL 7 (x86_64)
    • Affects Build:
      6.14.0
    • Acceptance Criteria:
      Hide

      simple package update documented above returns success

      Show
      simple package update documented above returns success
    • Team:
      Night's Watch
    • Story Points:
      1
    • Sprint:
      NW - 2020-04-15
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      Puppet Version: 3.0 - 6.14
      Puppet Server Version: 3.0 - 6.9.2
      OS Name/Version: RHEL+CentOS 7 and 8

      Puppet package fails to install or update java-1.8.0-openjdk-headless.  This has been consistent for 2 generations of RH linux kernels and 4 generations of Puppet

      To reproduce:

      • Install a fresh build of RHEL or CentOS (reproducable on all modern versions, I tested on CentOS 8.1.1 and replicated on RHEL and CentOS 7.5 and 7.7(
      • Install Puppet (tested on puppetmaster 6.9.2-1, reproduced as far back as 3.1)
      • Try and install openjdk - headless
        matt@vm041:72% sudo puppet resource package java-1.8.0-openjdk-headless ensure=present
        package { 'java-1.8.0-openjdk-headless':   ensure   => '1:1.8.0.242.b08-0.el8_1',   provider => 'dnf', }

        matt@vm041:73%
         
        Notice that the ensure value returns a version, not a Boolean.  When I try installing the package from a manifest I get the following error:
         
        package

        { ' java-1.8.0-openjdk-headless':     ensure => true, }

         
        matt@vm041: 73% sudo puppet agent --test
        ...
        Info: Applying configuration version '1586032186'
        Error: undefined method `index' for true:TrueClass
        Info: Unknown failure using insync_values? on type: Package[java-1.8.0-openjdk-headless] / property: ensure to compare values [true] and 1:1.8.0.242.b08-0.el8_1
        Error: /Stage[main]/Linux/Package[java-1.8.0-openjdk-headless]/ensure: change from '1:1.8.0.242.b08-0.el8_1' to true failed: undefined method `index' for true:TrueClass
        Info: Stage[main]: Unscheduling all events on Stage[main]
        Notice: Applied catalog in 10.02 seconds
        matt@vm041:74%
         
        Installing the non-headless version works as expected.  Installing the package through dnf or yum works as expected
        Desired Behavior:

      puppet package returns a boolean value, run exits with success

      Actual Behavior:

      puppet package returns a string value and fails the run

       

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            littlelion Matt
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support

                  Time Tracking

                  Estimated:
                  Original Estimate - 2 hours
                  2h
                  Remaining:
                  Remaining Estimate - 2 hours
                  2h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified