aspnet / Wave

Cross-platform tools for running perf and stress tests
Other
21 stars 17 forks source link

Linux system enviornmental not picked up #40

Closed shhsu closed 8 years ago

shhsu commented 8 years ago

It seems that system environmental variable set up in /etc/environment (or /etc/init.d, or /etc/profile) are not picked up when WAVE execute remote shell script.

Changing /etc/sudoer to

Defaults        !env_reset

Does not fix the issue

This is breaking linux music store scenario because of this change

https://github.com/aspnet/MusicStore/commit/f5eda3da44c4262a0c057aed2f0efe9d0e3cd321

BrennanConroy commented 8 years ago

Is Wave run through TeamCity or some other thing, cause TeamCity you can set the variable there and it should work? Have you tried setting the variable in ~/.bash_profile or ~/.bashrc

shhsu commented 8 years ago

Thanks

This does not seem to work either. I edited the .bashrc and .profile. Still not seeing the variable set.

shhsu commented 8 years ago

I've noticed these are the environmental variable that is there when the task is run

UPSTART_INSTANCE=
HOME=/home/asplab
runlevel=2
UPSTART_JOB=rc
TERM=linux
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin
RUNLEVEL=2
PREVLEVEL=N
NODE_PATH=:/usr/local/lib/node_modules
UPSTART_EVENTS=runlevel
PWD=/
previous=N
NODE_RED_HOME=/home/asplab/git/aspnet/Wave/node_modules/node-red

I tried to set the environment variable in /etc/init/rc.conf, did not work either

shhsu commented 8 years ago

Problem solve by using SetEnv command https://github.com/aspnet/Wave/tree/master/client#setting-environment-variables