<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:01:07 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-13420] append to PFL-file without &apos;eof&apos; component fails</title>
                <link>https://jira.whamcloud.com/browse/LU-13420</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&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;
# mkdir /mnt/lustre/d
#  lfs setstripe -E 4M -c 1 -E 64M -c 4 /mnt/lustre/d/f1; echo asd &amp;gt;&amp;gt;/mnt/lustre/d/f1
-bash: echo: write error: Invalid argument
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;and in the log:&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;
00000004:80000000:1.0:1586276528.329048:0:6464:0:(lod_object.c:6811:lod_declare_update_plain()) lustre-MDT0000-mdtlov: the defined layout [0, 0x4000000) does not covers the write range [0x0, 0xffffffffffffffff)
00000004:00000001:1.0:1586276528.329049:0:6464:0:(lod_object.c:6816:lod_declare_update_plain()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; leaving via out (rc=18446744073709551594 : -22 : 0xffffffffffffffea)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="58668">LU-13420</key>
            <summary>append to PFL-file without &apos;eof&apos; component fails</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.whamcloud.com/images/icons/priorities/major.svg">Major</priority>
                        <status id="1" iconUrl="https://jira.whamcloud.com/images/icons/statuses/open.png" description="The issue is open and ready for the assignee to start work on it.">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="wc-triage">WC Triage</assignee>
                                    <reporter username="bzzz">Alex Zhuravlev</reporter>
                        <labels>
                            <label>llnl</label>
                    </labels>
                <created>Tue, 7 Apr 2020 16:24:03 +0000</created>
                <updated>Mon, 8 Jan 2024 20:13:13 +0000</updated>
                                            <version>Upstream</version>
                    <version>Lustre 2.12.4</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                            <comments>
                            <comment id="267077" author="adilger" created="Tue, 7 Apr 2020 18:23:16 +0000"  >&lt;p&gt;There are discussions on various options for implementing/optimizing file append in &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9341&quot; title=&quot;PFL: append should not instantiate full layout&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9341&quot;&gt;&lt;del&gt;LU-9341&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-10782&quot; title=&quot;Enable tiny write append for singly striped non-composite file&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-10782&quot;&gt;LU-10782&lt;/a&gt;.  I think something like what is proposed there (partial file lock, verify EOF hasn&apos;t changed/adjust offset after getting lock) would be needed for this to work.&lt;/p&gt;

&lt;p&gt;Since using limited-size PFL layouts for log files is a use case that has real benefits (e.g. put an upper limit of 1GB for files in log directory) it would be good to find a way for this to work.  Maybe changing the check in &lt;tt&gt;lod_declare_update_plain()&lt;/tt&gt; is enough for the short term, if we understand that this is an &lt;tt&gt;O_APPEND&lt;/tt&gt; file?&lt;/p&gt;</comment>
                            <comment id="273357" author="ofaaland" created="Fri, 19 Jun 2020 20:13:54 +0000"  >&lt;p&gt;Ran into this doing testing at LLNL.  (used to say: Should I create another ticket, or add topllnl to this?  Thanks.)&lt;/p&gt;

&lt;p&gt;I&apos;ve just added our usual tags and will post here until told otherwise, so that I&apos;m not holding up the process.&lt;/p&gt;

&lt;p&gt;Our versions involved:&lt;br/&gt;
opal lustre-2.12.4_6.chaos-1.ch6.x86_64&lt;br/&gt;
jet lustre-2.12.4_6.chaos-1.ch6.x86_64&lt;/p&gt;

&lt;p&gt;It&apos;s the lack of an EOF component in the layout that triggers the error on my system.&lt;/p&gt;

&lt;p&gt;User 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;bash-4.2$ lfs setstripe -E 16M -c 1 -E 1G -c 2  will_fail
bash-4.2$ date &amp;gt;&amp;gt; will_fail
date: write error: Invalid argument

bash-4.2$ lfs setstripe -E 16M -c 1 -E -1 -c 2  will_succeed
bash-4.2$ date &amp;gt;&amp;gt; will_succeed
bash-4.2$ echo $?
0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And error on console of the lustre client node:&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;[Thu Jun 18 17:46:06 2020] LustreError: 11-0: lquake-MDT0000-mdc-ffff8a7c68307000: operation ldlm_enqueue to node 172.19.1.111@o2ib100 failed: rc = -22
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And on the MDT we see&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;dk.jet1.1592591626:00000004:80000000:2.0:1592591621.254440:0:15022:0:(lod_object.c:6049:lod_declare_update_plain()) lquake-MDT0000-mdtlov: the defined layout [0, 0x1000000000) does not covers the write range [0x0, 0xffffffffffffffff)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Although that debug log record is from a different iteration of executing the reproducer than the client console log error message.&lt;/p&gt;</comment>
                            <comment id="273364" author="ofaaland" created="Fri, 19 Jun 2020 21:37:42 +0000"  >&lt;p&gt;&lt;del&gt;I&apos;ll note our use case here for now; if you want to discuss it elsewhere let me know.&lt;/del&gt;&lt;/p&gt;

&lt;p&gt;&lt;del&gt;We want to use PFL specifically so we can set a default that results in reasonable striping for all files, without user knowledge or action.  That means that a routine operation like appending has to work with PFL, for it to be usable by us.  I wouldn&apos;t think we are special in that way, but I can&apos;t explain why this hasn&apos;t come up already.&lt;/del&gt;&lt;/p&gt;

&lt;p&gt;When I wrote the above I thought this error occurred for any append to any PFL file, and didn&apos;t realize it was the lack of an EOF component that triggered the failure.&lt;/p&gt;

&lt;p&gt;Is there a reason a user wouldn&apos;t want the EOF component?  I can&apos;t think of one.&lt;/p&gt;</comment>
                            <comment id="273404" author="adilger" created="Sat, 20 Jun 2020 08:33:49 +0000"  >&lt;p&gt;Olaf, you are correct that this issue only affects PFL files that do not have an EOF component. For most cases it makes sense that the default layout would have an EOF component. &lt;/p&gt;

&lt;p&gt;At one time it was proposed that it would be possible to limit the maximum size of files by using a PFL layout where the last component ended at the maximum file size. That might be useful to avoid runaway processes filling the filesystem or an OST.  Ironically, this would probably be most useful for log files, which are often written with O_APPEND.&lt;/p&gt;

&lt;p&gt;So this is a real issue, but one that is only going to catch people actively doing something&apos;s strange, and is easily worked around by adding a final component to the file. &lt;/p&gt;</comment>
                            <comment id="273412" author="ofaaland" created="Sat, 20 Jun 2020 21:28:27 +0000"  >&lt;blockquote&gt;&lt;p&gt;At one time it was proposed that it would be possible to limit the maximum size of files by using a PFL layout where the last component ended at the maximum file size. That might be useful to avoid runaway processes filling the filesystem or an OST. Ironically, this would probably be most useful for log files, which are often written with O_APPEND.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Andreas, thanks for explaining.  I&apos;ve seen exactly that here (unintended log file growth without bound).  A limit like that would be useful.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;So this is a real issue, but one that is only going to catch people actively doing something&apos;s strange, and is easily worked around by adding a final component to the file.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;In our case it happened to someone by mistake - a sysadmin omitted the eof component accidentally.  That&apos;s easy to do.   Until the issue is fixed, shouldn&apos;t there be a warning at the time &quot;lfs setstripe&quot; is run?  I&apos;m thinking mostly of Lustre 2.12.  We could also/instead produce a one-time message on the console log, but that might be noticed only after jobs have failed.&lt;/p&gt;</comment>
                            <comment id="273496" author="charr" created="Mon, 22 Jun 2020 19:53:28 +0000"  >&lt;p&gt;I concur that there should be a warning or a default EOF pattern set when &quot;-E -1 ...&quot; isn&apos;t specified. It seems too easy to run into this issue, whether by accident or ignorance.&lt;/p&gt;</comment>
                            <comment id="274436" author="adilger" created="Sat, 4 Jul 2020 05:43:18 +0000"  >&lt;p&gt;I would be OK with a warning printed by &quot;&lt;tt&gt;lfs setstripe&lt;/tt&gt; in the case of a missing &lt;tt&gt;eof&lt;/tt&gt; component, at least until we fix the &quot;&lt;tt&gt;O_APPEND&lt;/tt&gt; to short layout&quot; issue.  I wouldn&apos;t want to prevent that usage, since it still has potential value in some cases even without &lt;tt&gt;O_APPEND&lt;/tt&gt; (e.g. limiting maximum file size).  It would be even better to fix the &lt;tt&gt;O_APPEND&lt;/tt&gt; case so that it works as expected (allowing appends up to the end of the last extent before reporting &lt;tt&gt;EFBIG&lt;/tt&gt; like it would if the write exceeded the maximum allowed file size.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="51149">LU-10782</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="45499">LU-9341</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="50818">LU-10665</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="79878">LU-17403</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="34623" name="append.log" size="2707850" author="bzzz" created="Tue, 7 Apr 2020 16:24:37 +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|i00xaf:</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>