[ewg] Re: [PATCH] Set openibd service to stop before iscsi service

Vladimir Sokolovsky vlad at dev.mellanox.co.il
Sun Feb 17 04:38:45 PST 2008


Erez Zilber wrote:
> Vladimir Sokolovsky wrote:
>> Doron Shoham wrote:
>>> Vladimir Sokolovsky wrote:
>>>> Doron Shoham wrote:
>>>>>  iscsi service should start after openibd service.
>>>>>  iscsi service should stop before openibd service.
>>>>>
>>>>> Signed-off-by: Doron Shoham <dorons at voltaire.com>
>>>>> ---
>>>> Hi Doron,
>>>> Why can't you just put in the /etc/init.d/iscsi:
>>>>
>>>> # chkconfig: 2345 16 84
>>> Why is openibd's start 15 and stop 85?
>>> will it always be correct?
>> Because the network start is 10 and stop is 90.
>> This is correct for now...
>>
>>>> And in the /etc/init.d/open-iscsi:
>>>> Required-Start: openibd
>>>>
>>>> And then update ofa_kernel.spec to set
>>>> Required-Stop: open-iscsi
>>>> In case that iser was selected and OS is SuSE.
>>> You are right.
>>> I'll do it that way.
>>>
>>>> This will change about 5 lines of code instead of about 150 lines of
>>>> your patch.
>>>>
>>>> Regards,
>>>> Vladimir
>>> I'll make a new patch.
>>>
>>> Thanks,
>>> Doron
>>>
>> Tell me if you need help with ofa_kernel.spec.
>>
>>
> 
> open-iscsi depends on the openibd service.
> If iSER is selected and the OS is SuSE, edit the openibd
> init script and add open-iscsi to its Required-Stop.
> 
> Signed-off-by: Doron Shoham <dorons at voltaire.com>
> Signed-off-by: Erez Zilber <erezz at voltaire.com>
> ---
>  ofed_scripts/ofa_kernel.spec |   12 +++++++++---
>  1 files changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/ofed_scripts/ofa_kernel.spec b/ofed_scripts/ofa_kernel.spec
> index 954dd0c..eed2484 100755
> --- a/ofed_scripts/ofa_kernel.spec
> +++ b/ofed_scripts/ofa_kernel.spec
> @@ -428,12 +428,18 @@ perl -i -ne 'if (m@^#!/bin/bash@) {
>  fi
>  
>  if [ -f /etc/SuSE-release ]; then
> -        perl -i -ne 'if (m@^#!/bin/bash@) {
> +    local_fs='$local_fs'
> +    network='$network'
> +    openiscsi=''
> +    %if %{build_iser}
> +        openiscsi='open-iscsi'
> +    %endif
> +        perl -i -ne "if (m@^#!/bin/bash@) {
>          print q@#!/bin/bash
>  ### BEGIN INIT INFO
>  # Provides:       openibd
>  # Required-Start: $local_fs $network
> -# Required-Stop: opensmd
> +# Required-Stop: opensmd $openiscsi
>  # Default-Start:  2 3 5
>  # Default-Stop: 0 1 2 6
>  # Description:    Activates/Deactivates InfiniBand Driver to \
> @@ -442,7 +448,7 @@ if [ -f /etc/SuSE-release ]; then
>  @;
>                   } else {
>                       print;
> -                 }' /etc/init.d/openibd
> +                 }" /etc/init.d/openibd
>  
>          if ! ( /sbin/insserv openibd > /dev/null 2>&1 ); then
>                  true

Applied,

Regards,
Vladimir



More information about the ewg mailing list