<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:29:23 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-9799] mount doesn&apos;t return an error when failing </title>
                <link>https://jira.whamcloud.com/browse/LU-9799</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;When &lt;tt&gt;mount -t lustre ...&lt;/tt&gt;&#160;has failed to actually mount a target, the exit code of &lt;tt&gt;mount&lt;/tt&gt; does not reflect this:&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;# mount -t lustre zfs_pool_scsi0QEMU_QEMU_HARDDISK_disk13/MGS /mnt/MGS
e2label: No such file or directory while trying to open zfs_pool_scsi0QEMU_QEMU_HARDDISK_disk13/MGS
Couldn&apos;t find valid filesystem superblock.
# echo $?
0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This of course wreaks havoc on systems such as IML which rely on the exit code of one step in the process of starting a filesystem to decide if it should continue with subsequent steps.&lt;/p&gt;</description>
                <environment>Lustre: Build Version: 2.10.0_5_gbb3c407</environment>
        <key id="47514">LU-9799</key>
            <summary>mount doesn&apos;t return an error when failing </summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.whamcloud.com/images/icons/priorities/critical.svg">Critical</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="utopiabound">Nathaniel Clark</assignee>
                                    <reporter username="brian">Brian Murrell</reporter>
                        <labels>
                    </labels>
                <created>Wed, 26 Jul 2017 11:22:59 +0000</created>
                <updated>Fri, 18 Aug 2017 23:34:57 +0000</updated>
                            <resolved>Thu, 17 Aug 2017 04:32:39 +0000</resolved>
                                    <version>Lustre 2.10.0</version>
                                    <fixVersion>Lustre 2.10.1</fixVersion>
                    <fixVersion>Lustre 2.11.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="203948" author="brian" created="Mon, 31 Jul 2017 16:51:08 +0000"  >&lt;p&gt;But what is interesting about this command and error is that clearly the user is trying to mount a ZFS target so why is &lt;tt&gt;ldiskfs_read_ldd()&lt;/tt&gt; being called for it?&lt;/p&gt;

&lt;p&gt;Isn&apos;t &lt;tt&gt;osd_read_ldd()&lt;/tt&gt; supposed to know that the target&#160;is (supposed to be formatted) ZFS at this point through &lt;tt&gt;ldd-&amp;gt;ldd_mount_type&lt;/tt&gt;?&lt;/p&gt;

&lt;p&gt;Could this be a symptom of a failed &lt;tt&gt;mkfs&lt;/tt&gt; on the target perhaps?&lt;/p&gt;

&lt;p&gt;Any other suggestions of what this could be a symptom of would be welcome.&lt;/p&gt;</comment>
                            <comment id="204077" author="pjones" created="Tue, 1 Aug 2017 15:31:45 +0000"  >&lt;p&gt;Nathaniel&lt;/p&gt;

&lt;p&gt;Can you please advise?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="204323" author="utopiabound" created="Thu, 3 Aug 2017 12:08:24 +0000"  >&lt;p&gt;ldd_mount_type should be set by osd_is_lustre() or it would error out with &quot;... has not been formatted with mkfs.lustre...&quot;&lt;/p&gt;

&lt;p&gt;Are you sure it didn&apos;t mount it?  The errors listed are ldiskfs errors, which is okay when mounting a ZFS device.&lt;/p&gt;</comment>
                            <comment id="204339" author="brian" created="Thu, 3 Aug 2017 15:49:20 +0000"  >&lt;blockquote&gt;
