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

Hosts cannot be searched by applicable_errata using the IN operator

XMLWordPrintable

    • Moderate
    • None

      Description of problem:
      It's not possible to use the search_query field in order to choose applicable_errata option with "^" operator (in) when running remote execution to call the Job Template Install Errata - Katello Script Default.

      Version-Release number of selected component (if applicable):
      N/A

      How reproducible:
      Always I choose the Job Template Install Errata - Katello Script Default and type the following search query on search_query field:
      applicable_errata ^ (RHSA-2023:0958, RHSA-2023:0952). This two errata are just an example, 'cause any errata cause this behavior. It's not necessary to submit this action, the error occurs as soon as I type the search query.

      Steps to Reproduce:
      1. Login in to the satellite server's WebUI;
      2. Go to Monitor >> Jobs >> Run Job;
      3. Choose the job template called "Install Errata - Katello Script Default" and fill in the Search Query field with the following content:
      applicable_errata ^ RHSA-2023:0958

      Actual results:
      The following error rises:

      external method 'find_by_applicable_errata' failed with error: PG::SyntaxError: ERROR: syntax error at or near "'RHSA-2023:0958'" LINE 1: ...ocation_id" = $3 AND (katello_errata.errata_id IN 'RHSA-2023... ^

      Expected results:
      Resolve the hosts affected by that errata

      Additional info:
      The same error rises when I try to call this Job Template, using the search query, through API, as I showed on the attached image.

            jira-bugzilla-migration RH Bugzilla Integration
            rh-ee-rprincip Roger Principe
            RH Bugzilla Integration RH Bugzilla Integration
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: