2012-09-11 14:10:18 |
Andreas Hasenack |
bug |
|
|
added bug |
2012-09-11 14:12:30 |
Scott Moser |
description |
I spawned a lucid AWS instance and used some cloud-init config to perform some tasks for me.
All is good.
Then, as part of the task I was performing, I upgraded that lucid instance to precise using do-release-upgrade. It failed, but unrelated to cloud-init (a postinst from a package failed).
I then rebooted the instance. When it came back up, the cloud-init config I supplied the first time was run again, as if this was the first time the instance booted.
smoser had access to before and after reboot, and asked to add this to the bug:
# for x in /var/lib/cloud/instance/sem/*; do [ -f var-lib-cloud/instance/sem/${x##*/} ] || echo ${x##*/}; done
config-byobu
config-ca-certs
config-chef
config-grub-dpkg
config-keys-to-console
config-landscape
config-mcollective
config-phone-home
config-rightscale_userdata
config-rsyslog
config-salt-minion
config-scripts-per-instance
config-scripts-user
config-set-passwords
config-ssh-import-id
config-timezone |
I spawned a lucid AWS instance and used some cloud-init config to perform some tasks for me.
All is good.
Then, as part of the task I was performing, I upgraded that lucid instance to precise using do-release-upgrade. It failed, but unrelated to cloud-init (a postinst from a package failed).
I then rebooted the instance. When it came back up, the cloud-init config I supplied the first time was run again, as if this was the first time the instance booted.
smoser had access to before and after reboot, and asked to add this to the bug:
# for x in /var/lib/cloud/instance/sem/*; do [ -f var-lib-cloud/instance/sem/${x##*/} ] || echo ${x##*/}; done
config-byobu
config-ca-certs
config-chef
config-grub-dpkg
config-keys-to-console
config-landscape
config-mcollective
config-phone-home
config-rightscale_userdata
config-rsyslog
config-salt-minion
config-scripts-per-instance
config-scripts-user
config-set-passwords
config-ssh-import-id
config-timezone
$ ls var-lib-cloud/instance/sem/
config-apt-pipelining config-puppet config-updates-check
config-apt-update-upgrade config-runcmd consume_userdata
config-locale config-set_hostname user-scripts
config-mounts config-ssh |
|
2012-09-11 14:13:24 |
Scott Moser |
attachment added |
|
/var/log/cloud-init.log from the instance after reboot https://bugs.launchpad.net/cloud-init/+bug/1049146/+attachment/3307494/+files/var-log-cloud-init.log |
|
2012-09-24 17:30:02 |
Launchpad Janitor |
branch linked |
|
lp:ubuntu/cloud-init |
|
2012-09-24 17:32:16 |
Scott Moser |
bug task added |
|
cloud-init (Ubuntu) |
|
2012-09-24 17:32:23 |
Scott Moser |
bug task deleted |
cloud-init |
|
|
2012-09-24 17:32:30 |
Scott Moser |
cloud-init (Ubuntu): status |
New |
Fix Released |
|
2012-09-24 17:32:46 |
Scott Moser |
cloud-init (Ubuntu): importance |
Undecided |
Medium |
|
2012-09-24 17:32:46 |
Scott Moser |
cloud-init (Ubuntu): assignee |
|
Scott Moser (smoser) |
|
2012-09-24 17:32:55 |
Scott Moser |
nominated for series |
|
Ubuntu Precise |
|
2012-09-24 17:32:55 |
Scott Moser |
bug task added |
|
cloud-init (Ubuntu Precise) |
|
2012-10-05 15:10:33 |
Scott Moser |
cloud-init (Ubuntu Precise): status |
New |
Triaged |
|
2012-10-05 15:10:36 |
Scott Moser |
cloud-init (Ubuntu Precise): importance |
Undecided |
High |
|
2012-10-12 18:41:52 |
Launchpad Janitor |
branch linked |
|
lp:~smoser/ubuntu/precise/cloud-init/sru |
|
2012-11-08 17:51:14 |
Scott Moser |
description |
I spawned a lucid AWS instance and used some cloud-init config to perform some tasks for me.
All is good.
Then, as part of the task I was performing, I upgraded that lucid instance to precise using do-release-upgrade. It failed, but unrelated to cloud-init (a postinst from a package failed).
I then rebooted the instance. When it came back up, the cloud-init config I supplied the first time was run again, as if this was the first time the instance booted.
smoser had access to before and after reboot, and asked to add this to the bug:
# for x in /var/lib/cloud/instance/sem/*; do [ -f var-lib-cloud/instance/sem/${x##*/} ] || echo ${x##*/}; done
config-byobu
config-ca-certs
config-chef
config-grub-dpkg
config-keys-to-console
config-landscape
config-mcollective
config-phone-home
config-rightscale_userdata
config-rsyslog
config-salt-minion
config-scripts-per-instance
config-scripts-user
config-set-passwords
config-ssh-import-id
config-timezone
$ ls var-lib-cloud/instance/sem/
config-apt-pipelining config-puppet config-updates-check
config-apt-update-upgrade config-runcmd consume_userdata
config-locale config-set_hostname user-scripts
config-mounts config-ssh |
=== Begin SRU Information ===
[Impact]
* If a user launches a 10.04 cloud-image with a user-data script, and then
does a upgrade to 12.04 and 'reboot's to complete the upgrade, the
user-data script will incorrectly execute again on boot.
This is because the cloud config module that executed user-data changed
names between 10.04 and 12.04 from 'user-scripts' to 'config-scripts-user',
but nothing was in place to adjust the "already ran" marker file
[Test Case]
* launch an instance with some user-data:
$ cat lp-1049146-user-data.txt
#!/bin/sh
echo "====== $(date -R) [$0] =====" | tee -a /root/user-data.log
$ ubuntu-ec2-run --key=your-keyname --instance-type=m1.medium \
--user-data-file lp-1049146-user-data.txt lucid daily
# us-east-1/instance-store/ubuntu-lucid-daily-amd64-server-20121108
* upgrade the image and then do-release-upgrade it, then reboot
$ IP=THE_IP_ADDRESS
$ ssh ubuntu@$IP
% sudo apt-get update -q && sudo apt-get upgrade -y
% do-release-upgrade --frontend=DistUpgradeViewNonInteractive
# you could install the patched new version of cloud-init by hand here.
% sudo reboot
* see that the user-data has run more than once
# upon reboot, you'll see that the user-data script ran again (twice)
$ sudo cat /root/user-data.log
====== Thu, 08 Nov 2012 17:07:52 +0000
[/var/lib/cloud/data/scripts/part-000] =====
====== Thu, 08 Nov 2012 17:26:50 +0000
[/var/lib/cloud/instance/scripts/part-000] =====
====== Thu, 08 Nov 2012 17:26:50 +0000
[/var/lib/cloud/instance/scripts/part-001] =====
[Regression Potential]
* There is little potential to make anything worse here. The relevant
change is really only to touch a file in the post install that will
serve as a marker for the newer version of cloud-init, so it realize
that the user-data has already been executed once.
=== End SRU Information ===
I spawned a lucid AWS instance and used some cloud-init config to perform some tasks for me.
All is good.
Then, as part of the task I was performing, I upgraded that lucid instance to precise using do-release-upgrade. It failed, but unrelated to cloud-init (a postinst from a package failed).
I then rebooted the instance. When it came back up, the cloud-init config I supplied the first time was run again, as if this was the first time the instance booted.
smoser had access to before and after reboot, and asked to add this to the bug:
# for x in /var/lib/cloud/instance/sem/*; do [ -f var-lib-cloud/instance/sem/${x##*/} ] || echo ${x##*/}; done
config-byobu
config-ca-certs
config-chef
config-grub-dpkg
config-keys-to-console
config-landscape
config-mcollective
config-phone-home
config-rightscale_userdata
config-rsyslog
config-salt-minion
config-scripts-per-instance
config-scripts-user
config-set-passwords
config-ssh-import-id
config-timezone
$ ls var-lib-cloud/instance/sem/
config-apt-pipelining config-puppet config-updates-check
config-apt-update-upgrade config-runcmd consume_userdata
config-locale config-set_hostname user-scripts
config-mounts config-ssh |
|
2012-12-10 23:04:38 |
Steve Langasek |
cloud-init (Ubuntu Precise): status |
Triaged |
Fix Committed |
|
2012-12-10 23:04:41 |
Steve Langasek |
bug |
|
|
added subscriber Ubuntu Stable Release Updates Team |
2012-12-10 23:04:43 |
Steve Langasek |
bug |
|
|
added subscriber SRU Verification |
2012-12-10 23:04:45 |
Steve Langasek |
tags |
|
verification-needed |
|
2012-12-12 19:53:22 |
Scott Moser |
tags |
verification-needed |
verification-done |
|
2013-01-08 19:15:53 |
Clint Byrum |
tags |
verification-done |
|
|
2013-01-08 19:15:54 |
Clint Byrum |
tags |
|
verification-needed |
|
2013-01-08 23:49:08 |
Scott Moser |
cloud-init (Ubuntu Precise): assignee |
|
Scott Moser (smoser) |
|
2013-01-08 23:49:22 |
Scott Moser |
tags |
verification-needed |
verification-done |
|
2013-01-08 23:49:46 |
Scott Moser |
cloud-init (Ubuntu Precise): assignee |
Scott Moser (smoser) |
|
|
2013-01-16 14:20:27 |
Colin Watson |
removed subscriber Ubuntu Stable Release Updates Team |
|
|
|
2013-01-16 14:20:17 |
Launchpad Janitor |
cloud-init (Ubuntu Precise): status |
Fix Committed |
Fix Released |
|
2013-08-28 11:32:39 |
Launchpad Janitor |
branch linked |
|
lp:~ubuntu-branches/ubuntu/precise/cloud-init/precise-proposed |
|