Bug 789079

Summary: Inconsistent state when subscriptions modified on server side
Product: Red Hat Enterprise Linux 7 Reporter: Jeff Weiss <jweiss>
Component: subscription-managerAssignee: William Poteat <wpoteat>
Status: CLOSED NOTABUG QA Contact: Entitlement Bugs <entitlement-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: dajohnso, jsefler, wpoteat
Target Milestone: beta   
Target Release: 7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-29 20:23:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 863175    

Description Jeff Weiss 2012-02-09 17:43:52 UTC
Description of problem:
some rhsm commands get the information from the server (up to date), some rely on local data (which could be out of date), so one command's result is not consistent with another.

Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
1. Register a system to katello
2. Suscribe the system to a product in the katello UI
3. sm refresh (now subscribed)
4. Unsubscribe in the katello UI
5. sm list --available (sm goes to server and sees it's available now)
6. sm list --consumed (sm only looks locally, shows subscription still consumed)

Actual results:
conflicting data shown

Expected results:
sm should *always* ask the server unless otherwise specified (say, via a command line switch to use local data only).  It's way too easy to get into an inconsistent state.  The same thing can happen if you unregister the system from the server side, and there's probably other ways to get inconsistent data.  

It's true the daemon would eventually sync things up, but that isn't good enough - sm should always show the right data when it's requested.

Additional info:

Comment 4 RHEL Program Management 2012-07-10 08:48:41 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 5 RHEL Program Management 2012-07-11 01:48:07 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 7 RHEL Program Management 2012-12-14 08:48:09 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 8 William Poteat 2013-01-29 20:23:51 UTC
subscription-manager refresh should be called to re-sync to the Candlepin server. It is too expensive to update the certs every time list --consumed or list --installed is called.