RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1462150 - mkfs.msdos fails to make a filesystem
Summary: mkfs.msdos fails to make a filesystem
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lorax
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: rc
: ---
Assignee: Brian Lane
QA Contact: Release Test Team
URL:
Whiteboard:
: 1464962 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-16 10:36 UTC by Lubos Kocman
Modified: 2018-04-10 17:39 UTC (History)
6 users (show)

Fixed In Version: lorax-19.6.95-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 17:38:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0947 0 None None None 2018-04-10 17:39:16 UTC

Description Lubos Kocman 2017-06-16 10:36:01 UTC
Description of problem:

I've seen that there is a new build of lorax from yesterday which just broke respin of snap-4 (lorax is directly being pushed to buildroot each time when attached to errata). It's one of 21 packages on whitelist.

Please fix it. I'm meanwhile tagging the *90* build into buildroot.

http://download-node-02.eng.bos.redhat.com/brewroot/work/tasks/1154/13451154/root.log


DEBUG util.py:417:  2017-06-16 09:00:52,329: plymouth.x86_64 0:0.8.9-0.28.20140113.el7 - u scriptlet output:
DEBUG util.py:417:  2661 blocks
DEBUG util.py:417:  plymouth.x86_64 0:0.8.9-0.28.20140113.el7 - u scriptlet output:
DEBUG util.py:417:  2661 blocks
DEBUG util.py:417:  2017-06-16 09:01:26,544: kernel.x86_64 0:3.10.0-681.el7 - i scriptlet output:
DEBUG util.py:417:  No '/dev/log' or 'logger' included for syslog logging
DEBUG util.py:417:  kernel.x86_64 0:3.10.0-681.el7 - i scriptlet output:
DEBUG util.py:417:  No '/dev/log' or 'logger' included for syslog logging
DEBUG util.py:417:  2017-06-16 09:01:32,368: writing .buildstamp file
DEBUG util.py:417:  writing .buildstamp file
DEBUG util.py:417:  2017-06-16 09:01:32,915: doing post-install configuration
DEBUG util.py:417:  doing post-install configuration
DEBUG util.py:417:  2017-06-16 09:01:32,933: running runtime-postinstall.tmpl
DEBUG util.py:417:  running runtime-postinstall.tmpl
DEBUG util.py:417:  Operation failed: No such file or directory
DEBUG util.py:417:  2017-06-16 09:01:33,140: writing .discinfo file
DEBUG util.py:417:  writing .discinfo file
DEBUG util.py:417:  2017-06-16 09:01:33,162: backing up installroot
DEBUG util.py:417:  backing up installroot
DEBUG util.py:417:  2017-06-16 09:01:33,865: generating kernel module metadata
DEBUG util.py:417:  generating kernel module metadata
DEBUG util.py:417:  2017-06-16 09:01:33,866: doing depmod and module-info for 3.10.0-681.el7.x86_64
DEBUG util.py:417:  doing depmod and module-info for 3.10.0-681.el7.x86_64
DEBUG util.py:417:  2017-06-16 09:01:36,302: cleaning unneeded files
DEBUG util.py:417:  cleaning unneeded files
DEBUG util.py:417:  2017-06-16 09:01:36,333: running runtime-cleanup.tmpl
DEBUG util.py:417:  running runtime-cleanup.tmpl
DEBUG util.py:417:  2017-06-16 09:01:39,530: creating the runtime image
DEBUG util.py:417:  creating the runtime image
DEBUG util.py:417:  mke2fs 1.42.9 (28-Dec-2013)
DEBUG util.py:417:  Discarding device blocks:    1024/2097152               done                            
DEBUG util.py:417:  Filesystem label=Anaconda
DEBUG util.py:417:  OS type: Linux
DEBUG util.py:417:  Block size=1024 (log=0)
DEBUG util.py:417:  Fragment size=1024 (log=0)
DEBUG util.py:417:  Stride=0 blocks, Stripe width=0 blocks
DEBUG util.py:417:  131072 inodes, 2097152 blocks
DEBUG util.py:417:  0 blocks (0.00%) reserved for the super user
DEBUG util.py:417:  First data block=1
DEBUG util.py:417:  Maximum filesystem blocks=35651584
DEBUG util.py:417:  256 block groups
DEBUG util.py:417:  8192 blocks per group, 8192 fragments per group
DEBUG util.py:417:  512 inodes per group
DEBUG util.py:417:  Superblock backups stored on blocks: 
DEBUG util.py:417:  	8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409, 663553, 
DEBUG util.py:417:  	1024001, 1990657
DEBUG util.py:417:  Allocating group tables:   0/256       done                            
DEBUG util.py:417:  Writing inode tables:   0/256       done                            
DEBUG util.py:417:  Creating journal (32768 blocks): done
DEBUG util.py:417:  Writing superblocks and filesystem accounting information:   0/256       done
DEBUG util.py:417:  mount: /dev/loop0: can't read superblock
DEBUG util.py:417:  losetup: /dev/loop0: detach failed: No such device or address
DEBUG util.py:417:  Traceback (most recent call last):
DEBUG util.py:417:    File "/usr/sbin/lorax", line 337, in <module>
DEBUG util.py:417:      main(sys.argv)
DEBUG util.py:417:    File "/usr/sbin/lorax", line 235, in main
DEBUG util.py:417:      remove_temp=True)
DEBUG util.py:417:    File "/usr/lib/python2.7/site-packages/pylorax/__init__.py", line 301, in run
DEBUG util.py:417:      compression=compression, compressargs=compressargs)
DEBUG util.py:417:    File "/usr/lib/python2.7/site-packages/pylorax/treebuilder.py", line 165, in create_runtime
DEBUG util.py:417:      "Anaconda", size=size)
DEBUG util.py:417:    File "/usr/lib/python2.7/site-packages/pylorax/imgutils.py", line 103, in mkrootfsimg
DEBUG util.py:417:      with Mount(loopdev) as mnt:
DEBUG util.py:417:    File "/usr/lib/python2.7/site-packages/pylorax/imgutils.py", line 289, in __enter__
DEBUG util.py:417:      self.mnt = mount(self.dev, self.opts, self.mnt)
DEBUG util.py:417:    File "/usr/lib/python2.7/site-packages/pylorax/imgutils.py", line 176, in mount
DEBUG util.py:417:      runcmd(mount)
DEBUG util.py:417:    File "/usr/lib/python2.7/site-packages/pylorax/executils.py", line 414, in runcmd
DEBUG util.py:417:      return execWithRedirect(cmd[0], cmd[1:], **kwargs)
DEBUG util.py:417:    File "/usr/lib/python2.7/site-packages/pylorax/executils.py", line 179, in execWithRedirect
DEBUG util.py:417:      raise subprocess.CalledProcessError(ret, [command]+argv)
DEBUG util.py:417:  subprocess.CalledProcessError: Command '['mount', '/dev/loop0', '/var/tmp/lorax.imgutils.ksolvK']' returned non-zero exit status 32

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Brian Lane 2017-06-16 14:52:28 UTC
This looks like a problem with the host.

