Public bug reported:

The yakkety-server-cloudimg-amd64.img as of 2016-06-09 does not grow the
root partition.

Jun 10 09:39:34 ubuntu [CLOUDINIT] util.py[DEBUG]: Failed: growpart /dev/vda 1
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/cloudinit/config/cc_growpart.py", line 
109, in resize
    util.subp(["growpart", diskdev, partnum])
  File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 1714, in subp
    cmd=args)#012cloudinit.util.ProcessExecutionError: Unexpected error while 
running command.
Command: ['growpart', '/dev/vda', '1']
Exit code: 2
Reason: -
Stdout: 'FAILED: pt_resize failed\n'
Stderr: 'failed [pt_update:1] pt_update /dev/vda 1\npartx: partition and disk 
name do not match\n'

I used following commands to launch the cloud images:

========<8========
#!/bin/sh
set -eu

wget -c https://cloud-images.ubuntu.com/yakkety/current/yakkety-server-
cloudimg-amd64.img

qemu-img convert yakkety-server-cloudimg-amd64.img cloudimg.raw
qemu-img resize -f raw cloudimg.raw 20G

mnt_dir=$(mktemp -d)
echo "${0##*/}: Mounting cloudimg.raw into $mnt_dir"
mount -o loop,offset=1048576 cloudimg.raw $mnt_dir

mkdir -p $mnt_dir/var/lib/cloud/seed/nocloud
printf "dsmode: local\n" > $mnt_dir/var/lib/cloud/seed/nocloud/meta-data
echo > $mnt_dir/var/lib/cloud/seed/nocloud/user-data <<EOF
#cloud-config
chpasswd:
  expire: False
  list: |
    root:passw0rd
EOF

umount $mnt_dir

qemu-system-x86_64 -enable-kvm -m 512 -net nic -net user,hostfwd=tcp::2222-:22 
-drive file=cloudimg.raw,if=virtio,format=raw
========<8========

Here is the error log of cloud-init:
========<8========
root@ubuntu:~# grep -i error /var/log/cloud-init.log 
Jun 10 09:39:34 ubuntu [CLOUDINIT] util.py[DEBUG]: Failed: growpart /dev/vda 
1#012Traceback (most recent call last):#012  File 
"/usr/lib/python3/dist-packages/cloudinit/config/cc_growpart.py", line 109, in 
resize#012    util.subp(["growpart", diskdev, partnum])#012  File 
"/usr/lib/python3/dist-packages/cloudinit/util.py", line 1714, in subp#012    
cmd=args)#012cloudinit.util.ProcessExecutionError: Unexpected error while 
running command.#012Command: ['growpart', '/dev/vda', '1']#012Exit code: 
2#012Reason: -#012Stdout: 'FAILED: pt_resize failed\n'#012Stderr: 'failed 
[pt_update:1] pt_update /dev/vda 1\npartx: partition and disk name do not 
match\n'
Jun 10 09:39:34 ubuntu [CLOUDINIT] cc_growpart.py[DEBUG]: '/' FAILED: failed to 
resize: disk=/dev/vda, ptnum=1: Unexpected error while running 
command.#012Command: ['growpart', '/dev/vda', '1']#012Exit code: 2#012Reason: 
-#012Stdout: 'FAILED: pt_resize failed\n'#012Stderr: 'failed [pt_update:1] 
pt_update /dev/vda 1\npartx: partition and disk name do not match\n'
Jun 10 12:36:22 ubuntu [CLOUDINIT] util.py[DEBUG]: failed stage 
init-local#012Traceback (most recent call last):#012  File 
"/usr/bin/cloud-init", line 536, in status_wrapper#012    ret = functor(name, 
args)#012  File "/usr/bin/cloud-init", line 250, in main_init#012    
init.fetch(existing=existing)#012  File 
"/usr/lib/python3/dist-packages/cloudinit/stages.py", line 357, in fetch#012    
return self._get_data_source(existing=existing)#012  File 
"/usr/lib/python3/dist-packages/cloudinit/stages.py", line 252, in 
_get_data_source#012    ds, desc = 
self._restore_from_checked_cache(existing)#012  File 
"/usr/lib/python3/dist-packages/cloudinit/stages.py", line 238, in 
_restore_from_checked_cache#012    ds.check_instance_id(self.cfg)):#012  File 
"/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceNoCloud.py", line 
197, in check_instance_id#012    quick_id = 
_quick_read_instance_id(cmdline_id=self.cmdline_id,#012AttributeError: 
'DataSourceNoCloud' object has no attribute 'cmdline_id'
========<8========

** Affects: cloud-images
     Importance: Undecided
         Status: New

** Affects: cloud-utils (Ubuntu)
     Importance: Undecided
         Status: New

** Also affects: cloud-init (Ubuntu)
   Importance: Undecided
       Status: New

** Package changed: cloud-init (Ubuntu) => cloud-utils (Ubuntu)

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

Title:
  Ubuntu yakkety cloud image does not grow root partition

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-images/+bug/1591181/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to