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 1133792 - Creating user in v1 API returns: undefined method `key?' for #<JSON::Ext::Generator::State:...>
Summary: Creating user in v1 API returns: undefined method `key?' for #<JSON::Ext::Gen...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API
Version: 6.0.4
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: Unspecified
Assignee: Bryan Kearney
QA Contact: Katello QA List
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-26 07:23 UTC by Tomas Lestach
Modified: 2017-02-23 21:01 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-04 18:27:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
relevant part of /var/log/foreman/production.log (18.42 KB, text/plain)
2014-08-26 07:27 UTC, Tomas Lestach
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 7260 0 None None None 2016-04-22 16:56:58 UTC

Description Tomas Lestach 2014-08-26 07:23:28 UTC
Description of problem:
API for user creation fails with:
{"message":"undefined method `key?' for #<JSON::Ext::Generator::State:0x0000000b3fd378>"}
but the user gets created!

Version-Release number of selected component (if applicable):
Satellite-6.0.4-RHEL-6-20140823.0-Satellite-x86_64

How reproducible:
always

Steps to Reproduce:

# curl "$(hostname)/api/users" -u admin:changeme -H "Accept: application/json" -H "Content-Type: application/json" -d '{"user":{"login":"another","mail":"root@localhost","auth_source_id":1,"password":"another_gfolvwxr"}}'


Actual results:
{"message":"undefined method `key?' for #<JSON::Ext::Generator::State:0x0000000b3fd378>"}

Additionally the user *was* created, even if an exception was thrown.

Expected results:
* no error && user gets created
or
* error && do not create the user

Comment 1 Tomas Lestach 2014-08-26 07:27:23 UTC
Created attachment 930760 [details]
relevant part of /var/log/foreman/production.log

Comment 3 Dominic Cleal 2014-08-26 09:36:11 UTC
The v2 API appears to be unaffected, please try using /api/v2/users.

Comment 5 Dominic Cleal 2014-08-26 09:37:47 UTC
Created redmine issue http://projects.theforeman.org/issues/7260 from this bug

Comment 6 Tomas Lestach 2014-08-26 09:57:49 UTC
V1 API ... my fault.
I created Bug 1133854 to remove V1 API from Sat6 completely.

Comment 7 Corey Welton 2014-09-04 18:22:58 UTC
Closing per comment #6

Comment 8 Corey Welton 2014-09-04 18:25:29 UTC
Or not...

Comment 10 Corey Welton 2014-09-04 18:27:40 UTC
OTOH...

Comment 11 Tomas Lestach 2014-09-05 08:07:16 UTC
So, the outcome is - "we keep it broken" ?


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