Bug 1830834 - Unable to update default value of a smart class parameter (Sql query error).
Summary: Unable to update default value of a smart class parameter (Sql query error).
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Organizations and Locations
Version: 6.6.0
Hardware: All
OS: All
unspecified
medium vote
Target Milestone: 6.8.0
Assignee: Kavita
QA Contact: Peter Ondrejka
URL:
Whiteboard:
: 1831787 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-04 04:41 UTC by Ranjan Kumar
Modified: 2021-01-18 14:46 UTC (History)
7 users (show)

Fixed In Version: foreman-2.1.0-0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1851154 (view as bug list)
Environment:
Last Closed: 2020-10-27 13:02:11 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 29682 0 Normal Closed Unable to update default value of a smart class parameter (Sql query error). 2021-02-13 03:09:49 UTC
Github theforeman foreman pull 7636 0 None closed Fixes #29682 - remove duplicate elements in audit set_taxonomies 2021-02-13 03:09:49 UTC
Red Hat Product Errata RHSA-2020:4366 0 None None None 2020-10-27 13:02:24 UTC

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


Note You need to log in before you can comment on or make changes to this bug.