Bug 879245 - [cli] `system subscriptions --uuid`returns python's "None" as system name
Summary: [cli] `system subscriptions --uuid`returns python's "None" as system name
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Subscription Asset Manager
Classification: Retired
Component: katello
Version: 1.2
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: Jordan OMara
QA Contact: Tazim Kolhar
URL:
Whiteboard:
Depends On:
Blocks: sam12-tracker
TreeView+ depends on / blocked
 
Reported: 2012-11-22 12:28 UTC by Garik Khachikyan
Modified: 2016-04-26 00:54 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
System's UUID now displayed in cases where it was missing.
Clone Of:
Environment:
Last Closed: 2013-02-21 19:20:21 UTC
Embargoed:
pm-rhel: automate_bug+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0544 0 normal SHIPPED_LIVE Important: Subscription Asset Manager 1.2 update 2013-02-26 04:08:04 UTC

Description Garik Khachikyan 2012-11-22 12:28:45 UTC
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 15:28:30 UTC
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 22:04:58 UTC
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 18:47:05 UTC
https://github.com/Katello/katello/pull/1142

Comment 5 Tazim Kolhar 2012-12-03 10:28:58 UTC
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 19:20:21 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.

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.