Bug 1120413 - 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 Online
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Derek Carr
QA Contact: libra bugs
Depends On:
Blocks: 1109058 1118703 1120825
TreeView+ depends on / blocked
Reported: 2014-07-16 21:13 UTC by Ben Parees
Modified: 2015-05-15 00:29 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1120825 (view as bug list)
Last Closed: 2014-10-10 00:48:53 UTC

Attachments (Terms of Use)

Description Ben Parees 2014-07-16 21:13:19 UTC
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

Comment 1 Derek Carr 2014-07-17 19:03:23 UTC
Fixed in PR:

Comment 2 Jianwei Hou 2014-07-21 03:00:30 UTC
Verified on devenv_4988

1. Create one jenkins app and create one fuse app.
2. Create a second fuse app, and query the pending_op_groups from mongo shell, the domain env vars to add are listed in UpdateAppConfigOp:
          "_id": ObjectId("53ccb5ce5b41b4aad2000063"),
          "_type": "UpdateAppConfigOp",
          "add_env_vars": [
              "component_id": ObjectId("53ccaf5e5b41b4aad2000032"),
              "key": "JENKINS_URL",
              "value": "https://jks-jhou.dev.rhcloud.com/"
              "component_id": ObjectId("53ccaf5e5b41b4aad2000032"),
              "key": "JENKINS_USERNAME",
              "value": "system_builder"
              "component_id": ObjectId("53ccaf5e5b41b4aad2000032"),
              "key": "JENKINS_PASSWORD",
              "value": "5Z1ascjBkPg2"
              "component_id": ObjectId("53ccb5815b41b4aad200003f"),
              "value": "fuse-jhou.dev.rhcloud.com:38037"
              "component_id": ObjectId("53ccb5815b41b4aad200003f"),
              "value": "nUfRnvnghPkN"
          "add_keys_attrs": [ ],
          "config": {
            "auto_deploy": true,
            "deployment_branch": "master",
            "deployment_type": "git",
            "keep_deployments": 1
          "created_at": ISODate("2014-07-21T06:40:14.715Z"),
          "gear_id": "53ccb5ce5b41b4aad200005b",
          "prereq": [
          "recalculate_sshkeys": true,
          "remove_env_vars": [ ],
          "remove_keys_attrs": [ ],
          "retry_count": 0,
          "state": "init"

The op id '53ccb5ce5b41b4aad2000063' is referenced in the AddCompOp
          "_id": ObjectId("53ccb5ce5b41b4aad2000064"),
          "_type": "AddCompOp",
          "comp_spec": {
            "cart": "fusesource-fuse-1.0.0",
            "cart_id": "53ccb5ce5b41b4aad200005a",
            "comp": "fusesource-fuse-1.0.0"
          "created_at": ISODate("2014-07-21T06:40:14.716Z"),
          "gear_id": "53ccb5ce5b41b4aad200005b",
          "init_git_url": null,
          "prereq": [
          "retry_count": 0,
          "skip_rollback": true,
          "state": "init"

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