Bug 1288626

Summary: list of "Serial numbers unsuccessfully removed at the server:" is reporting poolIds rather than serials
Product: Red Hat Enterprise Linux 6 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: Chris Snyder <csnyder>
Status: CLOSED ERRATA QA Contact: John Sefler <jsefler>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.8CC: csnyder, jsefler, skallesh
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-10 20:38:41 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:
Attachments:
Description Flags
rhsm.log from the attempt to remove many --pools none

Description John Sefler 2015-12-04 19:15:44 UTC
Description of problem:
 Likely a consequence of implementing RFE Bug 1198178....

Version-Release number of selected component (if applicable):
[root@jsefler-6 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.0.10-1
subscription management rules: 5.19
subscription-manager: 1.16.5-1.git.50.2a52dfd.el6
python-rhsm: 1.16.3-1.git.2.96c8b23.el6


How reproducible:


Steps to Reproduce:
1. attach all available pools
2. then attempt to attach them all again (the purpose is to get multiple entitlement serials granted from the same pools 
3. unsubscribe from all of the consumed poolids

Actual results:
[root@jsefler-6 ~]# subscription-manager unsubscribe --pool=8a908790516a011001516a02508b049b --pool=8a908790516a011001516a025891054a --pool=8a908790516a011001516a025dbc05ec --pool=8a908790516a011001516a026b970797 --pool=8a908790516a011001516a0250a1049e --pool=8a908790516a011001516a0264a006d3 --pool=8a908790516a011001516a02646b06c3 --pool=8a908790516a011001516a02511e04a4 --pool=8a908790516a011001516a02762e0904 --pool=8a908790516a011001516a0261720680 --pool=8a908790516a011001516a0265b906e1 --pool=8a908790516a011001516a02714d089b --pool=8a908790516a011001516a0261720680 --pool=8a908790516a011001516a0259dd056e --pool=8a908790516a011001516a02588b0547 --pool=8a908790516a011001516a025a490575 --pool=8a908790516a011001516a02646b06c3 --pool=8a908790516a011001516a0263ac06bb --pool=8a908790516a011001516a026168067d --pool=8a908790516a011001516a025e0e05f9 --pool=8a908790516a011001516a027e6b09db --pool=8a908790516a011001516a0251b504aa --pool=8a908790516a011001516a0274dd08e0 --pool=8a908790516a011001516a026919073f --pool=8a908790516a011001516a02662606f4 --pool=8a908790516a011001516a0278a70937 --pool=8a908790516a011001516a027b7f0984 --pool=8a908790516a011001516a0250650498 --pool=8a908790516a011001516a0264a106d6 --pool=8a908790516a011001516a026b030786 --pool=8a908790516a011001516a0278aa0939 --pool=8a908790516a011001516a0265b906e1 --pool=8a908790516a011001516a02714d089b --pool=8a908790516a011001516a025d6005e8 --pool=8a908790516a011001516a0278a70937 --pool=8a908790516a011001516a0258030542 --pool=8a908790516a011001516a0278aa0939 --pool=8a908790516a011001516a02510504a1 --pool=8a908790516a011001516a0264a106d6 --pool=8a908790516a011001516a02762e0904 --pool=8a908790516a011001516a02588b0547 --pool=8a908790516a011001516a027b930986 --pool=8a908790516a011001516a0260e5066a --pool=8a908790516a011001516a0258e20560 --pool=8a908790516a011001516a025a490575 --pool=8a908790516a011001516a025e0e05f9 --pool=8a908790516a011001516a0269940747 --pool=8a908790516a011001516a026acf0781 --pool=8a908790516a011001516a0251b504aa --pool=8a908790516a011001516a026910073c --pool=8a908790516a011001516a0274c608de --pool=8a908790516a011001516a02710c0899 --pool=8a908790516a011001516a02516304a7 --pool=8a908790516a011001516a0269940747 --pool=8a908790516a011001516a0259b60569 --pool=8a908790516a011001516a0274dd08e0 --pool=8a908790516a011001516a0259dd056e --pool=8a908790516a011001516a02516304a7 --pool=8a908790516a011001516a0269bf074b --pool=8a908790516a011001516a0263ac06bb --pool=8a908790516a011001516a0269bf074b --pool=8a908790516a011001516a026b33078f --pool=8a908790516a011001516a026b030786 --pool=8a908790516a011001516a026acf0781 --pool=8a908790516a011001516a026f8d0869 --pool=8a908790516a011001516a0257ab0529 --pool=8a908790516a011001516a025dbc05ec --pool=8a908790516a011001516a0264a006d3 --pool=8a908790516a011001516a027b930986
Pools successfully removed at the server:
   8a908790516a011001516a02508b049b
   8a908790516a011001516a025891054a
   8a908790516a011001516a025dbc05ec
   8a908790516a011001516a026b970797
   8a908790516a011001516a0250a1049e
   8a908790516a011001516a0264a006d3
   8a908790516a011001516a02646b06c3
   8a908790516a011001516a02511e04a4
   8a908790516a011001516a02762e0904
   8a908790516a011001516a0261720680
   8a908790516a011001516a0265b906e1
   8a908790516a011001516a02714d089b
   8a908790516a011001516a0259dd056e
   8a908790516a011001516a02588b0547
   8a908790516a011001516a025a490575
   8a908790516a011001516a0263ac06bb
   8a908790516a011001516a026168067d
   8a908790516a011001516a025e0e05f9
   8a908790516a011001516a027e6b09db
   8a908790516a011001516a0251b504aa
   8a908790516a011001516a0274dd08e0
   8a908790516a011001516a026919073f
   8a908790516a011001516a02662606f4
   8a908790516a011001516a0278a70937
   8a908790516a011001516a027b7f0984
   8a908790516a011001516a0250650498
   8a908790516a011001516a0264a106d6
   8a908790516a011001516a026b030786
   8a908790516a011001516a0278aa0939
   8a908790516a011001516a025d6005e8
   8a908790516a011001516a0258030542
   8a908790516a011001516a02510504a1
   8a908790516a011001516a027b930986
   8a908790516a011001516a0260e5066a
   8a908790516a011001516a0258e20560
   8a908790516a011001516a0269940747
   8a908790516a011001516a026acf0781
   8a908790516a011001516a026910073c
   8a908790516a011001516a0274c608de
   8a908790516a011001516a02710c0899
   8a908790516a011001516a02516304a7
   8a908790516a011001516a0259b60569
   8a908790516a011001516a0269bf074b
   8a908790516a011001516a026b33078f
   8a908790516a011001516a026f8d0869
   8a908790516a011001516a0257ab0529
Pools unsuccessfully removed at the server:
   8a908790516a011001516a0261720680
   8a908790516a011001516a02646b06c3
   8a908790516a011001516a0265b906e1
   8a908790516a011001516a02714d089b
   8a908790516a011001516a0278a70937
   8a908790516a011001516a0278aa0939
   8a908790516a011001516a0264a106d6
   8a908790516a011001516a02762e0904
   8a908790516a011001516a02588b0547
   8a908790516a011001516a025a490575
   8a908790516a011001516a025e0e05f9
   8a908790516a011001516a0251b504aa
   8a908790516a011001516a0269940747
   8a908790516a011001516a0274dd08e0
   8a908790516a011001516a0259dd056e
   8a908790516a011001516a02516304a7
   8a908790516a011001516a0263ac06bb
   8a908790516a011001516a0269bf074b
   8a908790516a011001516a026b030786
   8a908790516a011001516a026acf0781
   8a908790516a011001516a025dbc05ec
   8a908790516a011001516a0264a006d3
   8a908790516a011001516a027b930986
Serial numbers successfully removed at the server:
   6147826158890249653
   2710596911835822689
   8362938208950031094
   130483993634735580
   2732609281506598523
   9052549406872888283
   2331731296433832764
   4070001934983253811
   5093458126691284082
   2934789086622452149
   4350641989840642780
   8100688184154984008
   7226902196530833468
   6231213089781081700
   3601494150923049888
   7375892083819294917
   7131119751278479303
   2949488475282126112
   5580063804609758377
   3682622523013876837
   9209702832282627290
   3254133144643532478
   1401954569074842832
   3123243006713280529
   8455881751330943515
   7064751065547188328
   8167597658672101722
   3340382818796984362
   6026598882941243502
   5032527623925168276
   7430166448199035882
   4434320365027549343
   923823630311969468
   5391135035182574716
   6902967440092474479
   6076723028570594727
   6628225776972649428
   2888875028386268805
   6532494883021214881
   1764699522231619824
   6470338054569814784
   4273441235243462699
   2363303218180184692
   755001305442445466
   8088127697442845689
   5578837543393088102
   6359688843082196371
   2086701977997968419
   2203257097344187314
   8147008571142004615
   7845026360761072190
   1900374637132251264
   608005964157864710
   8148534521912266793
   8595670018836524499
   1346650790444341909
   9202991186305322219
   5669925821791686364
   8363278242625811633
   6709949662262862170
   3989094669850213197
   3070536053163281363
   2824515556873287970
   6826010820623730823
   340718176080410363
   3055202567945320408
   5708733670733121812
   6508918535234703147
   8376678252501434803
Serial numbers unsuccessfully removed at the server:
   8a908790516a011001516a0261720680
   8a908790516a011001516a02646b06c3
   8a908790516a011001516a0265b906e1
   8a908790516a011001516a02714d089b
   8a908790516a011001516a0278a70937
   8a908790516a011001516a0278aa0939
   8a908790516a011001516a0264a106d6
   8a908790516a011001516a02762e0904
   8a908790516a011001516a02588b0547
   8a908790516a011001516a025a490575
   8a908790516a011001516a025e0e05f9
   8a908790516a011001516a0251b504aa
   8a908790516a011001516a0269940747
   8a908790516a011001516a0274dd08e0
   8a908790516a011001516a0259dd056e
   8a908790516a011001516a02516304a7
   8a908790516a011001516a0263ac06bb
   8a908790516a011001516a0269bf074b
   8a908790516a011001516a026b030786
   8a908790516a011001516a026acf0781
   8a908790516a011001516a025dbc05ec
   8a908790516a011001516a0264a006d3
   8a908790516a011001516a027b930986
69 local certificates have been deleted.



BANG! Notice that the list of "Serial numbers unsuccessfully removed at the server:" is actually a duplicate of the unsuccessful poolIds.

Comment 2 Chris Snyder 2015-12-07 15:23:53 UTC
Please attach the rhsm.log if available. Thank you!

Comment 3 John Sefler 2015-12-07 16:07:21 UTC
Created attachment 1103285 [details]
rhsm.log from the attempt to remove many --pools

Comment 4 John Sefler 2015-12-07 16:34:16 UTC
This may be an easier test....

[root@jsefler-6 ~]# subscription-manager attach --pool=8a908790516a011001516a0261720680
Successfully attached a subscription for: Awesome OS for x86_64
[root@jsefler-6 ~]# 
[root@jsefler-6 ~]# subscription-manager remove --pool=8a908790516a011001516a0261720680 --pool=123
Pools successfully removed at the server:
   8a908790516a011001516a0261720680
Pools unsuccessfully removed at the server:
   123
Serial numbers successfully removed at the server:
   6047840749519172995
Serial numbers unsuccessfully removed at the server:
   123
1 local certificate has been deleted.


^^^ In this case you see that 123 was never a serial number.  It was an attempt to remove an unconsumed pool.

Comment 5 John Sefler 2015-12-07 16:34:30 UTC
Here's another variation of the same test with a slightly different response...

[root@jsefler-6 ~]# subscription-manager remove --pool=123
Serial numbers unsuccessfully removed at the server:
   123

^^^ In this case, the appearance is that pools and serials are interchangeable which is not true.

Comment 7 Chris Snyder 2015-12-07 20:18:55 UTC
The PR below addresses this BZ as well as the comments contained herein:
https://github.com/candlepin/subscription-manager/pull/1357

Comment 8 Chris Snyder 2015-12-14 17:20:30 UTC
commit c8e5d1bc47dfd250f0f3e3c402c9f3588df10519
Author: Christopher Snyder <csnyder>
Date:   Mon Dec 14 11:07:43 2015 -0500

    1288626: Does not report pool ids as serial numbers, ignore duplicates

Comment 10 Shwetha Kallesh 2016-01-14 13:42:26 UTC
Marking bug as verified :

[root@dhcp35-189 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.0.10-1
subscription management rules: 5.19
subscription-manager: 1.16.7-1.el6
python-rhsm: 1.16.5-1.el6


[root@dhcp35-189 ~]# subscription-manager remove --pool 8ac6a3f45215de5a015215dfb790073a --pool 8ac6a3f45215de5a015215dfa0cb049b --pool 8ac6a3f45215de5a015215dfa0cb04er
Pools successfully removed at the server:
   8ac6a3f45215de5a015215dfb790073a
   8ac6a3f45215de5a015215dfa0cb049b
Pools unsuccessfully removed at the server:
   8ac6a3f45215de5a015215dfa0cb04er
Serial numbers successfully removed at the server:
   2279667930591210846
   2822766136687201651
2 local certificates have been deleted.
 
[root@dhcp35-189 ~]# subscription-manager remove --pool 8ac6a3f45215de5a015215dfb3ea06d6 --serial 5716740667283576794 --pool 8ac6a3f45215de5a015215dfb790073a
Pools successfully removed at the server:
   8ac6a3f45215de5a015215dfb3ea06d6
Pools unsuccessfully removed at the server:
   8ac6a3f45215de5a015215dfb790073a
Serial numbers successfully removed at the server:
   8623316578571674764
   5716740667283576794
2 local certificates have been deleted.

Comment 12 errata-xmlrpc 2016-05-10 20:38:41 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://rhn.redhat.com/errata/RHBA-2016-0797.html