<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:16:39 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-15240] some lfs mirror extend error messages start with &quot;lfs mirror mirror&quot;</title>
                <link>https://jira.whamcloud.com/browse/LU-15240</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Some error messages from &quot;lfs mirror extend&quot; start with &quot;lfs mirror mirror&quot; others start with &quot;error: &quot;. Both should start with &quot;lfs mirror extend: &quot;.&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 mirror extend -N -p ddn_ssd f0
lfs mirror mirror: cannot get UNLOCK lease, ext 4: Device or resource busy (16)
error: lfs mirror extend: f0: cannot merge layout: Device or resource busy
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The first message should include the file path or at least FID. Paths should be enclosed in single quotes. We should not print two errors for the same message.&lt;/p&gt;</description>
                <environment></environment>
        <key id="67198">LU-15240</key>
            <summary>some lfs mirror extend error messages start with &quot;lfs mirror mirror&quot;</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="aalyaev">Aleksei Alyaev</assignee>
                                    <reporter username="jhammond">John Hammond</reporter>
                        <labels>
                    </labels>
                <created>Tue, 16 Nov 2021 14:40:10 +0000</created>
                <updated>Mon, 6 Dec 2021 15:29:04 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="318333" author="jhammond" created="Tue, 16 Nov 2021 14:40:36 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/secure/ViewProfile.jspa?name=aalyaev&quot; class=&quot;user-hover&quot; rel=&quot;aalyaev&quot;&gt;aalyaev&lt;/a&gt; could you take a look at this?&lt;/p&gt;</comment>
                            <comment id="318337" author="JIRAUSER16905" created="Tue, 16 Nov 2021 15:05:47 +0000"  >&lt;p&gt;Sure.&lt;/p&gt;</comment>
                            <comment id="319055" author="JIRAUSER16905" created="Wed, 24 Nov 2021 00:40:25 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/secure/ViewProfile.jspa?name=jhammond&quot; class=&quot;user-hover&quot; rel=&quot;jhammond&quot;&gt;jhammond&lt;/a&gt; there are a few places in lfs.c where a global variable &lt;em&gt;progname&lt;/em&gt; gets set to &quot;lfs COMMAND &lt;span class=&quot;error&quot;&gt;&amp;#91;...&amp;#93;&lt;/span&gt;&quot; instead of just &quot;lfs&quot;.&lt;br/&gt;
&#160;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt; cmd[PATH_MAX];
...
snprintf(cmd, sizeof(cmd), &lt;span class=&quot;code-quote&quot;&gt;&quot;%s %s&quot;&lt;/span&gt;, progname, argv[0]);
progname = cmd;
...&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;br/&gt;
This was introduced in a changeset dating back about 4 years (125f98f, f1daa8f). Looks like it worked for error messages added as part of the changeset, but messed up quite a few other errors in lfs.c where &lt;em&gt;progname&lt;/em&gt; was expected to contain only short invocation name.&lt;br/&gt;
&#160;&lt;br/&gt;
In &lt;em&gt;lfs_mirror&lt;/em&gt;() function, the updated &lt;em&gt;progname&lt;/em&gt; also overrides the &lt;em&gt;program_invocation_short_name&lt;/em&gt; global variable, affecting the error messages from liblustreapi, which relies on command name passed to &lt;em&gt;llapi_set_command_name&lt;/em&gt;().&lt;br/&gt;
&#160;&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;
snprintf(cmd, sizeof(cmd), &lt;span class=&quot;code-quote&quot;&gt;&quot;%s %s&quot;&lt;/span&gt;, progname, argv[0]);
progname = cmd;
program_invocation_short_name = cmd;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;br/&gt;
The first error message came from liblustreapi.c, with &lt;em&gt;program_invocation_short_name&lt;/em&gt; set to &quot;lfs mirror&quot;, but the command name in llapi set to &quot;mirror&quot;, so the source of error got reported as &quot;lfs mirror mirror&quot;.&lt;br/&gt;
&#160;&lt;br/&gt;
The second message came from lfs.c, where &lt;em&gt;progname&lt;/em&gt; points to buffer containing &quot;lfs mirror extend&quot;, which becomes the error source string.&lt;br/&gt;
&#160;&lt;br/&gt;
As for including the file path/fid with the error...&lt;br/&gt;
&#160;&lt;br/&gt;
The second error already contains the file path (not quoted though).&lt;br/&gt;
Adding FID/path to the first error message would require a change to liblustreapi.c &lt;em&gt;llapi_lease_set&lt;/em&gt;() which only gets a file descriptor.&lt;/p&gt;</comment>
                            <comment id="319372" author="jhammond" created="Mon, 29 Nov 2021 19:23:38 +0000"  >&lt;p&gt;Can you push a patch to make it do the right thing?&lt;/p&gt;</comment>
                            <comment id="319400" author="JIRAUSER16905" created="Mon, 29 Nov 2021 21:41:20 +0000"  >&lt;p&gt;Yes, was already working on it, it&apos;s almost ready.&lt;/p&gt;</comment>
                            <comment id="320107" author="JIRAUSER16905" created="Mon, 6 Dec 2021 15:29:04 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.whamcloud.com/secure/ViewProfile.jspa?name=jhammond&quot; class=&quot;user-hover&quot; rel=&quot;jhammond&quot;&gt;jhammond&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-15240&quot; title=&quot;some lfs mirror extend error messages start with &amp;quot;lfs mirror mirror&amp;quot;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-15240&quot;&gt;LU-15240&lt;/a&gt; looks good according to local tests ... all modes report the errors correctly, as far as the source of error is concerned. If you can take a quick look and review the changeset... The errors should change from:&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 mirror mirror: cannot get UNLOCK lease, ext 4: Device or resource busy (16)
error: lfs mirror extend: f0: cannot merge layout: Device or resource busy&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;to:&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 mirror: cannot get UNLOCK lease, ext 4: Device or resource busy (16)
error: lfs mirror extend: f0: cannot merge layout: Device or resource busy&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;I did not yet enclose the file name in the second message (f0) in single quotes, as the source of error was a more global issue. Let me know if this needs addressing?&lt;/p&gt;

&lt;p&gt;Neither did I change the fact that 2 message get printed, as one of them comes from liblustreapi, while the second one is lfs util specific. Doing so would break this pattern in many other places of lfs utility, where errors get reported similarly.&lt;/p&gt;

&lt;p&gt;Let me know what else needs to be done here.&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|i02a2n:</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>