Created attachment 483255 [details] Proposed Patch to add Flex entitlement within spacewalk-report entitlements Description of problem: During the spec and implementation of Flex entitlements for the 5.4.0 release we mistakenly overlooked enhancing the spacewalk-report command line tool to also include Flex entitlement usage/availability. This bugzilla is to capture the need to add this piece of 'polish' to the feature we released in Satellite 5.4.0. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: [root@rlx-1-18 ~]# spacewalk-report --list-fields entitlements organization_id organization entitlement_type entitlement used total [root@rlx-1-18 ~]# Expected results: We include a 'flex_used' and 'flex_total' columns to the report [root@rlx-1-18 ~]# spacewalk-report --list-fields entitlements organization_id organization entitlement_type entitlement used total flex_used flex_total [root@rlx-1-18 ~]# Additional info: Expect it to look similar too: [root@rlx-1-18 ~]# spacewalk-report entitlements | grep -i "core" | grep -v "0,0,0,0" 1,Red Hat Unsupported Cert,channel,Red Hat Enterprise Linux (core server),4,2204,1,60 1,Red Hat Unsupported Cert,channel,Red Hat Enterprise Linux Desktop (core client),0,2010,0,0 2,Cliff Test 1,channel,Red Hat Enterprise Linux (core server),0,200,0,50 24,david-test,channel,Red Hat Enterprise Linux (core server),0,100,0,0 [root@rlx-1-18 ~]# spacewalk-report entitlements | head -n 1 organization_id,organization,entitlement_type,entitlement,used,total,flex_used,flex_total [root@rlx-1-18 ~]#
Committed to Spacewalk master, cad979c0a66959b87ca7863250bc101b0013c2ee. Tagged in Spacewalk as spacewalk-reports-1.4.4-1.
Cherry picked to SATELLITE-5.4, e58ce31f24da3a32230eb4b6b749ebe95ff115e2. Tagged as spacewalk-reports-1.2.2-3.
Taking QA contact.
Please, does the feature has a spec? I can see a lot of lines without value for total and flex_total columns. What is the meaning of empty string? Does it mean zero or unlimited? spacewalk-report entitlements | wc -l 1396 spacewalk-report entitlements | grep ,,0,$ | wc -l 726
The 'spec' is comment #0 and it's attachment. For : flex_used,flex_total For Channel Entitlements these should always be: - either '0' - for no entitlements assigned/used - or a value greater than 0 for something assigned or being used (depending if it is flex_used vs flex_total). For System Entitlements, which has no concept of Flex entitlements, these will be blank or null - ',,' Custom channels, typically get unlimited entitlements for regular entitlements but have no concept of flex, as such - there is not flex associations for those channels and those channels should always return '0,0' for Flex used and total. Of course, I cannot account for 'unknown' bugs in schema/code for population of those tables, but the above is my expected results/behavior. Hope this helps. Cliff
Changing to Verified. Testing procedure: - Automated test (up to the comment 7) - Compared the new and the old output to ensure that we don't lost anything (on a Satellite instance with numerous organizations and channels) Verified against: spacewalk-reports-1.2.2-3.el5sat
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHEA-2011-0396.html