Bug 1192612

Summary: [RFE] Satellite version command for Satellite 6
Product: Red Hat Satellite Reporter: Sam Yangsao <syangsao>
Component: HammerAssignee: Oleh Fedorenko <ofedoren>
Status: CLOSED ERRATA QA Contact: Sanket Jagtap <sjagtap>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0.7CC: bkearney, chrobert, mbacovsk, mhulan, mmccune, pcreech, sjagtap
Target Milestone: 6.7.0Keywords: FutureFeature
Target Release: Unused   
Hardware: All   
OS: Linux   
URL: http://projects.theforeman.org/issues/12587
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-14 15:54:08 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: 260381    

Description Sam Yangsao 2015-02-13 20:30:58 UTC
Description of problem:

Satellite does not have a command that states the exact version that is running.

We can see the Satellite version by going to the initial login page.

There should be a command to show this version/release - maybe even show the "patched" up to date.

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

6.0.7

How reproducible:

Always

Steps to Reproduce:
1.
2.
3.

Actual results:

NA

Expected results:

#<Satellite command> -version
6.0.7 - <patched up to $DATE>

*Could also involve all the other package release/versions for pulp, mongodb, ruby, etc...

Additional info:

Add the versioning into the foreman-debug script

Only way we can see this version is by:

#cat /usr/share/foreman/lib/satellite/version.rb
module Satellite
  VERSION = "6.0.7"
end

Comment 1 RHEL Program Management 2015-02-13 20:43:24 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 2 Xixi 2015-03-06 00:34:24 UTC
> Add the versioning into the foreman-debug script
> 
Please see: Bug 1191584 include Satellite 6 version info in foreman-debug / sosreport

> Only way we can see this version is by:
> 
> #cat /usr/share/foreman/lib/satellite/version.rb
> module Satellite
>   VERSION = "6.0.7"
> end
Right - suggestion per discussion with BK/mmccune is to symlink this file to /etc/redhat-satellite-release or some such file so it's a more intuitive name, can just use this BZ now (thanks for creating it :)). 

In the meantime https://access.redhat.com/articles/1365633 has been created simlar to RHEL to help find Satellite releases and dates.

Xixi

Comment 4 Bryan Kearney 2015-11-05 18:07:31 UTC
*** Bug 1276136 has been marked as a duplicate of this bug. ***

Comment 5 Bryan Kearney 2015-11-24 15:52:12 UTC
Connecting redmine issue http://projects.theforeman.org/issues/12587 from this bug

Comment 6 Bryan Kearney 2015-11-24 17:03:57 UTC
Upstream bug component is Hammer

Comment 7 Bryan Kearney 2016-07-26 15:25:24 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 8 Bryan Kearney 2016-07-26 15:47:07 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 10 Sam Yangsao 2017-02-13 14:55:46 UTC
Just to add on to this RFE, is it possible to create a file that shows the history of upgrades?

For example, customer installed 6.2.5, and has upgraded from 6.2.6 then to 6.2.7.

This will give us a great idea on the history of upgrades for a certain customers installation and where problems started occurring if they said that something worked before they patched.

# cat /path/versions.txt

Initial installation 6.2.5
** upgraded on date ** 6.2.6
** upgraded on date ** 6.2.7

Thanks!

Comment 11 Marek Hulan 2017-02-14 09:15:52 UTC
Sam, that would be a different RFE I believe. This is about getting the information through hammer.

Comment 12 Bryan Kearney 2019-10-21 14:07:20 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/12587 has been resolved.

Comment 13 Sanket Jagtap 2019-12-23 10:55:54 UTC
Build: Satellite 6.7 Snap 7.0 

[root@qe-sat6-feature-rhel7 ~]# hammer status --help
Usage:
    hammer status [OPTIONS] [SUBCOMMAND] [ARG] ...

Parameters:
 [ARG] ...                     Subcommand arguments
 [SUBCOMMAND]                  Subcommand (default: "foreman")

Subcommands:
 foreman                       Shows status and version information of Satellite system and it's subcomponents
 katello                       Shows version information

Options:
 -h, --help                    Print help


[root@qe-sat6-feature-rhel7 ~]# hammer status foreman
Version:           1.24.0
API Version:       v2
Database:          
    Status:          ok
    Server Response: Duration: 0ms
Plugins:           
 1) Name:    foreman-tasks
    Version: 0.17.5
 2) Name:    foreman_ansible
    Version: 4.0.3
 3) Name:    foreman_bootdisk
    Version: 16.0.0
 4) Name:    foreman_discovery
    Version: 16.0.1
 5) Name:    foreman_hooks
    Version: 0.3.15
 6) Name:    foreman_openscap
    Version: 2.0.2
 7) Name:    foreman_remote_execution
    Version: 2.0.6
 8) Name:    foreman_templates
    Version: 7.0.5
 9) Name:    foreman_theme_satellite
    Version: 5.0.1.5
 10)Name:    foreman_virt_who_configure
    Version: 0.5.0
 11)Name:    katello
    Version: 3.14.0.1
 12)Name:    redhat_access
    Version: 2.2.8
Smart Proxies:     
 1) Name:     qe-sat6-feature-rhel7<snip>
    Version:  1.24.0
    Status:   ok
    Features: 
     1) Name:    discovery
        Version: 1.0.5
     2) Name:    dynflow
        Version: 0.2.4
     3) Name:    ssh
        Version: 0.2.1
     4) Name:    pulp
        Version: 1.5.0
     5) Name:    openscap
        Version: 0.7.2
     6) Name:    ansible
        Version: 3.0.1
     7) Name:    dns
        Version: 1.24.0
     8) Name:    templates
        Version: 1.24.0
     9) Name:    tftp
        Version: 1.24.0
     10)Name:    dhcp
        Version: 1.24.0
     11)Name:    puppetca
        Version: 1.24.0
     12)Name:    puppet
        Version: 1.24.0
     13)Name:    logs
        Version: 1.24.0
     14)Name:    httpboot
        Version: 1.24.0
Compute Resources: 
 1) Name:   libvirt
    Status: ok
 2) Name:   VMware
    Status: ok
candlepin:         
    Status:          ok
    Server Response: Duration: 18ms
candlepin_auth:    
    Status:          ok
    Server Response: Duration: 19ms
pulp:              
    Status:          ok
    Server Response: Duration: 71ms
pulp_auth:         
    Status:          ok
    Server Response: Duration: 46ms
foreman_tasks:     
    Status:          ok
    Server Response: Duration: 6ms

[root@qe-sat6-feature-rhel7 ~]# hammer status katello
Version:  3.14.0.1
Time UTC: 2019/12/23 10:54:17

Comment 16 errata-xmlrpc 2020-04-14 15:54:08 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-2020:1455