&lt;p&gt;ldd_mount_type should be set by osd_is_lustre() or it would error out with &quot;... has not been formatted with mkfs.lustre...&quot;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Indeed, that is my understanding from reading the code also.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Are you sure it didn&apos;t mount it?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I got here actually because the error I was trying to find the source of was:&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;Jun 27 15:59:53 lotus-55vm18.lotus.hpdd.lab.intel.com kernel: LustreError: 15f-b: testfs-OST0001: cannot register this server with the MGS: rc = -108. Is the MGS running?
Jun 27 15:59:53 lotus-55vm18.lotus.hpdd.lab.intel.com kernel: LustreError: 12529:0:(obd_mount_server.c:1846:server_fill_super()) Unable to start targets: -108
Jun 27 15:59:53 lotus-55vm18.lotus.hpdd.lab.intel.com kernel: LustreError: 12529:0:(obd_mount_server.c:1560:server_put_super()) no obd testfs-OST0001
Jun 27 15:59:53 lotus-55vm18.lotus.hpdd.lab.intel.com kernel: LustreError: 12529:0:(obd_mount_server.c:135:server_deregister_mount()) testfs-OST0001 not registered
Jun 27 15:59:53 lotus-55vm18.lotus.hpdd.lab.intel.com kernel: Lustre: server umount testfs-OST0001 complete
Jun 27 15:59:53 lotus-55vm18.lotus.hpdd.lab.intel.com kernel: LustreError: 12529:0:(obd_mount.c:1505:lustre_fill_super()) Unable to mount  (-108)

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;So that would indicate that it didn&apos;t mount.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The errors listed are ldiskfs errors, which is okay when mounting a ZFS device.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;But why would one get any ldiskfs errors when trying to mount a ZFS device if &lt;tt&gt;osd_is_lustre()&lt;/tt&gt; correctly set &lt;tt&gt;ldd_mount_type&lt;/tt&gt;? If &lt;tt&gt;ldd_mount_type&lt;/tt&gt; is correct then why would &lt;tt&gt;ldiskfs_read_ldd()&lt;/tt&gt; (or &lt;tt&gt;ldiskfs_&amp;lt;anything&amp;gt;&lt;/tt&gt;&#160;for that matter) even have any opportunity to produce any ldiskfs related errors?&lt;/p&gt;</comment>
                            <comment id="204677" author="utopiabound" created="Mon, 7 Aug 2017 16:15:56 +0000"  >&lt;p&gt;Can you give me exact versions of what you using, and maybe an sosreport from the host?  I&apos;m having trouble reproducing even the initial error messages.&lt;/p&gt;</comment>
                            <comment id="204749" author="brian" created="Tue, 8 Aug 2017 11:50:43 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/secure/ViewProfile.jspa?name=utopiabound&quot; class=&quot;user-hover&quot; rel=&quot;utopiabound&quot;&gt;utopiabound&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Can you give me exact versions of what you using,&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;The Lustre build version is in the &lt;em&gt;Environment&lt;/em&gt; field of this ticket.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I&apos;m having trouble reproducing even the initial error messages&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Yes, it&apos;s not very reproducible. We only hit it occasionally. But since we do create Lustre filesystems so many times during our test runs, even only very intermittent issues can hit seemingly frequently.&lt;/p&gt;

&lt;p&gt;I think the first step is to agree on the expected behaviour. My position, from reading the code is that one should never be able to get the &lt;tt&gt;e2label: No such file or directory while trying to open...&lt;/tt&gt; error if the target was properly formatted since the codepath that that error exists in should be only for &lt;em&gt;ldiskfs&lt;/em&gt; and if the target was formatted ZFS then it should be an unreachable codepath. You seem to indicate that it could happen though. I explained why I don&apos;t think one should be able to hit that codepath but you must disagree with my explanation if you think it can be hit.&lt;/p&gt;

&lt;p&gt;Could you explain what I missed in my analysis?&lt;/p&gt;</comment>
                            <comment id="204784" author="utopiabound" created="Tue, 8 Aug 2017 16:08:21 +0000"  >&lt;blockquote&gt;
&lt;p&gt;The Lustre build version is in the &lt;em&gt;Environment&lt;/em&gt; field of this ticket.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;But the ZFS, OS, e2fsprogs versions aren&apos;t.&lt;/p&gt;

&lt;p&gt;I can get sort of close, but not with your pool name:&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@ieel-mds03 tmp]# mount -t lustre zfs_pool_scsi0QEMU_Inode_HARDDISK_disk13/MGS /mnt/MGT; echo $?
zfs_pool_scsi0QEMU_Inode_HARDDISK_disk13/MGS: No such file or directory while opening filesystem
e2label: No such file or directory while trying to open zfs_pool_scsi0QEMU_Inode_HARDDISK_disk13/MGS
Couldn&apos;t find valid filesystem superblock.
mount.lustre: zfs_pool_scsi0QEMU_Inode_HARDDISK_disk13/MGS failed to read permanent mount data: 
254
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If &lt;tt&gt;e2label&lt;/tt&gt;  were to print anything (even a newline) to stdout on error, the final return code would be 0.&lt;/p&gt;</comment>
                            <comment id="204811" author="brian" created="Tue, 8 Aug 2017 18:28:57 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/secure/ViewProfile.jspa?name=utopiabound&quot; class=&quot;user-hover&quot; rel=&quot;utopiabound&quot;&gt;utopiabound&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;But the ZFS, OS, e2fsprogs versions aren&apos;t.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;It&apos;s probably moot, but just for clarity, the ZFS version is whatever is built by Jenkins with b2_10. &lt;em&gt;e2fsprogs&lt;/em&gt; is most recent GA and O/S is RHEL 7.4. I doubt any of these are particularly relevant though.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I can get sort of close, but not with your pool name:&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I think you got much more than just &quot;sort of close&quot;. &#160;I think you got an exact reproduction. The names of pools, etc. I think is quite irrelevant.&lt;/p&gt;