DEBUG util.py:417:  mount: /dev/loop0: can't read superblock
DEBUG util.py:417:  losetup: /dev/loop0: detach failed: No such device or address

There is NO way that the changes from lorax-19.6.90-1 to lorax-19.6.91-1 could have caused a problem. They were this single commit:

https://github.com/rhinstaller/lorax/commit/31fec67150b0f5d92f3ac4be88f7eb7d387edbf3

Which only touches the documentation and example kickstarts.

Comment 4 Brian Lane 2017-06-21 16:07:42 UTC
This nightly log has more details, I'm pretty sure it's the same thing but with the important details included:

http://download-node-02.eng.bos.redhat.com/nightly/RHEL-7.4-20170620.n.0/logs/x86_64/buildinstall-Workstation-logs/program.log

Running... mkefiboot --label=ANACONDA /mnt/redhat/nightly/RHEL-7.4-20170620.n.0/work/x86_64/buildinstall/Workstation/EFI/BOOT /mnt/redhat/nightly/RHEL-7.4-20170620.n.0/work/x86_64/buildinstall/Workstation/images/efiboot.img
mkfs.fat 3.0.20 (12 Jun 2013)
Loop device does not match a floppy size, using default hd params
ERROR:program:mkfs.msdos: Attempting to create a too large filesystem
mkfs.msdos: Attempting to create a too large filesystem
ERROR:pylorax.imgutils:mkfs exited with a non-zero return code: 1
ERROR:pylorax.imgutils:None
ERROR:program:losetup: /dev/loop0: detach failed: No such device or address
losetup: /dev/loop0: detach failed: No such device or address

