<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:44:09 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-4594] evict client by nid not implemented in MDT</title>
                <link>https://jira.whamcloud.com/browse/LU-4594</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;In lprocfs_mdt_wr_evict_client(), it says evict client by nid not implemented:&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; 
static int lprocfs_mdt_wr_evict_client(struct file *file, const char *buffer,
                                       unsigned long count, void *data)
{
...
        if (strncmp(tmpbuf, &quot;nid:&quot;, 4) != 0) {
                count = lprocfs_wr_evict_client(file, buffer, count, data);
                goto out;
        }

        CERROR(&quot;NOT implement evict client by nid %s\n&quot;, tmpbuf);

...
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;Is there a reason why evict_client by nid still denied ?&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 (strncmp(tmpbuf, &quot;nid:&quot;, 4) != 0) {
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;As i see above case came from times when evict_by_nid was not supported.&lt;/p&gt;</description>
                <environment></environment>
        <key id="23026">LU-4594</key>
            <summary>evict client by nid not implemented in MDT</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="5" iconUrl="https://jira.whamcloud.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="2">Won&apos;t Fix</resolution>
                                        <assignee username="cliffw">Cliff White</assignee>
                                    <reporter username="scherementsev">Sergey Cheremencev</reporter>
                        <labels>
                            <label>patch</label>
                    </labels>
                <created>Thu, 6 Feb 2014 13:57:41 +0000</created>
                <updated>Mon, 24 Nov 2014 13:20:36 +0000</updated>
                            <resolved>Thu, 20 Nov 2014 17:42:03 +0000</resolved>
                                    <version>Lustre 2.5.0</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                            <comments>
                            <comment id="76492" author="green" created="Fri, 7 Feb 2014 18:38:27 +0000"  >&lt;p&gt;I think the functionality still lives in mds code and has not been migrated?&lt;/p&gt;</comment>
                            <comment id="76750" author="sergey" created="Tue, 11 Feb 2014 17:35:14 +0000"  >&lt;p&gt;Hello Oleg&lt;/p&gt;

&lt;p&gt;As i see that functionality is available in following places in proc:&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@192 tests]# find /proc/fs/lustre/ -name evict_client
/proc/fs/lustre/obdfilter/lustre-OST0001/evict_client
/proc/fs/lustre/obdfilter/lustre-OST0000/evict_client
/proc/fs/lustre/mdt/lustre-MDT0000/evict_client
/proc/fs/lustre/mgs/MGS/evict_client
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I&apos;ve added a patch with simple test. Hope it will be useful &lt;a href=&quot;http://review.whamcloud.com/#/c/9202/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#/c/9202/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="77033" author="green" created="Thu, 13 Feb 2014 22:24:40 +0000"  >&lt;p&gt;The thing with evict client by nid on MDT is such that it must be sending updates to all the servers, not just locally.&lt;/p&gt;

&lt;p&gt;That was the functionality in 1.x and it needs to be updated to happen in 2.x as well, otherwise we have change in expected behavior. That&apos;s why it was disabled on MDT I presume.&lt;/p&gt;</comment>
                            <comment id="77073" author="sergey" created="Fri, 14 Feb 2014 12:08:45 +0000"  >&lt;p&gt;evict client by uuid does the same things as evict client by nid:&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;...
class_fail_export(doomed_exp);      
class_export_put(doomed_exp);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;As I understand evict client by uuid also doesn&apos;t send updates to all servers.&lt;br/&gt;
Possible the both functions(evict by nid and by uuid) should be denied or allowed ?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</comment>
                            <comment id="77382" author="green" created="Wed, 19 Feb 2014 17:54:13 +0000"  >&lt;p&gt;You need t ocheck original b1_8 code:&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;static int lprocfs_mds_wr_evict_client(struct file *file, const char *buffer,
                                       unsigned long count, void *data)
{
        struct obd_device *obd = data;
        struct mds_obd *mds = &amp;amp;obd-&amp;gt;u.mds;
        char tmpbuf[sizeof(struct obd_uuid)];
        struct ptlrpc_request_set *set;
        int rc;

        sscanf(buffer, &quot;%40s&quot;, tmpbuf);

        if (strncmp(tmpbuf, &quot;nid:&quot;, 4) != 0)
                return lprocfs_wr_evict_client(file, buffer, count, data);

        set = ptlrpc_prep_set();
        if (!set)
                return -ENOMEM;

        if (obd-&amp;gt;u.mds.mds_evict_ost_nids) {
                rc = obd_set_info_async(mds-&amp;gt;mds_lov_exp,sizeof(KEY_EVICT_BY_NID),
                                        KEY_EVICT_BY_NID, strlen(tmpbuf + 4) + 1,
                                        tmpbuf + 4, set);
                if (rc)
                        CERROR(&quot;Failed to evict nid %s from OSTs: rc %d\n&quot;,
                               tmpbuf + 4, rc);
                ptlrpc_check_set(set);
        }

        /* See the comments in function lprocfs_wr_evict_client()
         * in ptlrpc/lproc_ptlrpc.c for details. - jay */
        class_incref(obd);
        LPROCFS_EXIT();

        obd_export_evict_by_nid(obd, tmpbuf+4);


        rc = ptlrpc_set_wait(set);
        if (rc)
                CERROR(&quot;Failed to evict nid %s from OSTs: rc %d\n&quot;, tmpbuf + 4,
                       rc);

        LPROCFS_ENTRY();
        class_decref(obd);

        ptlrpc_set_destroy(set);
        return count;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This is the functionality that needs to be restored.&lt;br/&gt;
It might be better to move this to mgs as a more &quot;Central&quot; and logical location too. We&apos;ll need to update the documentation and possibly add some compatibility hooks for older code.&lt;/p&gt;</comment>
                            <comment id="77384" author="green" created="Wed, 19 Feb 2014 17:55:14 +0000"  >&lt;p&gt;btw, if you plan to add this, make sure to properly use copy_from_user to avid the bugs present in this code. Thanks.&lt;/p&gt;</comment>
                            <comment id="77385" author="green" created="Wed, 19 Feb 2014 17:56:12 +0000"  >&lt;p&gt;oh, to answer your other question, there&apos;s different uuid as seen by every server per client I think, that&apos;s why evict by uuid is a totally local operation.&lt;/p&gt;</comment>
                            <comment id="88861" author="cliffw" created="Fri, 11 Jul 2014 19:17:46 +0000"  >&lt;p&gt;Sergey, will you be updating  this patch to address Oleg&apos;s concerns?&lt;/p&gt;</comment>
                            <comment id="89027" author="sergey" created="Tue, 15 Jul 2014 14:31:25 +0000"  >&lt;p&gt;Yes, i will update it.&lt;/p&gt;</comment>
                            <comment id="90033" author="sergey" created="Fri, 25 Jul 2014 10:10:41 +0000"  >&lt;p&gt;Hi, Oleg.&lt;br/&gt;
Thanks for your answers.&lt;/p&gt;

&lt;p&gt;I tried to restore functionality from b1_8 that you mentioned above and faced several problems.&lt;br/&gt;
I put this code into mgs/lproc_mgs.c, but mgs self_export doesn&apos;t have set_info_async operation &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;obd-&amp;gt;obd_self_export-&amp;gt;exp_obd-&amp;gt;obd_type-&amp;gt;typ_dt_ops-&amp;gt;o_set_info_async == NULL &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;mdt export has this operation but you suggested to use mgs &#1072;s a more &quot;Central&quot;  location.&lt;/p&gt;

&lt;p&gt;Did I miss something ?&lt;/p&gt;</comment>
                            <comment id="96062" author="cliffw" created="Thu, 9 Oct 2014 18:08:32 +0000"  >&lt;p&gt;Sergey - the patch needs to be updated, is it possible for you to do this?&lt;/p&gt;</comment>
                            <comment id="96076" author="sergey" created="Thu, 9 Oct 2014 19:53:08 +0000"  >&lt;p&gt;I need answers from Oleg to understand how patch should be updated.&lt;br/&gt;
In any cases current patch is not suitable. I think it could be abandoned.&lt;/p&gt;</comment>
                            <comment id="99699" author="cliffw" created="Thu, 20 Nov 2014 17:41:53 +0000"  >&lt;p&gt;We have abandoned the patch and are closing this issue. Please reopen if you wish.&lt;/p&gt;</comment>
                            <comment id="99919" author="green" created="Mon, 24 Nov 2014 13:20:36 +0000"  >&lt;p&gt;basically what is needed is this:&lt;/p&gt;

&lt;p&gt;proc handler that would get the nid list.&lt;br/&gt;
then will send set_info async RPCs to MDS and OSTs to relay this information and also communicate this internally too.&lt;/p&gt;

&lt;p&gt;Whenever you choose to implement MGS side of thins as a set_info handler (with a corresponding implementation) or by some other means is less important, though set_info handler might be better just for uniformity reasons.&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|hzwef3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>12547</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>