Bug 1079748

Summary: rhc-fix-missing-frontend isn't fixing a problem found by oo-accept-node
Product: OpenShift Online Reporter: Thomas Wiest <twiest>
Component: PodAssignee: Rajat Chopra <rchopra>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.xCC: jhou
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-04-24 21:36:33 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:
Attachments:
Description Flags
Script to fix primary cartridge env variable of a gear
none
Script to fix primary cartridge env variable of a gear. Revised. none

Description Thomas Wiest 2014-03-23 16:59:07 UTC
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

Comment 1 Jhon Honce 2014-03-24 16:25:24 UTC
[root ~]# cat /var/lib/openshift/531e6e274382ec4049000576/.env/OPENSHIFT_PRIMARY_CARTRIDGE_DIR
 
/var/lib/openshift/531e6e274382ec4049000576/metrics/

Comment 2 Rajat Chopra 2014-03-25 06:51:21 UTC
Created attachment 878316 [details]
Script to fix primary cartridge env variable of a gear

Usage : fix_primary_cart_on_gear.rb <uuid>

Comment 3 Rajat Chopra 2014-03-25 06:52:55 UTC
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

Comment 4 Jianwei Hou 2014-03-26 11:32:40 UTC
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/

Comment 5 Rajat Chopra 2014-03-26 21:47:09 UTC
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).