[ofa-general] opensm as service - cfg files

Sasha Khapyorsky sashak at voltaire.com
Wed Oct 29 08:57:08 PDT 2008


On 16:12 Wed 29 Oct     , Philippe Gregoire wrote:
> Sasha Khapyorsky a ?crit :
>> On 10:10 Mon 27 Oct     , Al Chu wrote:
>>   
>>>> init scripts generally execute/source some configuration file located
>>>> in /etc/sysconfig/ to set some variables used in the script. These
>>>> variables can be used to distinguish pid filename and log filename for
>>>> different opensm instances. If these variables are not defined in the
>>>> conf file, they should be build from the parameter value e.g :
>>>> opensm.log.ddn12 or opensm.pid.ddn12       
>>> My point was should the script automatically handle this, or is it the
>>> user's responsibility to set everything up?  As Ira mentioned in a later
>>> post, the console port is supposed to be at a known port value so users
>>> know what port to connect to.  So is it wise for the script to auto-
>>> magically select different different port values for different opensm
>>> instances?  Personally I don't think so.
>>>
>>> I was initially thinking the init script could take command line
>>> arguments that could be passed directly to the init.d scripts.  So for
>>> example, you can say:
>>>
>>> service opensmd start "--config ddn.conf"
>>> service opensmd start "--config lsi.conf"
>>>
>>> This puts alternate log file names and console port numbers into the
>>> responsibility of the user.
>>>     
>>
>> Why to not just copy /etc/init.d/opensmd to let's say
>> /etc/init.d/opensmd2? Sligthly edit this (add different config file,
>> etc.).
>>
>>   Sasha
>>
>>   
>
> Sasha, it is just what I want to avoid .
> Depending on how the initial script is written, it will require big 
> modifications to execute without undesired interactions
> (think about stopping one opensmd daemon )

Yes, you will need to change related places in the second script. I
don't think it is massive modifications.

> Why not using a directory /etc/opensm.d , put all the config files in this 
> directory and let the script /etc/init.d/opensmd

Why not to use just separate config file (/etc/opensm/opensm-2.conf, or
so)?

I don't feel that two OpenSM instances is a common case, anyway we don't
need to over-complicate the default (single instance) usage.

Sasha

> starts one  daemon for each file if it is executed without argument and 
> only for the configuration file if tis given as an argument.
> And let the system admin provide the good configuration file for different 
> instances.
> If the script manages different pid files , you will be able to do:
> service opensmd start
> service opensmd  stop
> to start and stop all the instances
> or
> service opensmd start ddn.conf
> service opensmd stop ddn.conf
> to start /stop the ddn instance using /etc/opensmd.d/ddn.conf configuration 
> file
>
>
>



More information about the general mailing list