Bug 1067585

Summary: Unable to run second hook in Publishes in postgresql cartridge
Product: OpenShift Online Reporter: Michal Fojtik <mfojtik>
Component: PodAssignee: Abhishek Gupta <abhgupta>
Status: CLOSED NOTABUG QA Contact: libra bugs <libra-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.x   
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-02-20 18:08:40 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
irb.log none

Description Michal Fojtik 2014-02-20 16:46:17 UTC
Created attachment 865618 [details]
irb.log

Description of problem:

I'm trying to add second hook for postgresql (and other carts as well) to
advertise its LD_LIBRARY_PATH_ELEMENT to the head cartridge.

I have following code:

https://github.com/mfojtik/origin-server/commit/34397c6ddb8e98a2e524c559f4c7a6238c492b3e

The problem is that the 'publish-ld-library-path-info' script is not executed at all (I checked platform.log, there is no mention about that script there.)

I cleared the broker cache (oo-admin-broker-cache -c), restarted broker, restarted mcollective, but still no luck. 

Version-Release number of selected component (if applicable):

devenv

How reproducible:

Sync this GIT branch with devenv: https://github.com/mfojtik/origin-server/tree/card_31

Steps to Reproduce:
1. rhc app create pyapp -s python-3.3 postgresql-9.2
2. rhc ssh pyapp # -> the LD_LIBRARY_PATH does not include postgresql path element

Expected results:

The hook should be executed and the ENV variable available in the head gear.

Additional info:

@agoldste did some debugging and he found that even after clearing the cache, the broker still does not have the new hook in the cache:

irb(main):003:0> CartridgeCache.find_cartridge_by_base_name('postgresql')
.....
@components=[#<OpenShift::Component:0x00000007ab3978 @name="postgresql-9.2", @publishes=[#<OpenShift::Connector:0x00000007ab35b8 @name="publish-db-connection-info", @type="ENV:NET_TCP:db:connection-info", @required=false>], @subscribes=[], @scaling=
....

(see the attachment for complete log).