Description of problem: Command "oo-idler-stats --validate" shown all app type as unknown. Version-Release number of selected component (if applicable): devenv_3405 How reproducible: always Steps to Reproduce: 1.create some apps. 2.ssh into instance and run command "oo-idler-stats --validate" 3.check the output. Actual results: All app type shown unknown as below: # oo-idler-stats --validate Validation for uid 504 (fef8a12adc7b11e2ba3a22000a893e2f): Last updated: Jun 23 2013 (0 days ago) app5 (unknown) seems okay. Validation for uid 502 (248678121169238628499456): Last updated: Jun 23 2013 (0 days ago) app3 (unknown) seems okay. Validation for uid 503 (51c7b9351d4f810a34000002): Last updated: Jun 23 2013 (0 days ago) app4 (unknown) seems okay. Validation for uid 501 (51c7b8f81d4f810a34000001): Last updated: Jun 23 2013 (0 days ago) app1 (unknown) seems okay. 4 running, 0 idled, 0 half-idled for a total 4 of 4 (100.00 %) Expected results: Should show the correct app type. Additional info: It seems that get_app_type method definition is incorrect.
There is also another minor issue (or typo) in the script oo-idler-state in the validate definition. When run the oo-idler-state --validate with git/ dir missing. 155 # Is there a /git directory? 156 if not os.path.isdir(app_path+"/git"): 157 return "Path /var/openshift/%s/git not found." % uuid ^^^^^^^^^^ Should be /var/lib/openshift here The issue is too minor to report a bug separately... Please fix the output incidentally.
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/e218a116ff01b1f8065dd95dd8cc7e63401c2e9e <oo-idler-stats> Bug 977293 - Fix get_app_type for v2 carts https://bugzilla.redhat.com/show_bug.cgi?id=977293 get_app_type was trying to match against v1 cartridge paths, updated to test for correct v2 paths.
Verified on devenv_3572. # oo-idler-stats --validate Validation for uid 502 (756336227430956351356928): Last updated: Jul 29 2013 (0 days ago) app2 (jbossews) seems okay. Validation for uid 501 (8c3b7c6af81011e2b09122000ab30e1f): Last updated: Jul 29 2013 (0 days ago) app1 (php) seems okay. 2 running, 0 idled, 0 half-idled for a total 2 of 2 (100.00 %) And problem in comment #1 also fixed. def validate(uuid): ''' given a user's uuid, verify an app exists. ''' app_path = "/var/lib/openshift/%s" % uuid # Is there a /git directory? if not os.path.isdir(app_path+"/git"): return "Path %s/git not found." % app_path # Is there something inside the /git directory? dirs = os.listdir(app_path+"/git") if len(dirs) == 0: return "Path %s/git is empty." % app_path