Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass node-specific data into config-handler script #307

Open
phil-dileo opened this issue Apr 8, 2015 · 0 comments
Open

Pass node-specific data into config-handler script #307

phil-dileo opened this issue Apr 8, 2015 · 0 comments
Assignees
Milestone

Comments

@phil-dileo
Copy link
Contributor

This RFE is designed to provide the script with some node-specific information that might assist users craft their config-handlers. Right now we call the config-handler script like:

proc = subprocess.Popen(script, stdin=PIPE, stdout=PIPE, stderr=PIPE, shell=True)

The proposal is to create a dictionary with some other useful information that gets passed into the child process.

env_info = { 'NODE_IP': request.remote_addr, 'NODE_ID': node_id, 'CONFIG_PATH': filename } 

subprocess.Popen(script, stdin=PIPE, stdout=PIPE, stderr=PIPE, shell=True, env=env_info)

These variables are already present in the function and would require no extra digging.

@phil-dileo phil-dileo self-assigned this Apr 13, 2015
@phil-dileo phil-dileo added this to the Release 2.0 milestone Apr 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant