Red Hat Bugzilla – Bug 1011234
subscription-manager list --avail should catch nil service-levels and report the absense of a service-level rather than "None"
Last modified: 2013-11-21 16:30:03 EST
Description of problem: Looks like a python null value is being reported as "None" in the Service Level field reported by subscription-manager list --available. Because "None" can also be regarded as a valid service level, subscription-manager should report an empty string for subscription pools whose Service Level has not been set. This is a regression. Version-Release number of selected component (if applicable): [root@jsefler-6 ~]# rpm -q subscription-manager subscription-manager-1.9.6-1.git.3.5220cd8.el6.x86_64 How reproducible: Steps to Reproduce: Using the candlepin TESTDATA... [root@jsefler-6 ~]# subscription-manager list --avail | grep awesomeos-all-no-86_64-cont -B1 -A9 Subscription Name: Awesome OS for All Arch (excpt for x86_64 content) SKU: awesomeos-all-no-86_64-cont Pool ID: 8a9086d3414bd57701414bd724570609 Available: 8 Suggested: 2 Service Level: None <============== WRONG (SHOULD BE BLANK) Service Type: Multi-Entitlement: Yes Ends: 09/22/2014 System Type: Physical [root@jsefler-6 ~]# subscription-manager attach --pool 8a9086d3414bd57701414bd724570609 Successfully attached a subscription for: Awesome OS for All Arch (excpt for x86_64 content) [root@jsefler-6 ~]# subscription-manager list --consumed +-------------------------------------------+ Consumed Subscriptions +-------------------------------------------+ Subscription Name: Awesome OS for All Arch (excpt for x86_64 content) Provides: Awesome OS for All Arch (excpt for x86_64 content) Bits SKU: awesomeos-all-no-86_64-cont Contract: 85 Account: 12331131231 Serial: 8472276835796622586 Pool ID: 8a9086d3414bd57701414bd724570609 Active: True Quantity Used: 2 Service Level: <============== CORRECT Service Type: Status Details: Starts: 09/22/2013 Ends: 09/22/2014 [root@jsefler-6 ~]#
commit 93708d265dda982dd583adacfdbebfb1ffc2b869 Author: ckozak <ckozak@redhat.com> Date: Mon Sep 23 16:44:42 2013 -0400 1011234: no service level displays empty string
Verifying Version using a candlepin server loaded with TESTDATA... [root@jsefler-6 ~]# subscription-manager version server type: Red Hat Subscription Management subscription management server: 0.8.28-1 subscription-manager: 1.9.8-1.el6 python-rhsm: 1.9.6-1.el6 [root@jsefler-6 ~]# subscription-manager list --avail | grep awesomeos-all-no-86_64-cont -B1 -A9 Provides: Awesome OS for All Arch (excpt for x86_64 content) Bits SKU: awesomeos-all-no-86_64-cont Pool ID: 8a9087404175311a01417531e93b0f20 Available: 5 Suggested: 2 Service Level: <============== VERIFIED Service Type: Multi-Entitlement: Yes Ends: 09/30/2014 System Type: Physical [root@jsefler-6 ~]# subscription-manager list --avail | grep Service Service Level: Premium Service Type: Level 3 Service Level: Super Service Type: Level 3 Service Level: Premium Service Type: Level 3 Service Level: Super Service Type: Level 3 Service Level: Super Service Type: Level 3 Service Level: Service Type: Service Level: Service Type: Service Level: Premium Service Type: Level 3 Service Level: Service Type: Service Level: Service Type: Service Level: Service Type: Service Level: Service Type: Service Level: Premium Service Type: Level 3 Service Level: Premium Service Type: Level 3 Service Level: Service Type: Service Level: Service Type: Service Level: Service Type: Service Level: Service Type: Service Level: Service Type: Service Level: Service Type: Service Level: Service Type: Service Level: Service Type: Service Level: Layered Service Type: Service Level: Service Type: Service Level: Service Type: Service Level: Service Type: Service Level: Service Type: Service Level: Service Type: Service Level: Service Type: Service Level: Service Type: Service Level: Service Type: Service Level: Standard Service Type: L1-L3 Service Level: None Service Type: Self-Support Service Level: Standard Service Type: L1-L3 Service Level: Standard Service Type: L1-L3 Service Level: None Service Type: Self-Support Service Level: None Service Type: Self-Support Service Level: None Service Type: Self-Support Service Level: Premium Service Type: Level 3 Service Level: Standard Service Type: L1-L3 Service Level: None Service Type: Self-Support Service Level: Service Type: [root@jsefler-6 ~]# VERIFIED: Notice in the grep above that subscriptions with a null/nil/None Service Level are being reported with a blank value while subscriptions with a "None" value are actually being reported as "None". This regression bug has been fixed.
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/RHBA-2013-1659.html