[Bug 1401190] Re: curtin makes assumptions about partition names on all devices

Rob Sanderson 1401190 at bugs.launchpad.net
Mon Mar 7 18:54:42 UTC 2016


Hi Ryan,

I have tried that but no luck.

Config using curtin defaults:
----------------------------------------------------------------------------------------------------------
cat configs/config-002.cfg

partitioning_commands:
  builtin: [curtin, block-meta, custom]
storage:
  config:
  - {id: nvme0n1, name: nvme0n1, path: /dev/nvme0n1, ptable: gpt, type: disk, wipe: superblock}
  - {device: nvme0n1, id: nvme0n1-part1, name: nvme0n1-part1, number: 1, offset: 4194304B, size: 128026935296B, type: partition, uuid: e66f2d9d-963a-4cb9-b2b5-472d491e768b, wipe: superblock}
  - {fstype: ext4, id: nvme0n1-part1_format, label: 'rootfs', type: format, uuid: 6a47f95c-40b6-478a-aefa-ca84a509d877, volume: nvme0n1-part1, path: /dev/nvme0n1p1}
  - {device: nvme0n1-part1_format, id: nvme0n1-part1_mount, path: /, type: mount}
  version: 1

bin/curtin --showtrace --install-deps install
--config=configs/config-002.cfg

http://10.10.4.221:5248/images/ubuntu/amd64/generic/trusty/release/root-tgz
Creating new GPT entries.
The operation has completed successfully.
The operation has completed successfully.
An error occured handling 'nvme0n1-part1_format': ValueError - '/dev/nvme0n11': no such file or directory
Traceback (most recent call last):
  File "/home/ubuntu/curtin/curtin/commands/main.py", line 209, in main
    ret = args.func(args)
  File "curtin/commands/block_meta.py", line 62, in block_meta
    meta_custom(args)
  File "curtin/commands/block_meta.py", line 1083, in meta_custom
    handler(command, storage_config_dict)
  File "curtin/commands/block_meta.py", line 672, in format_handler
    mkfs.mkfs_from_config(volume_path, info)
  File "curtin/block/mkfs.py", line 207, in mkfs_from_config
    label=info.get('label'))
  File "curtin/block/mkfs.py", line 145, in mkfs
    raise ValueError("'%s': no such file or directory" % path)
ValueError: '/dev/nvme0n11': no such file or directory
'/dev/nvme0n11': no such file or directory
Installation failed with exception: Unexpected error while running command.
Command: ['curtin', 'block-meta', 'custom']
Exit code: 3
Reason: -
Stdout: 'Creating new GPT entries.\nThe operation has completed successfully.\nThe operation has completed successfully.\nAn error occured handling \'nvme0n1-part1_format\': ValueError - \'/dev/nvme0n11\': no such file or directory\nTraceback (most recent call last):\n  File "/home/ubuntu/curtin/curtin/commands/main.py", line 209, in main\n    ret = args.func(args)\n  File "curtin/commands/block_meta.py", line 62, in block_meta\n    meta_custom(args)\n  File "curtin/commands/block_meta.py", line 1083, in meta_custom\n    handler(command, storage_config_dict)\n  File "curtin/commands/block_meta.py", line 672, in format_handler\n    mkfs.mkfs_from_config(volume_path, info)\n  File "curtin/block/mkfs.py", line 207, in mkfs_from_config\n    label=info.get(\'label\'))\n  File "curtin/block/mkfs.py", line 145, in mkfs\n    raise ValueError("\'%s\': no such file or directory" % path)\nValueError: \'/dev/nvme0n11\': no such file or directory\n\'/dev/nvme0n11\': no such file or directory\n'
Stderr: ''
Traceback (most recent call last):
  File "/home/ubuntu/curtin/curtin/commands/main.py", line 209, in main
    ret = args.func(args)
  File "curtin/commands/install.py", line 399, in cmd_install
    raise e
