processutils.execute() does not allow setting environment variables

Bug #1304284 reported by Roman Prykhodchenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo-incubator
Fix Released
Medium
Roman Prykhodchenko

Bug Description

Setting environment variables is essential for various kind of tasks. The most recent one that is required by the Ironic project is setting the LANG variable to be able to rely to the process output.

subprocess.Popen supports passing environment variables so this is quite easy to do.

Tags: processutils
description: updated
Changed in oslo:
assignee: nobody → Roman Prykhodchenko (romcheg)
Changed in oslo:
importance: Undecided → Medium
status: New → Triaged
summary: - processutils.execute() does not allow setting envitomnent variables
+ processutils.execute() does not allow setting environment variables
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo-incubator (master)

Fix proposed to branch: master
Review: https://review.openstack.org/86021

Changed in oslo:
status: Triaged → In Progress
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to oslo-incubator (master)

Reviewed: https://review.openstack.org/86021
Committed: https://git.openstack.org/cgit/openstack/oslo-incubator/commit/?id=51778f9eef2dd88a949679f0280f69ee99fd5567
Submitter: Jenkins
Branch: master

commit 51778f9eef2dd88a949679f0280f69ee99fd5567
Author: Roman Prykhodchenko <email address hidden>
Date: Tue Apr 8 14:37:44 2014 +0300

    Allow passing environment variables to execute()

    Some of the projects might need to pass environment variables
    to the processes they launch. For instance, if something needs
    to rely on the process' output it should be able to pass LANG="C"
    in order to set the correct localization.

    This patch adds a env_variables parameter to processutils.execute()
    which allows to pass news variables or replace the value of the existing
    ones for the process.

    Closes-bug: #1304284
    Change-Id: If801e11391bf7cf66518533443c3b29af53653e5

Changed in oslo:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in oslo:
milestone: none → juno-1
status: Fix Committed → Fix Released
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.