[Bug 2041725] [NEW] Autoinstall crash when using tmpfs mounts : mount entry without 'device' missing: ['fstype']

Florian Bobin 2041725 at bugs.launchpad.net
Sat Oct 28 15:45:48 UTC 2023


Public bug reported:

Hello !

I use the auto-install feature to automatically install my homelab
server based on Ubuntu 22.04.3 LTS. However, today the autoinstaller
crashed when curtin tried to add a standalone "tmpfs" mount in the
target installation fstab, here the stack trace :

 start: cmd-install/stage-partitioning/builtin/cmd-block-meta: configuring mount: tmpfs-tmp-mount
 An error occured handling 'tmpfs-tmp-mount': ValueError - mount entry without 'device' missing: ['fstype']. ({'path': '/tmp', 'options': 'mode=1777,strictatime,nosuid,nodev,size=50%,nr_inodes=1m', 'spec': 'tmpfs', 'id': 'tmpfs-tmp-mount', 'type': 'mount'})
 finish: cmd-install/stage-partitioning/builtin/cmd-block-meta: FAIL: configuring mount: tmpfs-tmp-mount
 TIMED BLOCK_META: 11.849
 finish: cmd-install/stage-partitioning/builtin/cmd-block-meta: FAIL: curtin command block-meta
 Traceback (most recent call last):
   File "/snap/subiquity/5270/lib/python3.10/site-packages/curtin/commands/main.py", line 202, in main
     ret = args.func(args)
   File "/snap/subiquity/5270/lib/python3.10/site-packages/curtin/log.py", line 97, in wrapper
     return log_time("TIMED %s: " % msg, func, *args, **kwargs)
   File "/snap/subiquity/5270/lib/python3.10/site-packages/curtin/log.py", line 79, in log_time
     return func(*args, **kwargs)
   File "/snap/subiquity/5270/lib/python3.10/site-packages/curtin/commands/block_meta.py", line 127, in block_meta
     return meta_custom(args)
   File "/snap/subiquity/5270/lib/python3.10/site-packages/curtin/commands/block_meta.py", line 2248, in meta_custom
     handler(command, storage_config_dict, context)
   File "/snap/subiquity/5270/lib/python3.10/site-packages/curtin/commands/block_meta.py", line 1468, in mount_handler
     mount_apply(mount_data(info, storage_config),
   File "/snap/subiquity/5270/lib/python3.10/site-packages/curtin/commands/block_meta.py", line 1251, in mount_data
     raise ValueError(
 ValueError: mount entry without 'device' missing: ['fstype']. ({'path': '/tmp', 'options': 'mode=1777,strictatime,nosuid,nodev,size=50%,nr_inodes=1m', 'spec': 'tmpfs', 'id': 'tmpfs-tmp-mount', 'type': 'mount'})
 mount entry without 'device' missing: ['fstype']. ({'path': '/tmp', 'options': 'mode=1777,strictatime,nosuid,nodev,size=50%,nr_inodes=1m', 'spec': 'tmpfs', 'id': 'tmpfs-tmp-mount', 'type': 'mount'})
 curtin: Installation failed with exception: Unexpected error while running command.

This doesn't make sense since I specified the 'fstype' in my mount
definition. This working well with other kind of volume having the
'device' directive.

#cloud-config
...omitted for brevity
storage:
  swap:
    size: 0 # Disable creation of swapfile
  config:
    ...omitted for brevity
    # Snap lib volume (path: /var/lib/snapd, size: 5G)
    - id: lvm-system-snaplib-vol
      type: lvm_partition
      volgroup: lvm-system-vg
      name: snap-lib
      size: 5GB
      preserve: false
    - id: lvm-system-snaplib-fs
      type: format
      volume: lvm-system-snaplib-vol
      fstype: ext4
      preserve: false
    - id: lvm-system-snaplib-mount
      type: mount
      device: lvm-system-snaplib-fs
      path: /var/lib/snapd
    ## tmpfs mounts
    # /tmp tmpfs mount (path: /tmp, size: 50% total memory)
    - id: tmpfs-tmp
      type: mount
      spec: tmpfs
      fstype: tmpfs
      path: /tmp
      options: 'mode=1777,strictatime,nosuid,nodev,size=50%,nr_inodes=1m'

I dig a bit and found that the 'fstype' directive was not kept for
whatever reason in the final generated storage configuration, so that's
why the installation is failing imo.

# cat /var/log/installer/curtin-install/subiquity-partitioning.conf
# Autogenerated by Subiquity: 2023-10-28 15:19:23.214035 UTC
install:
  error_tarfile: /var/log/installer/curtin-errors.tar
  log_file: /var/log/installer/curtin-install.log
  log_file_append: true
  resume_data: /tmp/tmpo7eqfsjb/resume-data.json
  save_install_config: false
  save_install_log: false
  target: /target
  unmount: disabled
storage:
  ...omitted for brevity
  - path: /tmp
    options: mode=1777,strictatime,nosuid,nodev,size=50%,nr_inodes=1m
    spec: tmpfs
    id: tmpfs-tmp-mount
    type: mount

Then, I tried to search a bit in the curtin codebase but can't find
anything useful to debug this issue. This was working fine previously
when using the Ubuntu 22.04.2 ISO installer. Finally, I tried to disable
the autoinstall auto-update when starting the installer and the
installation worked as expected !

Here are the software versions used in both cases :

Installer crashed:
  - Ubuntu 22.04.3 ISO
  - Curtin 22.1-125-g7c18bf6a2
  - Subiquity 23.10.1

Installer working fine:
  - Ubuntu 22.04.3 ISO
  - Curtin 22.1-43-g9e9f66e83
  - Subiquity 23.08.1

I attached the crash log, I can provide more debug logs if needed.

Kind regards,

Florian BOBIN

** Affects: curtin
     Importance: Undecided
         Status: New

** Attachment added: "Crash logs"
   https://bugs.launchpad.net/bugs/2041725/+attachment/5713981/+files/1698506376.440912724.install_fail.crash

** Description changed:

  Hello !
  
  I use the auto-install feature to automatically install my homelab
- server based on Ubuntu 22.04.3 LTS. However today, the autoinstaller
+ server based on Ubuntu 22.04.3 LTS. However, today the autoinstaller
  crashed when curtin tried to add a standalone "tmpfs" mount in the
  target installation fstab, here the stack trace :
  
-  start: cmd-install/stage-partitioning/builtin/cmd-block-meta: configuring mount: tmpfs-tmp-mount
-  An error occured handling 'tmpfs-tmp-mount': ValueError - mount entry without 'device' missing: ['fstype']. ({'path': '/tmp', 'options': 'mode=1777,strictatime,nosuid,nodev,size=50%,nr_inodes=1m', 'spec': 'tmpfs', 'id': 'tmpfs-tmp-mount', 'type': 'mount'})
-  finish: cmd-install/stage-partitioning/builtin/cmd-block-meta: FAIL: configuring mount: tmpfs-tmp-mount
-  TIMED BLOCK_META: 11.849
-  finish: cmd-install/stage-partitioning/builtin/cmd-block-meta: FAIL: curtin command block-meta
-  Traceback (most recent call last):
-    File "/snap/subiquity/5270/lib/python3.10/site-packages/curtin/commands/main.py", line 202, in main
-      ret = args.func(args)
-    File "/snap/subiquity/5270/lib/python3.10/site-packages/curtin/log.py", line 97, in wrapper
-      return log_time("TIMED %s: " % msg, func, *args, **kwargs)
-    File "/snap/subiquity/5270/lib/python3.10/site-packages/curtin/log.py", line 79, in log_time
-      return func(*args, **kwargs)
-    File "/snap/subiquity/5270/lib/python3.10/site-packages/curtin/commands/block_meta.py", line 127, in block_meta
-      return meta_custom(args)
-    File "/snap/subiquity/5270/lib/python3.10/site-packages/curtin/commands/block_meta.py", line 2248, in meta_custom
-      handler(command, storage_config_dict, context)
-    File "/snap/subiquity/5270/lib/python3.10/site-packages/curtin/commands/block_meta.py", line 1468, in mount_handler
-      mount_apply(mount_data(info, storage_config),
-    File "/snap/subiquity/5270/lib/python3.10/site-packages/curtin/commands/block_meta.py", line 1251, in mount_data
-      raise ValueError(
-  ValueError: mount entry without 'device' missing: ['fstype']. ({'path': '/tmp', 'options': 'mode=1777,strictatime,nosuid,nodev,size=50%,nr_inodes=1m', 'spec': 'tmpfs', 'id': 'tmpfs-tmp-mount', 'type': 'mount'})
-  mount entry without 'device' missing: ['fstype']. ({'path': '/tmp', 'options': 'mode=1777,strictatime,nosuid,nodev,size=50%,nr_inodes=1m', 'spec': 'tmpfs', 'id': 'tmpfs-tmp-mount', 'type': 'mount'})
-  curtin: Installation failed with exception: Unexpected error while running command.
+  start: cmd-install/stage-partitioning/builtin/cmd-block-meta: configuring mount: tmpfs-tmp-mount
+  An error occured handling 'tmpfs-tmp-mount': ValueError - mount entry without 'device' missing: ['fstype']. ({'path': '/tmp', 'options': 'mode=1777,strictatime,nosuid,nodev,size=50%,nr_inodes=1m', 'spec': 'tmpfs', 'id': 'tmpfs-tmp-mount', 'type': 'mount'})
+  finish: cmd-install/stage-partitioning/builtin/cmd-block-meta: FAIL: configuring mount: tmpfs-tmp-mount
+  TIMED BLOCK_META: 11.849
+  finish: cmd-install/stage-partitioning/builtin/cmd-block-meta: FAIL: curtin command block-meta
+  Traceback (most recent call last):
+    File "/snap/subiquity/5270/lib/python3.10/site-packages/curtin/commands/main.py", line 202, in main
+      ret = args.func(args)
+    File "/snap/subiquity/5270/lib/python3.10/site-packages/curtin/log.py", line 97, in wrapper
+      return log_time("TIMED %s: " % msg, func, *args, **kwargs)
+    File "/snap/subiquity/5270/lib/python3.10/site-packages/curtin/log.py", line 79, in log_time
+      return func(*args, **kwargs)
+    File "/snap/subiquity/5270/lib/python3.10/site-packages/curtin/commands/block_meta.py", line 127, in block_meta
+      return meta_custom(args)
+    File "/snap/subiquity/5270/lib/python3.10/site-packages/curtin/commands/block_meta.py", line 2248, in meta_custom
+      handler(command, storage_config_dict, context)
+    File "/snap/subiquity/5270/lib/python3.10/site-packages/curtin/commands/block_meta.py", line 1468, in mount_handler
+      mount_apply(mount_data(info, storage_config),
+    File "/snap/subiquity/5270/lib/python3.10/site-packages/curtin/commands/block_meta.py", line 1251, in mount_data
+      raise ValueError(
+  ValueError: mount entry without 'device' missing: ['fstype']. ({'path': '/tmp', 'options': 'mode=1777,strictatime,nosuid,nodev,size=50%,nr_inodes=1m', 'spec': 'tmpfs', 'id': 'tmpfs-tmp-mount', 'type': 'mount'})
+  mount entry without 'device' missing: ['fstype']. ({'path': '/tmp', 'options': 'mode=1777,strictatime,nosuid,nodev,size=50%,nr_inodes=1m', 'spec': 'tmpfs', 'id': 'tmpfs-tmp-mount', 'type': 'mount'})
+  curtin: Installation failed with exception: Unexpected error while running command.
  
  This doesn't make sense since I specified the 'fstype' in my mount
  definition. This working well with other kind of volume having the
  'device' directive.
  
  #cloud-config
  ...omitted for brevity
  storage:
-   swap:
-     size: 0 # Disable creation of swapfile
-   config:
-     ...omitted for brevity
-     # Snap lib volume (path: /var/lib/snapd, size: 5G)
-     - id: lvm-system-snaplib-vol
-       type: lvm_partition
-       volgroup: lvm-system-vg
-       name: snap-lib
-       size: 5GB
-       preserve: false
-     - id: lvm-system-snaplib-fs
-       type: format
-       volume: lvm-system-snaplib-vol
-       fstype: ext4
-       preserve: false
-     - id: lvm-system-snaplib-mount
-       type: mount
-       device: lvm-system-snaplib-fs
-       path: /var/lib/snapd
-     ## tmpfs mounts
-     # /tmp tmpfs mount (path: /tmp, size: 50% total memory)
-     - id: tmpfs-tmp
-       type: mount
-       spec: tmpfs
-       fstype: tmpfs
-       path: /tmp
-       options: 'mode=1777,strictatime,nosuid,nodev,size=50%,nr_inodes=1m'
+   swap:
+     size: 0 # Disable creation of swapfile
+   config:
+     ...omitted for brevity
+     # Snap lib volume (path: /var/lib/snapd, size: 5G)
+     - id: lvm-system-snaplib-vol
+       type: lvm_partition
+       volgroup: lvm-system-vg
+       name: snap-lib
+       size: 5GB
+       preserve: false
+     - id: lvm-system-snaplib-fs
+       type: format
+       volume: lvm-system-snaplib-vol
+       fstype: ext4
+       preserve: false
+     - id: lvm-system-snaplib-mount
+       type: mount
+       device: lvm-system-snaplib-fs
+       path: /var/lib/snapd
+     ## tmpfs mounts
+     # /tmp tmpfs mount (path: /tmp, size: 50% total memory)
+     - id: tmpfs-tmp
+       type: mount
+       spec: tmpfs
+       fstype: tmpfs
+       path: /tmp
+       options: 'mode=1777,strictatime,nosuid,nodev,size=50%,nr_inodes=1m'
  
  I dig a bit and found that the 'fstype' directive was not kept for
  whatever reason in the final generated storage configuration, so that's
  why the installation is failing imo.
  
  # cat /var/log/installer/curtin-install/subiquity-partitioning.conf
  # Autogenerated by Subiquity: 2023-10-28 15:19:23.214035 UTC
  install:
-   error_tarfile: /var/log/installer/curtin-errors.tar
-   log_file: /var/log/installer/curtin-install.log
-   log_file_append: true
-   resume_data: /tmp/tmpo7eqfsjb/resume-data.json
-   save_install_config: false
-   save_install_log: false
-   target: /target
-   unmount: disabled
+   error_tarfile: /var/log/installer/curtin-errors.tar
+   log_file: /var/log/installer/curtin-install.log
+   log_file_append: true
+   resume_data: /tmp/tmpo7eqfsjb/resume-data.json
+   save_install_config: false
+   save_install_log: false
+   target: /target
+   unmount: disabled
  storage:
-   ...omitted for brevity
-   - path: /tmp
-     options: mode=1777,strictatime,nosuid,nodev,size=50%,nr_inodes=1m
-     spec: tmpfs
-     id: tmpfs-tmp-mount
-     type: mount
+   ...omitted for brevity
+   - path: /tmp
+     options: mode=1777,strictatime,nosuid,nodev,size=50%,nr_inodes=1m
+     spec: tmpfs
+     id: tmpfs-tmp-mount
+     type: mount
  
  Then, I tried to search a bit in the curtin codebase but can't find
  anything useful to debug this issue. This was working fine previously
  when using the Ubuntu 22.04.2 ISO installer. Finally, I tried to disable
  the autoinstall auto-update when starting the installer and the
  installation worked as expected !
  
  Here are the software versions used in both cases :
  
  Installer crashed:
-   - Ubuntu 22.04.3 ISO
-   - Curtin 22.1-125-g7c18bf6a2
-   - Subiquity 23.10.1
+   - Ubuntu 22.04.3 ISO
+   - Curtin 22.1-125-g7c18bf6a2
+   - Subiquity 23.10.1
  
  Installer working fine:
-   - Ubuntu 22.04.3 ISO
-   - Curtin 22.1-43-g9e9f66e83
-   - Subiquity 23.08.1
+   - Ubuntu 22.04.3 ISO
+   - Curtin 22.1-43-g9e9f66e83
+   - Subiquity 23.08.1
  
  I attached the crash log, I can provide more debug logs if needed.
  
  Kind regards,
  
  Florian BOBIN

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to curtin.
https://bugs.launchpad.net/bugs/2041725

Title:
  Autoinstall crash when using tmpfs mounts : mount entry without
  'device' missing: ['fstype']

Status in curtin:
  New

Bug description:
  Hello !

  I use the auto-install feature to automatically install my homelab
  server based on Ubuntu 22.04.3 LTS. However, today the autoinstaller
  crashed when curtin tried to add a standalone "tmpfs" mount in the
  target installation fstab, here the stack trace :

   start: cmd-install/stage-partitioning/builtin/cmd-block-meta: configuring mount: tmpfs-tmp-mount
   An error occured handling 'tmpfs-tmp-mount': ValueError - mount entry without 'device' missing: ['fstype']. ({'path': '/tmp', 'options': 'mode=1777,strictatime,nosuid,nodev,size=50%,nr_inodes=1m', 'spec': 'tmpfs', 'id': 'tmpfs-tmp-mount', 'type': 'mount'})
   finish: cmd-install/stage-partitioning/builtin/cmd-block-meta: FAIL: configuring mount: tmpfs-tmp-mount
   TIMED BLOCK_META: 11.849
   finish: cmd-install/stage-partitioning/builtin/cmd-block-meta: FAIL: curtin command block-meta
   Traceback (most recent call last):
     File "/snap/subiquity/5270/lib/python3.10/site-packages/curtin/commands/main.py", line 202, in main
       ret = args.func(args)
     File "/snap/subiquity/5270/lib/python3.10/site-packages/curtin/log.py", line 97, in wrapper
       return log_time("TIMED %s: " % msg, func, *args, **kwargs)
     File "/snap/subiquity/5270/lib/python3.10/site-packages/curtin/log.py", line 79, in log_time
       return func(*args, **kwargs)
     File "/snap/subiquity/5270/lib/python3.10/site-packages/curtin/commands/block_meta.py", line 127, in block_meta
       return meta_custom(args)
     File "/snap/subiquity/5270/lib/python3.10/site-packages/curtin/commands/block_meta.py", line 2248, in meta_custom
       handler(command, storage_config_dict, context)
     File "/snap/subiquity/5270/lib/python3.10/site-packages/curtin/commands/block_meta.py", line 1468, in mount_handler
       mount_apply(mount_data(info, storage_config),
     File "/snap/subiquity/5270/lib/python3.10/site-packages/curtin/commands/block_meta.py", line 1251, in mount_data
       raise ValueError(
   ValueError: mount entry without 'device' missing: ['fstype']. ({'path': '/tmp', 'options': 'mode=1777,strictatime,nosuid,nodev,size=50%,nr_inodes=1m', 'spec': 'tmpfs', 'id': 'tmpfs-tmp-mount', 'type': 'mount'})
   mount entry without 'device' missing: ['fstype']. ({'path': '/tmp', 'options': 'mode=1777,strictatime,nosuid,nodev,size=50%,nr_inodes=1m', 'spec': 'tmpfs', 'id': 'tmpfs-tmp-mount', 'type': 'mount'})
   curtin: Installation failed with exception: Unexpected error while running command.

  This doesn't make sense since I specified the 'fstype' in my mount
  definition. This working well with other kind of volume having the
  'device' directive.

  #cloud-config
  ...omitted for brevity
  storage:
    swap:
      size: 0 # Disable creation of swapfile
    config:
      ...omitted for brevity
      # Snap lib volume (path: /var/lib/snapd, size: 5G)
      - id: lvm-system-snaplib-vol
        type: lvm_partition
        volgroup: lvm-system-vg
        name: snap-lib
        size: 5GB
        preserve: false
      - id: lvm-system-snaplib-fs
        type: format
        volume: lvm-system-snaplib-vol
        fstype: ext4
        preserve: false
      - id: lvm-system-snaplib-mount
        type: mount
        device: lvm-system-snaplib-fs
        path: /var/lib/snapd
      ## tmpfs mounts
      # /tmp tmpfs mount (path: /tmp, size: 50% total memory)
      - id: tmpfs-tmp
        type: mount
        spec: tmpfs
        fstype: tmpfs
        path: /tmp
        options: 'mode=1777,strictatime,nosuid,nodev,size=50%,nr_inodes=1m'

  I dig a bit and found that the 'fstype' directive was not kept for
  whatever reason in the final generated storage configuration, so
  that's why the installation is failing imo.

  # cat /var/log/installer/curtin-install/subiquity-partitioning.conf
  # Autogenerated by Subiquity: 2023-10-28 15:19:23.214035 UTC
  install:
    error_tarfile: /var/log/installer/curtin-errors.tar
    log_file: /var/log/installer/curtin-install.log
    log_file_append: true
    resume_data: /tmp/tmpo7eqfsjb/resume-data.json
    save_install_config: false
    save_install_log: false
    target: /target
    unmount: disabled
  storage:
    ...omitted for brevity
    - path: /tmp
      options: mode=1777,strictatime,nosuid,nodev,size=50%,nr_inodes=1m
      spec: tmpfs
      id: tmpfs-tmp-mount
      type: mount

  Then, I tried to search a bit in the curtin codebase but can't find
  anything useful to debug this issue. This was working fine previously
  when using the Ubuntu 22.04.2 ISO installer. Finally, I tried to
  disable the autoinstall auto-update when starting the installer and
  the installation worked as expected !

  Here are the software versions used in both cases :

  Installer crashed:
    - Ubuntu 22.04.3 ISO
    - Curtin 22.1-125-g7c18bf6a2
    - Subiquity 23.10.1

  Installer working fine:
    - Ubuntu 22.04.3 ISO
    - Curtin 22.1-43-g9e9f66e83
    - Subiquity 23.08.1

  I attached the crash log, I can provide more debug logs if needed.

  Kind regards,

  Florian BOBIN

To manage notifications about this bug go to:
https://bugs.launchpad.net/curtin/+bug/2041725/+subscriptions




More information about the foundations-bugs mailing list