So the mkfs.msdos failed for some reason. It doesn't happen with any of the other variations that I looked at (Server, Client). The directory it is pulling from has the same content as the others, only about 8.4M of data.

Comment 5 Brian Lane 2017-06-21 21:00:40 UTC
Conclusions that I've come to:

1. mkfs.msdos is failing because it thinks the /dev/loop0 is too big for a fat filesystem.
   The error returned happens when there are no suitable FAT formats for the size of the device.
2. The contents of EFI/BOOT are small, so that's not the problem.
3. If the loop0 device is too small for the contents it will create the filesystem but the copy will fail and you will get a different error than what we see.
4. If the size estimate for EFI/BOOT is wrong it could create too big a /dev/loop0
   But I don't see how that could happen.
5. If /dev/loop0 wasn't fully setup when mkfs.msdos runs on it, it may have trouble.
   I don't really see how that could happen either, but I ran 20k passes of a test script on 2 systems and saw no failures. Not proof, but no smoking gun either.
6. If you run mkfs.msdos /dev/loop0 without setting up the loop, you get the error we are seeing in the logs: mkfs.msdos: Attempting to create a too large filesystem

So my conclusion is that somehow the mkfs.msdos call runs before the /dev/loop0 is completely setup. I'm not sure *how* it is happening but it seems to fit the results.

Comment 6 Brian Lane 2017-06-21 21:37:15 UTC
Here's a patch that may fix it. I'm not 100% sure since I cannot reproduce it, but at the least it shouldn't make it any worse:

https://github.com/rhinstaller/lorax/pull/221

Comment 12 Brian Lane 2017-06-26 13:29:16 UTC
*** Bug 1464962 has been marked as a duplicate of this bug. ***

Comment 13 Brian Lane 2017-06-26 14:25:15 UTC
Note about most recent failures with 19.6.94 -- it doesn't appear (to me) to be any worse than .92, it worked in some places and not others. The reason for *this* failure (which is not related to the previous failures) is that the check I added does not take into account the inconsistent results from losetup.

Output from program.log on working runs:

Running... losetup --find --show /var/tmp/lorax.rupsah/installroot/images/runtime-workdir/LiveOS/rootfs.img
/dev/loop0
Running... udevadm settle --timeout 300
Running... losetup --list -O BACK-FILE /dev/loop0
BACK-FILE
/var/tmp/lorax.rupsah/installroot/images/runtime-workdir/LiveOS/rootfs.img

When the new test fails, it looks like this:

Running... losetup --find --show /var/tmp/lorax.Y7tnwi/installroot/images/runtime-workdir/LiveOS/rootfs.img
/dev/loop0
Running... udevadm settle --timeout 300
Running... losetup --list -O BACK-FILE /dev/loop0
BACK-FILE
/var/tmp/lorax.Y7tnwi/installroot/images/runtime-workdir/LiveO*


It ends up that in lib/loopdev.c in the losetup code it truncates the output to 64 chars with a * at the end if it is unable to get the backing store via sysfs. Why can't it get it via sysfs? Unknown at this time.

Comment 16 Lubos Kocman 2017-06-30 11:52:15 UTC
This is still a problem. I'm going to revert build in errata to 19.6.92-1.el7. So we don't accidentally ship what we didn't compose.

I expect that we will not risk any more respins for RC.

