[erlang-questions] slave node working directory

34 views
Skip to first unread message

Zhemzhitsky Sergey

unread,
Oct 30, 2012, 4:16:08 AM10/30/12
to erlang-questions Questions

Hello erlangers,

 

Is it possible to specify a working directory for the slave node started with slave:start/3 ? Currently it seems to be a user home directory, but a I’d like to specify a different one.

 

 

Best Regards,

Sergey

 

_______________________________________________________

CONFIDENTIALITY NOTICE: This email and any files attached to it may be confidential. If you are not the intended recipient you are notified that using, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error please notify the sender and delete this email.

 

Zhemzhitsky Sergey

unread,
Oct 30, 2012, 5:15:52 AM10/30/12
to Alex Shneyderman, erlang-questions Questions
Hi Alex,

Thanks a lot. Unfortunately rpc:call does not work in my case as I have to start my slaves with a relative code search path specified with -pa option.

Regards,
Sergey

-----Original Message-----
From: Alex Shneyderman [mailto:a.shne...@gmail.com]
Sent: Tuesday, October 30, 2012 12:22 PM
To: Zhemzhitsky Sergey
Subject: Re: [erlang-questions] slave node working directory

rpc:call(slave_node,file,set_cwd,["/tmp"]).
> _______________________________________________
> erlang-questions mailing list
> erlang-q...@erlang.org
> http://erlang.org/mailman/listinfo/erlang-questions
>
_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

Lukas Larsson

unread,
Oct 30, 2012, 5:19:35 AM10/30/12
to Zhemzhitsky Sergey, erlang-questions Questions
Maybe passing: "-eval \"file:set_cwd(\"/tmp\")\"" as an Arg will do the trick?

On Tue, Oct 30, 2012 at 10:15 AM, Zhemzhitsky Sergey

Peter Lemenkov

unread,
Oct 30, 2012, 5:27:21 AM10/30/12
to Zhemzhitsky Sergey, erlang-questions Questions
2012/10/30 Zhemzhitsky Sergey <sergey_zh...@sberbank-cib.ru>:
> Hi Alex,
>
> Thanks a lot. Unfortunately rpc:call does not work in my case as I have to start my slaves with a relative code search path specified with -pa option.

I think this requirement should be satisfied outside the Erlang VM
itself. Setting up the environment parameters should be done by your
service management system.

For example systemd allows this (setting up working directory) as well
as setting many other necessary parameters right out of the box:

* https://github.com/lemenkov/erlpmd/blob/master/priv/erlpmd.service

--
With best regards, Peter Lemenkov.

Zhemzhitsky Sergey

unread,
Oct 30, 2012, 7:04:53 AM10/30/12
to Peter Lemenkov, Alex Shneyderman, erlang-questions Questions
Thanks,
Resolved it with an appropriate configuration of environment and paths.

Regards,
Sergey

-----Original Message-----
From: Peter Lemenkov [mailto:leme...@gmail.com]
Sent: Tuesday, October 30, 2012 1:27 PM
To: Zhemzhitsky Sergey
Cc: Alex Shneyderman; erlang-questions Questions
Subject: Re: [erlang-questions] slave node working directory

2012/10/30 Zhemzhitsky Sergey <sergey_zh...@sberbank-cib.ru>:
> Hi Alex,
>
> Thanks a lot. Unfortunately rpc:call does not work in my case as I have to start my slaves with a relative code search path specified with -pa option.

I think this requirement should be satisfied outside the Erlang VM itself. Setting up the environment parameters should be done by your service management system.

For example systemd allows this (setting up working directory) as well as setting many other necessary parameters right out of the box:

* https://github.com/lemenkov/erlpmd/blob/master/priv/erlpmd.service

--
With best regards, Peter Lemenkov.

_______________________________________________________
CONFIDENTIALITY NOTICE: This email and any files attached to it may be confidential. If you are not the intended recipient you are notified that using, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error please notify the sender and delete this email.

Reply all
Reply to author
Forward
0 new messages