2016-10-18 22:33:59 |
Lee Faris |
bug |
|
|
added bug |
2016-10-18 22:33:59 |
Lee Faris |
attachment added |
|
Patch to not clear the partition when using 'auto' or 'any' https://bugs.launchpad.net/bugs/1634678/+attachment/4763457/+files/partition.patch |
|
2017-03-23 14:15:23 |
Launchpad Janitor |
merge proposal linked |
|
https://code.launchpad.net/~multani/cloud-init/+git/cloud-init/+merge/320815 |
|
2017-03-24 19:38:29 |
Scott Moser |
cloud-init: importance |
Undecided |
Medium |
|
2017-03-24 19:38:31 |
Scott Moser |
cloud-init: status |
New |
Confirmed |
|
2017-03-24 19:38:56 |
Scott Moser |
cloud-init: assignee |
|
Jonathan Ballet (multani) |
|
2017-03-24 20:48:08 |
Launchpad Janitor |
merge proposal linked |
|
https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/320986 |
|
2017-03-27 17:02:49 |
Scott Moser |
cloud-init: status |
Confirmed |
Fix Committed |
|
2017-03-27 17:03:02 |
Scott Moser |
bug task added |
|
cloud-init (Ubuntu) |
|
2017-03-27 17:03:09 |
Scott Moser |
cloud-init (Ubuntu): status |
New |
Confirmed |
|
2017-03-27 17:03:12 |
Scott Moser |
cloud-init (Ubuntu): importance |
Undecided |
Medium |
|
2017-03-27 17:04:01 |
Scott Moser |
cloud-init (Ubuntu): status |
Confirmed |
Fix Released |
|
2017-03-27 17:04:23 |
Scott Moser |
nominated for series |
|
Ubuntu Yakkety |
|
2017-03-27 17:04:23 |
Scott Moser |
bug task added |
|
cloud-init (Ubuntu Yakkety) |
|
2017-03-27 17:04:23 |
Scott Moser |
nominated for series |
|
Ubuntu Trusty |
|
2017-03-27 17:04:23 |
Scott Moser |
bug task added |
|
cloud-init (Ubuntu Trusty) |
|
2017-03-27 17:04:23 |
Scott Moser |
nominated for series |
|
Ubuntu Xenial |
|
2017-03-27 17:04:23 |
Scott Moser |
bug task added |
|
cloud-init (Ubuntu Xenial) |
|
2017-03-27 17:04:33 |
Scott Moser |
cloud-init (Ubuntu Trusty): status |
New |
Confirmed |
|
2017-03-27 17:04:36 |
Scott Moser |
cloud-init (Ubuntu Xenial): status |
New |
Confirmed |
|
2017-03-27 17:04:38 |
Scott Moser |
cloud-init (Ubuntu Yakkety): status |
New |
Confirmed |
|
2017-03-27 17:04:41 |
Scott Moser |
cloud-init (Ubuntu Trusty): importance |
Undecided |
Low |
|
2017-03-27 17:04:44 |
Scott Moser |
cloud-init (Ubuntu Xenial): importance |
Undecided |
Medium |
|
2017-03-27 17:04:47 |
Scott Moser |
cloud-init (Ubuntu Yakkety): importance |
Undecided |
Medium |
|
2017-04-05 18:43:31 |
Scott Moser |
description |
# cloud-init -v
cloud-init 0.7.5
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.4 LTS
Release: 14.04
Codename: trusty
AMI: ami-1721ff77 - Ubuntu 14.04 20160314
fs_setup fails to detect an existing filesystem and creates a new one when using the following configuration:
fs_setup:
label: None
filesystem: ext4
device: /dev/xvdf
partition: auto
There error seems to be here - https://git.launchpad.net/cloud-init/tree/cloudinit/config/cc_disk_setup.py#n216
This line sets definition['partition'] to None.
I believe " definition['partition'] = part" should be a part of the above conditional. |
=== Begin SRU Template ===
[Impact]
On instance first boot cloud-init may create a filesystem when
it should have re-used an existing filesystem.
[Test Case]
The test case launches an instance, assuming that has an old version
of cloud-init inside. The user-data will not be valid for the default
configuration of disks. (Most openstack instances would have a
single 'ephemeral' disk in addition to root, with an ext4 filesystem
labelled 'ephemeral0'). We will then upgrade instance to proposed.
And create a filesystem on /dev/vdb1 that *should* match.
1. launch an instance in openstack with the following user-data.
|#cloud-config
|fs_setup:
| - label: mydata
| device: /dev/vdb
| filesystem: ext4
| partition: auto
|mounts:
| - ["/dev/vdb1", "/mnt"]
$ cat > my-userdata.txt <<EOF
#cloud-config
fs_setup:
- label: mydata
device: /dev/vdb
filesystem: ext4
partition: auto
mounts:
- ["/dev/vdb1", "/mnt"]
EOF
$ openstack server create --user-data=my-userdata.txt \
--key-name=brickies --flavor=m1.small .... my-test
2. ssh in, prepare the /dev/vdb to have a partition, and upgrade
# run attached 'disk-setup'. This will partition the disk
# and wipe any filesystem data off, basically making it a partitioned
# but otherwise empty disk.
$ sudo ./disk-setup
umount: /mnt: not mounted
wiping /dev/vdb
partitioning /dev/vdb
/dev/vdb: PTUUID="9920db9b-a1ff-4f44-834c-8fcc42bd5821" PTTYPE="gpt"
/dev/vdb1: PARTUUID="1accde8d-8880-4a93-913a-61eee2e92535"
3. enable proposed, upgrade
4. clean out state and reboot
sudo rm -Rf /var/lib/cloud /var/log/cloud-init*
sudo sed -i '/comment=cloudconfig/d' /etc/fstab
sudo reboot
5. ssh back in and look around.
# cloud-init should have created a filesystem on /dev/vdb1
# and mounted it at /mnt.
$ grep /mnt /proc/mounts
/dev/vdb1 /mnt ext4 rw,relatime,data=ordered 0 0
# and have a filesystem 'mydata'
$ sudo blkid /dev/vdb1
/dev/vdb1: LABEL="mydata" UUID="79090091-800e-4348-a7a9-8c7a26ed18f7" TYPE="ext4" PARTUUID="b8ef8d3f-acb4-4bd0-ba2d-fdfb45c2e8f0"
# put a file on there, then clean up and reboot.
# we will expect that that this time, cloud-init will just re-use
# the existing filesystem rather than making another.
$ echo hi mom | sudo tee -a /mnt/my-important-data.txt
6. ssh in and expect /mnt/my-important-data.txt
$ cat /mnt/my-important-data.txt
hi mom
[Regression Potential]
Potentially this could re-use a partition that the user wanted reformatted.
[Other Info]
Upstream commit:
https://git.launchpad.net/cloud-init/commit/?id=4a2b2f87ec48c2
=== End SRU Template ===
# cloud-init -v
cloud-init 0.7.5
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.4 LTS
Release: 14.04
Codename: trusty
AMI: ami-1721ff77 - Ubuntu 14.04 20160314
fs_setup fails to detect an existing filesystem and creates a new one when using the following configuration:
fs_setup:
label: None
filesystem: ext4
device: /dev/xvdf
partition: auto
There error seems to be here - https://git.launchpad.net/cloud-init/tree/cloudinit/config/cc_disk_setup.py#n216
This line sets definition['partition'] to None.
I believe " definition['partition'] = part" should be a part of the above conditional. |
|
2017-04-10 22:22:30 |
Brian Murray |
cloud-init (Ubuntu Yakkety): status |
Confirmed |
Fix Committed |
|
2017-04-10 22:22:33 |
Brian Murray |
bug |
|
|
added subscriber Ubuntu Stable Release Updates Team |
2017-04-10 22:22:35 |
Brian Murray |
bug |
|
|
added subscriber SRU Verification |
2017-04-10 22:22:40 |
Brian Murray |
tags |
|
verification-needed |
|
2017-04-10 22:45:50 |
Brian Murray |
cloud-init (Ubuntu Xenial): status |
Confirmed |
Fix Committed |
|
2017-04-17 14:01:01 |
Scott Moser |
attachment added |
|
disk-setup for recreate https://bugs.launchpad.net/cloud-init/+bug/1634678/+attachment/4863577/+files/disk-setup |
|
2017-04-17 14:32:32 |
Scott Moser |
tags |
verification-needed |
verification-done-yakkety verification-needed-xenial |
|
2017-04-17 15:09:20 |
Scott Moser |
tags |
verification-done-yakkety verification-needed-xenial |
verification-done-xenial verification-done-yakkety |
|
2017-04-20 19:33:34 |
Launchpad Janitor |
cloud-init (Ubuntu Yakkety): status |
Fix Committed |
Fix Released |
|
2017-04-20 19:34:23 |
Steve Langasek |
removed subscriber Ubuntu Stable Release Updates Team |
|
|
|
2017-04-20 19:35:54 |
Launchpad Janitor |
cloud-init (Ubuntu Xenial): status |
Fix Committed |
Fix Released |
|
2017-09-23 02:13:56 |
Scott Moser |
cloud-init: status |
Fix Committed |
Fix Released |
|
2023-05-10 17:06:53 |
James Falcon |
bug watch added |
|
https://github.com/canonical/cloud-init/issues/2741 |
|