<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:44:17 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-11485] MDS allows &quot;lfs setstripe&quot; to mark last mirror as stale</title>
                <link>https://jira.whamcloud.com/browse/LU-11485</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;A trivial modification to sanity-flr test_0h shows a serious problem.&lt;/p&gt;

&lt;p&gt;If we write to the file before changing the layout flags, the file metadata is corrupted:&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 create -N -E 1M -S 1M --flags=prefer -E eof -N2 tfile
 echo 1 &amp;gt; tfile
#set flags to the first component
 lfs setstripe --comp-set -I 0x10001 --comp-flags=^prefer,stale tfile
ls -la 
 ls: cannot access tfile: Input/output error
 total 16
 drwxr-xr-x 3 root root 4096 Oct 9 13:00 .
 drwxr-xr-x. 43 root root 122880 Sep 27 22:49 ..
 -?????????? ? ? ? ? ? tfile&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;So this corrupts the layout.&#160;&#160;I tried adding &lt;a href=&quot;https://review.whamcloud.com/#/c/32847/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/#/c/32847/&lt;/a&gt;&#160;(&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-11158&quot; title=&quot;PFL component instantiation is not replayed properly&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-11158&quot;&gt;&lt;del&gt;LU-11158&lt;/del&gt;&lt;/a&gt; mdt: grow lvb buffer to hold layout) and it did not resolve this issue.&lt;/p&gt;

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

&lt;p&gt;But additionally, I&apos;m not sure what the correct behavior is here - should it be possible to remove the prefer flag in this situation, while the other replicas are stale?&lt;/p&gt;

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

&lt;p&gt;And to set stale on the write replica?&#160; (That, at least, seems clearly incorrect.)&lt;/p&gt;


&lt;p&gt; The effect of this (... if it worked ...) would presumably be that all the replicas are stale, which would be unresolvable, and so should not be allowed.&#160; (Separate from the corruption)&lt;/p&gt;

&lt;p&gt;There are various implications here.&lt;/p&gt;</description>
                <environment></environment>
        <key id="53543">LU-11485</key>
            <summary>MDS allows &quot;lfs setstripe&quot; to mark last mirror as stale</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="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="yujian">Jian Yu</assignee>
                                    <reporter username="paf">Patrick Farrell</reporter>
                        <labels>
                    </labels>
                <created>Tue, 9 Oct 2018 16:06:32 +0000</created>
                <updated>Fri, 26 Jun 2020 18:34:06 +0000</updated>
                            <resolved>Sat, 21 Sep 2019 01:21:24 +0000</resolved>
                                    <version>Lustre 2.11.0</version>
                    <version>Lustre 2.13.0</version>
                    <version>Lustre 2.12.2</version>
                                    <fixVersion>Lustre 2.13.0</fixVersion>
                    <fixVersion>Lustre 2.12.3</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="234643" author="paf" created="Tue, 9 Oct 2018 16:15:57 +0000"  >&lt;p&gt;See &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-11486&quot; title=&quot;FLR allows overlapping &amp;quot;write preferred&amp;quot; segments&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-11486&quot;&gt;&lt;del&gt;LU-11486&lt;/del&gt;&lt;/a&gt;&#160;for another issue found looking at sanity-flr.sh test_0h.&lt;/p&gt;</comment>
                            <comment id="234644" author="paf" created="Tue, 9 Oct 2018 16:40:45 +0000"  >&lt;p&gt;FYI that I am not actively working this one (Sorry).&#160; It&apos;s behind several other things on the priority list here.&#160; I&apos;ll update if that changes.&lt;/p&gt;</comment>
                            <comment id="234664" author="adilger" created="Wed, 10 Oct 2018 01:13:51 +0000"  >&lt;p&gt;I think the root of the problem is that you shouldn&apos;t be able to mark the last copy of a mirror stale like this.  I don&apos;t think I&apos;d go so far as to say this &lt;b&gt;corrupts&lt;/b&gt; the layout, just that the file does not have a valid component to read from and returns an IO error, which shouldn&apos;t be allowed.&lt;/p&gt;

&lt;p&gt;As I mentioned in my review of &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-11482&quot; title=&quot;Inherit component level flags from default layout&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-11482&quot;&gt;&lt;del&gt;LU-11482&lt;/del&gt;&lt;/a&gt; &lt;a href=&quot;https://review.whamcloud.com/33326&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;flr: Inherit flags from template&lt;/a&gt;, while there are some flags that can be set from userspace, it isn&apos;t enough to check them only in &lt;tt&gt;lfs&lt;/tt&gt;, they also need to be verified by the MDS that they make sense.  We should never be able to set &quot;&lt;tt&gt;init&lt;/tt&gt;&quot; directly from the client, and &quot;&lt;tt&gt;stale&lt;/tt&gt;&quot; shouldn&apos;t be allowed on the last/only mirror of a file.  I think a small tweak to the 33326 should fix part of this problem (set bad flags at create time), but a bit more work is needed to disallow setting &lt;tt&gt;stale&lt;/tt&gt;.&lt;/p&gt;</comment>
                            <comment id="234665" author="adilger" created="Wed, 10 Oct 2018 01:22:35 +0000"  >&lt;p&gt;As for removing the &lt;tt&gt;prefer&lt;/tt&gt; flag from the layout, I think that is fine.  This is only a hint to the MDS for which mirror to select as primary when writing to a file, but if the &lt;tt&gt;prefer&lt;/tt&gt; mirror is unavailable for some reason (e.g. OST offline) then the MDS will pick some other mirror (if one is available).&lt;/p&gt;

