Project

General

Profile

Bug #23022

SQL error when using PUT to upload RHSM facts

Added by Stephen Benjamin over 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Category:
Hosts
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1543598

Description of problem:
While attempting to verify bz 1405523 I ran into an error when i tried to upload changed facts.

Version-Release number of selected component (if applicable): Sat 6.3 snap 35

How reproducible: always

Steps to Reproduce:
1. curl -k -X GET -u admin:changeme https://<satellite>/rhsm/consumers/$id -H "Content-Type: application/json" -o facts.json
2.Edit facts.json and change cpu.cpu_socket(s) from 1 to 2
3. curl -k -X PUT -u admin:changeme https://<satellite>/rhsm/consumers/$id -H "Content-Type: application/json" -d "@facts.json"

Actual results:
Error returned: {"displayMessage":"ERROR: missing FROM-clause entry for table \"label\"\nLINE 1: ...WHERE \"taxonomies\".\"type\" IN ('Organization') AND \"label\".\"i...\n ^\n","errors":["ERROR: missing FROM-clause entry for table \"label\"\nLINE 1: ...WHERE \"taxonomies\".\"type\" IN ('Organization') AND \"label\".\"i...\n ^\n"]}

Expected results:
Facts updated

Additional info:
Uploaded foreman debug and facts.json

For reference the UUID of the content host i used was 963da17b-c50d-41dd-ab45-5ba670c4d55c

Associated revisions

Revision 643d3b81 (diff)
Added by Stephen Benjamin over 3 years ago

fixes #23022 - lookup candlepin owner from facts

When updating facts by a PUT to /rhsm/consumers, owner is
not the label, but rather a ActiveController::Parameters
hash containing keys like id, key, etc. The label
is stored in "key"

History

#1 Updated by The Foreman Bot over 3 years ago

  • Assignee set to Stephen Benjamin
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/7264 added

#2 Updated by John Mitsch over 3 years ago

  • Legacy Backlogs Release (now unused) set to 338
  • Subject changed from SQL error when using PUT to upload RHSM facts to SQL error when using PUT to upload RHSM facts

#3 Updated by Stephen Benjamin over 3 years ago

  • % Done changed from 0 to 100
  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF