Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1120825 - Domain env variables not set when running cartridge install/setup scripts
Domain env variables not set when running cartridge install/setup scripts
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Pod (Show other bugs)
2.1.0
Unspecified Unspecified
high Severity medium
: ---
: ---
Assigned To: Brenton Leanhardt
libra bugs
: Upstream
Depends On: 1120413
Blocks: 1109058
  Show dependency treegraph
 
Reported: 2014-07-17 15:27 EDT by Brenton Leanhardt
Modified: 2014-08-26 09:52 EDT (History)
9 users (show)

See Also:
Fixed In Version: rubygem-openshift-origin-controller-1.23.10.8-1.el6op
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.
Story Points: ---
Clone Of: 1120413
Environment:
Last Closed: 2014-08-26 09:52:49 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1095 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.1.5 bug fix and enhancement update 2014-08-26 13:51:34 EDT

  None (edit)
Description Brenton Leanhardt 2014-07-17 15:27:02 EDT
+++ 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:
https://github.com/openshift/origin-server/pull/5613
Comment 2 Brenton Leanhardt 2014-08-01 09:11:16 EDT
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 15:11:20 EDT
Brenton, this has become urgent for the QE team, can we get it into a puddle soon?

Thanks.
Comment 4 Brenton Leanhardt 2014-08-01 15:18:49 EDT
I'm testing a puddle right now.  Should be read today.
Comment 7 xjia 2014-08-04 02:17:27 EDT
Version:
2.1.z/2014-08-01.1/
rubygem-openshift-origin-controller-1.23.10.8-1.el6op.noarch

Verify:
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" : [
						{
							"key" : "OPENSHIFT_FUSE_DOMAIN_ZOOKEEPER_URL",
							"value" : "fuse01-xuan.fuse.com:44937",
							"component_id" : ObjectId("53df223741312e857100002c")
						},
						{
							"key" : "OPENSHIFT_FUSE_DOMAIN_ZOOKEEPER_PASSWORD",
							"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" : [
						"53df246e41312e857100006c"
					],
					"recalculate_sshkeys" : true,
					"created_at" : ISODate("2014-08-04T06:13:02.961Z")
				},
Comment 9 errata-xmlrpc 2014-08-26 09:52:49 EDT
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.

http://rhn.redhat.com/errata/RHBA-2014-1095.html

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