<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:47:57 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-11906] &quot;ambiguous redirect&quot; from yml.sh when running in multinode setup</title>
                <link>https://jira.whamcloud.com/browse/LU-11906</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;when trying to run any Lustre tests with bash as the shell (or via auster) and ost_HOST and/or mds_HOST set to a different node, the scripts fail in yaml.sh line 11:&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;/home/green/git/lustre-release/lustre/tests/yaml.sh: line 11: $logdir/node.$host.yml: ambiguous redirect
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The line in question is&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;
        echo &lt;span class=&quot;code-quote&quot;&gt;&quot;$line&quot;&lt;/span&gt; | sed &lt;span class=&quot;code-quote&quot;&gt;&quot;s/^${host}: &lt;span class=&quot;code-comment&quot;&gt;//&quot;&lt;/span&gt; | sed &lt;span class=&quot;code-quote&quot;&gt;&quot;s/^${host}://&quot;&lt;/span&gt; \
&lt;/span&gt;            &amp;gt;&amp;gt; $logdir/node.$host.yml;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;if I put quotes around that &quot;$logdir/node.$host.yml&quot; - the error goes away and everything works as intended.&lt;/p&gt;

&lt;p&gt;I guess this is the proper way to fix it?&lt;/p&gt;

&lt;p&gt;Also this error does not show up if I use &quot;sh&quot; instead of &quot;bash&quot; to run the scripts, but I must use bash as otherwise flakey logic does not work.&lt;/p&gt;</description>
                <environment></environment>
        <key id="54717">LU-11906</key>
            <summary>&quot;ambiguous redirect&quot; from yml.sh when running in multinode setup</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="green">Oleg Drokin</reporter>
                        <labels>
                    </labels>
                <created>Wed, 30 Jan 2019 21:57:55 +0000</created>
                <updated>Thu, 31 Jan 2019 02:05:52 +0000</updated>
                                            <version>Lustre 2.12.0</version>
                    <version>Lustre 2.13.0</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="241018" author="green" created="Wed, 30 Jan 2019 22:01:34 +0000"  >&lt;p&gt;also the reason for the warning is because the yaml file does not exist on the server node at the time this is executed.&lt;/p&gt;</comment>
                            <comment id="241020" author="adilger" created="Wed, 30 Jan 2019 22:19:39 +0000"  >&lt;p&gt;It looks like the code in question is:&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;
