slave's PATH change not picked up...

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

slave's PATH change not picked up...

Lidia Marchioni
Hi all

I have a solaris slave, where I added /usr/sfw/bin to PATH in
/etc/profile on the slave system.  I login to this system as user X via
ssh and the new addition is in the PATH.  Hudson also logs in to this
slave via ssh as user X.  However, hudson does not list /usr/sfw/bin in
the PATH...  I've restarted this slave but the PATH definition seems
stale.  Any ideas?  This is hudson 1.342.

Thanks
Lidia

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: slave's PATH change not picked up...

Sami Tikka
Hudson is prolly not logging in to start an interactive shell.

Try what the environment looks like if you run:

ssh slavehost env

It might be simpler for you to set the PATH using Hudson's slave  
configuration -> environment variables

-- Sami

Lidia Marchioni <[hidden email]> kirjoitti 17.2.2010 kello 2.08:

> Hi all
>
> I have a solaris slave, where I added /usr/sfw/bin to PATH in /etc/
> profile on the slave system.  I login to this system as user X via  
> ssh and the new addition is in the PATH.  Hudson also logs in to  
> this slave via ssh as user X.  However, hudson does not list /usr/
> sfw/bin in the PATH...  I've restarted this slave but the PATH  
> definition seems stale.  Any ideas?  This is hudson 1.342.
>
> Thanks
> Lidia
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Re: slave's PATH change not picked up...

mezlight
Is Hudson started as user X?

-----Original Message-----
From: Sami Tikka [mailto:[hidden email]]
Sent: Wednesday, February 17, 2010 2:21 AM
To: [hidden email]
Subject: Re: slave's PATH change not picked up...

Hudson is prolly not logging in to start an interactive shell.

Try what the environment looks like if you run:

ssh slavehost env

It might be simpler for you to set the PATH using Hudson's slave  
configuration -> environment variables

-- Sami

Lidia Marchioni <[hidden email]> kirjoitti 17.2.2010 kello 2.08:

> Hi all
>
> I have a solaris slave, where I added /usr/sfw/bin to PATH in /etc/
> profile on the slave system.  I login to this system as user X via  
> ssh and the new addition is in the PATH.  Hudson also logs in to  
> this slave via ssh as user X.  However, hudson does not list /usr/
> sfw/bin in the PATH...  I've restarted this slave but the PATH  
> definition seems stale.  Any ideas?  This is hudson 1.342.
>
> Thanks
> Lidia
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: slave's PATH change not picked up...

Kirill Evstigneev @spera
In reply to this post by Sami Tikka
Hudson overrides PATH for slaves - to add JVM for example.  So setting PATH environment variable in the slave configuration won't have the effect.

Sami Tikka wrote
Hudson is prolly not logging in to start an interactive shell.

Try what the environment looks like if you run:

ssh slavehost env

It might be simpler for you to set the PATH using Hudson's slave  
configuration -> environment variables

-- Sami
Reply | Threaded
Open this post in threaded view
|

Re: slave's PATH change not picked up...

Kohsuke Kawaguchi-2
Kirill Evstigneev @spera wrote:
> Hudson overrides PATH for slaves - to add JVM for example.  So setting PATH
> environment variable in the slave configuration won't have the effect.

This is incorrect. It's true that Hudson sometimes modify PATH when
forking a process during a build, but it only adds a new entry. It never
removes anything from PATH.

--
Kohsuke Kawaguchi
Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: slave's PATH change not picked up...

Kirill Evstigneev @spera
Sorry for being not clear enough.
One of our Hudson servers uses a Windows slave. That slave has distinct JDK location - it is configured in the slave configuration page.
Then the slave runs a tied job with a simple Windows batch script:

    set

Snippet of the build output:

    Started by user anonymous
    Building remotely on ...
   
    c:\hudson\slave\workspace\Sandbox>set
    ...
    JAVA_HOME=C:\Program Files\Java\jdk1.6.0_10
    ...
    Path=C:\Program Files\Java\jdk1.6.0_10/bin;C:\Program Files\Java\jre6\bin;C:\oracle\ora92\bin;C:\Program Files\Java\jdk1.6.0_10\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Perforce;C:\opt\Groovy\Groovy-1.6.3\bin;C:\opt\apache-ant-1.7.1\bin;C:\opt\GnuWin32\bin;"C:\Program Files\Java\jdk1.6.0_10\jre\bin"
    ...

The first (C:\Program Files\Java\jdk1.6.0_10/bin) and last ("C:\Program Files\Java\jdk1.6.0_10\jre\bin") elements are added to Path by Hudson. And they are incorrect ("/" instead of "\", quoting). I tried to override Path by Path environment variable in the slave configuration, but it was unsuccessful (these two elements were added too).


Kohsuke Kawaguchi-2 wrote
Kirill Evstigneev @spera wrote:
> Hudson overrides PATH for slaves - to add JVM for example.  So setting PATH
> environment variable in the slave configuration won't have the effect.

This is incorrect. It's true that Hudson sometimes modify PATH when
forking a process during a build, but it only adds a new entry. It never
removes anything from PATH.

--
Kohsuke Kawaguchi
Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/
Reply | Threaded
Open this post in threaded view
|

Re: slave's PATH change not picked up...

Lidia Marchioni
In reply to this post by Sami Tikka
Hello Sami

You were right.  The ssh itself did not load the correct PATH (I
couldn't see it via putty).  It turns out ssh does not read
/etc/profile, but it does read user's .bashrc.  Go figure...

Thanks
Lidia


Sami Tikka wrote:

> Hudson is prolly not logging in to start an interactive shell.
>
> Try what the environment looks like if you run:
>
> ssh slavehost env
>
> It might be simpler for you to set the PATH using Hudson's slave
> configuration -> environment variables
>
> -- Sami
>
> Lidia Marchioni <[hidden email]> kirjoitti 17.2.2010 kello 2.08:
>
>> Hi all
>>
>> I have a solaris slave, where I added /usr/sfw/bin to PATH in
>> /etc/profile on the slave system.  I login to this system as user X
>> via ssh and the new addition is in the PATH.  Hudson also logs in to
>> this slave via ssh as user X.  However, hudson does not list
>> /usr/sfw/bin in the PATH...  I've restarted this slave but the PATH
>> definition seems stale.  Any ideas?  This is hudson 1.342.
>>
>> Thanks
>> Lidia
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]