Same test on Xenial instance (with 0.7.8-1 cloud-init) fails with:
ubuntu@xenial-161117-1647:~$ sudo cloud-init --file user-data.cfg single --name cc_disk_setup --frequency always Cloud-init v. 0.7.8 running 'single' at Thu, 17 Nov 2016 18:46:52 +0000. Up 6996.70 seconds. 2016-11-17 18:46:52,763 - util.py[WARNING]: Failed partitioning operation Failed to partition device /dev/sdb Unexpected error while running command. Command: ['/sbin/sfdisk', '--Linux', '-uM', '/dev/sdb'] Exit code: 1 Reason: - Stdout: '' Stderr: "sfdisk: --Linux option is unnecessary and deprecated\nsfdisk: unsupported unit 'M'\n" 2016-11-17 18:46:52,884 - util.py[WARNING]: Failed during filesystem operation Failed during disk check for /dev/sdb2 Unexpected error while running command. Command: ['/bin/lsblk', '--pairs', '--output', 'NAME,TYPE,FSTYPE,LABEL', '/dev/sdb2', '--nodeps'] Exit code: 32 Reason: - Stdout: '' Stderr: 'lsblk: /dev/sdb2: not a block device\n'
This looks fatal on 16.04 for repartitioning, due to sfdisk changing parameters upstream
This is addressed in https://bugs.launchpad.net/cloud-init/+bug/1460715 which is not upstream yet in cloud-init, and trivially not in the cloud-init proposed package (0.7.8-47).
Same test on Xenial instance (with 0.7.8-1 cloud-init) fails with:
ubuntu@ xenial- 161117- 1647:~$ sudo cloud-init --file user-data.cfg single --name cc_disk_setup --frequency always FSTYPE, LABEL', '/dev/sdb2', '--nodeps']
Cloud-init v. 0.7.8 running 'single' at Thu, 17 Nov 2016 18:46:52 +0000. Up 6996.70 seconds.
2016-11-17 18:46:52,763 - util.py[WARNING]: Failed partitioning operation
Failed to partition device /dev/sdb
Unexpected error while running command.
Command: ['/sbin/sfdisk', '--Linux', '-uM', '/dev/sdb']
Exit code: 1
Reason: -
Stdout: ''
Stderr: "sfdisk: --Linux option is unnecessary and deprecated\nsfdisk: unsupported unit 'M'\n"
2016-11-17 18:46:52,884 - util.py[WARNING]: Failed during filesystem operation
Failed during disk check for /dev/sdb2
Unexpected error while running command.
Command: ['/bin/lsblk', '--pairs', '--output', 'NAME,TYPE,
Exit code: 32
Reason: -
Stdout: ''
Stderr: 'lsblk: /dev/sdb2: not a block device\n'
This looks fatal on 16.04 for repartitioning, due to sfdisk changing parameters upstream
This is addressed in https:/ /bugs.launchpad .net/cloud- init/+bug/ 1460715 which is not upstream yet in cloud-init, and trivially not in the cloud-init proposed package (0.7.8-47).