Bug 1120825 - Domain env variables not set when running cartridge install/setup scripts
Summary: Domain env variables not set when running cartridge install/setup scripts
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 2.1.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Brenton Leanhardt
QA Contact: libra bugs
Depends On: 1120413
Blocks: 1109058
TreeView+ depends on / blocked
Reported: 2014-07-17 19:27 UTC by Brenton Leanhardt
Modified: 2014-08-26 13:52 UTC (History)
9 users (show)

Fixed In Version: rubygem-openshift-origin-controller-
Doc Type: Bug Fix
Doc Text:
Previously, domain environment variables were not set when running cartridge install and setup scripts. This was due to a bug in the broker's Application model object. This bug fix updates the Application model, and environment variables are now correctly set before running the install and setup scripts.
Clone Of: 1120413
Last Closed: 2014-08-26 13:52:49 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1095 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.1.5 bug fix and enhancement update 2014-08-26 17:51:34 UTC

Description Brenton Leanhardt 2014-07-17 19:27:02 UTC
+++ This bug was initially created as a clone of Bug #1120413 +++

Description of problem:
Domain environment variables are not available to cartridge install/setup scripts.

The UpdateAppConfigOp (which sets domain env vars) is running after the AddCompOp (which runs the install/setup scripts).

The issue appears to be that UpdateAppConfigOp should be in the gear_id_preqreqs op list, and it is not.

Actual results:
domain env vars are not set when the install script is running

Expected results:
domain env vars should be set when the install script is running

--- Additional comment from Derek Carr on 2014-07-17 15:03:23 EDT ---

Fixed in PR:

Comment 2 Brenton Leanhardt 2014-08-01 13:11:16 UTC
Upstream commit:

commit 91160713f81417f710025eb6888a6c97e5704b05
Author: derekwaynecarr <decarr@redhat.com>
Date:   Thu Jul 17 14:59:06 2014 -0400

    Ensure domain environment variables are passed to cartridge install scripts

Comment 3 Ben Parees 2014-08-01 19:11:20 UTC
Brenton, this has become urgent for the QE team, can we get it into a puddle soon?


Comment 4 Brenton Leanhardt 2014-08-01 19:18:49 UTC
I'm testing a puddle right now.  Should be read today.

Comment 7 xjia 2014-08-04 06:17:27 UTC

1. Create a fuse app named fuse01
2. Create a second app named fuse02, at the mean time monitor application collection in mongodb 
> db.applications.findOne({"canonical_name" : "fuse02"})
	"_id" : ObjectId("53df246e41312e8571000065"),
	"pending_op_groups" : [
			"pending_ops" : [
					"_id" : ObjectId("53df246e41312e857100006d"),
					"state" : "init",
					"retry_count" : 0,
					"_type" : "UpdateAppConfigOp",
					"add_keys_attrs" : [ ],
					"remove_keys_attrs" : [ ],
					"add_env_vars" : [
							"value" : "fuse01-xuan.fuse.com:44937",
							"component_id" : ObjectId("53df223741312e857100002c")
							"value" : "M4ngAIqPjhma",
							"component_id" : ObjectId("53df223741312e857100002c")
					"remove_env_vars" : [ ],
					"config" : {
						"auto_deploy" : true,
						"deployment_branch" : "master",
						"keep_deployments" : 1,
						"deployment_type" : "git"
					"gear_id" : "53df246e41312e8571000065",
					"prereq" : [
					"recalculate_sshkeys" : true,
					"created_at" : ISODate("2014-08-04T06:13:02.961Z")

Comment 9 errata-xmlrpc 2014-08-26 13:52:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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