Bug 733643 - Incorrect 'OS' name under system --> system properties
Summary: Incorrect 'OS' name under system --> system properties
Keywords:
Status: CLOSED DUPLICATE of bug 769302
Alias: None
Product: Katello
Classification: Retired
Component: Webservice API
Version: 1.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 1.x
Assignee: Martin Bacovsky
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-26 10:56 UTC by Sachin Ghai
Modified: 2012-04-23 11:33 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-23 11:33:53 UTC


Attachments (Terms of Use)
The OS name should be RHEL instead of fedora under system properties (55.88 KB, image/png)
2011-08-26 10:58 UTC, Sachin Ghai
no flags Details

Description Sachin Ghai 2011-08-26 10:56:32 UTC
Description of problem:
I registered two systems, one is installed with fedora and other is installed with rhel6.1.

After registering the systems, when I checked the system properties of rhel61 system, the OS its displays is 'fedora'

 

Version-Release number of selected component (if applicable):
katello-0.1.70-1.git.7.ca8d03c.fc15.noarch


How reproducible:
always

Steps to Reproduce:
1. Register a system( installed with rhel OS) from katello cli
2. Go to systems tab ==> double click on newly registered system
3. Check 'OS' name under system properties on right pane
  
Actual results:
OS name is 'fedora'

Expected results:
It should be rhel in this case. So system register should discover the correct name of installed OS.


Additional info:


Here is the output from newly registered rhel system. And in UI its showing 'fedora'. Please see the incorrect_os.png attachment.

[root@dhcp201-136 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.1 (Santiago)
[root@dhcp201-136 ~]# hostname
dhcp201-136.englab.pnq.redhat.com
[root@dhcp201-136 ~]# 


[root@dhcp201-167 ~]# katello -u admin -p admin system facts --name=dhcp201-136.englab.pnq.redhat.com --org=ACME_Corporation
-------------------------------------------------------------------------------------------------------------------------------------------------------------
                                  System Facts For System [ dhcp201-136.englab.pnq.redhat.com ] in Org [ ACME_Corporation ]
-------------------------------------------------------------------------------------------------------------------------------------------------------------

Distribution.name: Fedora

Comment 1 Sachin Ghai 2011-08-26 10:58:14 UTC
Created attachment 520065 [details]
The OS name should be RHEL instead of fedora under system properties

Comment 2 Shannon Hughes 2011-09-07 16:49:10 UTC
lets retest this one too. its showing Red Hat Enterprise Linux Server for a rhel6 box I just registered. this information is actually grabbed from candlepin.

Comment 3 Sachin Ghai 2011-09-08 09:04:58 UTC
I'm still getting the same results with following build:

[root@dhcp201-204 ~]# rpm -qa | grep katello
katello-cli-0.1.9-1.git.2.18d37b8.fc15.noarch
katello-0.1.76-1.git.48.ee25bad.fc15.noarch
[root@dhcp201-204 ~]# 


I registered another rhel6 box and its still showing the fedora under system properties..

[root@dhcp201-204 ~]# katello -u admin -p admin system register --name dhcp201-119.englab.pnq.redhat.com --org=ACME_Corporation --environment=test_env
Successfully registered system [ dhcp201-119.englab.pnq.redhat.com ]


[root@dhcp201-119 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.0 (Santiago)
[root@dhcp201-119 ~]#


[root@dhcp201-204 ~]# katello -u admin -p admin system facts --name dhcp201-119.englab.pnq.redhat.com --org=ACME_Corporation --environment=test_env
-------------------------------------------------------------------------------
 System Facts For System [ dhcp201-119.englab.pnq.redhat.com ] in Environment [ test_env]  in Org [ ACME_Corporation ]
-------------------------------------------------------------------------------

Distribution.name: Fedora

[root@dhcp201-204 ~]#

Comment 4 Shannon Hughes 2011-09-08 14:58:33 UTC
what version of candlepin are you using? this information actually comes from candlepin and katello just displays to the UI.

Comment 5 Sachin Ghai 2011-09-09 12:17:38 UTC
I'm using following versions of candlepin and katello

[root@dhcp201-204 ~]# rpm -qa | grep candlepin
candlepin-tomcat6-0.4.14-1.fc15.noarch
candlepin-0.4.14-1.fc15.noarch
[root@dhcp201-204 ~]# rpm -qa | grep katello
katello-cli-0.1.9-1.git.2.18d37b8.fc15.noarch
katello-0.1.76-1.git.48.ee25bad.fc15.noarch

Comment 7 Sachin Ghai 2011-10-03 05:25:14 UTC
I registered a new rhel61 machine and found same results. 

[root@dhcp201-187 ~]# katello -u admin -p admin system register --name=dhcp201-195.englab.pnq.redhat.com --org=sghai_org --environment=testing
Successfully registered system [ dhcp201-195.englab.pnq.redhat.com ]

[root@dhcp201-187 ~]# katello -u admin -p admin system facts --name=dhcp201-195.englab.pnq.redhat.com --org=sghai_org
--------------------------------------------------------------------------------
 System Facts For System [ dhcp201-195.englab.pnq.redhat.com ] in Org [ sghai_org ]
--------------------------------------------------------------------------------

Distribution.name: Fedora

[root@dhcp201-187 ~]# 


[root@dhcp201-195 ~]# subscription-manager facts --list | grep distribution
distribution.id: Santiago
distribution.name: Red Hat Enterprise Linux Server
distribution.version: 6.1
[root@dhcp201-195 ~]# 

UI is also showing 'fedora' distribution under the system properties of newly registered rhel61 system.

Comment 9 Sachin Ghai 2011-10-04 05:55:16 UTC
If I register a rhel node using rhsm then I can see the correct distribution name under systems properties. However if I register rhel6 node using katello-cli then system properties lists the distribution name as 'fedora'

Comment 10 Lukas Zapletal 2011-12-07 14:29:40 UTC
NOT_IMPLEMENTED_FEATURE 

This is hard coded in the katello-cli:

class SystemAPI(KatelloAPI):
    """
    Connection class to access environment calls
    """
    def register(self, name, org, envName, activation_keys, cp_type):
        if envName is not None:
            environment = get_environment(org, envName)
            if environment is None:
                return None

            path = "/api/environments/%s/systems" % environment["id"]
        else:
            path = "/api/organizations/%s/systems" % org
        sysdata = {
          "name": name,
          "cp_type": cp_type,
          "facts": {
            "distribution.name": "Fedora"
          }
        }
        if activation_keys:
            sysdata["activation_keys"] = activation_keys
        return self.server.POST(path, sysdata)[1]

We did not implement this yet. Bryan set proper priority for this one. Where are we going to collect facts from by the way?

Comment 12 Petr Chalupa 2012-04-23 11:33:53 UTC

*** This bug has been marked as a duplicate of bug 769302 ***


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