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

{puppetlabs:java} : {update-java-alternatives --jre option is hardcoded}

    XMLWordPrintable

    Details

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

      debian ubuntu 20.04

    • Template:
      MODULES Bug Template
    • Team:
      Modules

      Description

      Basic Info
      Module Version: 7.1.1
      Puppet Version: 6.24
      OS Name/Version: Ubuntu 20.04

      Describe your issue in as much detail as possible...

      Desired Behavior:

      The options used with the update-java-alternatives command should reflect what you have chosen as distribution.

      Actual Behavior:

      At the moment you can choose jdk or jre as diistribution.

      Yet when using the java_alternative param, you would expect ALL related/etc/alternatives links to be corrected. But the init.pp:

      $jre_flag = $use_java_package_name ?

      { /headless/ => '--jre-headless', default => '--jre' }

      and as such in the config.pp:

      command => "update-java-alternatives --set ${java::use_java_alternative} ${java::jre_flag}",

      The jre flag ALWAYS gets set which is incorrect. In jdk situation you would want the command update-java-alternatives ran without any flag so it's sets all related links.

      I would propose:

      OR to have the jre-flag option match the distribution

      OR make the jre_flag a param that can be edited with hiera

      I prefer option 1

       

      Please take a moment and attach any relevant log output and/or manifests. This will help us immensely when troubleshooting the issue.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            joeribouchet Joeri Bouchet
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Zendesk Support