<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:15:05 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-1265] should not remove all files when cleanup lustre test</title>
                <link>https://jira.whamcloud.com/browse/LU-1265</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;We should not remove all files under mount. This prevent multiple tests being run at the same time&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;check_and_cleanup_lustre() {
    if [ &quot;$LFSCK_ALWAYS&quot; = &quot;yes&quot; -a &quot;$TESTSUITE&quot; != &quot;lfsck&quot; ]; then
        get_svr_devs
        generate_db
        run_lfsck
    fi

    if is_mounted $MOUNT; then
        [ -n &quot;$DIR&quot; ] &amp;amp;&amp;amp; rm -rf $DIR/[Rdfs][0-9]* ||
            error &quot;remove sub-test dirs failed&quot;
        [ &quot;$ENABLE_QUOTA&quot; ] &amp;amp;&amp;amp; restore_quota_type || true
    fi

    if [ &quot;$I_UMOUNTED2&quot; = &quot;yes&quot; ]; then
        restore_mount $MOUNT2 || error &quot;restore $MOUNT2 failed&quot;
    fi

    if [ &quot;$I_MOUNTED2&quot; = &quot;yes&quot; ]; then
        cleanup_mount $MOUNT2
    fi

    if [ &quot;$I_MOUNTED&quot; = &quot;yes&quot; ]; then
        cleanupall -f || error &quot;cleanup failed&quot;
        unset I_MOUNTED
    fi
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="13750">LU-1265</key>
            <summary>should not remove all files when cleanup lustre test</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="wc-triage">WC Triage</assignee>
                                    <reporter username="mdiep">Minh Diep</reporter>
                        <labels>
                    </labels>
                <created>Wed, 28 Mar 2012 11:29:22 +0000</created>
                <updated>Thu, 27 Feb 2020 23:53:56 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                            <comments>
                            <comment id="264195" author="adilger" created="Thu, 27 Feb 2020 23:53:56 +0000"  >&lt;p&gt;Minh, I just ran across this ticket by accident.  It isn&apos;t clear what your objection is here.  The code now looks like:&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;
check_and_cleanup_lustre() {                                       
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; is_mounted $MOUNT; then     
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; $DO_CLEANUP; then   
                        [ -n &lt;span class=&quot;code-quote&quot;&gt;&quot;$DIR&quot;&lt;/span&gt; ] &amp;amp;&amp;amp; rm -rf $DIR/[Rdfs][0-9]* ||
                                error &lt;span class=&quot;code-quote&quot;&gt;&quot;remove sub-test dirs failed&quot;&lt;/span&gt;
                &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt;
                        echo &lt;span class=&quot;code-quote&quot;&gt;&quot;skip cleanup&quot;&lt;/span&gt;     
                fi
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;so there is a &quot;&lt;tt&gt;$DO_CLEANUP&lt;/tt&gt;&quot; check, but more importantly (even in the older code) it is only deleting files under &quot;&lt;tt&gt;$DIR&lt;/tt&gt;&quot;, which is the per-test-script directory for all the files.  While there are some tests that modify &quot;&lt;tt&gt;$MOUNT&lt;/tt&gt;&quot; directly, most tests only operate inside &quot;&lt;tt&gt;$DIR&lt;/tt&gt;&quot;.  That wouldn&apos;t help for running &lt;em&gt;subtests&lt;/em&gt; in parallel, but it would (in theory) allow multiple different &lt;em&gt;test scripts&lt;/em&gt; to be run in parallel on a single filesystem (e.g. &lt;tt&gt;sanity.sh&lt;/tt&gt; and &lt;tt&gt;sanityn.sh&lt;/tt&gt;), though there are &lt;b&gt;many&lt;/b&gt; other obstacles to that in practice, so I don&apos;t think that is a problem we can realistically solve.&lt;/p&gt;

&lt;p&gt;For running &lt;em&gt;subtests&lt;/em&gt; in parallel, which I think is a potentially realistic goal for &lt;tt&gt;sanity.sh&lt;/tt&gt; and maybe &lt;tt&gt;sanityn.sh&lt;/tt&gt;, the correct behaviour is for the subtest to check &quot;&lt;tt&gt;[ $PARALLEL == yes ] &amp;amp;&amp;amp; skip &apos;skip parallel run&apos;&lt;/tt&gt;&quot; so that their changes don&apos;t mess up other running tests.  I&apos;m not at all against that, if it would speed up testing (e.g. avoid a lot of waiting).&lt;/p&gt;

&lt;p&gt;I can definitely imagine that there are many tests that &lt;b&gt;do not&lt;/b&gt; check &quot;&lt;tt&gt;$PARALLEL&lt;/tt&gt;&quot; properly before changing global state (stopping servers, changing the default filesystem layout, checking whether a specific amount of space is consumed, etc.), but since we are not running tests in parallel this is not noticed/doesn&apos;t matter.&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|hzw4wn:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>10905</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>