&lt;p&gt;The question is still though, when the &lt;tt&gt;e2label&lt;/tt&gt; call is only in the &lt;em&gt;ldiskfs&lt;/em&gt; OSD codepath, in &lt;tt&gt;ldiskfs_read_ldd()&lt;/tt&gt;, why is that being hit for a ZFS formatted target?&lt;/p&gt;

&lt;p&gt;My reading of the code is that by the time&#160;&lt;tt&gt;osd_read_ldd()&lt;/tt&gt;&#160;is supposed to call either &lt;tt&gt;zfs_read_ldd()&lt;/tt&gt; or &lt;tt&gt;ldiskfs_read_ldd()&lt;/tt&gt;, the format of the target is known and stored in&#160;&lt;tt&gt;ldd-&amp;gt;ldd_mount_type&lt;/tt&gt;, so only the relevant one of either &lt;tt&gt;zfs_read_ldd()&lt;/tt&gt; or &lt;tt&gt;ldiskfs_read_ldd()&lt;/tt&gt; should be called, not both and so why are we getting an error from the &lt;tt&gt;e2label&lt;/tt&gt; that is only in &lt;tt&gt;ldiskfs_read_ldd()&lt;/tt&gt;?&lt;/p&gt;</comment>
                            <comment id="204828" author="utopiabound" created="Tue, 8 Aug 2017 20:48:36 +0000"  >&lt;p&gt;The name of the pool is absolutely key for my reproduction:&lt;/p&gt;

&lt;p&gt;lustre/utils/libmount_utils_ldiskfs.c:&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; 448 /* Check whether the file exists in the device */
 449 static int file_in_dev(char *file_name, char *dev_name)
 450 {
 451         FILE *fp;
 452         char debugfs_cmd[256];
 453         unsigned int inode_num;
 454         int i;
 455 
 456         /* Construct debugfs command line. */
 457         snprintf(debugfs_cmd, sizeof(debugfs_cmd),
 458                  &quot;%s -c -R &apos;stat %s&apos; &apos;%s&apos; 2&amp;gt;&amp;amp;1 | egrep &apos;(Inode|unsupported)&apos;&quot;,
 459                  DEBUGFS, file_name, dev_name);
 460 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Notice the &lt;tt&gt;...|egrep ...&lt;/tt&gt; on line 458.  That will report out report output text if the egrep matches the pool name on an error, since stderr is also redirected through the egrep.&lt;/p&gt;</comment>
                            <comment id="204855" author="brian" created="Wed, 9 Aug 2017 02:11:48 +0000"  >&lt;p&gt;Ahhh. &#160;So, relevant only to force that codepath. &#160;But clearly that is not the problem in my case.&lt;/p&gt;</comment>
                            <comment id="204890" author="utopiabound" created="Wed, 9 Aug 2017 14:11:42 +0000"  >&lt;p&gt;Right. But something similar must be happening, though I am at a loss as to what. &lt;/p&gt;</comment>
                            <comment id="205007" author="utopiabound" created="Thu, 10 Aug 2017 13:24:26 +0000"  >&lt;p&gt;Okay, I was testing something totally different and ran into this:&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@ieel-mds03 ~]# mount -t lustre MGS/MGT /mnt/MGT
