<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:20:55 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-8832] no virt-what command in SLES</title>
                <link>https://jira.whamcloud.com/browse/LU-8832</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;The virt-what command that is used in the function runnng_in_vm() in test-framework.sh only exists in RHEL, not in SLES.  This makes the behavior of any test that uses this function unpredictable on anything but RHEL distros.&lt;/p&gt;

&lt;p&gt;The running_in_vm() function was added in &lt;a href=&quot;http://review.whamcloud.com/20698&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/20698&lt;/a&gt;, part of the fix for &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8248&quot; title=&quot;sanity test_248: fast read was not 4 times faster&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8248&quot;&gt;&lt;del&gt;LU-8248&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="41554">LU-8832</key>
            <summary>no virt-what command in SLES</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="jamesanunez">James Nunez</assignee>
                                    <reporter username="bogl">Bob Glossman</reporter>
                        <labels>
                    </labels>
                <created>Mon, 14 Nov 2016 23:52:41 +0000</created>
                <updated>Sun, 23 Apr 2017 03:10:56 +0000</updated>
                            <resolved>Sat, 17 Dec 2016 14:24:36 +0000</resolved>
                                                    <fixVersion>Lustre 2.10.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                            <comments>
                            <comment id="173556" author="adilger" created="Tue, 15 Nov 2016 00:22:46 +0000"  >&lt;p&gt;The code should be able to handle the lack of &quot;virt-what&quot; by running dmidecode and finally just returning nothing:&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;running_in_vm() {
        local virt=$(virt-what 2&amp;gt; /dev/&lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;)

        [ $? -eq 0 ] &amp;amp;&amp;amp; [ -n &lt;span class=&quot;code-quote&quot;&gt;&quot;$virt&quot;&lt;/span&gt; ] &amp;amp;&amp;amp; { echo $virt; &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt;; }

        virt=$(dmidecode -s system-product-name | awk &lt;span class=&quot;code-quote&quot;&gt;&apos;{print $1}&apos;&lt;/span&gt;)

        &lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt; $virt in
                VMware|KVM|VirtualBox|Parallels) echo ${virt,,} ;;
                *) ;;
        esac
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;What sort of error are you seeing?&lt;/p&gt;</comment>
                            <comment id="173591" author="bogl" created="Tue, 15 Nov 2016 14:07:52 +0000"  >&lt;p&gt;see &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8831&quot; title=&quot;sanity test_248: test-framework.sh: line 1003: ${virt,,}: bad substitution&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8831&quot;&gt;&lt;del&gt;LU-8831&lt;/del&gt;&lt;/a&gt; for an example of an error.&lt;/p&gt;

&lt;p&gt;another branch, not master, has a different instance of using virt-what but in that case it makes sure it really exists using &apos;which virt-what&apos; before using it.&lt;/p&gt;</comment>
                            <comment id="173615" author="adilger" created="Tue, 15 Nov 2016 15:41:49 +0000"  >&lt;p&gt;Bob, could you please try the above sequence of commands manually to see what &quot;virt&quot; is, and what &lt;tt&gt;dmidecode&lt;/tt&gt; returns. It may be that the problem is really that the ${virt,,} expansion (which converts the string to lower case) is not working in the SLES version of bash. We know that the $virt string is not empty since it has to match one of the guest machine names to even be run.&lt;/p&gt;</comment>
                            <comment id="173618" author="bogl" created="Tue, 15 Nov 2016 15:52:41 +0000"  >&lt;p&gt;Andreas,&lt;br/&gt;
It appears you are correct, the SLES version of bash doesn&apos;t know about the ,, expansion.&lt;br/&gt;
Here are the manual commands:&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;sles11sp4gm:/home/bogl/lustre-release # virt=$(dmidecode -s system-product-name | awk &apos;{print $1}&apos;)
sles11sp4gm:/home/bogl/lustre-release # echo $virt
VMware
sles11sp4gm:/home/bogl/lustre-release # echo ${virt,,}
bash: ${virt,,}: bad substitution
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Since it only matters if the string echo&apos;ed by this function is empty or not, why not just echo $virt ?&lt;br/&gt;
Who cares if it has some caps in it.&lt;/p&gt;</comment>
                            <comment id="173624" author="bogl" created="Tue, 15 Nov 2016 16:07:13 +0000"  >&lt;p&gt;if it absolutely needs conversion, I think this will work everywhere:&lt;/p&gt;

&lt;p&gt;echo $virt | tr &apos;&lt;span class=&quot;error&quot;&gt;&amp;#91;A-Z&amp;#93;&lt;/span&gt;&apos; &apos;&lt;span class=&quot;error&quot;&gt;&amp;#91;a-z&amp;#93;&lt;/span&gt;&apos;&lt;/p&gt;</comment>
                            <comment id="173635" author="bogl" created="Tue, 15 Nov 2016 16:35:43 +0000"  >&lt;p&gt;it looks like only the sles11 bash doesn&apos;t know about the ,, expansion.  it does work fine in sles12.&lt;/p&gt;

