Commits pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/65f72bd7c6b022a6211c80670c2b40934f0802ec admin_helper.rb: check for nil plans Bug 1279584 BZ https://bugzilla.redhat.com/show_bug.cgi?id=1279584 In situations where get_plans returns nil when trying to determine user capabilities, attempting to populate_user_hash in oo-admin-chk and oo-admin-repair would result in the script crashing due to an undefined method exception. The script will now check if get_plans comes back nil and will drop back to using the default user capabilities, as well as displaying a warning that plans will not be used. This warning will not cause oo-admin-chk or oo-admin-repair to fail. https://github.com/openshift/origin-server/commit/cf252f41f6a5ecd58a178a2f1b8956ba78969043 Merge pull request #6348 from thrasher-redhat/bug1279584 Merged by openshift-bot
QE, Can we test that oo-admin-chk will no longer fail when a user has a plan_id that has not been defined by the billing plugin's get_plans? 1. Create a user with a plan_id of 'foo' 2. Run oo-admin-chk oo-admin-chk should not fail, and should print "Warning: At least one user has a plan id defined, but no plans could be found. Plan-defined user capabilities will not be considered." Puddle:http://etherpad.corp.redhat.com/puddle-2-2-2016-02-19 Thank you
Verified this bug with rubygem-openshift-origin-controller-1.38.5.1-1.el6op.noarch, and PASS. # oo-admin-ctl-user -l jialiu --setplan na # oo-admin-repair --consumed-gears Started at: 2016-02-29 07:35:24 UTC Warning: At least one user has a plan id defined, but no plans could be found. Plan-defined user capabilities will not be considered. Finished at: 2016-02-29 07:35:24 UTC Total time: 0.014s SUCCESS # oo-admin-chk Started at: 2016-02-29 07:37:05 UTC Warning: At least one user has a plan id defined, but no plans could be found. Plan-defined user capabilities will not be considered. User data populated in 0 seconds Domain data populated in 0 seconds District data populated in 0 seconds Total gears found in mongo: 2 Application data populated in 0 seconds Usage data populated in 0 seconds Fetched all gears in 20 seconds Total gears found on the nodes: 2 Total nodes that responded: 1 Checked application gears on nodes in 0 seconds Checked application gears on nodes (reverse match) in 0 seconds Finished at: 2016-02-29 07:37:25 UTC Total time: 20.554s SUCCESS
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/RHSA-2016-0489.html