<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:31:00 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-16908] lnet module ip2nets parameter not acting as documented</title>
                <link>https://jira.whamcloud.com/browse/LU-16908</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;The ip2nets parameter, when matching a bound IP address on an interface of the node, may activate a different LND interface with the wrong IP address.&lt;/p&gt;

&lt;p&gt;This may be related to LUs:&lt;br/&gt;
&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-7563&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.whamcloud.com/browse/LU-7563&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-11859&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.whamcloud.com/browse/LU-11859&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Note/example on page 69 of &lt;a href=&quot;https://build.whamcloud.com/job/lustre-manual/lastSuccessfulBuild/artifact/lustre_manual.pdf&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://build.whamcloud.com/job/lustre-manual/lastSuccessfulBuild/artifact/lustre_manual.pdf&lt;/a&gt; doesn&apos;t match what actually happens.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;If an interface is explicitly specified as well as a pattern, the interface matched using the IP pattern will be sanitized against the explicitly-defined interface.

For example, tcp(eth0) 192.168.*.3 and there exists in the system eth0 == 192.158.19.3 and eth1 == 192.168.3.3, then the configuration will fail, because the pattern contradicts the interface specified.

A clear warning will be displayed if inconsistent configuration is encountered.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Example showing the issue with stock lnet.ko, working through the above steps:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;[root@lustre.test ~]# ip netns add test
[root@lustre.test ~]# ip -n test link add eth0 type dummy
[root@lustre.test ~]# ip -n test link add eth1 type dummy
[root@lustre.test ~]# ip -n test addr add 127.0.0.1/8 brd + dev lo
[root@lustre.test ~]# ip -n test addr add 192.158.19.3/24 brd + dev eth0
[root@lustre.test ~]# ip -n test addr add 192.168.3.3/24 brd + dev eth1
[root@lustre.test ~]# ip -n test link set up dev lo
[root@lustre.test ~]# ip -n test link set up dev eth0
[root@lustre.test ~]# ip -n test link set up dev eth1

[root@lustre.test ~]# ip netns exec test bash

[root@lustre.test ~]# ip -4 addr list
1: lo: &amp;lt;LOOPBACK,UP,LOWER_UP&amp;gt; mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
       valid_lft forever preferred_lft forever
2: eth0: &amp;lt;BROADCAST,NOARP,UP,LOWER_UP&amp;gt; mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
    inet 192.158.19.3/24 brd 192.158.19.255 scope global eth0
       valid_lft forever preferred_lft forever
3: eth1: &amp;lt;BROADCAST,NOARP,UP,LOWER_UP&amp;gt; mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
    inet 192.168.3.3/24 brd 192.168.3.255 scope global eth1
       valid_lft forever preferred_lft forever

[root@lustre.test ~]# modinfo -F version lnet
0.7.0

[root@lustre.test ~]# modinfo -F version lustre
2.15.2

[root@lustre.test ~]# cat /etc/modprobe.d/lnet.conf
options lnet &quot;ip2nets=tcp(eth0) 192.168.*.3&quot;

[root@lustre.test ~]# modprobe lnet

[root@lustre.test ~]# cat /sys/module/lnet/parameters/ip2nets
tcp(eth0) 192.168.*.3

[root@lustre.test ~]# lnetctl net show
show:
    - net:
          errno: -100
          descr: &quot;cannot get networks: Network is down&quot;

[root@lustre.test ~]# lnetctl lnet configure --all

[root@lustre.test ~]# lnetctl net show
net:
    - net type: lo
      local NI(s):
        - nid: 0@lo
          status: up
    - net type: tcp
      local NI(s):
        - nid: 192.158.19.3@tcp
          status: up
          interfaces:
              0: eth0

[root@lustre.test ~]# dmesg
LNet: HW NUMA nodes: 2, HW CPU cores: 56, npartitions: 2
alg: No test for adler32 (adler32-zlib)
Key type ._llcrypt registered
Key type .llcrypt registered
LNet: Added LNI 192.158.19.3@tcp [8/256/0/180]
LNet: Accept secure, port 988
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Same steps with patched lnet.ko (without IP stack setup steps):&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;[root@lustre.test ~]# ip netns exec test bash

