<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:07:48 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-7312] sanity-hsm: $? verification is not valid with set -e</title>
                <link>https://jira.whamcloud.com/browse/LU-7312</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;The part of the fix for &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-5622&quot; title=&quot;copytool_cleanup function should check/wait for copytool death&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-5622&quot;&gt;&lt;del&gt;LU-5622&lt;/del&gt;&lt;/a&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;while&lt;/span&gt; (( SECONDS &amp;lt; end_wait )); &lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt;
                sleep 2
                do_nodesv $agents &lt;span class=&quot;code-quote&quot;&gt;&quot;pgrep -x $HSMTOOL_BASE&quot;&lt;/span&gt;
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; [ $? -ne 0 ]; then
                        echo &lt;span class=&quot;code-quote&quot;&gt;&quot;Copytool is stopped on $agents&quot;&lt;/span&gt;
                        &lt;span class=&quot;code-keyword&quot;&gt;break&lt;/span&gt;
                fi
                echo &lt;span class=&quot;code-quote&quot;&gt;&quot;Copytool still running on $agents&quot;&lt;/span&gt;
        done
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; do_nodesv $agents &lt;span class=&quot;code-quote&quot;&gt;&quot;pgrep -x $HSMTOOL_BASE&quot;&lt;/span&gt;; then
                error &lt;span class=&quot;code-quote&quot;&gt;&quot;Copytool failed to stop in ${TIMEOUT}s ...&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;Copytool has stopped in &quot;&lt;/span&gt; \
                     &lt;span class=&quot;code-quote&quot;&gt;&quot;$((TIMEOUT - (end_wait - SECONDS)))s.&quot;&lt;/span&gt;
        fi
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;causes failure in sanity-hsm. &lt;br/&gt;
sanity-hsm.sh has set -e option, so checks of return code can cause an error&lt;/p&gt;</description>
                <environment></environment>
        <key id="32693">LU-7312</key>
            <summary>sanity-hsm: $? verification is not valid with set -e</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="6">Not a Bug</resolution>
                                        <assignee username="bfaccini">Bruno Faccini</assignee>
                                    <reporter username="529964">Bhagyesh Dudhediya</reporter>
                        <labels>
                            <label>patch</label>
                    </labels>
                <created>Mon, 19 Oct 2015 06:08:39 +0000</created>
                <updated>Sun, 10 Oct 2021 22:41:48 +0000</updated>
                            <resolved>Sun, 10 Oct 2021 22:41:48 +0000</resolved>
                                    <version>Lustre 2.7.0</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                            <comments>
                            <comment id="130747" author="gerrit" created="Mon, 19 Oct 2015 08:18:15 +0000"  >&lt;p&gt;Bhagyesh Dudhediya (bhagyesh.dudhediya@seagate.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/16866&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/16866&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-7312&quot; title=&quot;sanity-hsm: $? verification is not valid with set -e&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-7312&quot;&gt;&lt;del&gt;LU-7312&lt;/del&gt;&lt;/a&gt; test: With set -e exit status in sanity-hsm was not valid&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: cbfec6f59b5239c093f5dc74266f859a1eb0f54f&lt;/p&gt;</comment>
                            <comment id="130748" author="bfaccini" created="Mon, 19 Oct 2015 08:52:58 +0000"  >&lt;p&gt;Hello Bhagyesh,&lt;br/&gt;
I have checked with recent auto-tests runs of sanity-hsm, and they all show full script execution with no problem and with multiple &quot;Copytool is stopped on ...&quot;/&quot;Copytool has stopped in ...&quot; msgs (in fact one for each sub-test using copytoll_cleanup() function) in their outputs.&lt;br/&gt;
So can you better detail the problem you have encountered ?&lt;/p&gt;

&lt;p&gt;OTOH, re-reading Bash/set documentation (&lt;a href=&quot;https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html&lt;/a&gt;), I understand that when &quot;set -e&quot; is being used, a simple command failure can lead to shell/script exit, even if this does not seem to occur ... Is this what you mean ?&lt;/p&gt;

&lt;p&gt;And then that the :&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;                do_nodesv $agents &quot;pgrep -x $HSMTOOL_BASE&quot;
                if [ $? -ne 0 ]; then
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;construct should be replaced by :&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;                if ! do_nodesv $agents &quot;pgrep -x $HSMTOOL_BASE&quot;; then
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;to avoid any problem?&lt;/p&gt;</comment>
                            <comment id="130750" author="529964" created="Mon, 19 Oct 2015 09:36:14 +0000"  >&lt;p&gt;Yes, IMO the replacement should be done as mentioned.&lt;br/&gt;
Initially when I would run say test_400 due to the exit status check it would exit from the script.&lt;br/&gt;
Before the patch : the check &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; [ $? -ne 0 ]; then &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt; leads to exit.&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;[root@Bhagyesh tests]# ONLY=400 ./sanity-hsm.sh
Logging to shared log directory: /tmp/test_logs/1445246722
Starting client Bhagyesh:  -o user_xattr,flock Bhagyesh@tcp:/lustre /mnt/lustre2
Started clients Bhagyesh:
Bhagyesh@tcp:/lustre on /mnt/lustre2 type lustre (rw,user_xattr,flock)
Bhagyesh: Checking config lustre mounted on /mnt/lustre
Checking servers environments
Checking clients Bhagyesh environments
Using TIMEOUT=20
disable quota as required
osd-ldiskfs.track_declares_assert=1
running as uid/gid/euid/egid 500/500/500/500, groups:
 [touch] [/mnt/lustre/d0_runas_test/f3594]
excepting tests: 34 35 36
Killing existing copytools on Bhagyesh
Set HSM on and start
Start copytool
Purging archive on Bhagyesh
Starting copytool agt1 on Bhagyesh
Set sanity-hsm HSM policy


== sanity-hsm test 400: Single request is sent to the right MDT == 14:55:43 (1445246743)

 SKIP: sanity-hsm test_400 needs &amp;gt;= 2 MDTs
Resetting fail_loc on all nodes...done.
SKIP 400 (0s)
[root@Bhagyesh tests]#
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;After the patch : &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;[root@Bhagyesh tests]# ONLY=400 ./sanity-hsm.sh
Logging to shared log directory: /tmp/test_logs/1445246819
Bhagyesh: Checking config lustre mounted on /mnt/lustre2
Checking servers environments
Checking clients Bhagyesh environments
Bhagyesh: Checking config lustre mounted on /mnt/lustre
Checking servers environments
Checking clients Bhagyesh environments
Using TIMEOUT=20
disable quota as required
osd-ldiskfs.track_declares_assert=1
running as uid/gid/euid/egid 500/500/500/500, groups:
 [touch] [/mnt/lustre/d0_runas_test/f4943]
excepting tests: 34 35 36
Killing existing copytools on Bhagyesh
Set HSM on and start
Start copytool
Purging archive on Bhagyesh
Starting copytool agt1 on Bhagyesh
Set sanity-hsm HSM policy


== sanity-hsm test 400: Single request is sent to the right MDT == 14:57:20 (1445246840)

 SKIP: sanity-hsm test_400 needs &amp;gt;= 2 MDTs
Resetting fail_loc on all nodes...done.
SKIP 400 (0s)
Copytool is stopped on Bhagyesh
Copytool has stopped in  2s.
mdt.lustre-MDT0000.hsm_control=shutdown
Waiting 20 secs &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; update
mdt.lustre-MDT0000.hsm_control=enabled
== sanity-hsm test complete, duration 24 sec == 14:57:23 (1445246843)
Stopping clients: Bhagyesh /mnt/lustre2 (opts:)
Stopping client Bhagyesh /mnt/lustre2 opts:
[root@Bhagyesh tests]#
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="130858" author="jcl" created="Tue, 20 Oct 2015 09:47:21 +0000"  >&lt;p&gt;It seems there are other places in sanity-hsm.sh and sanity.sh with the same error test (and may be other test scripts).&lt;br/&gt;
Why do we need set -e? (it is in all test scripts)&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="26536">LU-5622</issuekey>
        </issuelink>
                            </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_10070" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Project</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10040"><![CDATA[HSM]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzxqqv:</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>