Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1158139 - rhel client setup with shortname that is subcription-manager subscribed to satellite causes backend problems
rhel client setup with shortname that is subcription-manager subscribed to sa...
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: WebUI (Show other bugs)
6.0.3
Unspecified Unspecified
high Severity high (vote)
: 6.2.5
: Unused
Assigned To: Justin Sherrill
Lukas Pramuk
: Triaged
Depends On:
Blocks: 1316897 1394384
  Show dependency treegraph
 
Reported: 2014-10-28 13:02 EDT by Dave Sullivan
Modified: 2017-10-16 08:11 EDT (History)
8 users (show)

See Also:
Fixed In Version: rubygem-katello-3.0.0.54-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1394384 (view as bug list)
Environment:
Last Closed: 2016-12-12 12:09:31 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2940 normal SHIPPED_LIVE Satellite 6.2.5 Async Bug Release 2016-12-12 17:08:21 EST

  None (edit)
Description Dave Sullivan 2014-10-28 13:02:44 EDT
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 Product and Program Management 2014-10-28 13:02:56 EDT
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 08:15:55 EST
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 12:44:05 EDT
Believe this was fixed by  https://github.com/Katello/katello/pull/6104
Comment 9 Brad Buckingham 2016-07-24 12:04:42 EDT
Created redmine issue http://projects.theforeman.org/issues/15809 from this bug
Comment 10 Bryan Kearney 2016-07-24 14:04:32 EDT
Upstream bug component is WebUI
Comment 11 Justin Sherrill 2016-07-26 10:39:05 EDT
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 04:23:56 EST
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 12:09:31 EST
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.