This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 879245 - [cli] `system subscriptions --uuid`returns python's "None" as system name
[cli] `system subscriptions --uuid`returns python's "None" as system name
Status: CLOSED ERRATA
Product: Subscription Asset Manager
Classification: Red Hat
Component: katello (Show other bugs)
1.2
Unspecified Unspecified
medium Severity unspecified
: rc
: ---
Assigned To: Jordan OMara
Tazim Kolhar
:
Depends On:
Blocks: sam12-tracker
  Show dependency treegraph
 
Reported: 2012-11-22 07:28 EST by Garik Khachikyan
Modified: 2016-04-25 20:54 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
System's UUID now displayed in cases where it was missing.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 14:20:21 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
pm-rhel: automate_bug+


Attachments (Terms of Use)

  None (edit)
Description Garik Khachikyan 2012-11-22 07:28:45 EST
Description of problem:
Recent cli of SAM 1.2 has an issue when displaying info about system's subscriptinos fetching by uuid. It types "None" as system's name. One would expect to see the real system's _registered_ name there. (--name for RHSM could vary from machine's hostname!)

Version-Release number of selected component (if applicable):
katello-cli-1.2.4-2h.el6_3.noarch
katello-headpin-1.2.6-2h.el6_3.noarch


How reproducible:
always

Steps to Reproduce:
1.import manifest with RHEL subscription
2.register a client and subscribe to that pool
3.make cli call of: system subscriptions --uuid <system-uuid> --org <org>`
  
Actual results:
Notice what is written on the header of the output: "Current Subscriptions for System [ None ]"

Expected results:
Current Subscriptions for System [ <systemRegisteredName> ]

Additional info:
Comment 1 Garik Khachikyan 2012-11-22 10:28:30 EST
same here doing system unregister --uuid
---
Successfully unregistered System [ None ]


So please, whenever will be fixing/verifying the issue: please check the whole "system <command> --uuid" chain. thanks.
Comment 2 Jordan OMara 2012-11-28 17:04:58 EST
Changed the name option to use uuid if name is not present:

[root@brazillions katello]# headpin --username=admin --password=admin system subscribe --uuid=48c658d9-1733-40d9-9a47-9e334d67460d --pool=ff8080813b43bd6f013b43c5c8040033  --org=ACME_Corporation
Successfully attached subscription to System [ 48c658d9-1733-40d9-9a47-9e334d67460d ]

d9-9a47-9e334d67460d --org=ACME_Corporation
------------------------------------------------------------------------------------------------------------------
                    Current Subscriptions for System [ 48c658d9-1733-40d9-9a47-9e334d67460d ]



[root@brazillions katello]# headpin --username=admin --password=admin system unsubscribe --uuid=48c658d9-1733-40d9-9a47-9e334d67460d --org=ACME_Corporation --entitlement=ff8080813b43bd6f013b48fcb37a00b6
Successfully removed subscription from System [ 48c658d9-1733-40d9-9a47-9e334d67460d ]



[root@brazillions katello]# headpin --username=admin --password=admin system unregister --org=ACME_Corporation --uuid=48c658d9-1733-40d9-9a47-9e334d67460d
Successfully unregistered System [ 48c658d9-1733-40d9-9a47-9e334d67460d ]

https://github.com/Katello/katello/pull/1142
Comment 3 Jordan OMara 2012-11-29 13:47:05 EST
https://github.com/Katello/katello/pull/1142
Comment 5 Tazim Kolhar 2012-12-03 05:28:58 EST
VERIFIED :

# rpm -qa | grep katello
katello-certs-tools-1.2.1-1h.el6_3.noarch
katello-common-1.2.6-3h.el6_3.noarch
katello-headpin-all-1.2.6-3h.el6_3.noarch
katello-cli-common-1.2.4-3h.el6_3.noarch
katello-selinux-1.2.1-1h.el6_3.noarch
katello-cli-1.2.4-3h.el6_3.noarch
katello-headpin-1.2.6-3h.el6_3.noarch
katello-configure-1.2.3-1h.el6_3.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-glue-candlepin-1.2.6-3h.el6_3.noarch



# headpin -u admin -p admin system subscribe --uuid 2e05bdb6-ca43-4cbd-a0e7-31c0df9ef898 --pool 8a90c2993b6025a2013b602bd7810053 --org ACME_Corporation
Successfully attached subscription to System [ 2e05bdb6-ca43-4cbd-a0e7-31c0df9ef898 ]


# headpin -u admin -p admin system unsubscribe --uuid 2e05bdb6-ca43-4cbd-a0e7-31c0df9ef898 --entitlement 8a90c2993b6025a2013b603bc0ff007e --org ACME_Corporation
Successfully removed subscription from System [ 2e05bdb6-ca43-4cbd-a0e7-31c0df9ef898 ]



# headpin -u admin -p admin system unregister --org ACME_Corporation --uuid  2e05bdb6-ca43-4cbd-a0e7-31c0df9ef898
Successfully unregistered System [ 2e05bdb6-ca43-4cbd-a0e7-31c0df9ef898 ]

# headpin -u admin -p admin system info --uuid 76e85c24-d296-42d6-bfb7-879c0dab284f --org ACME_Corporation
--------------------------------------------------------------------------------
          System Information [ 76e85c24-d296-42d6-bfb7-879c0dab284f ]
--------------------------------------------------------------------------------

Name            : ibm-hs22-02.lab.bos.redhat.com
Ipv4 Address    : None
Uuid            : 76e85c24-d296-42d6-bfb7-879c0dab284f
Location        : None
Registered      : 2012/12/03 05:21:25
Last updated    : 2012/12/03 05:21:25
Description:
    Initial Registration Params
Activation Keys:
    [  ]
Service Level   : 
Guests          : [  ]
Custom Info:
    [  ]

# headpin -u admin -p admin system subscriptions --uuid 76e85c24-d296-42d6-bfb7-879c0dab284f --org ACME_Corporation
No Subscriptions found for System [ 76e85c24-d296-42d6-bfb7-879c0dab284f ] in Org [ ACME_Corporation ]
Comment 7 errata-xmlrpc 2013-02-21 14:20:21 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.

http://rhn.redhat.com/errata/RHSA-2013-0544.html

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