<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:11:41 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-14661] Provide kernel API for adding peer/peer NI</title>
                <link>https://jira.whamcloud.com/browse/LU-14661</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Provide kernel API for adding peer and peer NI&lt;/p&gt;

&lt;p&gt;Implement LNetAddPeer() and LNetAddPeerNI() APIs to allow other&lt;br/&gt;
kernel modules to add peer and peer NIs to LNet.&lt;/p&gt;

&lt;p&gt;Peers created via these APIs are not marked as having been configured&lt;br/&gt;
by DLC. As such, they can be overwritten by discovery.&lt;/p&gt;</description>
                <environment></environment>
        <key id="64008">LU-14661</key>
            <summary>Provide kernel API for adding peer/peer NI</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="6" iconUrl="https://jira.whamcloud.com/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="hornc">Chris Horn</assignee>
                                    <reporter username="hornc">Chris Horn</reporter>
                        <labels>
                    </labels>
                <created>Fri, 30 Apr 2021 19:25:51 +0000</created>
                <updated>Sat, 15 Apr 2023 00:06:34 +0000</updated>
                            <resolved>Tue, 24 Jan 2023 16:27:32 +0000</resolved>
                                                    <fixVersion>Lustre 2.15.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="300247" author="gerrit" created="Fri, 30 Apr 2021 19:41:02 +0000"  >&lt;p&gt;Chris Horn (chris.horn@hpe.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/43508&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/43508&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14661&quot; title=&quot;Provide kernel API for adding peer/peer NI&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14661&quot;&gt;&lt;del&gt;LU-14661&lt;/del&gt;&lt;/a&gt; lnet: Check if discovery toggled off in ping reply&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: b9beeb8b776eed1b9ecb4e274afa57cec3666fc1&lt;/p&gt;</comment>
                            <comment id="300248" author="gerrit" created="Fri, 30 Apr 2021 19:41:03 +0000"  >&lt;p&gt;Chris Horn (chris.horn@hpe.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/43509&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/43509&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14661&quot; title=&quot;Provide kernel API for adding peer/peer NI&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14661&quot;&gt;&lt;del&gt;LU-14661&lt;/del&gt;&lt;/a&gt; lnet: Provide kernel API for adding peer and peer NI&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 71c89ce80d38c528d1103d9e28a8b22adabc6e48&lt;/p&gt;</comment>
                            <comment id="300249" author="gerrit" created="Fri, 30 Apr 2021 19:41:04 +0000"  >&lt;p&gt;Chris Horn (chris.horn@hpe.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/43510&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/43510&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14661&quot; title=&quot;Provide kernel API for adding peer/peer NI&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14661&quot;&gt;&lt;del&gt;LU-14661&lt;/del&gt;&lt;/a&gt; obdclass: Add peer/peer NI when processing llog&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 7451b3d1b5865230e2882c450812660379d00539&lt;/p&gt;</comment>
                            <comment id="303895" author="gerrit" created="Tue, 8 Jun 2021 21:59:09 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/43508/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/43508/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14661&quot; title=&quot;Provide kernel API for adding peer/peer NI&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14661&quot;&gt;&lt;del&gt;LU-14661&lt;/del&gt;&lt;/a&gt; lnet: Check if discovery toggled off in ping reply&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 143893381d428466d4c71e075a041a9cbbd28818&lt;/p&gt;</comment>
                            <comment id="303939" author="pjones" created="Wed, 9 Jun 2021 03:56:00 +0000"  >&lt;p&gt;Landed for 2.15&lt;/p&gt;</comment>
                            <comment id="303976" author="hornc" created="Wed, 9 Jun 2021 13:33:20 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/secure/ViewProfile.jspa?name=pjones&quot; class=&quot;user-hover&quot; rel=&quot;pjones&quot;&gt;pjones&lt;/a&gt; there are still two outstanding patches for this ticket, so I am reopening it.&lt;/p&gt;</comment>
                            <comment id="310507" author="gerrit" created="Wed, 18 Aug 2021 01:58:53 +0000"  >&lt;p&gt;&quot;Oleg Drokin &amp;lt;green@whamcloud.com&amp;gt;&quot; merged in patch &lt;a href=&quot;https://review.whamcloud.com/43509/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/43509/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14661&quot; title=&quot;Provide kernel API for adding peer/peer NI&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14661&quot;&gt;&lt;del&gt;LU-14661&lt;/del&gt;&lt;/a&gt; lnet: Provide kernel API for adding peers&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: ac201366ad5700edc860c139955af8a09bf53a1a&lt;/p&gt;</comment>
                            <comment id="310508" author="gerrit" created="Wed, 18 Aug 2021 01:59:00 +0000"  >&lt;p&gt;&quot;Oleg Drokin &amp;lt;green@whamcloud.com&amp;gt;&quot; merged in patch &lt;a href=&quot;https://review.whamcloud.com/43510/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/43510/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14661&quot; title=&quot;Provide kernel API for adding peer/peer NI&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14661&quot;&gt;&lt;del&gt;LU-14661&lt;/del&gt;&lt;/a&gt; obdclass: Add peer/peer NI when processing llog&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 16321de596f6395153be6cbb6192250516963077&lt;/p&gt;</comment>
                            <comment id="310551" author="pjones" created="Wed, 18 Aug 2021 12:45:54 +0000"  >&lt;p&gt;Everything seems to have landed now&lt;/p&gt;</comment>
                            <comment id="354811" author="bzzz" created="Thu, 1 Dec 2022 16:03:30 +0000"  >&lt;p&gt;we met a problem with this patch - config log can contain unavailable NIDs, which result in sequence like this:&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;
00000040:00001000:12.0:1669888833.903403:0:82546:0:(llog.c:605:llog_process_thread()) processing rec 0x00000000453477cb type 0x10620000
00000040:00001000:12.0:1669888833.903403:0:82546:0:(llog.c:611:llog_process_thread()) after swabbing, type=0x10620000 idx=26
00000040:00001000:12.0:1669888833.903404:0:82546:0:(llog.c:713:llog_process_thread()) lrh_index: 26 lrh_len: 120 (4768 remains)
00000040:00001000:12.0:1669888833.903404:0:82546:0:(llog.c:730:llog_process_thread()) index: 26, lh_last_idx: 254 synced_idx: 0 lgh_last_idx: 254
00000020:00000001:12.0:1669888833.903405:0:82546:0:(obd_config.c:1807:class_config_llog_handler()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; entered
00000020:00000010:12.0:1669888833.903405:0:82546:0:(obd_config.c:2023:class_config_llog_handler()) kmalloced &lt;span class=&quot;code-quote&quot;&gt;&apos;(lcfg_new)&apos;&lt;/span&gt;: 96 at 00000000c5e5bbaf.
00000020:00000080:12.0:1669888833.903406:0:82546:0:(obd_config.c:1399:class_process_config()) processing cmd: cf00b
00000020:00000001:12.0:1669888833.903408:0:82546:0:(obd_config.c:965:class_add_conn()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; entered
00000020:00000001:12.0:1669888833.903408:0:82546:0:(obd_class.h:776:obd_add_conn()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; entered
00010000:00000001:12.0:1669888833.903409:0:82546:0:(ldlm_lib.c:67:import_set_conn()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; entered
00000100:00000200:12.0:1669888833.903410:0:82546:0:(events.c:580:ptlrpc_uuid_to_peer()) 172.16.0.80@o2ib-&amp;gt;12345-172.16.0.80@o2ib
00000100:00000001:12.0:1669888833.903410:0:82546:0:(connection.c:84:ptlrpc_connection_get()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; entered
00000400:00000200:12.0:1669888833.903411:0:82546:0:(api-ni.c:1405:lnet_nid_cpt_hash()) Match nid 172.16.0.80@o2ib to cpt 3
00000400:00000200:12.0:1669888833.903415:0:82546:0:(peer.c:2052:lnet_peer_queue_for_discovery()) Queue peer 172.16.0.80@o2ib: 0
00000400:00000200:12.0:1669888833.903416:0:82546:0:(peer.c:2370:lnet_discover_peer_locked()) Discovery attempt # 1
00000400:00000200:8.0:1669888867.664662:0:82546:0:(peer.c:2420:lnet_discover_peer_locked()) peer 172.16.0.80@o2ib NID 172.16.0.80@o2ib: -110. discovery complete
00000400:00000200:8.0:1669888867.664664:0:82546:0:(peer.c:1320:LNetPrimaryNID()) NID 172.16.0.80@o2ib primary NID 172.16.0.80@o2ib rc -110
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;notice 30+ second delay. a log may contain number of unavailable NIDs. so overall config llog processing can take hundreds of seconds. the problem gets worse when few services need to start (in case of failover, for example) - they all are serialized on cl_mgc_mutex. sometimes mounting takes long enough so HA decides it makes no progress and initiate another failover.&lt;/p&gt;</comment>
                            <comment id="354816" author="hornc" created="Thu, 1 Dec 2022 16:30:31 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/secure/ViewProfile.jspa?name=bzzz&quot; class=&quot;user-hover&quot; rel=&quot;bzzz&quot;&gt;bzzz&lt;/a&gt; Do you have a reproducer? If so, can you see if &lt;a href=&quot;https://review.whamcloud.com/#/c/fs/lustre-release/+/47322/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/#/c/fs/lustre-release/+/47322/&lt;/a&gt; helps?&lt;/p&gt;</comment>
                            <comment id="354817" author="hornc" created="Thu, 1 Dec 2022 16:32:05 +0000"  >&lt;p&gt;Also, it isn&apos;t clear to me, based on the output you provided, that this problem is related to my patch. Peers are discovered as part of llog processing with our without &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14661&quot; title=&quot;Provide kernel API for adding peer/peer NI&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14661&quot;&gt;&lt;del&gt;LU-14661&lt;/del&gt;&lt;/a&gt; patch, right?&lt;/p&gt;</comment>
                            <comment id="354820" author="bzzz" created="Thu, 1 Dec 2022 16:45:58 +0000"  >&lt;blockquote&gt;&lt;p&gt;Do you have a reproducer? If so, can you see if &lt;a href=&quot;https://review.whamcloud.com/#/c/fs/lustre-release/+/47322/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/#/c/fs/lustre-release/+/47322/&lt;/a&gt; helps?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;yes, we do have a reproducer, will try that patch.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Also, it isn&apos;t clear to me, based on the output you provided, that this problem is related to my patch&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I&apos;m not really familiar with lnet code, but the patch adds this:&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;
+               rc = LNetAddPeer(entry-&amp;gt;un_nids, entry-&amp;gt;un_nid_count);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;and I&apos;ve got one succesful pass with that patch reverted. we&apos;ll do more testing of course.&lt;/p&gt;</comment>
                            <comment id="354825" author="bzzz" created="Thu, 1 Dec 2022 17:04:02 +0000"  >&lt;p&gt;we&apos;ve tested with the patch reverted on two different systems, successfuly.&lt;/p&gt;</comment>
                            <comment id="354829" author="hornc" created="Thu, 1 Dec 2022 17:18:01 +0000"  >&lt;blockquote&gt;
&lt;p&gt;but the patch adds this:&lt;/p&gt;

&lt;p&gt;+               rc = LNetAddPeer(entry-&amp;gt;un_nids, entry-&amp;gt;un_nid_count);&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Yes, but LNetAddPeer() does not directly result in discovery. Discovery is triggered by call to LNetPrimaryNID() in ptlrpc_connection_get(), and these calls should exist with or without my patch. So we&apos;ll need to understand why the behavior is different with the patch.&lt;br/&gt;
Can you provide debug logs from reproducer with and without and the patch for analysis?&lt;/p&gt;</comment>
                            <comment id="354832" author="bzzz" created="Thu, 1 Dec 2022 17:38:17 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/secure/ViewProfile.jspa?name=hornc&quot; class=&quot;user-hover&quot; rel=&quot;hornc&quot;&gt;hornc&lt;/a&gt; please check the lines I posted 2 hours ago - this is a case where llog processing took very long.&lt;br/&gt;
now similar part for a &quot;good&quot; case:&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;
00000020:00000080:4.0:1669847133.980952:0:19526:0:(obd_config.c:1389:class_process_config()) processing cmd: cf00b
00010000:00080000:4.0:1669847133.980956:0:19526:0:(ldlm_lib.c:99:import_set_conn()) imp ffff9a54fb49b000@testfs-OST0001-osc-MDT0002: found existing conn 172.16.0.75@o2ib
00000020:00000080:4.0:1669847133.980957:0:19526:0:(obd_config.c:1389:class_process_config()) processing cmd: cf005
00000020:00000080:4.0:1669847133.980957:0:19526:0:(obd_config.c:1401:class_process_config()) adding mapping from uuid 172.16.0.77@o2ib to nid 0x50000ac10004d (172.16.0.77@o2ib)
00000020:00000080:4.0:1669847133.980958:0:19526:0:(obd_config.c:1389:class_process_config()) processing cmd: cf005
00000020:00000080:4.0:1669847133.980959:0:19526:0:(obd_config.c:1401:class_process_config()) adding mapping from uuid 172.16.0.77@o2ib to nid 0x50000ac10004e (172.16.0.78@o2ib)
00000020:00000080:4.0:1669847133.980960:0:19526:0:(obd_config.c:1389:class_process_config()) processing cmd: cf00b
00010000:00080000:4.0:1669847133.980961:0:19526:0:(ldlm_lib.c:116:import_set_conn()) imp ffff9a54fb49b000@testfs-OST0001-osc-MDT0002: add connection 172.16.0.77@o2ib at tail
00000020:00000080:4.0:1669847133.980962:0:19526:0:(obd_config.c:1389:class_process_config()) processing cmd: cf005
00000020:00000080:4.0:1669847133.980963:0:19526:0:(obd_config.c:1401:class_process_config()) adding mapping from uuid 172.16.0.79@o2ib to nid 0x50000ac10004f (172.16.0.79@o2ib)
00000020:00000080:4.0:1669847133.980964:0:19526:0:(obd_config.c:1389:class_process_config()) processing cmd: cf005
00000020:00000080:4.0:1669847133.980964:0:19526:0:(obd_config.c:1401:class_process_config()) adding mapping from uuid 172.16.0.79@o2ib to nid 0x50000ac100050 (172.16.0.80@o2ib)
00000020:00000080:4.0:1669847133.980965:0:19526:0:(obd_config.c:1389:class_process_config()) processing cmd: cf00b
00010000:00080000:4.0:1669847133.980967:0:19526:0:(ldlm_lib.c:116:import_set_conn()) imp ffff9a54fb49b000@testfs-OST0001-osc-MDT0002: add connection 172.16.0.79@o2ib at tail
00000020:00000080:4.0:1669847133.980968:0:19526:0:(obd_config.c:1389:class_process_config()) processing cmd: cf005
00000020:00000080:4.0:1669847133.980969:0:19526:0:(obd_config.c:1401:class_process_config()) adding mapping from uuid 172.16.0.81@o2ib to nid 0x50000ac100051 (172.16.0.81@o2ib)
00000020:00000080:4.0:1669847133.980970:0:19526:0:(obd_config.c:1389:class_process_config()) processing cmd: cf005
00000020:00000080:4.0:1669847133.980970:0:19526:0:(obd_config.c:1401:class_process_config()) adding mapping from uuid 172.16.0.81@o2ib to nid 0x50000ac100052 (172.16.0.82@o2ib)
00000020:00000080:4.0:1669847133.980971:0:19526:0:(obd_config.c:1389:class_process_config()) processing cmd: cf00b
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="354834" author="hornc" created="Thu, 1 Dec 2022 17:46:01 +0000"  >&lt;p&gt;The log for good case doesn&apos;t seem to show the same log processing. e.g. there are no calls to ptlrpc_uuid_to_peer()/ptlrpc_connection_get(). Do you see those calls anywhere in the log? Is &quot;net&quot; trace enabled in debug mask in the log for good case? Can you compare the calls to LNetPrimaryNID() in good/bad case? e.g. count the number of LNetPrimaryNID() calls and compare in good/bad case?&lt;/p&gt;</comment>
                            <comment id="354912" author="bzzz" created="Fri, 2 Dec 2022 13:09:34 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/secure/ViewProfile.jspa?name=hornc&quot; class=&quot;user-hover&quot; rel=&quot;hornc&quot;&gt;hornc&lt;/a&gt; please check the log I&apos;ve just attached. this was gathered using pre-&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14661&quot; title=&quot;Provide kernel API for adding peer/peer NI&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14661&quot;&gt;&lt;del&gt;LU-14661&lt;/del&gt;&lt;/a&gt; version.&lt;/p&gt;</comment>
                            <comment id="354913" author="hornc" created="Fri, 2 Dec 2022 13:18:05 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/secure/ViewProfile.jspa?name=bzzz&quot; class=&quot;user-hover&quot; rel=&quot;bzzz&quot;&gt;bzzz&lt;/a&gt; Can you please attach the full log for the bad case as well?&lt;/p&gt;</comment>
                            <comment id="354914" author="hornc" created="Fri, 2 Dec 2022 13:20:54 +0000"  >&lt;p&gt;And can you provide the exact Lustre hash(es) being tested?&lt;/p&gt;</comment>
                            <comment id="354919" author="bzzz" created="Fri, 2 Dec 2022 13:31:54 +0000"  >&lt;blockquote&gt;&lt;p&gt;Alex Zhuravlev Can you please attach the full log for the bad case as well?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;just attached&lt;/p&gt;</comment>
                            <comment id="354920" author="hornc" created="Fri, 2 Dec 2022 13:35:52 +0000"  >&lt;p&gt;Is LNet peer discovery disabled in the good case but enabled in the bad case?&lt;/p&gt;</comment>
                            <comment id="354922" author="bzzz" created="Fri, 2 Dec 2022 13:52:49 +0000"  >&lt;blockquote&gt;&lt;p&gt;Is LNet peer discovery disabled in the good case but enabled in the bad case?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;not quite ready to answer, will have to check with collegue.&lt;br/&gt;
this is what we&apos;ve found yesterday: same branch, same setup - gets stuck with &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14661&quot; title=&quot;Provide kernel API for adding peer/peer NI&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14661&quot;&gt;&lt;del&gt;LU-14661&lt;/del&gt;&lt;/a&gt; and does well with &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14661&quot; title=&quot;Provide kernel API for adding peer/peer NI&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14661&quot;&gt;&lt;del&gt;LU-14661&lt;/del&gt;&lt;/a&gt; reverted.&lt;/p&gt;</comment>
                            <comment id="355468" author="bzzz" created="Wed, 7 Dec 2022 06:21:24 +0000"  >&lt;blockquote&gt;&lt;p&gt;If so, can you see if &lt;a href=&quot;https://review.whamcloud.com/#/c/fs/lustre-release/+/47322/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/#/c/fs/lustre-release/+/47322/&lt;/a&gt; helps?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;according to the testing, no, it doesn&apos;t help.&lt;/p&gt;</comment>
                            <comment id="355809" author="ssmirnov" created="Fri, 9 Dec 2022 05:26:43 +0000"  >&lt;p&gt;I was experimenting with the mount command which lists nids as X1,X2:Y1,Y2&#160;&lt;/p&gt;

&lt;p&gt;In my experiment all nids were fake, so all attempts to connect were expected to fail. I was just checking which nids LNet would try to connect to.&lt;/p&gt;

&lt;p&gt;Basically, it looks like before &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14661&quot; title=&quot;Provide kernel API for adding peer/peer NI&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14661&quot;&gt;&lt;del&gt;LU-14661&lt;/del&gt;&lt;/a&gt; patch, LNet would only try to connect to X1 and Y1 when discovering X and Y respectively. With &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14661&quot; title=&quot;Provide kernel API for adding peer/peer NI&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14661&quot;&gt;&lt;del&gt;LU-14661&lt;/del&gt;&lt;/a&gt; patch, LNet tries to connect to all listed nids. I think this behavior is expected though and is good in the sense that it gives the mount the chance to succeed if X1 is down but X2 is up.&lt;/p&gt;</comment>
                            <comment id="355811" author="bzzz" created="Fri, 9 Dec 2022 05:43:00 +0000"  >&lt;p&gt;the problem that mount takes too long in such a scenario, HA gives up and initiates a failover which can hit the same problem.&lt;br/&gt;
would it be possible to make such a &quot;try to connect&quot; async? so mount process (adding nids from the config) is not blocked trying to connect one by one?&lt;/p&gt;</comment>
                            <comment id="355812" author="gtapase" created="Fri, 9 Dec 2022 05:47:52 +0000"  >&lt;p&gt;We can definitely improve HA agents to wait a bit more (right now they wait for 450s before giving up). I had tried doubling the timeout (900s), still saw the problem. We need a definite timeout before which the mount would succeed.&lt;/p&gt;</comment>
                            <comment id="355815" author="bzzz" created="Fri, 9 Dec 2022 06:00:52 +0000"  >&lt;p&gt;IMO, increasing timeout isn&apos;t the optimial way - mount takes very long (so failover), users have bad experience, etc.&lt;/p&gt;</comment>
                            <comment id="355816" author="gtapase" created="Fri, 9 Dec 2022 06:15:37 +0000"  >&lt;blockquote&gt;&lt;p&gt;IMO, increasing timeout isn&apos;t the optimial way - mount takes very long (so failover), users have bad experience, etc.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Agree.&lt;/p&gt;</comment>
                            <comment id="356463" author="bzzz" created="Wed, 14 Dec 2022 18:45:51 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/secure/ViewProfile.jspa?name=hornc&quot; class=&quot;user-hover&quot; rel=&quot;hornc&quot;&gt;hornc&lt;/a&gt; can we discover new NIDs asynchronously so that the thread processing llog doesn&apos;t block?&lt;/p&gt;</comment>
                            <comment id="359382" author="hornc" created="Tue, 17 Jan 2023 21:08:53 +0000"  >&lt;p&gt;Couple points:&lt;br/&gt;
We should probably open a new ticket for this issue/discussion.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;I was experimenting with the mount command which lists nids as X1,X2:Y1,Y2 &lt;span class=&quot;error&quot;&gt;&amp;#91;...&amp;#93;&lt;/span&gt; With &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14661&quot; title=&quot;Provide kernel API for adding peer/peer NI&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14661&quot;&gt;&lt;del&gt;LU-14661&lt;/del&gt;&lt;/a&gt; patch, LNet tries to connect to all listed nids.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;To be clear, a &lt;em&gt;client&lt;/em&gt; mount attempt performs exactly the same with or without &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14661&quot; title=&quot;Provide kernel API for adding peer/peer NI&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14661&quot;&gt;&lt;del&gt;LU-14661&lt;/del&gt;&lt;/a&gt; when passed &quot;X1,X2:Y1,Y2&quot; MGS nid format.&lt;/p&gt;

&lt;p&gt;With &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14661&quot; title=&quot;Provide kernel API for adding peer/peer NI&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14661&quot;&gt;&lt;del&gt;LU-14661&lt;/del&gt;&lt;/a&gt; (master commit 6f490275b0):&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@ct7-mds1 lustre-filesystem]# mount -t lustre 1.1.1.1@tcp,1.1.1.2@tcp:2.2.2.1@tcp,2.2.2.2@tcp:/lustre /mnt/lustre
mount.lustre: mount 1.1.1.1@tcp,1.1.1.2@tcp:2.2.2.1@tcp,2.2.2.2@tcp:/lustre at /mnt/lustre failed: Input/output error
Is the MGS running?
[root@ct7-mds1 lustre-filesystem]# lctl dk &amp;gt; /tmp/dk.log
[root@ct7-mds1 lustre-filesystem]# grep -e lnet_health_check -e TRACE -e lnet_discover_peer_locked /tmp/dk.log | egrep -e 1.1.1. -e 2.2.2. -e lnet_discover_peer_locked
00000400:00000200:0.0:1673986593.772495:0:5947:0:(peer.c:2528:lnet_discover_peer_locked()) Discovery attempt # 1
00000400:00000200:0.0:1673986593.772524:0:5509:0:(lib-move.c:2009:lnet_handle_send()) TRACE: 10.73.20.11@tcp(10.73.20.11@tcp:&amp;lt;?&amp;gt;) -&amp;gt; 1.1.1.1@tcp(1.1.1.1@tcp:1.1.1.1@tcp) &amp;lt;?&amp;gt; : GET try# 0
00000400:00000200:0.0:1673986652.199830:0:5506:0:(lib-msg.c:811:lnet_health_check()) health check: 10.73.20.11@tcp-&amp;gt;1.1.1.1@tcp: GET: LOCAL_TIMEOUT
00000400:00000200:0.0:1673986652.199877:0:5510:0:(lib-move.c:2009:lnet_handle_send()) TRACE: 10.73.20.12@tcp(10.73.20.12@tcp:&amp;lt;?&amp;gt;) -&amp;gt; 1.1.1.2@tcp(1.1.1.1@tcp:1.1.1.2@tcp) &amp;lt;?&amp;gt; : GET try# 1
00000400:00000200:0.0:1673986703.226629:0:5506:0:(lib-msg.c:811:lnet_health_check()) health check: 10.73.20.12@tcp-&amp;gt;1.1.1.2@tcp: GET: LOCAL_TIMEOUT
00000400:00000200:0.0:1673986703.226700:0:5510:0:(lib-move.c:2009:lnet_handle_send()) TRACE: 10.73.20.11@tcp(10.73.20.11@tcp:&amp;lt;?&amp;gt;) -&amp;gt; 1.1.1.1@tcp(1.1.1.2@tcp:1.1.1.1@tcp) &amp;lt;?&amp;gt; : GET try# 2
00000400:00000200:0.0:1673986721.024165:0:5502:0:(lib-msg.c:811:lnet_health_check()) health check: 10.73.20.11@tcp-&amp;gt;1.1.1.1@tcp: GET: LOCAL_TIMEOUT
00000400:00000200:0.0:1673986721.024196:0:5947:0:(peer.c:2578:lnet_discover_peer_locked()) peer 1.1.1.1@tcp NID 1.1.1.1@tcp: -110. discovery complete
00000400:00000200:0.0:1673986721.027992:0:5947:0:(peer.c:2528:lnet_discover_peer_locked()) Discovery attempt # 1
00000400:00000200:0.0:1673986721.028022:0:5509:0:(lib-move.c:2009:lnet_handle_send()) TRACE: 10.73.20.12@tcp(10.73.20.12@tcp:&amp;lt;?&amp;gt;) -&amp;gt; 2.2.2.1@tcp(2.2.2.1@tcp:2.2.2.1@tcp) &amp;lt;?&amp;gt; : GET try# 0
00000400:00000200:0.0:1673986778.248439:0:5506:0:(lib-msg.c:811:lnet_health_check()) health check: 10.73.20.12@tcp-&amp;gt;2.2.2.1@tcp: GET: LOCAL_TIMEOUT
00000400:00000200:0.0:1673986778.248497:0:5510:0:(lib-move.c:2009:lnet_handle_send()) TRACE: 10.73.20.11@tcp(10.73.20.11@tcp:&amp;lt;?&amp;gt;) -&amp;gt; 2.2.2.2@tcp(2.2.2.1@tcp:2.2.2.2@tcp) &amp;lt;?&amp;gt; : GET try# 1
00000400:00000200:0.0:1673986829.257114:0:5506:0:(lib-msg.c:811:lnet_health_check()) health check: 10.73.20.11@tcp-&amp;gt;2.2.2.2@tcp: GET: LOCAL_TIMEOUT
00000400:00000200:0.0:1673986829.257158:0:5510:0:(lib-move.c:2009:lnet_handle_send()) TRACE: 10.73.20.12@tcp(10.73.20.12@tcp:&amp;lt;?&amp;gt;) -&amp;gt; 2.2.2.1@tcp(2.2.2.2@tcp:2.2.2.1@tcp) &amp;lt;?&amp;gt; : GET try# 2
00000400:00000200:0.0:1673986848.256819:0:5505:0:(lib-msg.c:811:lnet_health_check()) health check: 10.73.20.12@tcp-&amp;gt;2.2.2.1@tcp: GET: LOCAL_TIMEOUT
00000400:00000200:0.0:1673986848.256871:0:5947:0:(peer.c:2578:lnet_discover_peer_locked()) peer 2.2.2.1@tcp NID 2.2.2.1@tcp: -110. discovery complete
...
[root@ct7-mds1 lustre-filesystem]# echo 1673986848.256871 - 1673986593.772495 | bc
254.484376
[root@ct7-mds1 lustre-filesystem]#
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Without &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14661&quot; title=&quot;Provide kernel API for adding peer/peer NI&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14661&quot;&gt;&lt;del&gt;LU-14661&lt;/del&gt;&lt;/a&gt; (master commit 6f490275b0 + revert of 16321de596f6395153be6cbb6192250516963077):&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@ct7-mds1 lustre-filesystem]# mount -t lustre 1.1.1.1@tcp,1.1.1.2@tcp:2.2.2.1@tcp,2.2.2.2@tcp:/lustre /mnt/lustre
mount.lustre: mount 1.1.1.1@tcp,1.1.1.2@tcp:2.2.2.1@tcp,2.2.2.2@tcp:/lustre at /mnt/lustre failed: Input/output error
Is the MGS running?
[root@ct7-mds1 lustre-filesystem]# lctl dk &amp;gt; /tmp/dk.log2
[root@ct7-mds1 lustre-filesystem]# grep -e lnet_health_check -e TRACE -e lnet_discover_peer_locked /tmp/dk.log2 | egrep -e 1.1.1. -e 2.2.2. -e lnet_discover_peer_locked
00000400:00000200:0.0:1673988188.818846:0:7434:0:(peer.c:2528:lnet_discover_peer_locked()) Discovery attempt # 1
00000400:00000200:0.0:1673988188.818874:0:7032:0:(lib-move.c:2009:lnet_handle_send()) TRACE: 10.73.20.11@tcp(10.73.20.11@tcp:&amp;lt;?&amp;gt;) -&amp;gt; 1.1.1.1@tcp(1.1.1.1@tcp:1.1.1.1@tcp) &amp;lt;?&amp;gt; : GET try# 0
00000400:00000200:0.0:1673988249.480663:0:7029:0:(lib-msg.c:811:lnet_health_check()) health check: 10.73.20.11@tcp-&amp;gt;1.1.1.1@tcp: GET: LOCAL_TIMEOUT
00000400:00000200:0.0:1673988249.480727:0:7033:0:(lib-move.c:2009:lnet_handle_send()) TRACE: 10.73.20.12@tcp(10.73.20.12@tcp:&amp;lt;?&amp;gt;) -&amp;gt; 1.1.1.1@tcp(1.1.1.1@tcp:1.1.1.1@tcp) &amp;lt;?&amp;gt; : GET try# 1
00000400:00000200:0.0:1673988300.480228:0:7029:0:(lib-msg.c:811:lnet_health_check()) health check: 10.73.20.12@tcp-&amp;gt;1.1.1.1@tcp: GET: LOCAL_TIMEOUT
00000400:00000200:0.0:1673988300.480289:0:7033:0:(lib-move.c:2009:lnet_handle_send()) TRACE: 10.73.20.11@tcp(10.73.20.11@tcp:&amp;lt;?&amp;gt;) -&amp;gt; 1.1.1.1@tcp(1.1.1.1@tcp:1.1.1.1@tcp) &amp;lt;?&amp;gt; : GET try# 2
00000400:00000200:0.0:1673988316.033279:0:7025:0:(lib-msg.c:811:lnet_health_check()) health check: 10.73.20.11@tcp-&amp;gt;1.1.1.1@tcp: GET: LOCAL_TIMEOUT
00000400:00000200:0.0:1673988316.033351:0:7434:0:(peer.c:2578:lnet_discover_peer_locked()) peer 1.1.1.1@tcp NID 1.1.1.1@tcp: -110. discovery complete
00000400:00000200:0.0:1673988316.034632:0:7434:0:(peer.c:2528:lnet_discover_peer_locked()) Discovery attempt # 1
00000400:00000200:0.0:1673988316.034665:0:7032:0:(lib-move.c:2009:lnet_handle_send()) TRACE: 10.73.20.12@tcp(10.73.20.12@tcp:&amp;lt;?&amp;gt;) -&amp;gt; 2.2.2.1@tcp(2.2.2.1@tcp:2.2.2.1@tcp) &amp;lt;?&amp;gt; : GET try# 0
00000400:00000200:0.0:1673988375.486277:0:7029:0:(lib-msg.c:811:lnet_health_check()) health check: 10.73.20.12@tcp-&amp;gt;2.2.2.1@tcp: GET: LOCAL_TIMEOUT
00000400:00000200:0.0:1673988375.486332:0:7033:0:(lib-move.c:2009:lnet_handle_send()) TRACE: 10.73.20.11@tcp(10.73.20.11@tcp:&amp;lt;?&amp;gt;) -&amp;gt; 2.2.2.1@tcp(2.2.2.1@tcp:2.2.2.1@tcp) &amp;lt;?&amp;gt; : GET try# 1
00000400:00000200:0.0:1673988426.497680:0:7029:0:(lib-msg.c:811:lnet_health_check()) health check: 10.73.20.11@tcp-&amp;gt;2.2.2.1@tcp: GET: LOCAL_TIMEOUT
00000400:00000200:0.0:1673988426.497744:0:7033:0:(lib-move.c:2009:lnet_handle_send()) TRACE: 10.73.20.12@tcp(10.73.20.12@tcp:&amp;lt;?&amp;gt;) -&amp;gt; 2.2.2.1@tcp(2.2.2.1@tcp:2.2.2.1@tcp) &amp;lt;?&amp;gt; : GET try# 2
00000400:00000200:0.0:1673988443.264923:0:7028:0:(lib-msg.c:811:lnet_health_check()) health check: 10.73.20.12@tcp-&amp;gt;2.2.2.1@tcp: GET: LOCAL_TIMEOUT
00000400:00000200:0.0:1673988443.264993:0:7434:0:(peer.c:2578:lnet_discover_peer_locked()) peer 2.2.2.1@tcp NID 2.2.2.1@tcp: -110. discovery complete
...
[root@ct7-mds1 lustre-filesystem]# echo 1673988443.264993 - 1673988188.818846 | bc
254.446147
[root@ct7-mds1 lustre-filesystem]#
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;We can see the amount of time spent in blocking discovery calls is identical with or without the patch.&lt;/p&gt;

&lt;p&gt;Again, the &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14661&quot; title=&quot;Provide kernel API for adding peer/peer NI&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14661&quot;&gt;&lt;del&gt;LU-14661&lt;/del&gt;&lt;/a&gt; patch does not add &lt;em&gt;any&lt;/em&gt; calls to discover NIDs. &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14661&quot; title=&quot;Provide kernel API for adding peer/peer NI&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14661&quot;&gt;&lt;del&gt;LU-14661&lt;/del&gt;&lt;/a&gt; simply creates a peer entry in peer table so that LNet is aware of all NIDs available on server.&lt;/p&gt;

&lt;p&gt;All traffic is driven by Lustre - either by calling LNetPrimaryNID while processing llog or by trying to send RPCs.&lt;/p&gt;

&lt;p&gt;Yes, if you attempt to mount the MGS/MDT0 and you have a lot of unreachable NIDs in the llog then this can cause delays in starting MGS/MDT0, but it is not clear to me how &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14661&quot; title=&quot;Provide kernel API for adding peer/peer NI&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14661&quot;&gt;&lt;del&gt;LU-14661&lt;/del&gt;&lt;/a&gt; patch makes this worse. If anything, it should improve certain situations where targets are only available on subset of configured interfaces.&lt;/p&gt;

&lt;p&gt;I reviewed the attached log files but they do not seem to show an identical experiment with/without &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14661&quot; title=&quot;Provide kernel API for adding peer/peer NI&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14661&quot;&gt;&lt;del&gt;LU-14661&lt;/del&gt;&lt;/a&gt;. In the &quot;successful&quot; case I see this mount activity:&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;hornc@C02V50B9HTDG Downloads % grep lustre_fill_super exa61_lustre_debug_mgs_logs_successful_failover
00000020:00000001:2.0:1669879252.327292:0:1363:0:(obd_mount.c:1603:lustre_fill_super()) Process entered
00000020:01200004:2.0:1669879252.327293:0:1363:0:(obd_mount.c:1605:lustre_fill_super()) VFS Op: sb ffff99d65f79c000
00000020:01000004:2.0:1669879252.327519:0:1363:0:(obd_mount.c:1659:lustre_fill_super()) Mounting server from /dev/sdl
00000020:00000001:14.0:1669879252.330511:0:1373:0:(obd_mount.c:1603:lustre_fill_super()) Process entered
00000020:01200004:14.0:1669879252.330512:0:1373:0:(obd_mount.c:1605:lustre_fill_super()) VFS Op: sb ffff99d67ce4e000
00000020:01000004:14.0:1669879252.330803:0:1373:0:(obd_mount.c:1659:lustre_fill_super()) Mounting server from /dev/sdh
00000020:00000001:7.0:1669879252.333040:0:1364:0:(obd_mount.c:1603:lustre_fill_super()) Process entered
00000020:01200004:7.0:1669879252.333041:0:1364:0:(obd_mount.c:1605:lustre_fill_super()) VFS Op: sb ffff99d65c0e4000
00000020:01000004:7.0:1669879252.333251:0:1364:0:(obd_mount.c:1659:lustre_fill_super()) Mounting server from /dev/sdi
00000020:00000001:1.0:1669879252.336037:0:1368:0:(obd_mount.c:1603:lustre_fill_super()) Process entered
00000020:01200004:1.0:1669879252.336037:0:1368:0:(obd_mount.c:1605:lustre_fill_super()) VFS Op: sb ffff99b235271800
00000020:01000004:1.0:1669879252.336229:0:1368:0:(obd_mount.c:1659:lustre_fill_super()) Mounting server from /dev/sdm
00000020:00000001:18.0:1669879252.839585:0:2016:0:(obd_mount.c:1603:lustre_fill_super()) Process entered
00000020:01200004:18.0:1669879252.839587:0:2016:0:(obd_mount.c:1605:lustre_fill_super()) VFS Op: sb ffff99d67cca0800
00000020:01000004:18.0:1669879252.839789:0:2016:0:(obd_mount.c:1659:lustre_fill_super()) Mounting server from /dev/mapper/vg_mdt0003_testfs-mdt0003
00000020:00000001:3.0:1669879252.898029:0:2180:0:(obd_mount.c:1603:lustre_fill_super()) Process entered
00000020:01200004:3.0:1669879252.898031:0:2180:0:(obd_mount.c:1605:lustre_fill_super()) VFS Op: sb ffff99d650fd0800
00000020:01000004:3.0:1669879252.898227:0:2180:0:(obd_mount.c:1659:lustre_fill_super()) Mounting server from /dev/mapper/vg_mdt0001_testfs-mdt0001
00000020:00000001:3.0:1669879294.415448:0:1373:0:(obd_mount.c:1677:lustre_fill_super()) Process leaving via out (rc=0 : 0 : 0x0)
00000020:00000004:3.0:1669879294.415449:0:1373:0:(obd_mount.c:1684:lustre_fill_super()) Mount /dev/sdh complete
00000020:00000001:4.0:1669879294.459274:0:1364:0:(obd_mount.c:1677:lustre_fill_super()) Process leaving via out (rc=0 : 0 : 0x0)
00000020:00000004:4.0:1669879294.459275:0:1364:0:(obd_mount.c:1684:lustre_fill_super()) Mount /dev/sdi complete
00000020:00000001:4.0:1669879294.504129:0:1363:0:(obd_mount.c:1677:lustre_fill_super()) Process leaving via out (rc=0 : 0 : 0x0)
00000020:00000004:4.0:1669879294.504129:0:1363:0:(obd_mount.c:1684:lustre_fill_super()) Mount /dev/sdl complete
00000020:00000001:7.0:1669879294.547133:0:1368:0:(obd_mount.c:1677:lustre_fill_super()) Process leaving via out (rc=0 : 0 : 0x0)
00000020:00000004:7.0:1669879294.547134:0:1368:0:(obd_mount.c:1684:lustre_fill_super()) Mount /dev/sdm complete
00000020:00000001:9.0:1669879434.214316:0:2016:0:(obd_mount.c:1677:lustre_fill_super()) Process leaving via out (rc=0 : 0 : 0x0)
00000020:00000004:9.0:1669879434.214317:0:2016:0:(obd_mount.c:1684:lustre_fill_super()) Mount /dev/mapper/vg_mdt0003_testfs-mdt0003 complete
00000020:00000001:6.0:1669879434.306276:0:2180:0:(obd_mount.c:1677:lustre_fill_super()) Process leaving via out (rc=0 : 0 : 0x0)
00000020:00000004:6.0:1669879434.306277:0:2180:0:(obd_mount.c:1684:lustre_fill_super()) Mount /dev/mapper/vg_mdt0001_testfs-mdt0001 complete
hornc@C02V50B9HTDG Downloads %
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;We can see MDT0003/MDT0001 are started on this server.&lt;/p&gt;

&lt;p&gt;Here&apos;s the &quot;failure&quot; case:&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;00000020:01200004:18.0:1669887849.684402:0:26184:0:(obd_mount.c:1605:lustre_fill_super()) VFS Op: sb 000000006da5383a
00000020:01000004:18.0:1669887849.684416:0:26184:0:(obd_mount.c:1659:lustre_fill_super()) Mounting server from /dev/mapper/vg_mgs-mgs
00000020:01200004:4.0F:1669887851.305182:0:26399:0:(obd_mount.c:1605:lustre_fill_super()) VFS Op: sb 0000000083d05345
00000020:01000004:4.0:1669887851.305239:0:26399:0:(obd_mount.c:1659:lustre_fill_super()) Mounting server from /dev/mapper/vg_mdt0000_testfs-mdt0000
00000020:01200004:18.0:1669887896.681846:0:26695:0:(obd_mount.c:1605:lustre_fill_super()) VFS Op: sb 0000000011e1fd8a
00000020:01000004:18.0:1669887896.681899:0:26695:0:(obd_mount.c:1659:lustre_fill_super()) Mounting server from /dev/sdf
00000020:01200004:8.0:1669887896.689944:0:26694:0:(obd_mount.c:1605:lustre_fill_super()) VFS Op: sb 00000000fd561f91
00000020:01000004:8.0:1669887896.689984:0:26694:0:(obd_mount.c:1659:lustre_fill_super()) Mounting server from /dev/sdg
00000020:01200004:14.0:1669888000.593093:0:34933:0:(obd_mount.c:1605:lustre_fill_super()) VFS Op: sb 00000000015e2fa5
00000020:01000004:14.0:1669888000.593106:0:34933:0:(obd_mount.c:1659:lustre_fill_super()) Mounting server from /dev/mapper/vg_mgs-mgs
00000020:01200004:4.0:1669888003.512820:0:35427:0:(obd_mount.c:1605:lustre_fill_super()) VFS Op: sb 00000000b90f4eca
00000020:01000004:4.0:1669888003.512868:0:35427:0:(obd_mount.c:1659:lustre_fill_super()) Mounting server from /dev/mapper/vg_mdt0000_testfs-mdt0000
00000020:01200004:17.0:1669888003.512942:0:35428:0:(obd_mount.c:1605:lustre_fill_super()) VFS Op: sb 000000005d688404
00000020:01000004:17.0:1669888003.512993:0:35428:0:(obd_mount.c:1659:lustre_fill_super()) Mounting server from /dev/sdf
00000020:01200004:15.0:1669888158.886882:0:50631:0:(obd_mount.c:1605:lustre_fill_super()) VFS Op: sb 00000000fc1a622b
00000020:01000004:15.0:1669888158.886894:0:50631:0:(obd_mount.c:1632:lustre_fill_super()) Mounting client testfs-client
00000020:00000001:12.0:1669888790.461036:0:79837:0:(obd_mount.c:1603:lustre_fill_super()) Process entered
00000020:01200004:12.0:1669888790.461037:0:79837:0:(obd_mount.c:1605:lustre_fill_super()) VFS Op: sb 000000003e0cdb4c
00000020:01000004:12.0:1669888790.461270:0:79837:0:(obd_mount.c:1659:lustre_fill_super()) Mounting server from /dev/sdl
00000020:00000001:8.0:1669888790.462048:0:79841:0:(obd_mount.c:1603:lustre_fill_super()) Process entered
00000020:01200004:8.0:1669888790.462049:0:79841:0:(obd_mount.c:1605:lustre_fill_super()) VFS Op: sb 00000000d89b60bc
00000020:01000004:8.0:1669888790.462268:0:79841:0:(obd_mount.c:1659:lustre_fill_super()) Mounting server from /dev/sdh
00000020:00000001:14.0:1669888790.465089:0:79842:0:(obd_mount.c:1603:lustre_fill_super()) Process entered
00000020:01200004:14.0:1669888790.465090:0:79842:0:(obd_mount.c:1605:lustre_fill_super()) VFS Op: sb 000000000a7dd246
00000020:01000004:14.0:1669888790.465316:0:79842:0:(obd_mount.c:1659:lustre_fill_super()) Mounting server from /dev/sdm
00000020:00000001:13.0:1669888790.466087:0:79843:0:(obd_mount.c:1603:lustre_fill_super()) Process entered
00000020:01200004:13.0:1669888790.466088:0:79843:0:(obd_mount.c:1605:lustre_fill_super()) VFS Op: sb 0000000076093839
00000020:01000004:13.0:1669888790.466360:0:79843:0:(obd_mount.c:1659:lustre_fill_super()) Mounting server from /dev/sdi
00000020:00000001:18.0:1669888790.967385:0:80366:0:(obd_mount.c:1603:lustre_fill_super()) Process entered
00000020:01200004:18.0:1669888790.967386:0:80366:0:(obd_mount.c:1605:lustre_fill_super()) VFS Op: sb 00000000602ad4f3
00000020:01000004:18.0:1669888790.967614:0:80366:0:(obd_mount.c:1659:lustre_fill_super()) Mounting server from /dev/mapper/vg_mdt0003_testfs-mdt0003
00000020:00000001:16.0:1669888790.993980:0:80397:0:(obd_mount.c:1603:lustre_fill_super()) Process entered
00000020:01200004:16.0:1669888790.993981:0:80397:0:(obd_mount.c:1605:lustre_fill_super()) VFS Op: sb 000000003510bf98
00000020:01000004:16.0:1669888790.994203:0:80397:0:(obd_mount.c:1659:lustre_fill_super()) Mounting server from /dev/mapper/vg_mdt0001_testfs-mdt0001
00000020:00000001:14.0:1669888833.193485:0:79841:0:(obd_mount.c:1677:lustre_fill_super()) Process leaving via out (rc=0 : 0 : 0x0)
00000020:00000004:14.0:1669888833.193486:0:79841:0:(obd_mount.c:1684:lustre_fill_super()) Mount /dev/sdh complete
00000020:00000001:18.0:1669888833.236872:0:79842:0:(obd_mount.c:1677:lustre_fill_super()) Process leaving via out (rc=0 : 0 : 0x0)
00000020:00000004:18.0:1669888833.236873:0:79842:0:(obd_mount.c:1684:lustre_fill_super()) Mount /dev/sdm complete
00000020:00000001:3.0:1669888833.289210:0:79837:0:(obd_mount.c:1677:lustre_fill_super()) Process leaving via out (rc=0 : 0 : 0x0)
00000020:00000004:3.0:1669888833.289211:0:79837:0:(obd_mount.c:1684:lustre_fill_super()) Mount /dev/sdl complete
00000020:00000001:13.0:1669888833.341585:0:79843:0:(obd_mount.c:1677:lustre_fill_super()) Process leaving via out (rc=0 : 0 : 0x0)
00000020:00000004:13.0:1669888833.341586:0:79843:0:(obd_mount.c:1684:lustre_fill_super()) Mount /dev/sdi complete
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Here we see MGS, MDT0000, a client mount, MDT0003 and MDT0001 are started on this node.&lt;/p&gt;

&lt;p&gt;If we look at just portion of both logs that cover mount of MDT0003 and MDT0001 then it appears they spend about the same amount of time. So, again, it is not clear why &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14661&quot; title=&quot;Provide kernel API for adding peer/peer NI&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14661&quot;&gt;&lt;del&gt;LU-14661&lt;/del&gt;&lt;/a&gt; patch is to blame.&lt;/p&gt;

&lt;p&gt;I suspect that you are actually seeing a delay in mounting MGS/MDT0, and maybe &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14661&quot; title=&quot;Provide kernel API for adding peer/peer NI&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14661&quot;&gt;&lt;del&gt;LU-14661&lt;/del&gt;&lt;/a&gt; patch is somehow making this worse, but I do not see evidence of it.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Chris Horn can we discover new NIDs asynchronously so that the thread processing llog doesn&apos;t block?&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;This is the idea in &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14668&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.whamcloud.com/browse/LU-14668&lt;/a&gt; but those patches have not landed.&lt;/p&gt;</comment>
                            <comment id="359391" author="ssmirnov" created="Tue, 17 Jan 2023 22:10:42 +0000"  >&lt;p&gt;Hi Chris,&lt;/p&gt;

&lt;p&gt;I think there&apos;s a difference in the examples you posted: &#160;&lt;/p&gt;

&lt;p&gt;&quot;With &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14661&quot; title=&quot;Provide kernel API for adding peer/peer NI&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14661&quot;&gt;&lt;del&gt;LU-14661&lt;/del&gt;&lt;/a&gt;&quot; trace shows client trying to discover 1.1.1.1@tcp, then to 1.1.1.2@tcp, then&#160;2.2.2.1@tcp and finally&#160;2.2.2.2@tcp. &#160;&lt;/p&gt;

&lt;p&gt;&quot;Without&quot; trace shows client trying to discover 1.1.1.1@tcp, then&#160;2.2.2.1@tcp and that&apos;s it.&lt;/p&gt;

&lt;p&gt;I thought that this difference in behaviour was responsible for the difference in time it took for the mount to fail, because in the &quot;with&quot; case there were more nids being discovered sequentially, but your example demonstrates it is not so as it looks like the same number of discovery attempts is made per peer regardless of destination nid.&lt;/p&gt;

&lt;p&gt;Either way, like I said before, I don&apos;t see anything wrong with &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14661&quot; title=&quot;Provide kernel API for adding peer/peer NI&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14661&quot;&gt;&lt;del&gt;LU-14661&lt;/del&gt;&lt;/a&gt;. I&apos;m planning to revisit &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14668&quot; title=&quot;LNet: do discovery in the background&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14668&quot;&gt;&lt;del&gt;LU-14668&lt;/del&gt;&lt;/a&gt; though to see if we can get it to work though as it would speed things up vs discovering nids one at a time, especially when some nids are unreachable.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;/p&gt;

&lt;p&gt;Serguei.&lt;/p&gt;</comment>
                            <comment id="359502" author="hornc" created="Wed, 18 Jan 2023 16:03:00 +0000"  >&lt;p&gt;Yes, the NIDs being discovered are different, but my point was that in both cases you have three blocking discovery calls for each &quot;MGS&quot;, and those calls contribute the same amount of time to the failed mount with or without the patch.&lt;/p&gt;

&lt;p&gt;+1 on reviving &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14668&quot; title=&quot;LNet: do discovery in the background&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14668&quot;&gt;&lt;del&gt;LU-14668&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="359749" author="bzzz" created="Thu, 19 Jan 2023 20:45:25 +0000"  >&lt;p&gt;well, still the fact that reverting that patch fixed the problem. I guess Guarang can confirm.&lt;/p&gt;</comment>
                            <comment id="360080" author="hornc" created="Mon, 23 Jan 2023 17:43:01 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/secure/ViewProfile.jspa?name=bzzz&quot; class=&quot;user-hover&quot; rel=&quot;bzzz&quot;&gt;bzzz&lt;/a&gt; I think this ticket should be closed and a new ticket opened for this issue. I am not saying there is no problem, but the logs that are provided so far do not show the problem (AFAICT).&lt;/p&gt;</comment>
                            <comment id="360159" author="bzzz" created="Tue, 24 Jan 2023 09:03:18 +0000"  >&lt;blockquote&gt;
&lt;p&gt;but the logs that are provided so far do not show the problem (AFAICT).&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I&apos;m fine with another ticket or any either way, that&apos;s totally fine. but not sure why are you saying above. the logs I pasted above show that in once case config log&apos;s processing took 30 seconds and in a good case (with the patch reverted) it took less a second. isn&apos;t this a problem?&lt;/p&gt;</comment>
                            <comment id="360194" author="hornc" created="Tue, 24 Jan 2023 16:16:43 +0000"  >&lt;p&gt;Please open a new ticket and we can continue discussion there.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="47066" name="exa61_lustre_debug_mgs_logs_successful_failover.gz" size="20735469" author="bzzz" created="Fri, 2 Dec 2022 13:08:36 +0000"/>
                            <attachment id="47068" name="exa62_mgs_lustre_logs_failover_with_trace.gz" size="12409365" author="bzzz" created="Fri, 2 Dec 2022 13:30:32 +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|i01tjb:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>