<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:51:37 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-5454] Support lnet init script on SLES</title>
                <link>https://jira.whamcloud.com/browse/LU-5454</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;The /etc/init.d/lnet script should be supported on SLES machines.  Currently, the lnet init script is only packaged when building for a RHEL distribution.  It should be pretty straightforward to support the lnet init script on SLES as well.  As far as I can tell, it doesn&apos;t do anything necessarily RHEL-specific.&lt;/p&gt;</description>
                <environment></environment>
        <key id="25881">LU-5454</key>
            <summary>Support lnet init script on SLES</summary>
                <type id="4" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11310&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="1" iconUrl="https://jira.whamcloud.com/images/icons/statuses/open.png" description="The issue is open and ready for the assignee to start work on it.">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="wc-triage">WC Triage</assignee>
                                    <reporter username="haasken">Ryan Haasken</reporter>
                        <labels>
                    </labels>
                <created>Tue, 5 Aug 2014 22:13:46 +0000</created>
                <updated>Wed, 6 Aug 2014 21:39:34 +0000</updated>
                                                                                <due></due>
                            <votes>1</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="90939" author="haasken" created="Tue, 5 Aug 2014 22:15:45 +0000"  >&lt;p&gt;This is related to &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-4707&quot; title=&quot;Don&#8217;t deploy the &#8220;lustre&#8221; init script on clients&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-4707&quot;&gt;&lt;del&gt;LU-4707&lt;/del&gt;&lt;/a&gt; since the change that fixed that bug stopped the packaging of /etc/init.d/lnet on SLES.&lt;/p&gt;</comment>
                            <comment id="90940" author="bogl" created="Tue, 5 Aug 2014 22:23:08 +0000"  >&lt;p&gt;I don&apos;t think your description is at all accurate.  I see a bunch of things in the lnet script as it exists now that are very RHEL specific.&lt;/p&gt;

&lt;p&gt;In addition to those I believe in SLES rc scripts there are quite rigid conventions about comment headers in rc scripts that help specify dependencies and order of execution.  Pretty sure the existing script doesn&apos;t conform at all.  Would probably need a more SLES specific script and Makefile support to package the right ones for each distro.  Or maybe that&apos;s one possible approach.&lt;/p&gt;

&lt;p&gt;I believe our policy on scripts was always to describe ours as examples and recommend users wanting to use them customize them as necessary in whatever site specific way was needed.  I could be wrong, but that is my impression.&lt;/p&gt;</comment>
                            <comment id="91006" author="haasken" created="Wed, 6 Aug 2014 20:21:03 +0000"  >&lt;p&gt;Hi Bob.&lt;/p&gt;

&lt;p&gt;I&apos;ve done some further investigation to figure out just how RHEL specific the current lnet init script is.&lt;/p&gt;

&lt;p&gt;This section at the beginning of the script sources two RHEL-specific files:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;# Source function library.
[ -f /etc/rc.d/init.d/functions ] &amp;amp;&amp;amp; . /etc/rc.d/init.d/functions

# Source networking configuration and check that networking is up.
[ -f /etc/sysconfig/network ] &amp;amp;&amp;amp; . /etc/sysconfig/network &amp;amp;&amp;amp; \
[ &lt;span class=&quot;code-quote&quot;&gt;&quot;${NETWORKING}&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;no&quot;&lt;/span&gt; ] &amp;amp;&amp;amp; exit 0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;For /etc/rc.d/init.d/functions, there is a similar SLES alternative, /etc/rc.status.  However, as far as I can tell, nothing from /etc/rc.d/init.d/functions is being used by the lnet script anyway.  Am I missing something?&lt;/p&gt;

&lt;p&gt;For /etc/sysconfig/network, there is apparently no SUSE equivalent.  I&apos;m not sure how to address that.  We could probably ignore that check on whether NETWORKING is enabled.&lt;/p&gt;