&lt;p&gt;Note that the current FLR implementation is such that it will pick a whole mirror for write, and mark all other mirrors stale, so if any preferred OST is unavailable then the whole mirror will be skipped.  This has availability implications as well, since a few offline OSTs might make the whole file unwritable. If there are multiple components to a mirror (e.g. PFL), in theory it would be possible to mark only one component of a preferred mirror stale, and use the remaining preferred components for the write, but there are non-trivial complexities in this case (e.g. if the components are not aligned between mirrors), so it was left out of the initial FLR implementation.&lt;/p&gt;</comment>
                            <comment id="234780" author="paf" created="Thu, 11 Oct 2018 17:23:18 +0000"  >&lt;p&gt;Ugh, bizarre - Something is eating my mails from Whamcloud Jira.&#160; Sorry for not replying earlier, I didn&apos;t realize you had commented.&lt;/p&gt;



&lt;p&gt;Corrupts is too strong - I didn&apos;t realize it was just an i/o error causing the bad ls output - but it&apos;s not recoverable either, at least not for the user who caused it.&#160; Thanks for clarifying (here and in the other LU).&lt;/p&gt;



&lt;p&gt;So as you said, we can&apos;t let them stale the last non-stale copy...&#160; There&apos;s some complexity there, but manageable.&lt;/p&gt;</comment>
                            <comment id="252783" author="adilger" created="Thu, 8 Aug 2019 20:30:03 +0000"  >&lt;p&gt;This still seems like a fairly serious issue that has a fairly straight forward solution - have the MDS check that setting the flags does not mark the last copy of a mirror &lt;tt&gt;STALE&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;Similarly, we shouldn&apos;t allow &quot;&lt;tt&gt;lfs mirror split&lt;/tt&gt;&quot; to remove the last non-&lt;tt&gt;STALE&lt;/tt&gt; mirror of a file (in case this is an issue).&lt;/p&gt;</comment>
                            <comment id="254360" author="yujian" created="Sun, 8 Sep 2019 18:11:26 +0000"  >&lt;p&gt;For setting &lt;tt&gt;stale&lt;/tt&gt; flag, the check needs to be done in lod_declare_layout_set(), and the &lt;tt&gt;lme_stale&lt;/tt&gt; field in &lt;tt&gt;struct lod_mirror_entry&lt;/tt&gt; can be used to check if a component is stale or not.&lt;br/&gt;
For &quot;lfs mirror split&quot;, the check needs to be done in mirror_split().&lt;/p&gt;</comment>
                            <comment id="254433" author="gerrit" created="Tue, 10 Sep 2019 08:10:31 +0000"  >&lt;p&gt;Jian Yu (yujian@whamcloud.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/36141&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/36141&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-11485&quot; title=&quot;MDS allows &amp;quot;lfs setstripe&amp;quot; to mark last mirror as stale&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-11485&quot;&gt;&lt;del&gt;LU-11485&lt;/del&gt;&lt;/a&gt; lod: disallow setting the last non-stale mirror as stale&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: cd7fb425ed8a8282b3aa0894b4ad654f7ba88acb&lt;/p&gt;</comment>
                            <comment id="254744" author="gerrit" created="Mon, 16 Sep 2019 17:31:55 +0000"  >&lt;p&gt;Jian Yu (yujian@whamcloud.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/36195&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/36195&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-11485&quot; title=&quot;MDS allows &amp;quot;lfs setstripe&amp;quot; to mark last mirror as stale&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-11485&quot;&gt;&lt;del&gt;LU-11485&lt;/del&gt;&lt;/a&gt; lod: disallow setting the last non-stale mirror as stale&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_12&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 45421f91ff1318f35ee6d433fdb89b8421c9659c&lt;/p&gt;</comment>
                            <comment id="255098" author="gerrit" created="Fri, 20 Sep 2019 07:54:18 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/36141/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/36141/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-11485&quot; title=&quot;MDS allows &amp;quot;lfs setstripe&amp;quot; to mark last mirror as stale&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-11485&quot;&gt;&lt;del&gt;LU-11485&lt;/del&gt;&lt;/a&gt; lod: disallow setting the last non-stale mirror as stale&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: b380a1f9a1daa1683593d0ee4a508da859277164&lt;/p&gt;</comment>
                            <comment id="255175" author="pjones" created="Sat, 21 Sep 2019 01:21:24 +0000"  >&lt;p&gt;Landed for 2.13&lt;/p&gt;</comment>
                            <comment id="255241" author="gerrit" created="Mon, 23 Sep 2019 08:43:50 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/36195/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/36195/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-11485&quot; title=&quot;MDS allows &amp;quot;lfs setstripe&amp;quot; to mark last mirror as stale&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-11485&quot;&gt;&lt;del&gt;LU-11485&lt;/del&gt;&lt;/a&gt; lod: disallow setting the last non-stale mirror as stale&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_12&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 79346930b340f73f27c28a1c53c73cc2138b8508&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="52690">LU-11142</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="53544">LU-11486</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="56621">LU-12649</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="59748">LU-13720</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|i003un:</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>