(from http://download-node-02.eng.bos.redhat.com/brewroot/work/tasks/8731/13578731/root.log)

Installing:
 lorax                          x86_64 19.6.94-1.el7                build 169 k
 strace                         x86_64 4.12-4.el7                   build 458 k




(from http://download-node-02.eng.bos.redhat.com/brewroot/work/tasks/8731/13578731/runroot.log)

+ rm -rf /mnt/redhat/devel/candidate-trees/RHEL-7.4-20170630.0/work/x86_64/buildinstall/Client
+ lorax '--product=Red Hat Enterprise Linux' --version=7.4 --release=7.4 --source=file:///mnt/redhat/devel/candidate-trees/RHEL-7.4-20170630.0/work/x86_64/repo --variant=Client --nomacboot --isfinal --buildarch=x86_64 '--volid=RHEL-7.4 Client.x86_64' --logfile=/mnt/redhat/devel/candidate-trees/RHEL-7.4-20170630.0/logs/x86_64/buildinstall-Client-logs/lorax.log /mnt/redhat/devel/candidate-trees/RHEL-7.4-20170630.0/work/x86_64/buildinstall/Client

...

2017-06-30 04:46:10,521: writing .buildstamp file
writing .buildstamp file
2017-06-30 04:46:11,074: doing post-install configuration
doing post-install configuration
2017-06-30 04:46:11,091: running runtime-postinstall.tmpl
running runtime-postinstall.tmpl
Operation failed: No such file or directory
2017-06-30 04:46:11,316: writing .discinfo file
writing .discinfo file
2017-06-30 04:46:11,327: backing up installroot
backing up installroot
2017-06-30 04:46:11,920: generating kernel module metadata
generating kernel module metadata
2017-06-30 04:46:11,920: doing depmod and module-info for 3.10.0-691.el7.x86_64
doing depmod and module-info for 3.10.0-691.el7.x86_64
2017-06-30 04:46:14,365: cleaning unneeded files
cleaning unneeded files
2017-06-30 04:46:14,395: running runtime-cleanup.tmpl
running runtime-cleanup.tmpl
2017-06-30 04:46:17,535: creating the runtime image
creating the runtime image
Traceback (most recent call last):
  File "/usr/sbin/lorax", line 337, in <module>
    main(sys.argv)
  File "/usr/sbin/lorax", line 235, in main
    remove_temp=True)
  File "/usr/lib/python2.7/site-packages/pylorax/__init__.py", line 301, in run
    compression=compression, compressargs=compressargs)
  File "/usr/lib/python2.7/site-packages/pylorax/treebuilder.py", line 165, in create_runtime
    "Anaconda", size=size)
  File "/usr/lib/python2.7/site-packages/pylorax/imgutils.py", line 100, in mkrootfsimg
    mkext4img(rootdir, outfile, label=label, size=fssize)
  File "/usr/lib/python2.7/site-packages/pylorax/imgutils.py", line 411, in mkext4img
    mkfsargs=["-L", label, "-b", "1024", "-m", "0"], graft=graft)
  File "/usr/lib/python2.7/site-packages/pylorax/imgutils.py", line 388, in mkfsimage
    with LoopDev(outfile, size) as loopdev:
  File "/usr/lib/python2.7/site-packages/pylorax/imgutils.py", line 293, in __enter__
    self.loopdev = loop_attach(self.filename)
  File "/usr/lib/python2.7/site-packages/pylorax/imgutils.py", line 153, in loop_attach
    loop_waitfor(dev.strip(), outfile)
  File "/usr/lib/python2.7/site-packages/pylorax/imgutils.py", line 145, in loop_waitfor
    raise RuntimeError("Unable to setup %s on %s" % (loop_dev, outfile))
RuntimeError: Unable to setup /dev/loop3 on /var/tmp/lorax.zM_jw5/installroot/images/runtime-workdir/LiveOS/rootfs.img

Comment 21 Brian Lane 2017-08-08 16:53:47 UTC
PR for the final patch - https://github.com/rhinstaller/lorax/pull/231

Comment 23 Peter Kotvan 2018-01-30 07:36:58 UTC
Hi Lubos,

can you please confirm that the issue is fixed in the current version of lorax?

Thanks.

Comment 28 Lubos Kocman 2018-02-08 09:37:44 UTC
*** Bug 1543325 has been marked as a duplicate of this bug. ***

Comment 35 errata-xmlrpc 2018-04-10 17:38:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0947


Note You need to log in before you can comment on or make changes to this bug.