Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-5432

Issue found with module: puppetlabs-java

    Details

    • Type: Bug
    • Status: Open
    • Priority: Blocker
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: java
    • Labels:
    • Environment:

      OS: Centos 7.3.1611
      Puppet Enterprise version (2017.1): 4.9.4
      puppetlabs-java version: 1.6.0 (also tested with 2.0.0)

      Description

      I get an Error: Invalid relationship: error when using the require attribute of a resource to validate Java is already installed.

      For example, this class:

      # class debug
      class debug {
       
        # java
        class { 'java' :
          package => 'jdk1.8.0_141'
        }
       
        file { '/var/tmp/foobar':
          owner => 'root',
          group => 'root',
          content => 'helloworld',
          require => Package['jdk1.8.0_141'],
        }
       
      }
      

      WIll yield this error when run on a client:

      Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Invalid relationship: File[/var/tmp/foobar] { require => Package[jdk1.8.0_141] }, because Package[jdk1.8.0_141] doesn't seem to be in the catalog
      

      I came across this bug? while preparing to upgrade PE from 3.8.4 to 2017.1 (4.9.4). I also applied that same example code to a PE 3.8.4 installation and I do not get any errors. I used the same java module (1.6.0) in both cases.

      I also tested this on PE (4.9.4) with the Java 2.0.0 module as well. I still get the error.

      I can work around the issue by changing the require to match only 'java' (instead of 'jdk1.8.0_141)

      require => 'java'
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              abrust Adam Brust
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Zendesk Support