Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-36779

"Package Action - Script Default" template fails to render dnf/yum binary name for foreman host

XMLWordPrintable

    • None
    • None
    • None
    • None
    • Fail

      Description of problem:
      "Package Action - Script Default" template fails to render dnf/yum binary name for foreman host (e.g. Satellite host)

      # Action
             -y $USER_INPUT[options] install $USER_INPUT[package]
        RETVAL=$?
      [ $RETVAL -eq 0 ] || exit_with_message "Package action failed" $RETVAL
      

      So the REX job then fails with:

         1: /var/tmp/foreman-ssh-cmd-<<uuid>>/script: line 21: -y: command not found
         2: Package action failed, exiting...
         3: Exit status: 127
         4: StandardError: Job execution failed
      

      For content host the template works since content hosts have some katello facet which foreman-only host doesn't have.
       

      How reproducible:
      Render any Package/Group install/remove/update template that uses Script Default transport.
       

      Is this issue a regression from an earlier version:
      yes
       

      Steps to Reproduce:

      1. Navigate to Hosts > Templates > Job Templates > select "Package Action - Script Default"

      2. In editor window header click "Preview" and select Satellite host (matches to Satellite FQDN)

      3. Check the script - line 21

             -y $USER_INPUT[options] $USER_INPUT[action] $USER_INPUT[package]
      

      Actual behavior:
      [Describe the issue in detail, including what is happening and where]
      -y ....... - DNF binary name is missing

      Expected behavior:
      [Describe what should be happening instead]
      dnf -y ....... - DNF or YUM binary name is present

      Business Impact / Additional info:

       

              aruzicka@redhat.com Adam Ruzicka
              lpramuk Lukas Pramuk
              Lukas Pramuk Lukas Pramuk
              Ian Ballou Ian Ballou
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: