Bug 1830834

Summary: Unable to update default value of a smart class parameter (Sql query error).
Product: Red Hat Satellite Reporter: Ranjan Kumar <rankumar>
Component: Organizations and LocationsAssignee: Kavita <kgaikwad>
Status: CLOSED ERRATA QA Contact: Peter Ondrejka <pondrejk>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.6.0CC: ahumbe, egolov, jpasqual, karnsing, mmccune, phess, wclark
Target Milestone: 6.8.0Keywords: Triaged
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: foreman-2.1.0-0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1851154 (view as bug list) Environment:
Last Closed: 2020-10-27 13:02:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ranjan Kumar 2020-05-04 04:41:01 UTC
Description of problem: Unable to update the default value of a smart class parameter

 hammer sc-param update --id 3086 --default-value '["ntp3.csv.local iburst trust","ntp4.csv.local iburst"]'
Could not update the parameter:
  PG::ProtocolViolation: ERROR:  invalid message format
  : SELECT "taxonomies".* FROM "taxonomies" WHERE "taxonomies"."id" IN ($1, $2, $3, $4, $5, $6, $7, $8, $9.......<Record truncated>......
....$270159, $270160, $270161, $270162, $270163, $270164) ORDER BY "taxonomies"."title" ASC
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:603:in `async_exec'



Version-Release number of selected component (if applicable): Satellite 6.6



Actual results: Fails to update default value of smart class parameter.


Expected results: Should able to update default value


Additional info:

It seems the above query fails due to SQL query constructed with large arguments(around 2.7L parameters) and it fails to execute.

Comment 3 Kavita 2020-05-04 07:39:02 UTC
Created redmine issue https://projects.theforeman.org/issues/29682 from this bug

Comment 4 Bryan Kearney 2020-05-04 16:52:24 UTC
Upstream bug assigned to kgaikwad

Comment 5 wclark 2020-05-08 16:08:15 UTC
*** Bug 1831787 has been marked as a duplicate of this bug. ***

Comment 6 Bryan Kearney 2020-05-11 12:36:21 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/29682 has been resolved.

Comment 8 wclark 2020-06-10 15:03:18 UTC
HOTFIX is available for Satellite 6.7.1. To install the Hotfix, please follow the below instructions.

1. Since the HF RPM is too large to be provided as a Bugzilla attachment, please open a case with Red Hat Technical Support to request the HF RPM

2. Take a complete backup or snapshot or your Satellite server

3. Copy the HF RPM to Satellite server

4. # rpm -Uvh --nodeps /root/foreman-1.24.1.21-2.HOTFIXRHBZ1830834.el7sat.noarch.rpm

5. # satellite-installer --scenario satellite

Comment 10 Peter Ondrejka 2020-07-17 12:35:44 UTC
Verified on Sat 6.8 snap, sc parameters' default values can be updated successfully with hammer (add '--override true' to the above command) on Satellite with larger number of organizations.

Comment 13 errata-xmlrpc 2020-10-27 13:02:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Satellite 6.8 release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:4366