Project

General

Profile

Bug #30451

Attempting to attach a subscription to an unregistered host results in ISE 500

Added by Piyush Tiwari 3 months ago. Updated 3 months ago.

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

Description

Description of problem:

Trying to make API call:
PUT /api/v2/hosts/bulk/add_subscriptions
With data:
{"organization_id": 15, "included": {"ids": [13, 14]}, "excluded": {}, "subscriptions": [{"id": 59, "quantity": 1}]}
I get error:
NoMethodError: undefined method `candlepin_consumer' for nil:NilClass

Version-Release number of selected component (if applicable):
]# rpm -q satellite
satellite-6.8.0-0.6.beta.el7sat.noarch
]# rpm -q candlepin
candlepin-3.1.14-1.el7sat.noarch

How reproducible:
Every time

Steps to Reproduce:
1. Create host collection with two content host entries
2. Create a custom product
3. Attempt to attach subscription for custom product using API path: PUT /api/v2/hosts/bulk/add_subscriptions

Actual results:
Internal Service Error (ISE)
NoMethodError: undefined method `candlepin_consumer' for nil:NilClass

Expected results:
useful error message

Additional info:
https://theforeman.org/plugins/katello/3.15/api/apidoc/v2/hosts_bulk_actions/add_subscriptions.html

Associated revisions

Revision ccf77fda (diff)
Added by Piyush Tiwari 3 months ago

Fixes #30451 - attach subscription to unregstered host gives useful error message

History

#1 Updated by Piyush Tiwari 3 months ago

  • Bugzilla link set to 1857124

#2 Updated by The Foreman Bot 3 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/8844 added

#3 Updated by The Foreman Bot 3 months ago

  • Fixed in Releases Katello 4.0.0 added

#4 Updated by Piyush Tiwari 3 months ago

  • Status changed from Ready For Testing to Closed

#5 Updated by Chris Roberts 3 months ago

  • Triaged changed from No to Yes
  • Target version set to Katello 3.16.0
  • Category set to Subscriptions

Also available in: Atom PDF