How do we use RHEL virtual datacenter subscriptions via katello

we have couple of RHEL virtual datacenter subscriptions, so we can create
unlimited guest OS on our RHEV, redhat supply a tool called virt-who that
we can use to subscribe our guest OS, here is link about the instruction on
how to register guest OS to RHN, it works perfectly. please see here:
https://access.redhat.com/solutions/659563

I did some test trying to register our guest os via katello by following
the same procedure as showed above, I can find the six content host
created, but they were created under the default orgnization and I cann't
allocate the virtual datacenter subscriptions to these hosts, is this a bug
or something wrong with the configuration?

Thanks
Sinux

If you're running katello-2.0, that version is missing some recent fixes to assist using VDC subscriptions. These may or may not be impacting you. (Note that the Red Hat supported Satellite-6.0 has released errata covering the above; please be sure to fully update if you are running that.)

Here are some pointers that may assist in your case:

Note that both your hypervisor and its guests must all be in a single organization. Apply the VDC subscription to the hypervisor.

The content host that you are running virt-who on must be registered to the same organization that you wish to put the hypervisors in. The virt-who config values for this org must be the same as the host running it.

Once the hypervisor has the VDC attached, a new line item subscription will appear ("0 of Unlimited" quantity). This subscription may then be consumed by guests that virt-who has reported as belonging to the hypervisor. These subs cannot be consumed without this association. To confirm the association, view the Details page of the content hosts in question and confirm that the guests list their host as the hypervisor.

Your Red Hat support should be able to assist further in regards to the VDC subscription and its setup.

Let us know of your success.

··· ----- Original Message ----- > we have couple of RHEL virtual datacenter subscriptions, so we can create > unlimited guest OS on our RHEV, redhat supply a tool called virt-who that > we can use to subscribe our guest OS, here is link about the instruction on > how to register guest OS to RHN, it works perfectly. please see here: > https://access.redhat.com/solutions/659563 > > I did some test trying to register our guest os via katello by following > the same procedure as showed above, I can find the six content host > created, but they were created under the default orgnization and I cann't > allocate the virtual datacenter subscriptions to these hosts, is this a bug > or something wrong with the configuration? > > Thanks > Sinux > > -- > You received this message because you are subscribed to the Google Groups > "Foreman users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to foreman-users+unsubscribe@googlegroups.com. > To post to this group, send email to foreman-users@googlegroups.com. > Visit this group at http://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/d/optout. >

Hi,

I'm using Katello 2.1 and I have the same problem with VMWare.

Regards,

Fernando

··· On Thursday, December 4, 2014 at 5:37:12 AM UTC-5, sinux shen wrote: > > we have couple of RHEL virtual datacenter subscriptions, so we can create > unlimited guest OS on our RHEV, redhat supply a tool called virt-who that > we can use to subscribe our guest OS, here is link about the instruction on > how to register guest OS to RHN, it works perfectly. please see here: > https://access.redhat.com/solutions/659563 > > I did some test trying to register our guest os via katello by following > the same procedure as showed above, I can find the six content host > created, but they were created under the default orgnization and I cann't > allocate the virtual datacenter subscriptions to these hosts, is this a bug > or something wrong with the configuration? > > Thanks > Sinux >

Hi,

I just upgraded Katello to 2.1, and I tried again to upload the VDC
subscription to katello, I follow the instruction to add our 6 hypervisors
to katello, here is the instruction:
https://access.redhat.com/solutions/659563. I can see 6 "content hosts"
which are our hypervisor that was added into katello successfully, and then
I allocate VDC subscription to them, now under "content–>redhat
subscription" page, I can see the unlimited subscriptions, I attached a
screen snapshot, please check it.

The question is when I created an activation key, I want to attach all
those 6 unlimited subscriptions to this activation key, but katello don't
let me do this, it didn't have any error prompt, but I can get some error
from the production.log, here is the log when I click "add selected" icon:

Processing by Katello::Api::V2::ActivationKeysController#add_subscriptions
as JSON
Parameters: {"id"=>"4",
"subscriptions"=>[{"id"=>"8a71a0934b917ad8014bbf3f276b0577",
"quantity"=>0}, {"id"=>"8a71a0934b917ad8014bbf3e7ebf0553", "quantity"=>0},
{"id"=>"8a71a0934b917ad8014bbf3dd534052f", "quantity"=>0},
{"id"=>"8a71a0934b917ad8014bbf3d51c9050b", "quantity"=>0},
{"id"=>"8a71a0934b917ad8014bbf3cee6004e7", "quantity"=>0},
{"id"=>"8a71a0934b917ad8014bbf3afa0d04bd", "quantity"=>0}],
"api_version"=>"v2", "activation_key"=>{"id"=>"4"}}
RuntimeError: rulefailed.multiple.host.restrictions
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/app/models/katello/activation_key.rb:219:in
rescue in subscribe' /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/app/models/katello/activation_key.rb:217:insubscribe'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/app/controllers/katello/api/v2/activation_keys_controller.rb:182:in
block in add_subscriptions' /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/app/controllers/katello/api/v2/activation_keys_controller.rb:182:ineach'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/app/controllers/katello/api/v2/activation_keys_controller.rb:182:in
add_subscriptions' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:4:insend_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:167:in
process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rendering.rb:10:inprocess_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:18:in
block in process_action' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:505:inblock (3 levels) in
_run__2086954612763146761__process_action__2387937477834134126__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in
block in _conditional_callback_around_11317' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:inaround'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in
_callback_around_3723' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in_conditional_callback_around_11317'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:471:in
block (2 levels) in _run__2086954612763146761__process_action__2387937477834134126__callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:inblock in _conditional_callback_around_11316'
/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:33:in
clear_thread' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in_conditional_callback_around_11316'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:426:in
block in _run__2086954612763146761__process_action__2387937477834134126__callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:inblock in _conditional_callback_around_11315'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in
around' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in_callback_around_13'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in
_conditional_callback_around_11315' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:414:in_run__2086954612763146761__process_action__2387937477834134126__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in
__run_callback' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in_run_process_action_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in
run_callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:17:inprocess_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rescue.rb:29:in
process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:30:inblock in process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in
block in instrument' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:ininstrument'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in
instrument' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:29:inprocess_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:207:in
process_action' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/controller_runtime.rb:18:inprocess_action'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/app/controllers/katello/api/api_controller.rb:54:in
process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:121:inprocess'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:45:in
process' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:203:indispatch'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rack_delegation.rb:14:in
dispatch' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:246:inblock in action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:indispatch'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:36:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/mapper.rb:42:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:68:in
block in call' /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:ineach'
/opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:600:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:479:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:inmethod_missing'
/opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:68:in
block in call' /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:ineach'
/opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:600:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/extractor/recorder.rb:97:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/middleware/checksum_in_headers.rb:27:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/best_standards_support.rb:17:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/etag.rb:23:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/conditionalget.rb:35:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/head.rb:14:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/params_parser.rb:21:incall'
/usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:9:in call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/flash.rb:242:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in
context' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/cookies.rb:339:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/query_cache.rb:64:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:28:inblock in call'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in
_run__2991697531775924674__call__2213471591746601478__callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in__run_callback'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in
_run_call_callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:inrun_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:27:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/remote_ip.rb:31:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/debug_exceptions.rb:16:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/show_exceptions.rb:56:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/lib/katello/middleware/silenced_logger.rb:29:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/request_id.rb:22:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/runtime.rb:17:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/cache/strategy/local_cache.rb:72:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/lock.rb:15:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:inforward'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:143:in
pass' /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:155:ininvalidate'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:71:in
call!' /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:479:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application.rb:223:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in
method_missing' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/builder.rb:134:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:64:in
block in call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:ineach'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in
call' /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/rack/thread_handler_extension.rb:77:inprocess_request'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:140:in
accept_and_process_next_request' /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:108:inmain_loop'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler.rb:441:in
block (3 levels) in start_threads' /opt/rh/ruby193/root/usr/share/gems/gems/logging-1.8.1/lib/logging/diagnostic_context.rb:323:incall'
/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' caused by: (RestClient::BadRequest) Katello::Resources::Candlepin::ActivationKey: 400 Bad Request {"displayMessage":"rulefailed.multiple.host.restrictions","requestUuid":"7e900e1e-663a-430c-be24-9bbdd7370ddf"} (POST /candlepin/activation_keys/8a71a0934b917ad8014bc01a366809d5/pools/8a71a0934b917ad8014bbf3e7ebf0553) /opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:inreturn!'
/opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in
process_result' /opt/rh/ruby193/root/usr/share/gems/gems/rbovirt-0.0.29/lib/restclient_ext/request.rb:50:inblock 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:intransmit'
/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:inexecute'
/opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/resource.rb:67:in
post' /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/app/lib/katello/http_resource.rb:110:inpost'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/app/lib/katello/resources/candlepin.rb:803:in
`add_pools'
… skipped 108 lines
Completed 500 Internal Server Error in 243ms (Views: 0.4ms | ActiveRecord:
0.9ms)

Please take a look of this, I think it should allow me to add all these
kind of subscriptions so that any virtual guest can be easily registered.
Not sure if this is a bug or anything wrong with the configuration.

··· On Thursday, December 4, 2014 at 10:20:14 PM UTC+8, Tom McKay wrote: > > > > ----- Original Message ----- > > we have couple of RHEL virtual datacenter subscriptions, so we can > create > > unlimited guest OS on our RHEV, redhat supply a tool called virt-who > that > > we can use to subscribe our guest OS, here is link about the instruction > on > > how to register guest OS to RHN, it works perfectly. please see here: > > https://access.redhat.com/solutions/659563 > > > > I did some test trying to register our guest os via katello by following > > the same procedure as showed above, I can find the six content host > > created, but they were created under the default orgnization and I > cann't > > allocate the virtual datacenter subscriptions to these hosts, is this a > bug > > or something wrong with the configuration? > > > > Thanks > > Sinux > > > > -- > > You received this message because you are subscribed to the Google > Groups > > "Foreman users" group. > > To unsubscribe from this group and stop receiving emails from it, send > an > > email to foreman-user...@googlegroups.com . > > To post to this group, send email to forema...@googlegroups.com > . > > Visit this group at http://groups.google.com/group/foreman-users. > > For more options, visit https://groups.google.com/d/optout. > > > > If you're running katello-2.0, that version is missing some recent fixes > to assist using VDC subscriptions. These may or may not be impacting you. > (Note that the Red Hat supported Satellite-6.0 has released errata covering > the above; please be sure to fully update if you are running that.) > > Here are some pointers that may assist in your case: > > Note that both your hypervisor and its guests must all be in a single > organization. Apply the VDC subscription to the hypervisor. > > The content host that you are running virt-who on must be registered to > the same organization that you wish to put the hypervisors in. The virt-who > config values for this org must be the same as the host running it. > > Once the hypervisor has the VDC attached, a new line item subscription > will appear ("0 of Unlimited" quantity). This subscription may then be > consumed by guests that virt-who has reported as belonging to the > hypervisor. These subs cannot be consumed without this association. To > confirm the association, view the Details page of the content hosts in > question and confirm that the guests list their host as the hypervisor. > > Your Red Hat support should be able to assist further in regards to the > VDC subscription and its setup. > > Let us know of your success. >

Hi,

This is a known limitation which I've been seeing in nearly all my Sat 6
implementations. I've opened a case with RH support, and found out that
this feature will be included in a future release of Satellite 6 (6.1?)

I use a kind-of-workaround to attach right VDC subscriptions to the guests:

  • Set up virt-who and VDC stuff
  • Create an Activation Key, do not add any subscriptions (yes it sounds
    counter intuitive, but it just works)
  • Register a client with this key, verify the subscription is missing
  • Browse the client's subscription page and click "Run Auto-Attach" on
    Satellite GUI
    OR
  • run "service rhsmcertd stop; rhsmcertd -n; service rhsmcertd restart" on
    the guest
  • verify auto attach process picked the right ( x of unlimited)
    subscription for the guest.

Hope this helps,

··· On Wed, Feb 25, 2015 at 12:20 PM, sinux shen wrote:

Hi,

I just upgraded Katello to 2.1, and I tried again to upload the VDC
subscription to katello, I follow the instruction to add our 6 hypervisors
to katello, here is the instruction:
https://access.redhat.com/solutions/659563. I can see 6 "content hosts"
which are our hypervisor that was added into katello successfully, and then
I allocate VDC subscription to them, now under “content–>redhat
subscription” page, I can see the unlimited subscriptions, I attached a
screen snapshot, please check it.

The question is when I created an activation key, I want to attach all
those 6 unlimited subscriptions to this activation key, but katello don’t
let me do this, it didn’t have any error prompt, but I can get some error
from the production.log, here is the log when I click “add selected” icon:

Processing by Katello::Api::V2::ActivationKeysController#add_subscriptions
as JSON
Parameters: {“id”=>“4”,
“subscriptions”=>[{“id”=>“8a71a0934b917ad8014bbf3f276b0577”,
“quantity”=>0}, {“id”=>“8a71a0934b917ad8014bbf3e7ebf0553”, “quantity”=>0},
{“id”=>“8a71a0934b917ad8014bbf3dd534052f”, “quantity”=>0},
{“id”=>“8a71a0934b917ad8014bbf3d51c9050b”, “quantity”=>0},
{“id”=>“8a71a0934b917ad8014bbf3cee6004e7”, “quantity”=>0},
{“id”=>“8a71a0934b917ad8014bbf3afa0d04bd”, “quantity”=>0}],
“api_version”=>“v2”, “activation_key”=>{“id”=>“4”}}
RuntimeError: rulefailed.multiple.host.restrictions
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/app/models/katello/activation_key.rb:219:in
rescue in subscribe' /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/app/models/katello/activation_key.rb:217:insubscribe’
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/app/controllers/katello/api/v2/activation_keys_controller.rb:182:in
block in add_subscriptions' /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/app/controllers/katello/api/v2/activation_keys_controller.rb:182:ineach’
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/app/controllers/katello/api/v2/activation_keys_controller.rb:182:in
add_subscriptions' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:4:insend_action’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:167:in
process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rendering.rb:10:inprocess_action’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:18:in
block in process_action' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:505:inblock (3 levels) in
_run__2086954612763146761__process_action__2387937477834134126__callbacks’
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in
block in _conditional_callback_around_11317' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:inaround’
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in
_callback_around_3723' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in_conditional_callback_around_11317’
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:471:in
block (2 levels) in _run__2086954612763146761__process_action__2387937477834134126__callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:inblock in _conditional_callback_around_11316’
/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:33:in
clear_thread' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in_conditional_callback_around_11316’
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:426:in
block in _run__2086954612763146761__process_action__2387937477834134126__callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:inblock in _conditional_callback_around_11315’
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in
around' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in_callback_around_13’
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in
_conditional_callback_around_11315' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:414:in_run__2086954612763146761__process_action__2387937477834134126__callbacks’
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in
__run_callback' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in_run_process_action_callbacks’
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in
run_callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:17:inprocess_action’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rescue.rb:29:in
process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:30:inblock in process_action’
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in
block in instrument' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:ininstrument’
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in
instrument' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:29:inprocess_action’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:207:in
process_action' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/controller_runtime.rb:18:inprocess_action’
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/app/controllers/katello/api/api_controller.rb:54:in
process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:121:inprocess’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:45:in
process' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:203:indispatch’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rack_delegation.rb:14:in
dispatch' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:246:inblock in action’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:indispatch’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:36:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/mapper.rb:42:incall’
/opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:68:in
block in call' /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:ineach’
/opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:600:incall’
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:479:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:inmethod_missing’
/opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:68:in
block in call' /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:ineach’
/opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:600:incall’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:incall’
/opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/extractor/recorder.rb:97:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:incall’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:incall’
/opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/middleware/checksum_in_headers.rb:27:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/best_standards_support.rb:17:incall’
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/etag.rb:23:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/conditionalget.rb:35:incall’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/head.rb:14:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/params_parser.rb:21:incall’
/usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:9:in call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/flash.rb:242:incall’
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in
context' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:incall’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/cookies.rb:339:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/query_cache.rb:64:incall’
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:28:inblock in call’
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in
_run__2991697531775924674__call__2213471591746601478__callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in__run_callback’
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in
_run_call_callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:inrun_callbacks’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:27:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/remote_ip.rb:31:incall’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/debug_exceptions.rb:16:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/show_exceptions.rb:56:incall’
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/lib/katello/middleware/silenced_logger.rb:29:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/request_id.rb:22:incall’
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/runtime.rb:17:incall’
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/cache/strategy/local_cache.rb:72:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/lock.rb:15:incall’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:inforward’
/opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:143:in
pass' /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:155:ininvalidate’
/opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:71:in
call!' /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:incall’
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:479:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application.rb:223:incall’
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in
method_missing' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/builder.rb:134:incall’
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:64:in
block in call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:ineach’
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in
call' /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/rack/thread_handler_extension.rb:77:inprocess_request’
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:140:in
accept_and_process_next_request' /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:108:inmain_loop’
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler.rb:441:in
block (3 levels) in start_threads' /opt/rh/ruby193/root/usr/share/gems/gems/logging-1.8.1/lib/logging/diagnostic_context.rb:323:incall’
/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' caused by: (RestClient::BadRequest) Katello::Resources::Candlepin::ActivationKey: 400 Bad Request {"displayMessage":"rulefailed.multiple.host.restrictions","requestUuid":"7e900e1e-663a-430c-be24-9bbdd7370ddf"} (POST /candlepin/activation_keys/8a71a0934b917ad8014bc01a366809d5/pools/8a71a0934b917ad8014bbf3e7ebf0553) /opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:inreturn!’
/opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in
process_result' /opt/rh/ruby193/root/usr/share/gems/gems/rbovirt-0.0.29/lib/restclient_ext/request.rb:50:inblock 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:intransmit’
/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:inexecute’
/opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/resource.rb:67:in
`post’
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/app/lib/katello/http_res