Bug 1158139 - rhel client setup with shortname that is subcription-manager subscribed to satellite causes backend problems
Summary: rhel client setup with shortname that is subcription-manager subscribed to sa...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: WebUI
Version: 6.0.3
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: Unspecified
Assignee: Justin Sherrill
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks: 1316897 1394384
TreeView+ depends on / blocked
 
Reported: 2014-10-28 17:02 UTC by Dave Sullivan
Modified: 2019-10-10 09:27 UTC (History)
8 users (show)

Fixed In Version: rubygem-katello-3.0.0.54-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1394384 (view as bug list)
Environment:
Last Closed: 2016-12-12 17:09:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2940 0 normal SHIPPED_LIVE Satellite 6.2.5 Async Bug Release 2016-12-12 22:08:21 UTC

Description Dave Sullivan 2014-10-28 17:02:44 UTC
Description of problem:

capsule and content name shortname and long name mismatch causing errors.

appears to be the result of shortname that comes in from subscription manager to content host.

Actions::Katello::CapsuleContent::AddLifecycleEnvironment
  +- Actions::Katello::CapsuleContent::AddRepository

Input:

--- {}
ActiveRecord::RecordNotFound (ActiveRecord::RecordNotFound)
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation/finder_methods.rb:129:in `first!'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/katello/capsule_content.rb:44:in `consumer_uuid'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/actions/katello/capsule_content/add_repository.rb:24:in `plan'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:398:in `block (3 levels) in execute_plan'
/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'





Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

This seems to be caused by the fact that the capsule is named 'x123.acme.com', while the content host
that represents the registered system is named 'x123': renaming the content host to 'x123.acme.com'
should get us moving forward, as the names of the capsule and the content host, and adding the env to the capsule should start working again.

Also if customer is setup for shortname they can subscribe with full FQDN as such.

in subscription manager's help

  --name=SYSTEMNAME     name of the system to register, defaults to the
                        hostname

I believe the general right recommendation here is for customers to not use shortname configuration.

Comment 1 RHEL Program Management 2014-10-28 17:02: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 3 Ivan Necas 2014-11-03 13:15:55 UTC
Thanks for identifying the issue and filing in BZ. The proper fix would be to not rely on the names,

Comment 8 Justin Sherrill 2016-07-22 16:44:05 UTC
Believe this was fixed by  https://github.com/Katello/katello/pull/6104

Comment 9 Brad Buckingham 2016-07-24 16:04:42 UTC
Created redmine issue http://projects.theforeman.org/issues/15809 from this bug

Comment 10 Bryan Kearney 2016-07-24 18:04:32 UTC
Upstream bug component is WebUI

Comment 11 Justin Sherrill 2016-07-26 14:39:05 UTC
This was resolved by https://bugzilla.redhat.com/show_bug.cgi?id=1349043

moving to on_qa as this was shipped in 6.2.0, not marking as a dupe because the steps to reproduce are a bit different.

Comment 12 Lukas Pramuk 2016-12-09 09:23:56 UTC
VERIFIED.

@satellite-6.2.5-1.0.el6sat.noarch
tfm-rubygem-katello-3.0.0.89-1.el6sat.noarch

used this manual reproducer:

1. Register a future capsule to Satellite with different name than hostname: 
subscription register --name is no longer taken into account, so I changed hostname temporarily to 'capsule' and got rid off katello fact hostname override in /etc/rhsm/facts/katello.facts

2. On Satellite sync some repos to Library 

3. Install a capsule and associate the capsule with DEV environment

4. Publish repos to DEV environment

5. Trigger the capsule sync from satellite using capsule UI.

I repeated also for capsule with deleted content-host entry and it still worked

Comment 14 errata-xmlrpc 2016-12-12 17:09:31 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/RHBA-2016:2940


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