Bug 1079748 - rhc-fix-missing-frontend isn't fixing a problem found by oo-accept-node
Summary: rhc-fix-missing-frontend isn't fixing a problem found by oo-accept-node
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Rajat Chopra
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-23 16:59 UTC by Thomas Wiest
Modified: 2015-05-15 00:27 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-04-24 21:36:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Script to fix primary cartridge env variable of a gear (2.68 KB, application/x-ruby)
2014-03-25 06:51 UTC, Rajat Chopra
no flags Details
Script to fix primary cartridge env variable of a gear. Revised. (2.73 KB, application/x-ruby)
2014-03-26 21:47 UTC, Rajat Chopra
no flags Details

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).


Note You need to log in before you can comment on or make changes to this bug.