Process environment properly in control-node scale script

Bug #1597942 reported by Ananth Suryanarayana
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.0
Fix Committed
Low
Ananth Suryanarayana
Trunk
Fix Committed
Low
Ananth Suryanarayana

Bug Description

diff --git a/serial_scripts/control_node_scaling/commands.py b/serial_scripts/control_no
index c280e0e..7dd932b 100755
--- a/serial_scripts/control_node_scaling/commands.py
+++ b/serial_scripts/control_node_scaling/commands.py
@@ -18,8 +18,8 @@ class Command(object):
         self.fstderr = tempfile.NamedTemporaryFile(mode='w',
                                                    prefix='CMD_ERR_')
         self.env = copy.deepcopy(os.environ)
- if not env:
- self.env.update({i.split('=')[0]:i.split('=')[1] for i in e.split()})
+ if env:
+ self.env.update({i.split('=')[0]:i.split('=')[1] for i in env.split()})

     def start(self):
         """Launches a local command as background process."""

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/21607
Submitter: Ananth Suryanarayana (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.0

Review in progress for https://review.opencontrail.org/21608
Submitter: Ananth Suryanarayana (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/21607
Committed: http://github.org/Juniper/contrail-test/commit/e228a17c5c949e1357a4f979865d967ffd31b967
Submitter: Zuul
Branch: master

commit e228a17c5c949e1357a4f979865d967ffd31b967
Author: Ananth Suryanarayana <email address hidden>
Date: Thu Jun 30 15:54:23 2016 -0700

Update environment correct in Commands constructor

Change-Id: I4bfecb8b87a3f69570946ef210bf9bf2507f7b7b
Closes-Bug: #1597942

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/21608
Committed: http://github.org/Juniper/contrail-test/commit/a719d67c80787c4ef5166a344879c199b7330b27
Submitter: Zuul
Branch: R3.0

commit a719d67c80787c4ef5166a344879c199b7330b27
Author: Ananth Suryanarayana <email address hidden>
Date: Thu Jun 30 15:54:23 2016 -0700

Update environment correct in Commands constructor

Change-Id: I4bfecb8b87a3f69570946ef210bf9bf2507f7b7b
Closes-Bug: #1597942

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.