ProcessExecutionError: Unexpected error while running command.
Command: ['curtin', 'block-meta', 'custom']
Exit code: 3
Reason: -
Stdout: 'Creating new GPT entries.\nThe operation has completed successfully.\nThe operation has completed successfully.\nAn error occured handling \'nvme0n1-part1_format\': ValueError - \'/dev/nvme0n11\': no such file or directory\nTraceback (most recent call last):\n  File "/home/ubuntu/curtin/curtin/commands/main.py", line 209, in main\n    ret = args.func(args)\n  File "curtin/commands/block_meta.py", line 62, in block_meta\n    meta_custom(args)\n  File "curtin/commands/block_meta.py", line 1083, in meta_custom\n    handler(command, storage_config_dict)\n  File "curtin/commands/block_meta.py", line 672, in format_handler\n    mkfs.mkfs_from_config(volume_path, info)\n  File "curtin/block/mkfs.py", line 207, in mkfs_from_config\n    label=info.get(\'label\'))\n  File "curtin/block/mkfs.py", line 145, in mkfs\n    raise ValueError("\'%s\': no such file or directory" % path)\nValueError: \'/dev/nvme0n11\': no such file or directory\n\'/dev/nvme0n11\': no such file or directory\n'
Stderr: ''
Unexpected error while running command.
Command: ['curtin', 'block-meta', 'custom']
Exit code: 3
Reason: -
Stdout: 'Creating new GPT entries.\nThe operation has completed successfully.\nThe operation has completed successfully.\nAn error occured handling \'nvme0n1-part1_format\': ValueError - \'/dev/nvme0n11\': no such file or directory\nTraceback (most recent call last):\n  File "/home/ubuntu/curtin/curtin/commands/main.py", line 209, in main\n    ret = args.func(args)\n  File "curtin/commands/block_meta.py", line 62, in block_meta\n    meta_custom(args)\n  File "curtin/commands/block_meta.py", line 1083, in meta_custom\n    handler(command, storage_config_dict)\n  File "curtin/commands/block_meta.py", line 672, in format_handler\n    mkfs.mkfs_from_config(volume_path, info)\n  File "curtin/block/mkfs.py", line 207, in mkfs_from_config\n    label=info.get(\'label\'))\n  File "curtin/block/mkfs.py", line 145, in mkfs\n    raise ValueError("\'%s\': no such file or directory" % path)\nValueError: \'/dev/nvme0n11\': no such file or directory\n\'/dev/nvme0n11\': no such file or directory\n'
Stderr: ''
----------------------------------------------------------------------------------------------------------


Edited config using device names:
----------------------------------------------------------------------------------------------------------
cat configs/config-002.cfg

partitioning_commands:
  builtin: [curtin, block-meta, custom]
storage:
  config:
  - {id: nvme0n1, name: nvme0n1, path: /dev/nvme0n1, ptable: gpt, type: disk, wipe: superblock}
  - {device: nvme0n1, id: nvme0n1p1, name: nvme0n1p1, number: 1, offset: 4194304B, size: 128026935296B, type: partition, uuid: e66f2d9d-963a-4cb9-b2b5-472d491e768b, wipe: superblock}
  - {fstype: ext4, id: nvme0n1p1_format, label: 'rootfs', type: format, uuid: 6a47f95c-40b6-478a-aefa-ca84a509d877, volume: nvme0n1p1, path: /dev/nvme0n1p1}
  - {device: nvme0n1p1_format, id: nvme0n1p1_mount, path: /, type: mount}
  version: 1


bin/curtin --showtrace --install-deps install --config=configs/config-002.cfg http://10.10.4.221:5248/images/ubuntu/amd64/generic/trusty/release/root-tgz
Creating new GPT entries.
The operation has completed successfully.
The operation has completed successfully.
An error occured handling 'nvme0n1p1_format': ValueError - '/dev/nvme0n11': no such file or directory
Traceback (most recent call last):
  File "/home/ubuntu/curtin/curtin/commands/main.py", line 209, in main
    ret = args.func(args)
  File "curtin/commands/block_meta.py", line 62, in block_meta
    meta_custom(args)
  File "curtin/commands/block_meta.py", line 1083, in meta_custom
    handler(command, storage_config_dict)
  File "curtin/commands/block_meta.py", line 672, in format_handler
    mkfs.mkfs_from_config(volume_path, info)
  File "curtin/block/mkfs.py", line 207, in mkfs_from_config
    label=info.get('label'))
  File "curtin/block/mkfs.py", line 145, in mkfs
    raise ValueError("'%s': no such file or directory" % path)
