Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1543598

Summary: SQL error when using PUT to upload RHSM facts
Product: Red Hat Satellite Reporter: Perry Gagne <pgagne>
Component: Hosts - ContentAssignee: Stephen Benjamin <stbenjam>
Status: CLOSED ERRATA QA Contact: Perry Gagne <pgagne>
Severity: medium Docs Contact:
Priority: medium    
Version: UnspecifiedCC: ehelms, pgagne, stbenjam
Target Milestone: 6.4.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-16 18:55:23 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:
Bug Depends On:    
Bug Blocks: 1405523    

Comment 3 Stephen Benjamin 2018-03-26 18:11:42 UTC
Created redmine issue http://projects.theforeman.org/issues/23022 from this bug

Comment 4 Stephen Benjamin 2018-03-26 18:31:56 UTC
I'm able to update facts on a content host without a problem in 6.3, and running the same version of Katello as you.  I do see the error in the foreman-debug, though I'm not sure why, and there's not a lot of info to help me.  Any chance you see have the box around?



[root@sat-630-150-rhel7 ~]# export id=43d0a475-d2be-4583-b82a-16d81a10fa4c
[root@sat-630-150-rhel7 ~]# curl -k -X GET -u admin:changeme https://$HOSTNAME/rhsm/consumers/$id -H "Content-Type: application/json" -o facts.json
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 11338    0 11338    0     0  71003      0 --:--:-- --:--:-- --:--:-- 71308
[root@sat-630-150-rhel7 ~]# vim facts.json
[root@sat-630-150-rhel7 ~]# curl -k -X PUT -u admin:changeme https://$HOSTNAME/rhsm/consumers/$id -H "Content-Type: application/json" -d "@facts.json"
{"content":"Facts successfully updated."}



Upstream I found a different issue though, and opened a PR to fix that.

Comment 5 Satellite Program 2018-03-26 20:22:19 UTC
Upstream bug assigned to stbenjam

Comment 6 Satellite Program 2018-03-26 20:22:22 UTC
Upstream bug assigned to stbenjam

Comment 8 Stephen Benjamin 2018-03-27 15:17:56 UTC
Ah it's the same problem as upstream it just manifests as a different error due to different rails versions.  PR open upstream (https://github.com/Katello/katello/pull/7264) will fix it, thanks.

Comment 9 Satellite Program 2018-04-04 02:22:20 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/23022 has been resolved.

Comment 10 Perry Gagne 2018-06-14 19:43:48 UTC
Verified fix in 6.4.0 snap 7 using the steps above, got: 

{"content":"Facts successfully updated."}

Comment 11 Bryan Kearney 2018-10-16 18:55:23 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, 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-2018:2927