Bug 997342

Summary: oo-admin-chk will check the queued master plan instead of current plan if a queued plan change occurs
Product: OpenShift Online Reporter: Meng Bo <bmeng>
Component: PodAssignee: Ravi Sankar <rpenta>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: jhou, xtian
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-17 13:27:57 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:

Description Meng Bo 2013-08-15 08:10:08 UTC
Description of problem:
Change plan in Aria from free to silver with queued plan change, check the plan via oo-admin-chk -l1, it will fail with confusing output.

[root@ip-10-166-60-44 ~]# oo-admin-chk -l1
Started at: 2013-08-15 03:49:24 -0400
Time to fetch mongo data: 0.025s
Total gears found in mongo: 0
Time to get all gears from nodes: 20.536s
Total gears found on the nodes: 0
Total nodes that responded : 0
Time to get all sshkeys for all gears from nodes: 20.073s
Total gears found on the nodes: 0
Total nodes that responded : 1
Check failed.
User '520c7c77e8cc64b232000001' has plan_id 'free' in mongo but has plan_id 'free' in Aria billing provider.
Please refer to the oo-admin-repair tool to resolve some of these inconsistencies.
Total time: 43.025s
Finished at: 2013-08-15 03:50:07 -0400


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

How reproducible:
always

Steps to Reproduce:
1.Create user and make the user has record in both mongodb and Aria
The plan for both mongodb and Aria should be "free"

2.Change the plan from Aria with Queue request
Change the master plan with "Assign on Anniversary" method
For now, the plan in Aria should still be free, and will be changed to silver in a few days.

3.Run oo-admin-chk -l1 on instance

Actual results:
Failed with confusing output:

User '520c7c77e8cc64b232000001' has plan_id 'free' in mongo but has plan_id 'free' in Aria billing provider.

It means the oo-admin-chk read the queued plan from Aria and show the current plan to output.


Expected results:
It should check current plan instead of queued plan.


Additional info:

Comment 1 Ravi Sankar 2013-08-19 18:52:00 UTC
Invalid usecase in step-2.
In the current model, plan upgrade is always done immediately and only plan downgrade is queued.

Comment 3 Meng Bo 2013-09-23 07:09:03 UTC
According to comment#1, use the same way to reproduce the issue when queuing downgrade plan, the message still confusing.


# oo-admin-chk -l1
Started at: 2013-09-23 03:02:39 -0400
<--snip-->

Check failed.
User '523fe605b65bec55ec0000dc' has plan_id 'silver' in mongo but has plan_id 'silver' in Aria billing provider.

<--snip-->
Total time: 45.029s
Finished at: 2013-09-23 03:03:24 -0400



Steps to Reproduce:
1.Create user and make the user has record in both mongodb and Aria
Make the user has "silver" plan in both mongo and aria.

2.Change the plan from Aria with Queue request
Change the master plan with "Assign on Anniversary" method
For now, the plan in Aria should still be silver, and will be changed to free in a few days.

3.Run oo-admin-chk -l1 on instance

Comment 4 Ravi Sankar 2013-09-26 22:52:52 UTC
Fixed in https://github.com/openshift/li/pull/1932

Comment 5 openshift-github-bot 2013-09-27 04:37:20 UTC
Commit pushed to master at https://github.com/openshift/li

https://github.com/openshift/li/commit/2b11de382c4cb8bc7c39da07a1d8d7d4f8669c94
Bug 997342 - show appropriate error message in oo-admin-chk

Comment 6 Meng Bo 2013-09-30 02:27:51 UTC
Checked on devenv_3844, the error message looks more meaningful now.

[root@ip-10-164-113-141 ~]# oo-admin-chk -l1
<>
User '5248de825fb3273b45000001' has plan_id 'silver' in mongo but has plan_id 'free' in Aria billing provider.
<>
Finished at: 2013-09-29 22:25:30 -0400