ubuntu-image fails with: mkfs.ext4 - Invalid filesystem option set: has_journal,extent,huge_file,flex_bg,metadata_csum,64bit,dir_nlink,extra_isize

Bug #1644131 reported by Jean-Baptiste Lallement
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu Image
Fix Released
High
Unassigned

Bug Description

With ubuntu-image 0.12+real1 rev39 on zesty ubuntu-image fails to create a pc-amd64 image with the following error:

⟫ ubuntu-image -c edge -o pc-amd64-edge.img --image-size 3G amd64.model
Fetching core
Fetching pc-kernel
Fetching pc
COMMAND FAILED: mkfs.ext4 -L writable -T default -O uninit_bg /tmp/tmpnf3_2jwd/.images/root.img

mke2fs 1.42.13 (17-May-2015)
Invalid filesystem option set: has_journal,extent,huge_file,flex_bg,metadata_csum,64bit,dir_nlink,extra_isize

Crash in state machine
Traceback (most recent call last):
  File "/snap/ubuntu-image/39/lib/python3.5/site-packages/ubuntu_image/__main__.py", line 158, in main
    list(state_machine)
  File "/snap/ubuntu-image/39/lib/python3.5/site-packages/ubuntu_image/state.py", line 73, in __next__
    step()
  File "/snap/ubuntu-image/39/lib/python3.5/site-packages/ubuntu_image/builder.py", line 372, in populate_filesystems
    mkfs_ext4(self.root_img, self.rootfs)
  File "/snap/ubuntu-image/39/lib/python3.5/site-packages/ubuntu_image/helpers.py", line 153, in mkfs_ext4
    run('mkfs.ext4 -L {} -T default -O uninit_bg {}'.format(label, img_file))
  File "/snap/ubuntu-image/39/lib/python3.5/site-packages/ubuntu_image/helpers.py", line 97, in run
    proc.check_returncode()
  File "/snap/ubuntu-image/39/usr/lib/python3.5/subprocess.py", line 659, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['mkfs.ext4', '-L', 'writable', '-T', 'default', '-O', 'uninit_bg', '/tmp/tmpnf3_2jwd/.images/root.img']' returned non-zero exit status 1

Revision history for this message
Barry Warsaw (barry) wrote :

Please attach your amd64.model file. Thanks!

Revision history for this message
Steve Langasek (vorlon) wrote :

> COMMAND FAILED: mkfs.ext4 -L writable -T default -O uninit_bg /tmp/tmpnf3_2jwd/.images/root.img

> mke2fs 1.42.13 (17-May-2015)
> Invalid filesystem option set: has_journal,extent,huge_file,flex_bg,metadata_csum,64bit,dir_nlink,extra_isize

This shouldn't happen on zesty. What version of e2fsprogs do you have installed?

Changed in ubuntu-image:
status: New → Incomplete
Barry Warsaw (barry)
Changed in ubuntu-image:
status: Incomplete → Confirmed
importance: Undecided → High
milestone: none → 0.13
Revision history for this message
Barry Warsaw (barry) wrote :

I'm testing the ubuntu-image snap #42 for promotion and I get the same error. The version of mkfs.ext4 in the snap is:

@subdivisions[/snap/ubuntu-image/42:1014]% sbin/mkfs.ext4 -V
mke2fs 1.42.13 (17-May-2015)
 Using EXT2FS Library version 1.43.3

So it's picking up the Xenial version. I just looked at the Launchpad recipe:

https://code.launchpad.net/~canonical-foundations/+snap/ubuntu-image

and it's using the Xenial archive for the stage-packages, so that probably explains it. IIRC, Xenial is recommended by the snapcraft documentation, but let me switch that over to Zesty, rebuild and try again.

Changed in ubuntu-image:
assignee: nobody → Barry Warsaw (barry)
milestone: 0.13 → none
status: Confirmed → In Progress
Revision history for this message
Barry Warsaw (barry) wrote :

Nope, Zesty as the archive for stage-packages does not work.

https://launchpadlibrarian.net/295856667/buildlog_snap_ubuntu_zesty_amd64_ubuntu-image_BUILDING.txt.gz

I do remember reading somewhere that Launchpad recipes must target Xenial, but I can't find that documentation any more (nothing comes up on help.launchpad.net or snapcraft.io). If that's the case, auto-build recipes in Launchpad should be disabled because it's worse to produce broken snaps than no snaps at all. We'll just have to do manual builds.

Revision history for this message
Barry Warsaw (barry) wrote :

Right, only Xenial for now.

https://bugs.launchpad.net/launchpad/+bug/1626739

In the meantime, I am going to disable the Launchpad recipe and build the snap manually.

Revision history for this message
Barry Warsaw (barry) wrote :

The manual, local build should work fine now.

Changed in ubuntu-image:
status: In Progress → Fix Released
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

This is happening for me in zesty

$ snap list
Name Version Rev Developer Notes
core 16-2 2312 canonical -
documentation-builder 1.4.3 34 canonicalwebteam devmode
ubuntu-image 1.1+snap1 64 canonical classic

$ ubuntu-image -c edge -O xx ../pc.model
Fetching core
Fetching pc-kernel
Fetching pc
COMMAND FAILED: mkfs.ext4 -L writable -T default -O uninit_bg /tmp/tmpbpxi8v2g/volumes/pc/part3.img

mke2fs 1.42.13 (17-May-2015)
Se puso una opción no válida para el sistema de archivos: has_journal,extent,huge_file,flex_bg,metadata_csum,64bit,dir_nlink,extra_isize

Crash in state machine
Traceback (most recent call last):
  File "/snap/ubuntu-image/64/lib/python3/site-packages/ubuntu_image/__main__.py", line 204, in main
    list(state_machine)
  File "/snap/ubuntu-image/64/lib/python3/site-packages/ubuntu_image/state.py", line 82, in __next__
    step()
  File "/snap/ubuntu-image/64/lib/python3/site-packages/ubuntu_image/builder.py", line 415, in populate_filesystems
    self._populate_one_volume(name, volume)
  File "/snap/ubuntu-image/64/lib/python3/site-packages/ubuntu_image/builder.py", line 368, in _populate_one_volume
    mkfs_ext4(part_img, self.rootfs, part.filesystem_label)
  File "/snap/ubuntu-image/64/lib/python3/site-packages/ubuntu_image/helpers.py", line 154, in mkfs_ext4
    run('mkfs.ext4 -L {} -T default -O uninit_bg {}'.format(label, img_file))
  File "/snap/ubuntu-image/64/lib/python3/site-packages/ubuntu_image/helpers.py", line 98, in run
    proc.check_returncode()
  File "/snap/ubuntu-image/64/usr/lib/python3.5/subprocess.py", line 659, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['mkfs.ext4', '-L', 'writable', '-T', 'default', '-O', 'uninit_bg', '/tmp/tmpbpxi8v2g/volumes/pc/part3.img']' returned non-zero exit status 1

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Re-opening until investigated.

Changed in ubuntu-image:
status: Fix Released → New
assignee: Barry Warsaw (barry) → Łukasz Zemczak (sil2100)
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

FTR, installing a locally built ubuntu-image snap removes the issue in zesty.

Revision history for this message
Łukasz Zemczak (sil2100) wrote :
Changed in ubuntu-image:
status: New → Fix Released
assignee: Łukasz Zemczak (sil2100) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.