[ofa-general] opensm as service - cfg files

Philippe Gregoire philippe.gregoire at cea.fr
Mon Oct 27 06:51:17 PDT 2008


Yevgeny Kliteynik a écrit :
> Philippe Gregoire wrote:
>> Al Chu a écrit :
>>> On Thu, 2008-10-23 at 14:53 +0200, Philippe Gregoire wrote:
>>>  
>>>> Hi Yevgeny,
>>>>
>>>> Is it possible to write this service so it will be able to manage 
>>>> multiple instances of opensm on the same node, I mean start and 
>>>> stop all instances at the same time or separately.
>>>> This will be very usefull when you have several Infiniband storage 
>>>> devices connected directly to one node,
>>>> so you have to run several opensm -g guid processes on this node.
>>>>
>>>> It is authorized to have a service that understand parameters like:
>>>> service start 0x8000010232
>>>> or service start ddn12.conf
>>>>     
>>>
>>> This doesn't sound like that bad of idea, although "what does the user
>>> expect" is a concern.  My co-worker brought up the simple issue of the
>>> log files.  Do you automatically pick a different log file to store to,
>>> or does it store to the same log, or is it the user's responsibility to
>>> pick a reasonable different log file name in the .conf file?  I have no
>>> idea what other daemons/init scripts do.
>>>
>>> Al
>>>
>>>   
>>
>> 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
>
> It is possible to make init script understand parameters, so that
> you will be able to run "opensmd start -guid <GUID>" or
> "opensmd start -conf <conf_file>", but I think that there will be
> some problems monitoring these opensm instances once they started.
> For instance, how would you run "opensmd status" on a specific
> opensm instance?
No, I you do the job for the start part, it should be easy to do the 
same for the status part to allow
service opensmd status -guid <GUID> or -conf <CONF>.
On I/O node connected directly to an IB storage, you must be able to 
manage separately each IB port.
> Other approach is to have some variable in the conf file, e.g.
> GUIDS="guid1 guid2 ...", and then in the init script it will
> iterate through all the guids and run opensm instances for all of
> them, but then you'll be able to manage these processes together,
> not one by one. For instance, "opensmd stop" will kill all the
> opensm processes.
>
> -- Yevgeny
>
>>>> Philippe Gregoire
>>>> CEA/DAM.
>>>>
>>>> Yevgeny Kliteynik a écrit :
>>>>   
>>>>> Hi Sasha,
>>>>>
>>>>> I was just trying to put some order in my head regarding
>>>>> the use of opensm as service, and I have couple of questions.
>>>>> Some of them might be dumb, so please bear with me... :)
>>>>>
>>>>> 1. OpenSM config file.
>>>>>    Do we still need opensm/scripts/opensm.conf?
>>>>>    I think it's not used any more.
>>>>>
>>>>> 2. From opensm/scripts/opensm.init.in:
>>>>>       @sbindir@/opensm -B $OPTIONS > /dev/null
>>>>>    Is someone setting the $OPTIONS variable? I think it was
>>>>>    set in the config file in the past, but not now.
>>>>>
>>>>> 3. From opensm/scripts/redhat-opensm.init.in:
>>>>>      CONFIG=@sysconfdir@/sysconfig/opensm.conf
>>>>>      if [ -f $CONFIG ]; then
>>>>>      . $CONFIG
>>>>>      fi
>>>>>
>>>>>    From opensm/scripts/opensm.init.in:
>>>>>      if [[ -s /etc/sysconfig/opensm ]]; then
>>>>>          . /etc/sysconfig/opensm
>>>>>      fi
>>>>>
>>>>>    If it's not some naming convention, perhaps we should use
>>>>>    opensm.conf in both cases?
>>>>>
>>>>> 4. Logrotate:
>>>>>    opensm/scripts/opensm.spec.in installs logrotate file as follows:
>>>>>       install -m 644 scripts/opensm.logrotate $etc/logrotate.d/opensm
>>>>>    I may be off here, but should the installed file name be opensmd
>>>>>    to match the service name?
>>>>>
>>>>> -- Yevgeny
>>>>> _______________________________________________
>>>>> general mailing list
>>>>> general at lists.openfabrics.org
>>>>> http:// lists.openfabrics.org/cgi-bin/mailman/listinfo/general
>>>>>
>>>>> To unsubscribe, please visit http:// 
>>>>> openib.org/mailman/listinfo/openib-general
>>>>>
>>>>>       
>>>> _______________________________________________
>>>> general mailing list
>>>> general at lists.openfabrics.org
>>>> http:// lists.openfabrics.org/cgi-bin/mailman/listinfo/general
>>>>
>>>> To unsubscribe, please visit http:// 
>>>> openib.org/mailman/listinfo/openib-general
>>>>
>>>>     
>>
>>
>
>




More information about the general mailing list