&lt;p&gt;Another compatibility issue is the use of the file /var/lock/subsys/lnet.  Here is what SUSE says about /var/lock/subsys (source: &lt;a href=&quot;http://en.opensuse.org/openSUSE:Packaging_checks&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://en.opensuse.org/openSUSE:Packaging_checks&lt;/a&gt; ):&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;/var/lock/subsys is neither used nor supported on openSUSE. Other distributions use it to mark that an init script has run. There is no equivalent on openSUSE. So in most cases refereces to /var/lock/subsys can be removed without replacement.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Since there is no SUSE equivalent, we&apos;ll just remove that for SLES.&lt;/p&gt;

&lt;p&gt;With respect to the rigid conventions about comment headers in rc scripts, I don&apos;t believe those conventions are specific to SLES.  I think it is an LSB thing.  See the description here:  &lt;a href=&quot;https://refspecs.linuxbase.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://refspecs.linuxbase.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I think this means it would be okay, and even desirable, to include such a comment header in the init script for RHEL &lt;b&gt;and&lt;/b&gt; SLES.&lt;/p&gt;

&lt;p&gt;I can see a couple of ways to achieve lnet init script support for SLES.  One would be to create two init scripts like you suggested, one for each distro.  However, we could also do something like this and use just a single init script for both:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; [ -f /etc/rc.d/init.d/functions ] ; then
    # define RHEL-specific {start,stop,...} functions
elif [ -f /etc/rc.status ]; then
    # define SLES-specific {start,stop,...} functions
fi
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;That&apos;s probably the way I would prefer to proceed.  Do you have any thoughts on this plan?  Did I miss anything that&apos;s RHEL specific in the LNET init script?&lt;/p&gt;</comment>
                            <comment id="91007" author="haasken" created="Wed, 6 Aug 2014 20:25:51 +0000"  >&lt;p&gt;I should also address this comment:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I believe our policy on scripts was always to describe ours as examples and recommend users wanting to use them customize them as necessary in whatever site specific way was needed. I could be wrong, but that is my impression.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;We would like an LNet init script for our usage on SLES nodes.  There&apos;s not really anything site-specific about this lnet init script, so as long as I&apos;m creating one that works for us, I&apos;d like to contribute that change here.&lt;/p&gt;</comment>
                            <comment id="91012" author="bogl" created="Wed, 6 Aug 2014 20:55:07 +0000"  >&lt;p&gt;Ryan,&lt;br/&gt;
  I don&apos;t object in principle to you taking on the effort to craft truly general lnet &amp;amp; lustre init scripts.  I think you&apos;ve identified all the major areas that might be RHEL or SLES specific.   I just worry that the rc.status include in SLES &amp;amp; functions include in RHEL might not be exactly equivalent in the primitives they provide to rc scripts.  I also don&apos;t know in detail all the functions or global definitions used.  I also don&apos;t know how much is provided by the /etc/sysconfig/network script in RHEL.  It may be required for more than just ensuring that networking is already running. I agree it has no exact equivalent in SUSE, where /etc/sysconfig/network is a directory and not a script.&lt;/p&gt;

&lt;p&gt;As far as I know you have called out the major diffs between SLES &amp;amp; RHEL rc frameworks that have an impact.&lt;/p&gt;

&lt;p&gt;I would hope that whatever you do would be tested sufficiently in both SUSE &amp;amp; RHEL that it doesn&apos;t add noise in terms of extra warnings or errors at install time or boot time.&lt;/p&gt;

&lt;p&gt;Do you plan to confine your efforts to just the lnet init script or take on the lustre one too?  I think they are packaged together.&lt;/p&gt;
</comment>
                            <comment id="91018" author="haasken" created="Wed, 6 Aug 2014 21:26:23 +0000"  >&lt;p&gt;That&apos;s correct.  The functions provided by RHEL in /etc/rc.d/init.d/functions are not the same as the functions provided by SLES in /etc/rc.status.  However, I looked closely, and I don&apos;t see anything in /etc/init.d/lnet that uses any of those functions, so I&apos;m not too worried about that.  &lt;/p&gt;

&lt;p&gt;The only thing the lnet init script uses out of /etc/sysconfig/network is the variable NETWORKING for this check:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;# Source networking configuration and check that networking is up.
[ -f /etc/sysconfig/network ] &amp;amp;&amp;amp; . /etc/sysconfig/network &amp;amp;&amp;amp; \
[ &lt;span class=&quot;code-quote&quot;&gt;&quot;${NETWORKING}&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;no&quot;&lt;/span&gt; ] &amp;amp;&amp;amp; exit 0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Yes, I&apos;ll test it on both a CentOS and a SLES machine and check for error messages.&lt;/p&gt;

&lt;p&gt;We only have a need for the lnet init script, and the lustre one is massive, so I&apos;d prefer not to get into that.  Yes, they are packaged together based on the value of the automake conditional INIT_SCRIPTS:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; INIT_SCRIPTS
initdir = $(sysconfdir)/init.d
init_SCRIPTS = lnet
&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; SERVER
init_SCRIPTS += lustre
endif
endif
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I could change it so that the lnet init script is packaged separately, so I can avoid making the lustre init script compatible with SLES.&lt;/p&gt;</comment>
                            <comment id="91020" author="haasken" created="Wed, 6 Aug 2014 21:39:34 +0000"  >&lt;p&gt;I did a quick scan of the lustre init script, and it actually looks like very little is dependent on RHEL-specific functionality.  It sources /etc/rc.d/init.d/functions, but it doesn&apos;t look like it uses anything from that file.  It also sources /etc/sysconfig/network, and it uses the NETWORKING definition to see if networking is enabled.  It does not actually touch any files under /var/lock/subsys, so no work would need to be done there.&lt;/p&gt;

&lt;p&gt;We don&apos;t use the lustre init script, so I&apos;m not sure how to use it and test it.  We also don&apos;t run Lustre servers on SLES, so I would have to figure out how to test that.  I&apos;d prefer to just port the lnet init script to SLES, but the lustre init script could potentially be ported if necessary.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzwt0n:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>15188</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>