[Bug 2093714] [NEW] zpool option default_features: false does not work

Christian Finke 2093714 at bugs.launchpad.net
Fri Jan 10 19:35:31 UTC 2025


Public bug reported:

Hi,

I don't know if it is my brain but the option for deactivating the
default_features does not work.

As stated in the documentation:

https://curtin.readthedocs.io/en/latest/topics/storage.html#zpool-
command

the option should omit the -d flag in the zpool create command. And by
that I understand it I would be able to set advanced zpool features but
the version is still tagged along with the zpool create command.

I further tried to specify the version in pool_properties as hinted in
the documentation. With empty and with "null" which both resultet in the
following executed command:

        Command: ['zpool', 'create', '-o', 'ashift=12', '-o', 'version=
None', '-o', 'feature at encryption=on', '-O', 'atime=off', '-O',
'canmount=off', '-O', 'normalization=formD', '-O', 'mountpoint=/', '-R',
'/tmp/tmpn15o9w_6/target', 'rpool', '/dev/disk/by-id/nvme-
eui.e8238fa6bf530001001b448b4705a108-part2']

where Version = None

I am trying to work out the encryption_style: luks_keystore option.

Is the correct way missing in the documentation to use this feature or
am I doing something wrong here?

curtin-config:

    - device: nvme0n1
      id: nvme0n1-part2
      name: nvme0n1-part2
      number: 2
      size: 255537971200B
      type: partition
      uuid: e040ab60-94fb-4fef-b5c5-392f9d19861a
      wipe: superblock   
    -   id: nvme0n1_rootpool
        mountpoint: /
        pool: rpool
        type: zpool
        default_features: false
        pool_properties:
            feature at encryption: on
        encryption_style: luks_keystore
        keyfile: test123
        vdevs:
        - nvme0n1-part2


curtin-log:

        Creating zpool rpool with vdevs ['/dev/disk/by-id/nvme-eui.e8238fa6bf530001001b448b4705a108-part2']
        Running command ['zpool', 'create', '-o', 'ashift=12', '-o', 'version=28', '-o', 'feature at encryption=on', '-O', 'atime=off', '-O', 'canmount=off', '-O', 'normalization=formD', '-O', 'mountpoint=/', '-R', '/tmp/tmpn15o9w_6/target', 'rpool', '/dev/disk/by-id/nvme-eui.e8238fa6bf530001001b448b4705a108-part2'] with allowed return codes [0] (capture=True)
        An error occured handling 'nvme0n1_rootpool': ProcessExecutionError - Unexpected error while running command.
        Command: ['zpool', 'create', '-o', 'ashift=12', '-o', 'version=28', '-o', 'feature at encryption=on', '-O', 'atime=off', '-O', 'canmount=off', '-O', 'normalization=formD', '-O', 'mountpoint=/', '-R', '/tmp/tmpn15o9w_6/target', 'rpool', '/dev/disk/by-id/nvme-eui.e8238fa6bf530001001b448b4705a108-part2']
        Exit code: 1
        Reason: -
        Stdout: ''
        Stderr: 'feature@' and 'version' properties cannot be specified together
                
        finish: cmd-install/stage-partitioning/builtin/cmd-block-meta: FAIL: configuring zpool: nvme0n1_rootpool
        TIMED BLOCK_META: 3.666
        finish: cmd-install/stage-partitioning/builtin/cmd-block-meta: FAIL: curtin command block-meta
        Traceback (most recent call last):
          File "/curtin/curtin/commands/main.py", line 202, in main
            ret = args.func(args)
                  ^^^^^^^^^^^^^^^
          File "/curtin/curtin/log.py", line 97, in wrapper
            return log_time("TIMED %s: " % msg, func, *args, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File "/curtin/curtin/log.py", line 79, in log_time
            return func(*args, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^
          File "/curtin/curtin/commands/block_meta.py", line 124, in block_meta
            return meta_custom(args)
                   ^^^^^^^^^^^^^^^^^
          File "/curtin/curtin/commands/block_meta.py", line 2209, in meta_custom
            handler(command, storage_config_dict, context)
          File "/curtin/curtin/commands/block_meta.py", line 1976, in zpool_handler
            zfs.zpool_create(poolname, vdevs_byid,
          File "/curtin/curtin/block/zfs.py", line 159, in zpool_create
            util.subp(cmd, capture=True)
          File "/curtin/curtin/util.py", line 280, in subp
            return _subp(*args, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^
          File "/curtin/curtin/util.py", line 144, in _subp
            raise ProcessExecutionError(stdout=out, stderr=err,
        curtin.util.ProcessExecutionError: Unexpected error while running command.
        Command: ['zpool', 'create', '-o', 'ashift=12', '-o', 'version=28', '-o', 'feature at encryption=on', '-O', 'atime=off', '-O', 'canmount=off', '-O', 'normalization=formD', '-O', 'mountpoint=/', '-R', '/tmp/tmpn15o9w_6/target', 'rpool', '/dev/disk/by-id/nvme-eui.e8238fa6bf530001001b448b4705a108-part2']
        Exit code: 1
        Reason: -
        Stdout: ''
        Stderr: 'feature@' and 'version' properties cannot be specified together
                
        Unexpected error while running command.
        Command: ['zpool', 'create', '-o', 'ashift=12', '-o', 'version=28', '-o', 'feature at encryption=on', '-O', 'atime=off', '-O', 'canmount=off', '-O', 'normalization=formD', '-O', 'mountpoint=/', '-R', '/tmp/tmpn15o9w_6/target', 'rpool', '/dev/disk/by-id/nvme-eui.e8238fa6bf530001001b448b4705a108-part2']
        Exit code: 1
        Reason: -
        Stdout: ''
        Stderr: 'feature@' and 'version' properties cannot be specified together
                
        
Stderr: ''


Thank you for your help in advance!

Best regards,

Christian

** Affects: curtin
     Importance: Undecided
         Status: New

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

Title:
  zpool option default_features: false does not work

Status in curtin:
  New

Bug description:
  Hi,

  I don't know if it is my brain but the option for deactivating the
  default_features does not work.

  As stated in the documentation:

  https://curtin.readthedocs.io/en/latest/topics/storage.html#zpool-
  command

  the option should omit the -d flag in the zpool create command. And by
  that I understand it I would be able to set advanced zpool features
  but the version is still tagged along with the zpool create command.

  I further tried to specify the version in pool_properties as hinted in
  the documentation. With empty and with "null" which both resultet in
  the following executed command:

          Command: ['zpool', 'create', '-o', 'ashift=12', '-o',
  'version= None', '-o', 'feature at encryption=on', '-O', 'atime=off',
  '-O', 'canmount=off', '-O', 'normalization=formD', '-O',
  'mountpoint=/', '-R', '/tmp/tmpn15o9w_6/target', 'rpool',
  '/dev/disk/by-id/nvme-eui.e8238fa6bf530001001b448b4705a108-part2']

  where Version = None

  I am trying to work out the encryption_style: luks_keystore option.

  Is the correct way missing in the documentation to use this feature or
  am I doing something wrong here?

  curtin-config:

      - device: nvme0n1
        id: nvme0n1-part2
        name: nvme0n1-part2
        number: 2
        size: 255537971200B
        type: partition
        uuid: e040ab60-94fb-4fef-b5c5-392f9d19861a
        wipe: superblock   
      -   id: nvme0n1_rootpool
          mountpoint: /
          pool: rpool
          type: zpool
          default_features: false
          pool_properties:
              feature at encryption: on
          encryption_style: luks_keystore
          keyfile: test123
          vdevs:
          - nvme0n1-part2


  curtin-log:

          Creating zpool rpool with vdevs ['/dev/disk/by-id/nvme-eui.e8238fa6bf530001001b448b4705a108-part2']
          Running command ['zpool', 'create', '-o', 'ashift=12', '-o', 'version=28', '-o', 'feature at encryption=on', '-O', 'atime=off', '-O', 'canmount=off', '-O', 'normalization=formD', '-O', 'mountpoint=/', '-R', '/tmp/tmpn15o9w_6/target', 'rpool', '/dev/disk/by-id/nvme-eui.e8238fa6bf530001001b448b4705a108-part2'] with allowed return codes [0] (capture=True)
          An error occured handling 'nvme0n1_rootpool': ProcessExecutionError - Unexpected error while running command.
          Command: ['zpool', 'create', '-o', 'ashift=12', '-o', 'version=28', '-o', 'feature at encryption=on', '-O', 'atime=off', '-O', 'canmount=off', '-O', 'normalization=formD', '-O', 'mountpoint=/', '-R', '/tmp/tmpn15o9w_6/target', 'rpool', '/dev/disk/by-id/nvme-eui.e8238fa6bf530001001b448b4705a108-part2']
          Exit code: 1
          Reason: -
          Stdout: ''
          Stderr: 'feature@' and 'version' properties cannot be specified together
                  
          finish: cmd-install/stage-partitioning/builtin/cmd-block-meta: FAIL: configuring zpool: nvme0n1_rootpool
          TIMED BLOCK_META: 3.666
          finish: cmd-install/stage-partitioning/builtin/cmd-block-meta: FAIL: curtin command block-meta
          Traceback (most recent call last):
            File "/curtin/curtin/commands/main.py", line 202, in main
              ret = args.func(args)
                    ^^^^^^^^^^^^^^^
            File "/curtin/curtin/log.py", line 97, in wrapper
              return log_time("TIMED %s: " % msg, func, *args, **kwargs)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/curtin/curtin/log.py", line 79, in log_time
              return func(*args, **kwargs)
                     ^^^^^^^^^^^^^^^^^^^^^
            File "/curtin/curtin/commands/block_meta.py", line 124, in block_meta
              return meta_custom(args)
                     ^^^^^^^^^^^^^^^^^
            File "/curtin/curtin/commands/block_meta.py", line 2209, in meta_custom
              handler(command, storage_config_dict, context)
            File "/curtin/curtin/commands/block_meta.py", line 1976, in zpool_handler
              zfs.zpool_create(poolname, vdevs_byid,
            File "/curtin/curtin/block/zfs.py", line 159, in zpool_create
              util.subp(cmd, capture=True)
            File "/curtin/curtin/util.py", line 280, in subp
              return _subp(*args, **kwargs)
                     ^^^^^^^^^^^^^^^^^^^^^^
            File "/curtin/curtin/util.py", line 144, in _subp
              raise ProcessExecutionError(stdout=out, stderr=err,
          curtin.util.ProcessExecutionError: Unexpected error while running command.
          Command: ['zpool', 'create', '-o', 'ashift=12', '-o', 'version=28', '-o', 'feature at encryption=on', '-O', 'atime=off', '-O', 'canmount=off', '-O', 'normalization=formD', '-O', 'mountpoint=/', '-R', '/tmp/tmpn15o9w_6/target', 'rpool', '/dev/disk/by-id/nvme-eui.e8238fa6bf530001001b448b4705a108-part2']
          Exit code: 1
          Reason: -
          Stdout: ''
          Stderr: 'feature@' and 'version' properties cannot be specified together
                  
          Unexpected error while running command.
          Command: ['zpool', 'create', '-o', 'ashift=12', '-o', 'version=28', '-o', 'feature at encryption=on', '-O', 'atime=off', '-O', 'canmount=off', '-O', 'normalization=formD', '-O', 'mountpoint=/', '-R', '/tmp/tmpn15o9w_6/target', 'rpool', '/dev/disk/by-id/nvme-eui.e8238fa6bf530001001b448b4705a108-part2']
          Exit code: 1
          Reason: -
          Stdout: ''
          Stderr: 'feature@' and 'version' properties cannot be specified together
                  
          
  Stderr: ''

  
  Thank you for your help in advance!

  Best regards,

  Christian

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




More information about the foundations-bugs mailing list