fs_setup fails when specifying partition

Bug #1709513 reported by Dan Leehr
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Expired
Undecided
Unassigned

Bug Description

When specifying the device and partition number in fs_setup according to sample documentation, cloud-init fails to successfully partition the device. If I use

- {device: /dev/vdb1, filesystem: ext3}

instead, the partitioning succeeds.

1. Cloud Provider: Openstack
2. 0.7.8-49-g9e904bb-0ubuntu1~16.04.4
3. Cloud init config

#cloud-config

disk_setup:
  /dev/vdb: {layout: true, table_type: gpt}
fs_setup:
- {device: /dev/vdb, filesystem: ext3, partition: 1}
mounts:
- [/dev/vdb1, /work]

Revision history for this message
Dan Leehr (dleehr) wrote :
Revision history for this message
Joshua Powers (powersj) wrote :

Hi Dan,

Thanks for taking the time to file a bug along with the cloud-config and logs!

I tried to reproduce using cloud-init version 0.7.9-153-g16a7302f-0ubuntu1~16.04.2 from the daily Ubuntu Xenial cloud image and found it partitioned as expected. I used the following cloud-config, which looks identical to yours except I am partitioning /dev/vdc:

#cloud-config
password: password
chpasswd: { expire: False }
disk_setup:
  /dev/vdc:
      layout: true
      table_type: gpt
fs_setup:
  - device: /dev/vdc
    filesystem: ext3
    partition: 1
mounts:
  - [/dev/vdc1, /work]

Generated a local data source and created an extra disk:
$ cloud-localds seed.img userdata.yaml
$ qemu-img create -f qcow2 disk.img 1G
$ qemu-system-x86_64 -enable-kvm -m 512 -nographic -drive "file=xenial.img,if=virtio" -drive "file=seed.img,if=virtio,format=raw" -drive "file=disk.img,if=virtio" -device virtio-net-pci,netdev=net00 -netdev type=user,id=net00,hostfwd=tcp::2222-:22

After logging in I found lsblk showed the new device:

vdc 253:32 0 1G 0 disk
└─vdc1 253:33 0 1023M 0 part /work

I think the best solution for you is to upgrade your version of cloud-init.

Changed in cloud-init:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for cloud-init because there has been no activity for 60 days.]

Changed in cloud-init:
status: Incomplete → Expired
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.