<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:26:56 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-16427] &apos;lfs rmfid&apos; does not print anything on error</title>
                <link>https://jira.whamcloud.com/browse/LU-16427</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;The &quot;&lt;tt&gt;lfs rmfid&lt;/tt&gt;&quot; does not print anything useful or exit with a non-zero error code when passed bad arguments:&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;# lfs rmfid --help
# lfs rmfid foo
# echo $?
0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It would make sense to handle &quot;&lt;tt&gt;--help&lt;/tt&gt;&quot; to print the usage message, and should print an error and the usage message if a bad filesystem name/mountpoint argument is given or if a bad FID is passed (though it should continue to process all remaining FIDs on the command-line and exit with an error at the end).&lt;/p&gt;</description>
                <environment></environment>
        <key id="73728">LU-16427</key>
            <summary>&apos;lfs rmfid&apos; does not print anything on error</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="1">Fixed</resolution>
                                        <assignee username="arshad512">Arshad Hussain</assignee>
                                    <reporter username="adilger">Andreas Dilger</reporter>
                        <labels>
                            <label>easy</label>
                    </labels>
                <created>Thu, 22 Dec 2022 17:49:20 +0000</created>
                <updated>Mon, 1 May 2023 06:29:03 +0000</updated>
                            <resolved>Mon, 1 May 2023 06:29:03 +0000</resolved>
                                                    <fixVersion>Lustre 2.16.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="366685" author="JIRAUSER18444" created="Tue, 21 Mar 2023 15:19:59 +0000"  >&lt;p&gt;I have been looking into this and have found that `rmfid` also appears completely nonfunctional when used within the &quot;lfs shell&quot;. Here&apos;s what I mean:&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;
$ lfs
lfs &amp;gt; rmfid /mnt/mylustre [0x200000407:0xcc:0x0]
unrecognized FID: /mnt/mylustre 
lfs &amp;gt; rmfid [0x200000407:0xcc:0x0]
lfs rmfid: cannot remove FIDs: Bad file descriptor
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;I&apos;m guessing that lfs is not commonly used in this way, but is this shell considered supported and should be working? Should this be fixed as part of this bug? &lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="366744" author="JIRAUSER18444" created="Tue, 21 Mar 2023 22:32:06 +0000"  >&lt;p&gt;One challenge with printing out good error messages here is that I don&apos;t think the current API of &lt;tt&gt;llapi_rmfid()&lt;/tt&gt; provides a good way to distinguish an error in opening the filesystem directory vs. an error with the &lt;tt&gt;ioctl()&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;A nonexistent filesystem path should result in &lt;tt&gt;llapi_rmfid()&lt;/tt&gt; returning -&lt;tt&gt;ENOENT,&lt;/tt&gt; I think (although currently it returns &lt;tt&gt;-EBAD&lt;/tt&gt;F), and while the &lt;tt&gt;ioctl()&lt;/tt&gt; won&apos;t return &lt;tt&gt;-ENOENT&lt;/tt&gt; from what I can tell, I don&apos;t know that it will &lt;b&gt;never&lt;/b&gt; return &lt;tt&gt;-ENOENT&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;One solution would be to create a function &lt;tt&gt;llapi_rmfid_at()&lt;/tt&gt; that takes an FD open to the lustre mountpoint as the 1st argument so that the caller can validate the mountpoint, similar to &lt;tt&gt;lfs_fid2path()&lt;/tt&gt; and &lt;tt&gt;llapi_fid2path_at()&lt;/tt&gt;. (Or just modify &lt;tt&gt;llapi_rmfid()&lt;/tt&gt;, although this would be a breaking API change.) This change would allow for clearer error messages from &lt;tt&gt;lfs rmfid&lt;/tt&gt;, IMO. Do you have any thoughts on this idea?&lt;/p&gt;</comment>
                            <comment id="366995" author="arshad512" created="Thu, 23 Mar 2023 03:59:33 +0000"  >&lt;p&gt;Andreas/Thomas,&lt;/p&gt;

&lt;p&gt;I am already working on rmfid issues. (See below) you want me to pick up this LU?&lt;/p&gt;

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

&lt;p&gt;&lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/50367&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/50367&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16618&quot; title=&quot;rmfid miscellaneous fixes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16618&quot;&gt;LU-16618&lt;/a&gt; lfs: rmfid miscellaneous fixes&lt;/p&gt;

&lt;p&gt;This patch fixes:&lt;/p&gt;

&lt;p&gt;01. Fix rmfid silently accepting fid without fsname&lt;br/&gt;
or lustre root mount point. Make it correctly&lt;br/&gt;
fail if required arguments is not provided.&lt;/p&gt;

&lt;p&gt;After Patch:&lt;br/&gt;
~~~~~~~~~~~~&lt;br/&gt;
$ lfs rmfid 0x200000402:0x1:0x0&lt;br/&gt;
lfs rmfid: missing &amp;lt;fsname|rootpath&amp;gt; or &amp;lt;fid&amp;gt;&lt;br/&gt;
Remove file(s) by FID(s)&lt;br/&gt;
usage: rmfid &amp;lt;fsname|rootpath&amp;gt; &amp;lt;fid&amp;gt; ...&lt;/p&gt;

&lt;p&gt;Before Patch:&lt;br/&gt;
~~~~~~~~~~~~&lt;br/&gt;
$ lfs rmfid 0x200000402:0x1:0x0&lt;br/&gt;
${noformat}&lt;/p&gt;</comment>
                            <comment id="367002" author="gerrit" created="Thu, 23 Mar 2023 07:06:22 +0000"  >&lt;p&gt;&quot;Arshad Hussain &amp;lt;arshad.hussain@aeoncomputing.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/50388&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/50388&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16427&quot; title=&quot;&amp;#39;lfs rmfid&amp;#39; does not print anything on error&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16427&quot;&gt;&lt;del&gt;LU-16427&lt;/del&gt;&lt;/a&gt; lfs: rmfid does not print anything on error&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 83add47417cfca6600336ae7d890125a513cee94&lt;/p&gt;</comment>
                            <comment id="367049" author="JIRAUSER18444" created="Thu, 23 Mar 2023 13:00:06 +0000"  >&lt;p&gt;@Arshad sorry, I did not realize you were already working on this one! I&apos;ll be happy to review your patch if desired.&lt;/p&gt;</comment>
                            <comment id="370021" author="arshad512" created="Thu, 20 Apr 2023 10:16:15 +0000"  >&lt;p&gt;@Thomas, no worries and thanks for your review. Even I realized much later that this ticke was open much earlier by Andreas. It was missed by me. I started working on rmfid when I accidentally stumbled upon its error.&lt;/p&gt;</comment>
                            <comment id="371003" author="gerrit" created="Mon, 1 May 2023 04:09:39 +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/c/fs/lustre-release/+/50388/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/50388/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16427&quot; title=&quot;&amp;#39;lfs rmfid&amp;#39; does not print anything on error&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16427&quot;&gt;&lt;del&gt;LU-16427&lt;/del&gt;&lt;/a&gt; lfs: rmfid does not print anything on error&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 5d930252407cc11604c4b9de2984784c62c43a4c&lt;/p&gt;</comment>
                            <comment id="371025" author="pjones" created="Mon, 1 May 2023 06:29:03 +0000"  >&lt;p&gt;Landed for 2.16&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="74937">LU-16618</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="63011">LU-14469</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <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|i038kv:</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>