Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1366338 - Activation Key in Fusor should not required "Red Hat Update Infrastructure" subscription, individual product entitlements should be sufficient.
Summary: Activation Key in Fusor should not required "Red Hat Update Infrastructure" s...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Quickstart Cloud Installer
Classification: Red Hat
Component: Installation - RHCI
Version: 1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ga
: 1.0
Assignee: Jesus M. Rodriguez
QA Contact: Tasos Papaioannou
Dan Macpherson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-11 17:15 UTC by John Matthews
Modified: 2016-09-13 16:36 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-13 16:36:14 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2016:1862 normal SHIPPED_LIVE Red Hat Quickstart Installer 1.0 2016-09-13 20:18:48 UTC

Description John Matthews 2016-08-11 17:15:58 UTC
Description of problem:

We want to investigate improvements to what we require in an activation key.
See tsanders or edube for more details.

See:
  https://github.com/fusor/fusor/blob/master/server/config/fusor.yaml#L333

Motivation is if we have entitlements on an account:
 - Cloud Forms, RHV, Sat

We should be able to do a deployment, without needing special "Red Hat Cloud Infrastructure".

Comment 5 dgao 2016-08-19 19:15:14 UTC
Further testing revealed that hosts w/ multiple subscriptions attached to the activation key does not register correctly. This leads to package installation issues because the expected repo is not enabled. Moving back to "Assigned".

The PR posted below have been reverted until we can figure out a better solution.

Comment 6 dgao 2016-08-29 20:08:26 UTC
https://github.com/fusor/fusor/pull/1190 resolves the previous encountered issue.

Comment 7 Tasos Papaioannou 2016-09-06 14:48:54 UTC
I'm getting Internal Server Errors when using a Satellite manifest that contains CloudForms Employee Subscriptions and RHEV Employee Subscriptions, for a deployment of one self-hosted RHV system. The traceback in /var/log/foreman/production.log looks like:

****
2016-09-06 09:34:08 [app] [I] Started GET "/fusor/api/v21/subscriptions/validate?deployment_id=3" for 10.13.57.116 at 2016-09-06 09:34:08 -0400
2016-09-06 09:34:08 [app] [I] Processing by Fusor::Api::V21::SubscriptionsController#validate as JSON
2016-09-06 09:34:08 [app] [I]   Parameters: {"deployment_id"=>"3", "api_version"=>"v21", "subscription"=>{}}
2016-09-06 09:34:08 [app] [I] SUB-VAL.build-si-dep: built subscription info from deployment. #<Fusor::Subscriptions::SubscriptionInfo:0x007f936d9f13b8 @name="tpapaioa_3", @product_ids={:rhev=>["69", "150", "183"]}, @counts={:rhev=>1}>
2016-09-06 09:34:08 [app] [I] SUB-VAL.validate: EXISTING MANIFEST! Subsequent deployment
2016-09-06 09:34:08 [app] [I] SUB-VAL.build-si-sat: built subscription info from satellite. #<Fusor::Subscriptions::SubscriptionInfo:0x007f937a091b58 @name="satellite-tpapaioa_3", @product_ids={"CloudForms Employee Subscription"=>["201", "69", "205", "180", "240", "167", "303"], "RHEV Employee Subscription"=>["183", "307", "150", "328"]}, @counts={"CloudForms Employee Subscription"=>20, "RHEV Employee Subscription"=>10}>
2016-09-06 09:34:08 [app] [I] SUB-VAL.compare: products are covered, validating counts now
2016-09-06 09:34:08 [app] [I] SUB-VAL.compare: deployment has product: rhev with count: 1
2016-09-06 09:34:08 [app] [I] SUB-VAL.compare: ["69", "150", "183"]
2016-09-06 09:34:08 [app] [E] ArgumentError: comparison of Fixnum with nil failed
 | /opt/theforeman/tfm/root/usr/share/gems/gems/fusor_server-1.0.13/app/lib/fusor/subscriptions/subscription_validator.rb:82:in `<='
 | /opt/theforeman/tfm/root/usr/share/gems/gems/fusor_server-1.0.13/app/lib/fusor/subscriptions/subscription_validator.rb:82:in `block in compare'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/fusor_server-1.0.13/app/lib/fusor/subscriptions/subscription_validator.rb:72:in `each'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/fusor_server-1.0.13/app/lib/fusor/subscriptions/subscription_validator.rb:72:in `compare'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/fusor_server-1.0.13/app/lib/fusor/subscriptions/subscription_validator.rb:48:in `validate'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/fusor_server-1.0.13/app/controllers/fusor/api/v21/subscriptions_controller.rb:111:in `validate'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
[...]
 | /opt/theforeman/tfm/root/usr/share/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'
2016-09-06 09:34:08 [app] [I] Completed 500 Internal Server Error in 60ms (Views: 9.6ms | ActiveRecord: 7.0ms)
****

Adding some extra logging, we can see that the compare method in server/app/lib/fusor/subscriptions/subscription_validator.rb is trying to find a key of '{"CloudForms Employee Subscription"=>["180", "201", "240", "303", "69", "205", "167"], "RHEV Employee Subscription"=>["183", "307", "150", "328"]}' in deployment_si:

****
2016-09-06 10:39:15 [app] [I] SUB-INFO: getting counts for rhev
2016-09-06 10:39:15 [app] [I] SUB-INFO get_counts_by_name: @counts = {:rhev=>1}
2016-09-06 10:39:15 [app] [I] SUB-VAL.compare: dep_count = 1
2016-09-06 10:39:15 [app] [I] SUB-VAL.compare: key = {"CloudForms Employee Subscription"=>["180", "201", "240", "303", "69", "205", "167"], "RHEV Employee Subscription"=>["183", "307", "150", "328"]}
2016-09-06 10:39:15 [app] [I] SUB-INFO: getting counts for {"CloudForms Employee Subscription"=>["180", "201", "240", "303", "69", "205", "167"], "RHEV Employee Subscription"=>["183", "307", "150", "328"]}
2016-09-06 10:39:15 [app] [I] SUB-INFO get_counts_by_name: @counts = {"CloudForms Employee Subscription"=>20, "RHEV Employee Subscription"=>10}
2016-09-06 10:39:15 [app] [I] SUB-VAL.compare: count = 
2016-09-06 10:39:15 [app] [E] ArgumentError: comparison of Fixnum with nil failed
****

It seems that the following line is returning an array of matches, instead of a single matching key:

****
key = other_si.get_product_key(deployment_si.get_product_ids_by_name(product))
****

Comment 8 Jesus M. Rodriguez 2016-09-08 19:04:58 UTC
https://github.com/fusor/fusor/pull/1218

Comment 10 Tasos Papaioannou 2016-09-09 19:40:59 UTC
Verified on QCI-1.0-RHEL-7-20160908.1.

Comment 12 errata-xmlrpc 2016-09-13 16:36:14 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/RHEA-2016:1862


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