split_output() {
    &lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt; read line; &lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt;
        host=${line%%:*};
        echo &lt;span class=&quot;code-quote&quot;&gt;&quot;$line&quot;&lt;/span&gt; | sed &lt;span class=&quot;code-quote&quot;&gt;&quot;s/^${host}: &lt;span class=&quot;code-comment&quot;&gt;//&quot;&lt;/span&gt; | sed &lt;span class=&quot;code-quote&quot;&gt;&quot;s/^${host}://&quot;&lt;/span&gt; \
&lt;/span&gt;            &amp;gt;&amp;gt; $logdir/node.$host.yml;
    done
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;so it is reading &quot;&lt;tt&gt;$line&lt;/tt&gt;&quot; from the standard input, then dropping everything after the first &quot;:&quot; to find &quot;&lt;tt&gt;$host&lt;/tt&gt;&quot;, so it is expecting output from &lt;tt&gt;pdsh&lt;/tt&gt; or similar.&lt;/p&gt;

&lt;p&gt;What is in &quot;&lt;tt&gt;$host&lt;/tt&gt;&quot; really depends on what is in &quot;&lt;tt&gt;$line&lt;/tt&gt;&quot; when the function is called.  If there is a space before the first &quot;:&quot; then &quot;&lt;tt&gt;$host&lt;/tt&gt;&quot; will have a space in it, and the redirect will be &quot;&lt;tt&gt;&amp;gt;&amp;gt; $logdir/node.foo bar.yml&lt;/tt&gt;&quot; or similar, and it means there are two possible output files, which is of course not allowed.  Quoting the output means you&apos;ll have an output filename with a space in it, which is probably why the error goes away.&lt;/p&gt;</comment>
                            <comment id="241024" author="green" created="Wed, 30 Jan 2019 23:16:44 +0000"  >&lt;p&gt;Ok, something really strange is going on here. I added printing of the host and that&apos;s what I got:&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;
            &amp;gt;&amp;gt; &lt;span class=&quot;code-quote&quot;&gt;&quot;$logdir/node.$host.yml&quot;&lt;/span&gt;;
echo we got host &lt;span class=&quot;code-quote&quot;&gt;&quot;*${host}*&quot;&lt;/span&gt; &amp;gt;&amp;amp;2
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&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;oleg1-server.localnet: executing yml_node
we got host *Build*
we got host *Build*
we got host *lbats_build_id*
we got host *lbats_build_name*
we got host *architecture*
we got host *os*
we got host *os_distribution*
we got host *lustre_version*
we got host *lustre_build*
we got host *lustre_branch*
we got host *lustre_revision*
we got host *kernel_version*
we got host *file_system*
we got host **
we got host *Node*
we got host *lbats_build_id*
we got host *lbats_build_name*
we got host *architecture*
we got host *os*
we got host *os_distribution*
we got host *lustre_version*
we got host *lustre_build*
we got host *lustre_branch*
we got host *lustre_revision*
we got host *kernel_version*
we got host *file_system*
we got host **
we got host *Node*
we got host *node_name*
we got host *mem_size*
we got host *architecture*
we got host *networks*
we got host *node_name*
we got host *mem_size*
we got host *architecture*
we got host *networks*
we got host *- tcp*
we got host **
we got host *LustreEntities*
we got host *- tcp*
we got host **
we got host *LustreEntities*
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="241025" author="green" created="Wed, 30 Jan 2019 23:31:22 +0000"  >&lt;p&gt;Ok, so after some digging with JJames, it looks like the code  depends on pdsh not being invoked with the -N option that supresses the host: prefix. I do run it with -N and so the code is utterly confusing. Not sure when did that change came to be because in the past -N was mandatory and in fact there are still checks for it in test-framework.sh&lt;/p&gt;</comment>
                            <comment id="241029" author="jamesanunez" created="Thu, 31 Jan 2019 02:05:52 +0000"  >&lt;p&gt;As Oleg said, the issue here was due to using the &#8216;-N&#8217; option to pdsh. The problem is that some routines in yaml.sh assume that all output from do_rpc_nodes() has the host name prepended to each line. Of course, using pdsh/ssh with the &#8216;-N&#8217; option removes the hostname from each line. In yaml.sh, yml_nodes_file() sends data to split_output() that is assumed to have the host name in every line parsed &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;
   8 split_output() {
   9     &lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt; read line; &lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt;
  10         host=${line%%:*};
  11         echo &lt;span class=&quot;code-quote&quot;&gt;&quot;$line&quot;&lt;/span&gt; | sed &lt;span class=&quot;code-quote&quot;&gt;&quot;s/^${host}: &lt;span class=&quot;code-comment&quot;&gt;//&quot;&lt;/span&gt; | sed &lt;span class=&quot;code-quote&quot;&gt;&quot;s/^${host}://&quot;&lt;/span&gt; \
&lt;/span&gt;  12             &amp;gt;&amp;gt; $logdir/node.$host.yml;
  13     done
  14 }
  15 
  16 yml_nodes_file() {
  17     export logdir=$1
  18 
  19     &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; [ -f $logdir/shared ]; then
  20         do_rpc_nodes $(comma_list $(all_nodes)) \
  21             &lt;span class=&quot;code-quote&quot;&gt;&quot;yml_node &amp;gt;&amp;gt; $logdir/node.\\\$(hostname -s).yml&quot;&lt;/span&gt;
  22     &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt;
  23         do_rpc_nodes $(comma_list $(all_nodes)) yml_node | split_output
  24     fi
  25     yml_entities
  26 }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Using the &apos;-N&apos; option for pdsh is not mandatory, but we should be able to write out results when it is specified. &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|i00am7:</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>