yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #31010
[Bug 1438520] Re: cloud-init on vivid upgrade causes sigterm, which aborts 'runcmd' execution
Above was long winded. A summary.
* cloud-init has 4 services and 1 target . see those at [1]
* cloud-config.service invoked 'apt-get dist-upgrade', and received a SIGTERM
* cloud-config.service *would* have subsequently written a file into /var/lib/cloud/instance/scripts/
* cloud-final.service did run. Had it seen the script written it would have run it, but nothing was there to run.
So I think what happened is that the upgrade somehow sent SIGTERM to
cloud-config.service which made it stop prematurely. I dont think that
happened with upstart.
Any ideas here?
--
[1] http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/files/head:/systemd/
** Changed in: cloud-init
Importance: Undecided => High
** Also affects: cloud-init (Ubuntu)
Importance: Undecided
Status: New
** Changed in: cloud-init (Ubuntu)
Status: New => Confirmed
** Changed in: cloud-init (Ubuntu)
Importance: Undecided => High
** Tags added: cloud-images systemd-boot
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1438520
Title:
cloud-init on vivid upgrade causes sigterm, which aborts 'runcmd'
execution
Status in Init scripts for use on cloud images:
Confirmed
Status in cloud-init package in Ubuntu:
Confirmed
Bug description:
I used an openstack infrastructure with a vivid beta2 image. End
result, if there is cloud-init upgrade available, it installs and
abort parts of the cloud-init execution. (bad news for my user
scripts!) I'm not sure of all the fallout, but at least my 'runcmd'
section was not executed (grep the logs for 'runcmd').
From cloud-init-output.log:
Preparing to unpack .../cryptsetup-bin_2%3a1.6.1-1ubuntu7_amd64.deb ...^M
Unpacking cryptsetup-bin (2:1.6.1-1ubuntu7) over (2:1.6.1-1ubuntu5) ...^M
Preparing to unpack .../cryptsetup_2%3a1.6.1-1ubuntu7_amd64.deb ...^M
Unpacking cryptsetup (2:1.6.1-1ubuntu7) over (2:1.6.1-1ubuntu5) ...^M
Preparing to unpack .../cloud-init_0.7.7~bzr1087-0ubuntu1_all.deb ...^M
Cloud-init v. 0.7.7 running 'modules:final' at Tue, 31 Mar 2015 05:09:42 +0000. Up 848.15 seconds.
Cloud-init v. 0.7.7 finished at Tue, 31 Mar 2015 05:09:44 +0000. Datasource DataSourceOpenStack [net,ver=2]. Up 850.19 seconds
From cloud-init.log:
Mar 31 04:57:38 ubuntu [CLOUDINIT] util.py[DEBUG]: Running command ['eatmydata', 'apt-get', '--option=Dpkg::Options::=--force-confold', '--option=Dpkg::options::=--force-unsafe-io', '--assume-yes', '--quiet', 'dist-upgrade'] with allowed return codes [0] (shell=False, capture=False)
Mar 31 05:09:41 ubuntu [CLOUDINIT] util.py[DEBUG]: Cloud-init 0.7.7 received SIGTERM, exiting...#012 Filename: /usr/lib/python3.4/subprocess.py#012 Function: _eintr_retry_call#012 Line number: 491#012 Filename: /usr/lib/python3.4/subprocess.py#012 Function: _try_wait#012 Line number: 1514#012 Filename: /usr/lib/python3.4/subprocess.py#012 Function: wait#012 Line number: 1566
Mar 31 05:09:41 ubuntu [CLOUDINIT] util.py[DEBUG]: apt-upgrade [eatmydata apt-get --option=Dpkg::Options::=--force-confold --option=Dpkg::options::=--force-unsafe-io --assume-yes --quiet dist-upgrade] took 722.766 seconds
Mar 31 05:09:41 ubuntu [CLOUDINIT] util.py[DEBUG]: Reading from /proc/uptime (quiet=False)
Mar 31 05:09:41 ubuntu [CLOUDINIT] util.py[DEBUG]: Read 12 bytes from /proc/uptime
Mar 31 05:09:41 ubuntu [CLOUDINIT] util.py[DEBUG]: cloud-init mode 'modules' took 761.227 seconds (761.23)
Mar 31 05:09:42 ubuntu [CLOUDINIT] util.py[DEBUG]: Cloud-init v. 0.7.7 running 'modules:final' at Tue, 31 Mar 2015 05:09:42 +0000. Up 848.15 seconds.
Mar 31 05:09:44 ubuntu [CLOUDINIT] stages.py[DEBUG]: Using distro class <class 'cloudinit.distros.ubuntu.Distro'>
Mar 31 05:09:44 ubuntu [CLOUDINIT] stages.py[DEBUG]: Running module rightscale_userdata (<module 'cloudinit.config.cc_rightscale_userdata' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_rightscale_userdata.py'>) with frequency once-per-instance
I'll attach full cloud-init logs and the userdata. I used the
following command to boot the instance:
nova boot --key-name dpb --user-data ~/test.txt --image
fc7aedfd-f465-48b9-9fc6-c826f3a0e81b --flavor 2 vivid-test
and the image is this:
ubuntu-released/ubuntu-
vivid-15.04-beta2-amd64-server-20150325-disk1.img
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1438520/+subscriptions
References