ValueError: '/dev/nvme0n11': no such file or directory
'/dev/nvme0n11': no such file or directory
Installation failed with exception: Unexpected error while running command.
Command: ['curtin', 'block-meta', 'custom']
Exit code: 3
Reason: -
Stdout: 'Creating new GPT entries.\nThe operation has completed successfully.\nThe operation has completed successfully.\nAn error occured handling \'nvme0n1p1_format\': ValueError - \'/dev/nvme0n11\': no such file or directory\nTraceback (most recent call last):\n  File "/home/ubuntu/curtin/curtin/commands/main.py", line 209, in main\n    ret = args.func(args)\n  File "curtin/commands/block_meta.py", line 62, in block_meta\n    meta_custom(args)\n  File "curtin/commands/block_meta.py", line 1083, in meta_custom\n    handler(command, storage_config_dict)\n  File "curtin/commands/block_meta.py", line 672, in format_handler\n    mkfs.mkfs_from_config(volume_path, info)\n  File "curtin/block/mkfs.py", line 207, in mkfs_from_config\n    label=info.get(\'label\'))\n  File "curtin/block/mkfs.py", line 145, in mkfs\n    raise ValueError("\'%s\': no such file or directory" % path)\nValueError: \'/dev/nvme0n11\': no such file or directory\n\'/dev/nvme0n11\': no such file or directory\n'
Stderr: ''
Traceback (most recent call last):
  File "/home/ubuntu/curtin/curtin/commands/main.py", line 209, in main
    ret = args.func(args)
  File "curtin/commands/install.py", line 399, in cmd_install
    raise e
ProcessExecutionError: Unexpected error while running command.
Command: ['curtin', 'block-meta', 'custom']
Exit code: 3
Reason: -
Stdout: 'Creating new GPT entries.\nThe operation has completed successfully.\nThe operation has completed successfully.\nAn error occured handling \'nvme0n1p1_format\': ValueError - \'/dev/nvme0n11\': no such file or directory\nTraceback (most recent call last):\n  File "/home/ubuntu/curtin/curtin/commands/main.py", line 209, in main\n    ret = args.func(args)\n  File "curtin/commands/block_meta.py", line 62, in block_meta\n    meta_custom(args)\n  File "curtin/commands/block_meta.py", line 1083, in meta_custom\n    handler(command, storage_config_dict)\n  File "curtin/commands/block_meta.py", line 672, in format_handler\n    mkfs.mkfs_from_config(volume_path, info)\n  File "curtin/block/mkfs.py", line 207, in mkfs_from_config\n    label=info.get(\'label\'))\n  File "curtin/block/mkfs.py", line 145, in mkfs\n    raise ValueError("\'%s\': no such file or directory" % path)\nValueError: \'/dev/nvme0n11\': no such file or directory\n\'/dev/nvme0n11\': no such file or directory\n'
Stderr: ''
Unexpected error while running command.
Command: ['curtin', 'block-meta', 'custom']
Exit code: 3
Reason: -
Stdout: 'Creating new GPT entries.\nThe operation has completed successfully.\nThe operation has completed successfully.\nAn error occured handling \'nvme0n1p1_format\': ValueError - \'/dev/nvme0n11\': no such file or directory\nTraceback (most recent call last):\n  File "/home/ubuntu/curtin/curtin/commands/main.py", line 209, in main\n    ret = args.func(args)\n  File "curtin/commands/block_meta.py", line 62, in block_meta\n    meta_custom(args)\n  File "curtin/commands/block_meta.py", line 1083, in meta_custom\n    handler(command, storage_config_dict)\n  File "curtin/commands/block_meta.py", line 672, in format_handler\n    mkfs.mkfs_from_config(volume_path, info)\n  File "curtin/block/mkfs.py", line 207, in mkfs_from_config\n    label=info.get(\'label\'))\n  File "curtin/block/mkfs.py", line 145, in mkfs\n    raise ValueError("\'%s\': no such file or directory" % path)\nValueError: \'/dev/nvme0n11\': no such file or directory\n\'/dev/nvme0n11\': no such file or directory\n'
Stderr: ''


Devices:
----------------------------------------------------------------------------------------------------------
ls -l /dev/nvme0*
crw------- 1 root root  10, 57 Mar  6 21:52 /dev/nvme0
brw-rw---- 1 root disk 259,  0 Mar  7 18:47 /dev/nvme0n1
brw-rw---- 1 root disk 259,  1 Mar  7 18:47 /dev/nvme0n1p1

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to curtin in Ubuntu.
https://bugs.launchpad.net/bugs/1401190

Title:
  curtin makes assumptions about partition names on all devices

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



More information about the Ubuntu-server-bugs mailing list