Bug 1036912 - attaching subscription to guest: "Unable to build object from JSON."
Summary: attaching subscription to guest: "Unable to build object from JSON."
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: WebUI
Version: Nightly
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Tom McKay
QA Contact: Li Bin Liu
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-02 21:44 UTC by robert.redhat
Modified: 2018-08-30 21:57 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-12 13:57:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
katello debug (1.15 MB, application/gzip)
2013-12-02 21:44 UTC, robert.redhat
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 10246 0 None None None 2016-04-22 15:35:13 UTC

Description robert.redhat 2013-12-02 21:44:39 UTC
Created attachment 831789 [details]
katello debug

Description of problem:
After attaching a subscription to an ESX host, attempting to attach a subscription to a guest fails 

Version-Release number of selected component (if applicable):
Parameter 	Value
Application 	Katello
Authentication 	database
Directory 	/usr/share/katello
Environment 	production
Ruby 	1.9.3
Version 	1.4.14-1.el6

How reproducible:
very

Steps to Reproduce:
1. Import manifest
2. Register virt-who server
3. Allow virt-who to import ESX hosts from vCenter
4. Attach subscriptions to ESX hosts. At the same time, change the "Name" attribute for the host from the original UUID to something more descriptive.
5. Add a subscription to a guest server

Actual results:
Resources::Candlepin::Consumer: 500 Internal Server Error {"displayMessage":"Unable to build object from JSON."} (POST /candlepin/consumers/e21d00b0-aaf8-42a6-b2d4-eef9dc8e2313/entitlements?pool=8a8b419842914436014294a786151195&quantity=1)

Expected results:
Subscription attaches

Additional info:

Comment 1 Bryan Kearney 2014-01-21 19:07:07 UTC
Moving to Sat6 to be tracked there. Upstream bugs are moving to redmine.

Comment 2 RHEL Program Management 2014-01-21 19:17:56 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 5 Mike McCune 2014-06-04 17:31:14 UTC
Tom, can you retest this?

Comment 6 Tom McKay 2014-07-30 17:20:33 UTC
Moving to ON_QA to allow QE testing in a more formal manner due to the importance of this feature.

I tested a libvirt host w/ guest. Registered host, registered guest, virt-who to make association, then tried attaching subs both before and after renaming the host and guest in various combinations. I was able to attach/unattach/reattach subs without issues.

Comment 12 gaoshang 2015-03-16 10:13:20 UTC
1. Import manifest
2. Register virt-who server
3. Allow virt-who to import ESX hosts from vCenter
4. Attach subscriptions to ESX hosts. At the same time, change the "Name" attribute for the host from the original UUID to something more descriptive.
5. Add a subscription to a guest server

When updating the ESX host "Name" in step 4, I got following error, so moved bug status to ASSIGNED.


Action:

Actions::Pulp::Consumer::Update

Input:

{"uuid"=>"272f00d6-6a05-49f2-836b-7cc3e4926f5e",
 "display_name"=>"ESX-128.10",
 "remote_user"=>"admin-38191c3b",
 "remote_cp_user"=>"admin",
 "locale"=>"en"}

Output:

{}

Exception:

RestClient::ResourceNotFound: 404 Resource Not Found

Backtrace:

/opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in `return!'
/opt/rh/ruby193/root/usr/share/gems/gems/runcible-1.3.0/lib/runcible/base.rb:92:in `block in get_response'
/opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:228:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:228:in `process_result'
/opt/rh/ruby193/root/usr/share/gems/gems/rbovirt-0.0.29/lib/restclient_ext/request.rb:50:in `block in transmit'
/opt/rh/ruby193/root/usr/share/ruby/net/http.rb:746:in `start'
/opt/rh/ruby193/root/usr/share/gems/gems/rbovirt-0.0.29/lib/restclient_ext/request.rb:44:in `transmit'
/opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/resource.rb:76:in `put'
/opt/rh/ruby193/root/usr/share/gems/gems/runcible-1.3.0/lib/runcible/base.rb:91:in `get_response'
/opt/rh/ruby193/root/usr/share/gems/gems/runcible-1.3.0/lib/runcible/base.rb:82:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/runcible-1.3.0/lib/runcible/resources/consumer.rb:60:in `update'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.21/app/lib/actions/pulp/consumer/update.rb:27:in `run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:443:in `block (3 levels) in execute_run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware/stack.rb:26:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware.rb:16:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.21/app/lib/actions/middleware/remote_action.rb:27:in `block in run'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.21/app/lib/actions/middleware/remote_action.rb:57:in `block (2 levels) in as_remote_user'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.21/app/lib/katello/util/thread_session.rb:84:in `pulp_config'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.21/app/lib/actions/middleware/remote_action.rb:43:in `as_pulp_user'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.21/app/lib/actions/middleware/remote_action.rb:56:in `block in as_remote_user'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.21/app/lib/katello/util/thread_session.rb:91:in `cp_config'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.21/app/lib/actions/middleware/remote_action.rb:38:in `as_cp_user'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.21/app/lib/actions/middleware/remote_action.rb:55:in `as_remote_user'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.21/app/lib/actions/middleware/remote_action.rb:27:in `run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware.rb:16:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action/progress.rb:30:in `with_progress_calculation'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action/progress.rb:16:in `run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware.rb:16:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.21/app/lib/actions/middleware/keep_locale.rb:23:in `block in run'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.21/app/lib/actions/middleware/keep_locale.rb:34:in `with_locale'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.21/app/lib/actions/middleware/keep_locale.rb:23:in `run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware/world.rb:30:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:442:in `block (2 levels) in execute_run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:441:in `catch'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:441:in `block in execute_run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:365:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:365:in `block in with_error_handling'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:365:in `catch'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:365:in `with_error_handling'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:436:in `execute_run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:230:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:9:in `block (2 levels) in execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/execution_plan/steps/abstract.rb:152:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/execution_plan/steps/abstract.rb:152:in `with_meta_calculation'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:8:in `block in execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:22:in `open_action'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:7:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/executors/parallel/worker.rb:20:in `block in on_message'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:859:in `block in assigns'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:858:in `tap'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:858:in `assigns'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:138:in `match_value'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:116:in `block in match'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:115:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:115:in `match'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/executors/parallel/worker.rb:17:in `on_message'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/micro_actor.rb:82:in `on_envelope'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/micro_actor.rb:72:in `receive'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/micro_actor.rb:99:in `block (2 levels) in run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/micro_actor.rb:99:in `loop'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/micro_actor.rb:99:in `block in run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/micro_actor.rb:99:in `catch'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/micro_actor.rb:99:in `run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/micro_actor.rb:13:in `block in initialize'
/opt/rh/ruby193/root/usr/share/gems/gems/logging-1.8.1/lib/logging/diagnostic_context.rb:323:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/logging-1.8.1/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'

Comment 13 Tom McKay 2015-04-22 18:35:18 UTC
I can reproduce, working on fix now.

Comment 14 Tom McKay 2015-04-22 21:21:47 UTC
Created redmine issue http://projects.theforeman.org/issues/10246 from this bug

Comment 17 gaoshang 2015-04-30 06:36:17 UTC
This bug has been verified in latest Satellite 6.1 (Satellite-6.1.0-RHEL-7-20150429.2), move status to VERIFIED, thanks!

Comment 18 Bryan Kearney 2015-08-11 13:21:20 UTC
This bug is slated to be released with Satellite 6.1.

Comment 19 Bryan Kearney 2015-08-12 13:57:13 UTC
This bug was fixed in version 6.1.1 of Satellite which was released on 12 August, 2015.


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