&lt;p&gt;fwiw, it works as expected in all versions of el6 and el7 I can find and try.&lt;/p&gt;</comment>
                            <comment id="173661" author="jgmitter" created="Tue, 15 Nov 2016 18:23:25 +0000"  >&lt;p&gt;Assigning to James for the test update&lt;/p&gt;</comment>
                            <comment id="173662" author="jamesanunez" created="Tue, 15 Nov 2016 18:24:06 +0000"  >&lt;p&gt;Bob - Do you have a patch for this or should I create one?&lt;/p&gt;</comment>
                            <comment id="173663" author="bogl" created="Tue, 15 Nov 2016 18:26:11 +0000"  >&lt;p&gt;James,  I have no patch.  The simplest patch would be to just change echo ${virt,,} to echo $virt.&lt;/p&gt;</comment>
                            <comment id="173666" author="jay" created="Tue, 15 Nov 2016 18:33:19 +0000"  >&lt;p&gt;I would propose &apos;echo $virt | tr &apos;&lt;span class=&quot;error&quot;&gt;&amp;#91;A-Z&amp;#93;&lt;/span&gt;&apos; &apos;&lt;span class=&quot;error&quot;&gt;&amp;#91;a-z&amp;#93;&lt;/span&gt;&apos;&apos; to avoid puzzles like &apos;VMWare&apos;, &apos;VMware&apos;, &apos;KVM&apos;, &apos;kvm&apos;&lt;/p&gt;</comment>
                            <comment id="173667" author="bogl" created="Tue, 15 Nov 2016 18:35:51 +0000"  >&lt;p&gt;fine, I won&apos;t argue.  if the favored solution is to continue to translate to all lower case I&apos;m ok with that.  It just seems unnecessary.&lt;/p&gt;</comment>
                            <comment id="173679" author="adilger" created="Tue, 15 Nov 2016 19:19:53 +0000"  >&lt;p&gt;I was going to suggest the same thing as Jinshan, to keep the output constant. Even if we don&apos;t need to know the VM details today, it may help in the future. &lt;/p&gt;</comment>
                            <comment id="173680" author="jay" created="Tue, 15 Nov 2016 19:20:19 +0000"  >&lt;p&gt;Sorry if this would introduce extra work on your side. I proposed that way because dmidecode and virt-what can produce different results.&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;[root@centos7 tests]# dmidecode -s system-product-name |awk &apos;{print $1}&apos;
VMware
[root@centos7 tests]# virt-what
vmware
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="173705" author="gerrit" created="Tue, 15 Nov 2016 21:20:07 +0000"  >&lt;p&gt;James Nunez (james.a.nunez@intel.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/23774&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/23774&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8832&quot; title=&quot;no virt-what command in SLES&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8832&quot;&gt;&lt;del&gt;LU-8832&lt;/del&gt;&lt;/a&gt; tests: Generalize check of virtual machine&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 8ef7cc5073ba246b0700bdf9ce5c108ae104a12a&lt;/p&gt;</comment>
                            <comment id="178199" author="gerrit" created="Sat, 17 Dec 2016 05:38:42 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/23774/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/23774/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8832&quot; title=&quot;no virt-what command in SLES&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8832&quot;&gt;&lt;del&gt;LU-8832&lt;/del&gt;&lt;/a&gt; tests: Generalize check of virtual machine&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: fb4e9d58e387af627e3599ddaa2ae553d078b6e1&lt;/p&gt;</comment>
                            <comment id="178257" author="pjones" created="Sat, 17 Dec 2016 14:24:37 +0000"  >&lt;p&gt;Landed for 2.10&lt;/p&gt;</comment>
                            <comment id="186383" author="gerrit" created="Tue, 28 Feb 2017 00:07:02 +0000"  >&lt;p&gt;Andreas Dilger (andreas.dilger@intel.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/25660&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/25660&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8832&quot; title=&quot;no virt-what command in SLES&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8832&quot;&gt;&lt;del&gt;LU-8832&lt;/del&gt;&lt;/a&gt; tests: fix module loading for Parallels&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: fb06483bf3a6dbeabd569997704723010104073a&lt;/p&gt;</comment>
                            <comment id="193118" author="gerrit" created="Sun, 23 Apr 2017 03:10:56 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/25660/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/25660/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8832&quot; title=&quot;no virt-what command in SLES&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8832&quot;&gt;&lt;del&gt;LU-8832&lt;/del&gt;&lt;/a&gt; tests: fix module loading for Parallels&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: c49c8b146fdb45ef621fbba288758611c6d35cf3&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="41551">LU-8831</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|hzyvmf:</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>