e2label: No such file or directory while trying to open MGS/MGT
Couldn&apos;t find valid filesystem superblock.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But on closer inspection:&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@ieel-mds03 ~]# df
Filesystem                      1K-blocks     Used Available Use% Mounted on
/dev/mapper/cl_ieel--mds03-root   6486016  1867296   4618720  29% /
devtmpfs                           496568        0    496568   0% /dev
tmpfs                              508324    39216    469108   8% /dev/shm
tmpfs                              508324    13188    495136   3% /run
tmpfs                              508324        0    508324   0% /sys/fs/cgroup
/dev/sda1                         1038336   193444    844892  19% /boot
ieel-storage:/home               40572928 38486912   2086016  95% /home
tmpfs                              101668        0    101668   0% /run/user/0
MGS                               5047168        0   5047168   0% /MGS
MGS/MGT                           5007744        0   5005696   0% /mnt/MGT
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The filesystem did mount, and each umount and remount, I get the same error message, but it succeeds in mounting.&lt;/p&gt;</comment>
                            <comment id="205013" author="gerrit" created="Thu, 10 Aug 2017 14:22:57 +0000"  >&lt;p&gt;Nathaniel Clark (nathaniel.l.clark@intel.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/28456&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/28456&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9799&quot; title=&quot;mount doesn&amp;#39;t return an error when failing &quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9799&quot;&gt;&lt;del&gt;LU-9799&lt;/del&gt;&lt;/a&gt; mount: Call read_ldd with initialized mount type&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: aeffd031d67a99896657617f7acd6dafd7a7722c&lt;/p&gt;</comment>
                            <comment id="205576" author="gerrit" created="Thu, 17 Aug 2017 01:30:13 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/28456/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/28456/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9799&quot; title=&quot;mount doesn&amp;#39;t return an error when failing &quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9799&quot;&gt;&lt;del&gt;LU-9799&lt;/del&gt;&lt;/a&gt; mount: Call read_ldd with initialized mount type&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 0108281c65545df169faaa0ce0690fb021680643&lt;/p&gt;</comment>
                            <comment id="205590" author="pjones" created="Thu, 17 Aug 2017 04:32:39 +0000"  >&lt;p&gt;Landed for 2.11&lt;/p&gt;</comment>
                            <comment id="205610" author="gerrit" created="Thu, 17 Aug 2017 14:32:33 +0000"  >&lt;p&gt;Minh Diep (minh.diep@intel.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/28581&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/28581&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9799&quot; title=&quot;mount doesn&amp;#39;t return an error when failing &quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9799&quot;&gt;&lt;del&gt;LU-9799&lt;/del&gt;&lt;/a&gt; mount: Call read_ldd with initialized mount type&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_10&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 776cae93b762e819cf80eed04d57bfc4040f09f0&lt;/p&gt;</comment>
                            <comment id="205767" author="gerrit" created="Fri, 18 Aug 2017 18:09:30 +0000"  >&lt;p&gt;John L. Hammond (john.hammond@intel.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/28581/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/28581/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9799&quot; title=&quot;mount doesn&amp;#39;t return an error when failing &quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9799&quot;&gt;&lt;del&gt;LU-9799&lt;/del&gt;&lt;/a&gt; mount: Call read_ldd with initialized mount type&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_10&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: f869b9da902fc305bfab8e902d0c1202aec6a7bc&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="47740">LU-9853</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|hzzhbb:</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>