<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:34:36 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-17335] allow &quot;lctl barrier_freeze&quot; to exclude MGS target</title>
                <link>https://jira.whamcloud.com/browse/LU-17335</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;For doing storage system configuration changes (e.g. adding new MDTs and OSTs to the filesystem) it is desirable to allow blocking modifications to the filesystem using the &quot;&lt;tt&gt;lctl barrier_freeze&lt;/tt&gt;&quot; command.  However, this also freezes the MGT device, preventing new MDT and OST devices from registering themselves with the MGS.&lt;/p&gt;

&lt;p&gt;It would be desirable to have an option like &quot;&lt;tt&gt;lctl barrier_freeze --nomgs&lt;/tt&gt;&quot; (similar to the &quot;&lt;tt&gt;nomgs&lt;/tt&gt;&quot; option for &lt;tt&gt;mkfs.lustre&lt;/tt&gt; and &lt;tt&gt;mount.lustre&lt;/tt&gt;) to freeze all of the storage targets (MDT, OST) but exclude the MGT device.  Currently, if &lt;tt&gt;barrier_freeze&lt;/tt&gt; is used the MDT/OST addition fails with the following error on the MGS:&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;Lustre: MGS: the system is in barrier, refuse the connection from MDT es01a-MDT0007 temporary
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;and the following on the MDS server:&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;LustreError: 15f-b: es01a-MDT0007: cannot register this server with the MGS: rc = -16. Is the MGS running?
LustreError: 41629:0:(obd_mount_server.c:2061:server_fill_super()) Unable to start targets: -16
LustreError: 41629:0:(obd_mount_server.c:1641:server_put_super()) no obd es01a-MDT0007
LustreError: 41629:0:(obd_mount_server.c:133:server_deregister_mount()) es01a-MDT0007 not registered
Lustre: server umount es01a-MDT0007 complete
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;For testing, this could use a modified version of &lt;tt&gt;test_46b&lt;/tt&gt; in patch &lt;a href=&quot;https://review.whamcloud.com/53300&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/53300&lt;/a&gt; that adds an &quot;&lt;tt&gt;lctl barrier_freeze --nomgs ...&lt;/tt&gt;&quot; command before the new MDT/OST devices are added to the filesystem, and then un-freezes the filesystem after the OSTs appear on the client (e.g. in &quot;&lt;tt&gt;lfs df&lt;/tt&gt;&quot;).&lt;/p&gt;</description>
                <environment></environment>
        <key id="79346">LU-17335</key>
            <summary>allow &quot;lctl barrier_freeze&quot; to exclude MGS target</summary>
                <type id="4" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11310&amp;avatarType=issuetype">Improvement</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="emoly.liu">Emoly Liu</assignee>
                                    <reporter username="adilger">Andreas Dilger</reporter>
                        <labels>
                    </labels>
                <created>Tue, 5 Dec 2023 23:31:13 +0000</created>
                <updated>Fri, 8 Dec 2023 07:49:16 +0000</updated>
                                            <version>Lustre 2.16.0</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="395594" author="adilger" created="Wed, 6 Dec 2023 00:18:57 +0000"  >&lt;p&gt;Parsing a new &lt;tt&gt;--nomgs&lt;/tt&gt; option in &quot;&lt;tt&gt;jt_barrier_freeze()&lt;/tt&gt;&quot; is needed. This could add a flag &quot;&lt;tt&gt;BF_NOMGS&lt;/tt&gt;&quot; in the high bits of &lt;tt&gt;bc_cmd&lt;/tt&gt;:&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-keyword&quot;&gt;enum&lt;/span&gt; barrier_commands {
        BC_FREEZE       = 1,
&#160; &#160; &#160; &#160; BC_THAW &#160; &#160; &#160; &#160; = 2,
&#160; &#160; &#160; &#160; BC_STAT &#160; &#160; &#160; &#160; = 3,
&#160; &#160; &#160; &#160; BC_RESCAN &#160; &#160; &#160; = 4,
+       BC_MASK         = 0xFFU,
+       &lt;span class=&quot;code-comment&quot;&gt;/* allow up to 255 commands, the high 24 bits are &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; flags */&lt;/span&gt;
+       BF_NOMGS        = 0x00000100U,
+       &lt;span class=&quot;code-comment&quot;&gt;/* list of known flags, maybe different &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; each command */&lt;/span&gt;
+       BF_KNOWN_FREEZE = BF_NOMGS,
+       BF_MASK         = ~BC_MASK
};
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This would be passed to &lt;tt&gt;mgs_iocontrol_barrier()&lt;/tt&gt; (if used with an old kernel that does not understand this flag it would return &lt;tt&gt;-EINVAL&lt;/tt&gt; because &quot;&lt;tt&gt;bc_cmd = 0x00000101&lt;/tt&gt;&quot; would be unknown:&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;int&lt;/span&gt; mgs_iocontrol_barrier(&lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; struct lu_env *env, struct mgs_device *mgs,
                          struct obd_ioctl_data *data)
{
        struct barrier_ctl *bc = (struct barrier_ctl *)(data-&amp;gt;ioc_inlbuf1);

-        &lt;span class=&quot;code-keyword&quot;&gt;switch&lt;/span&gt; (bc-&amp;gt;bc_cmd) {
+        &lt;span class=&quot;code-keyword&quot;&gt;switch&lt;/span&gt; (bc-&amp;gt;bc_cmd &amp;amp; BC_MASK) {
}

&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; mgs_barrier_freeze(&lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; struct lu_env *env, struct mgs_device *mgs,
                              struct barrier_ctl *bc)
{
        snprintf(name, sizeof(mgs_env_info(env)-&amp;gt;mgi_fsname) - 1, &lt;span class=&quot;code-quote&quot;&gt;&quot;%s-%s&quot;&lt;/span&gt;,
                 bc-&amp;gt;bc_name, BARRIER_FILENAME);

+       &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (bc-&amp;gt;bc_cmd &amp;amp; ~BF_KNOWN_FREEZE) {
+               rc = -EINVAL;
+               CERROR(&lt;span class=&quot;code-quote&quot;&gt;&quot;MGS: unknown barrier_freeze flags %#x: rc = %d\n&quot;&lt;/span&gt;,
+                      bc-&amp;gt;bc_cmd &amp;amp; ~BF_KNOWN_FLAGS, rc);
+               RETURN(rc);
+       }
        :
                        fsdb-&amp;gt;fsdb_barrier_status = BS_FREEZING_P1;
+                       &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (bc-&amp;gt;bc_cmd &amp;amp; BF_NOMGS)
+                               fsdb-&amp;gt;fsdb_flags |= FSDB_BARRIER_NOMGS;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;It looks like the other important code on the MGS is in &lt;tt&gt;mgs_target_reg()&lt;/tt&gt; to check this flag:&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-keyword&quot;&gt;if&lt;/span&gt; (mti-&amp;gt;mti_flags &amp;amp; LDD_F_SV_TYPE_MDT) {
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ((b_fsdb-&amp;gt;fsdb_barrier_status == BS_FREEZING_P1 ||
                     b_fsdb-&amp;gt;fsdb_barrier_status == BS_FREEZING_P2 ||
                     b_fsdb-&amp;gt;fsdb_barrier_status == BS_FROZEN) &amp;amp;&amp;amp;
+                    !(b_fsdb-&amp;gt;fsdb_barrier_flags &amp;amp; FSDB_BARRIER_NOMGS)) {
                        LCONSOLE_WARN(&lt;span class=&quot;code-quote&quot;&gt;&quot;%s: the system is in barrier, refuse &quot;&lt;/span&gt;
                                      &lt;span class=&quot;code-quote&quot;&gt;&quot;the connection from MDT %s temporary\n&quot;&lt;/span&gt;,
                                      obd-&amp;gt;obd_name, mti-&amp;gt;mti_svname);
                        GOTO(out_norevoke, rc = -EBUSY);
                }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="395610" author="emoly.liu" created="Wed, 6 Dec 2023 02:29:49 +0000"  >&lt;p&gt;OK, I will look into it.&lt;/p&gt;</comment>
                            <comment id="395813" author="gerrit" created="Thu, 7 Dec 2023 07:47:51 +0000"  >&lt;p&gt;&quot;Emoly Liu &amp;lt;emoly@whamcloud.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/53359&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/53359&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-17335&quot; title=&quot;allow &amp;quot;lctl barrier_freeze&amp;quot; to exclude MGS target&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-17335&quot;&gt;LU-17335&lt;/a&gt; mgs: new option &quot;lctl barrier_freeze --nomgs&quot;&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 0e38e7b1cd84695231e83fb380518d887161dc44&lt;/p&gt;</comment>
                            <comment id="395957" author="emoly.liu" created="Fri, 8 Dec 2023 07:49:16 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.whamcloud.com/secure/ViewProfile.jspa?name=adilger&quot; class=&quot;user-hover&quot; rel=&quot;adilger&quot;&gt;adilger&lt;/a&gt;&#160;,&lt;/p&gt;

&lt;p&gt;The patch at &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/53359&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/53359&lt;/a&gt;&#160;passed the new test case conf-sanity.sh test_46c at &lt;a href=&quot;https://testing.whamcloud.com/test_logs/f346e68c-ce10-46db-b847-f30fbe6cc5fe/show_text&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://testing.whamcloud.com/test_logs/f346e68c-ce10-46db-b847-f30fbe6cc5fe/show_text&lt;/a&gt;&#160;&lt;/p&gt;

&lt;p&gt;Could you please review it to see if both the fix and test case did work as we expect ?&#160;&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                                        </outwardlinks>
                                                        </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|i043z3:</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>