Description of problem: In PROD we're seeing a few of these: FAIL: Gear has a web framework cartridge but no Apache configuration: 531e6e274382ec4049000576 FAIL: Gear has a websocket framework cartridge but no websocket configuration: 531e6e274382ec4049000576 I use this command to try to clean these up: # /usr/bin/rhc-fix-missing-frontend -b 531e6e274382ec4049000576 Rebuilding the frontend for: 531e6e274382ec4049000576 Fixing gear: 531e6e274382ec4049000576 ... Done However, when I run oo-accept-node again, the same failures listed above are there. I don't see any errors from rhc-fix-missing-frontend, so I'm not really sure why it's not working. Version-Release number of selected component (if applicable): rhc-node-1.21.2-1.el6oso.x86_64 How reproducible: Very, once in this state Steps to Reproduce: 1. Unknown, found in PROD Actual results: /usr/bin/rhc-fix-missing-frontend isn't fixing the problem Expected results: It should fix the problem
[root ~]# cat /var/lib/openshift/531e6e274382ec4049000576/.env/OPENSHIFT_PRIMARY_CARTRIDGE_DIR /var/lib/openshift/531e6e274382ec4049000576/metrics/
Created attachment 878316 [details] Script to fix primary cartridge env variable of a gear Usage : fix_primary_cart_on_gear.rb <uuid>
Existing gears can be fixed with attached script. No new gears should have this problem as part of the fix done for bug#1076720 Pull request - https://github.com/openshift/origin-server/pull/4995
Verified with the attached script 1. Create a diy application with metrics, updated the OPENSHIFT_PRIMARY_CARTRIDGE_DIR with value /var/lib/openshift/5332b8f72b4e5c251600001b/metrics/ 2. ruby fix_primary_cart_on_gear.rb --uuid 5332b8f72b4e5c251600001b For gear 5332b8f72b4e5c251600001b: web_framework found on path /var/lib/openshift/5332b8f72b4e5c251600001b/diy/ expected, found /var/lib/openshift/5332b8f72b4e5c251600001b/metrics/ Fixed. [root@ip-10-230-138-45 .env]# cat OPENSHIFT_PRIMARY_CARTRIDGE_DIR /var/lib/openshift/5332b8f72b4e5c251600001b/diy/
Created attachment 879235 [details] Script to fix primary cartridge env variable of a gear. Revised. Fix utility to repair env var OPENSHIFT_PRIMARY_CARTRIDGE_DIR for a given gear uuid Usage : ./fix_primary_cart_on_gear.rb --uuid <uuid of gear to fix> New version can also handle cases where a stray cartridge directory exists whose manifest defined cartridge name is not the same as the directory name (a vestige of v1->v2 migration).