[root@lustre.test ~]# ip -4 addr list
1: lo: &amp;lt;LOOPBACK,UP,LOWER_UP&amp;gt; mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
       valid_lft forever preferred_lft forever
2: eth0: &amp;lt;BROADCAST,NOARP,UP,LOWER_UP&amp;gt; mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
    inet 192.158.19.3/24 brd 192.158.19.255 scope global eth0
       valid_lft forever preferred_lft forever
3: eth1: &amp;lt;BROADCAST,NOARP,UP,LOWER_UP&amp;gt; mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
    inet 192.168.3.3/24 brd 192.168.3.255 scope global eth1
       valid_lft forever preferred_lft forever

[root@lustre.test ~]# cat /etc/modprobe.d/lnet.conf
options lnet &quot;ip2nets=tcp(eth0) 192.168.*.3&quot;

[root@lustre.test ~]# modprobe lnet

[root@lustre.test ~]# cat /sys/module/lnet/parameters/ip2nets
tcp(eth0) 192.168.*.3

[root@lustre.test ~]# lnetctl net show
show:
    - net:
          errno: -100
          descr: &quot;cannot get networks: Network is down&quot;

[root@lustre.test ~]# lnetctl lnet configure --all
configure:
    - lnet:
          errno: -22
          descr: &quot;LNet configure error: Invalid argument&quot;

[root@lustre.test ~]# dmesg
LNet: HW NUMA nodes: 2, HW CPU cores: 56, npartitions: 2
alg: No test for adler32 (adler32-zlib)
Key type ._llcrypt registered
Key type .llcrypt registered
LNetError: 11a-a: ip2nets does not match any local IP interfaces
LNetError: 47753:0:(config.c:574:lnet_parse_networks()) networks string is undefined

[root@lustre.test ~]# modprobe -r lnet ; dmesg -C

[root@lustre.test ~]# modprobe lnet &quot;ip2nets=tcp(eth0,eth10,eth1) 192.168.*.3&quot;

[root@lustre.test ~]# cat /sys/module/lnet/parameters/ip2nets
tcp(eth0,eth10,eth1) 192.168.*.3

[root@lustre.test ~]# lnetctl net show
show:
    - net:
          errno: -100
          descr: &quot;cannot get networks: Network is down&quot;

[root@lustre.test ~]# lnetctl lnet configure --all

[root@lustre.test ~]# lnetctl net show
net:
    - net type: lo
      local NI(s):
        - nid: 0@lo
          status: up
    - net type: tcp
      local NI(s):
        - nid: 192.168.3.3@tcp
          status: up
          interfaces:
              0: eth1

[root@lustre.test ~]# dmesg
LNet: HW NUMA nodes: 2, HW CPU cores: 56, npartitions: 2
alg: No test for adler32 (adler32-zlib)
Key type ._llcrypt registered
Key type .llcrypt registered
LNet: ip2nets matched tcp(eth1) for 192.168.*.3
LNet: Added LNI 192.168.3.3@tcp [8/256/0/180]
LNet: Accept secure, port 988
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;I wrote the patch against the 2.15.2 tag in hopes of making the code follow my interpretation of the documentation for the module parameter. Hopefully the area where I added the check is the correct spot.&lt;/p&gt;</description>
                <environment></environment>
        <key id="76605">LU-16908</key>
            <summary>lnet module ip2nets parameter not acting as documented</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</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="joshs">Josh Samuelson</reporter>
                        <labels>
                            <label>lnet</label>
                            <label>patch</label>
                    </labels>
                <created>Fri, 16 Jun 2023 20:53:20 +0000</created>
                <updated>Fri, 16 Jun 2023 20:53:20 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                    <attachments>
                            <attachment id="49425" name="0001-Fix-ip2nets-to-use-correct-unambiguous-interface-nam.patch" size="6056" author="joshs" created="Fri, 16 Jun 2023 20:52:51 +0000"/>
                    </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|i03o9r:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10060" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Severity</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10022"><![CDATA[3]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>