Bug 1380117

Summary: content hosts show no info under "registered by" in 6.2.x
Product: Red Hat Satellite Reporter: Kathryn Dixon <kdixon>
Component: Hosts - ContentAssignee: Brad Buckingham <bbuckingham>
Status: CLOSED ERRATA QA Contact: jcallaha
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2.2CC: abalakht, bbuckingham, bkearney, chrobert, egolov, jcallaha, kdixon, mmccune, rplevka, shshah
Target Milestone: UnspecifiedKeywords: PrioBumpGSS, Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.0.0.151-1, rubygem-katello-3.0.0.151-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1455041 1480357 (view as bug list) Environment:
Last Closed: 2017-09-25 18:59:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1455041    
Attachments:
Description Flags
screen shot of the empty registered by
none
verification screenshot none

Description Kathryn Dixon 2016-09-28 17:24:31 UTC
Created attachment 1205589 [details]
screen shot of the empty registered by

Description of problem:

In satellite 6.1.9 and below when clicking on a content host and looking at the "registered by" column you could see what user registered it or what activation key was used to register it.

Now on 6.2.x this column still exists but only does it show any info if an activation key registers the system.

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


How reproducible: 100%


Steps to Reproduce:
1. register a new client ( or look at your old clients) in the webui under content hosts
2. do not use an activation key
3. attach a sub

Actual results: registered by shows no info


Expected results: registered by should show information if its registered by an activation key or not. Looks like a regression from 6.1.9


Additional info: screen shot attached.

looks like its missing from here.


        /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.78/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html
         
        266     <section>
        267       <h4 translate>Content Host Status</h4>
        268
        269       <div class="detail">
        270         <span class="info-label" translate>Registered</span>
        271         <span class="info-value">{{ host.created | date:'short' }}</span>
        272       </div>
        273
        274       <div class="detail">
        275         <span class="info-label" translate> Registered By</span>
        276         <span class="info-value"
        277               translate
        278               ng-show="host.subscription_facet_attributes.activation_keys.length == 0">
        279           {{ contentHost.registered_by }}
        280         </span>
        281         <span class="info-value"
        282               ng-show="host.subscription_facet_attributes.activation_keys.length > 0"
        283               translate
        284               translate-n="host.subscription_facet_attributes.activation_keys.length"
        285               translate-plural="Activation Keys">
        286           Activation Key
        287         </span>
        288         <span class="info-value">
        289           <ul ng-show="host.subscription_facet_attributes.activation_keys.length > 0">
        290             <li ng-repeat="activation_key in host.subscription_facet_attributes.activation_keys">
        291               <span>
        292                 <a ui-sref="activation-keys.details.info({activationKeyId: activation_key.id})">
        293                   {{ activation_key.name }}
        294                 </a>
        295               </span>
        296               <span ng-show="activation_key.description"> - {{ activation_key.description }}</span>
        297             </li>
        298           </ul>
        299         </span>
        300       </div>
        301
        302       <div class="detail">
        303         <span class="info-label" translate>Last Checkin</span>
        304         <span class="info-value">{{ (host.subscription_facet_attributes.last_checkin | date:'short') || ("Never checked in" | translate) }}</span>
        305       </div>
        306

Comment 2 Brad Buckingham 2016-10-03 20:38:42 UTC
Created redmine issue http://projects.theforeman.org/issues/16780 from this bug

Comment 3 Brad Buckingham 2016-10-11 15:56:41 UTC
Upstream Katello PR : https://github.com/Katello/katello/pull/6387

Comment 7 Brad Buckingham 2017-03-21 18:36:27 UTC
*** Bug 1431231 has been marked as a duplicate of this bug. ***

Comment 9 Evgeni Golov 2017-05-19 06:44:43 UTC
Looking at the upstream patch, I'd actually say that it does not completely fix the regression.
In 6.1 the column would have
* the username, if the the host was registered by a user
* the UUID of the submitting host, if the host was submitted by another one, like it happens in the virt-who case

The first is fixed by the patch, but the second (which is more interesting for me, personally) is not :(

Comment 12 jcallaha 2017-08-10 19:36:23 UTC
Verified in Satellite 6.3 Snap 10.

The content hosts now correctly show what activation key they were registered with. See attached screenshot for verification.

Comment 14 Roman Plevka 2017-08-28 14:42:19 UTC
I believe the fix for this BZ is causing a regression described in:
https://bugzilla.redhat.com/show_bug.cgi?id=1485942

can you confirm?

Comment 15 Brad Buckingham 2017-08-28 15:10:42 UTC
Roman, good catch.  It did and it was solved upstream with http://projects.theforeman.org/issues/17128.  I am linking that issue to bug 1485942 and we'll get it pulled in.

Comment 16 jcallaha 2017-08-28 18:12:03 UTC
Verified in Satellite 6.2.12 Snap 1.

The registered by functionality is back in place. Also, it correctly links to the appropriate activation key. See attached screenshot for verification.

Comment 17 jcallaha 2017-08-28 18:12:22 UTC
Created attachment 1319197 [details]
verification screenshot

Comment 19 errata-xmlrpc 2017-09-25 18:59:44 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-2017:2803