This is still a problem in Wily 15.10 (ami-225ebd11)
On the ec2 console I see:
Cloud-init 0.7.7 received SIGTERM, exiting...
Filename: /usr/lib/python3/dist-packages/cloudinit/config/cc_power_state_change.py
Function: run_after_pid_gone
Line number: 209
Filename: /usr/lib/python3/dist-packages/cloudinit/util.py
Function: fork_cb
Line number: 285
Filename: /usr/lib/python3/dist-packages/cloudinit/config/cc_power_state_change.py
Function: handle
Line number: 109
And in /var/log/cloud-init.log:
Oct 28 21:16:14 ubuntu [CLOUDINIT] helpers.py[DEBUG]: Running config-power-state-change using lock (<FileLock using file '/var/lib/cloud/instances/i-ea987333/sem/config_power_state_change'>)
Oct 28 21:16:14 ubuntu [CLOUDINIT] util.py[DEBUG]: Reading from /proc/1062/cmdline (quiet=False)
Oct 28 21:16:14 ubuntu [CLOUDINIT] util.py[DEBUG]: Read 58 bytes from /proc/1062/cmdline
Oct 28 21:16:14 ubuntu [CLOUDINIT] cc_power_state_change.py[DEBUG]: After pid 1062 ends, will execute: shutdown -P now
Oct 28 21:16:14 ubuntu [CLOUDINIT] util.py[DEBUG]: Forked child 1080 who will run callback run_after_pid_gone
Oct 28 21:16:14 ubuntu [CLOUDINIT] handlers.py[DEBUG]: finish: modules-final/config-power-state-change: SUCCESS: config-power-state-change ran successfully
Oct 28 21:16:14 ubuntu [CLOUDINIT] cloud-init[DEBUG]: Ran 11 modules with 1 failures
Oct 28 21:16:14 ubuntu [CLOUDINIT] util.py[DEBUG]: Reading from /proc/1062/cmdline (quiet=False)
Oct 28 21:16:14 ubuntu [CLOUDINIT] util.py[DEBUG]: Read 58 bytes from /proc/1062/cmdline
Oct 28 21:16:14 ubuntu [CLOUDINIT] util.py[DEBUG]: Creating symbolic link from '/run/cloud-init/result.json' => '../../var/lib/cloud/data/result.json'
Oct 28 21:16:14 ubuntu [CLOUDINIT] util.py[DEBUG]: Reading from /proc/uptime (quiet=False)
Oct 28 21:16:14 ubuntu [CLOUDINIT] util.py[DEBUG]: Read 12 bytes from /proc/uptime
Oct 28 21:16:14 ubuntu [CLOUDINIT] util.py[DEBUG]: cloud-init mode 'modules' took 0.502 seconds (0.50)
Oct 28 21:16:14 ubuntu [CLOUDINIT] handlers.py[DEBUG]: finish: modules-final: FAIL: running modules for final
Oct 28 21:16:14 ubuntu [CLOUDINIT] util.py[DEBUG]: Cloud-init 0.7.7 received SIGTERM, exiting...#012 Filename: /usr/lib/python3/dist-packages/cloudinit/config/cc_power_state_change.py#012 Function: run_after_pid_gone#012 Line number: 209#012 Filename: /usr/lib/python3/dist-packages/cloudinit/util.py#012 Function: fork_cb#012 Line number: 285#012 Filename: /usr/lib/python3/dist-packages/cloudinit/config/cc_power_state_change.py#012 Function: handle#012 Line number: 109
Oct 28 21:16:14 ubuntu [CLOUDINIT] util.py[WARNING]: Failed forking and calling callback run_after_pid_gone
Oct 28 21:16:14 ubuntu [CLOUDINIT] util.py[DEBUG]: Failed forking and calling callback run_after_pid_gone#012Traceback (most recent call last):#012 File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 285, in fork_cb#012 child_cb(*args, **kwargs)#012 File "/usr/lib/python3/dist-packages/cloudinit/config/cc_power_state_change.py", line 209, in run_after_pid_gone#012 time.sleep(.25)#012 File "/usr/lib/python3/dist-packages/cloudinit/signal_handler.py", line 63, in _handle_exit#012 sys.exit(rc)#012SystemExit: 1
This is still a problem in Wily 15.10 (ami-225ebd11)
On the ec2 console I see:
Cloud-init 0.7.7 received SIGTERM, exiting... python3/ dist-packages/ cloudinit/ config/ cc_power_ state_change. py python3/ dist-packages/ cloudinit/ util.py python3/ dist-packages/ cloudinit/ config/ cc_power_ state_change. py
Filename: /usr/lib/
Function: run_after_pid_gone
Line number: 209
Filename: /usr/lib/
Function: fork_cb
Line number: 285
Filename: /usr/lib/
Function: handle
Line number: 109
And in /var/log/ cloud-init. log:
Oct 28 21:16:14 ubuntu [CLOUDINIT] helpers.py[DEBUG]: Running config- power-state- change using lock (<FileLock using file '/var/lib/ cloud/instances /i-ea987333/ sem/config_ power_state_ change' >) state_change. py[DEBUG] : After pid 1062 ends, will execute: shutdown -P now final/config- power-state- change: SUCCESS: config- power-state- change ran successfully init/result. json' => '../../ var/lib/ cloud/data/ result. json' python3/ dist-packages/ cloudinit/ config/ cc_power_ state_change. py#012 Function: run_after_ pid_gone# 012 Line number: 209#012 Filename: /usr/lib/ python3/ dist-packages/ cloudinit/ util.py# 012 Function: fork_cb#012 Line number: 285#012 Filename: /usr/lib/ python3/ dist-packages/ cloudinit/ config/ cc_power_ state_change. py#012 Function: handle#012 Line number: 109 pid_gone# 012Traceback (most recent call last):#012 File "/usr/lib/ python3/ dist-packages/ cloudinit/ util.py" , line 285, in fork_cb#012 child_cb(*args, **kwargs)#012 File "/usr/lib/ python3/ dist-packages/ cloudinit/ config/ cc_power_ state_change. py", line 209, in run_after_ pid_gone# 012 time.sleep(.25)#012 File "/usr/lib/ python3/ dist-packages/ cloudinit/ signal_ handler. py", line 63, in _handle_exit#012 sys.exit( rc)#012SystemEx it: 1
Oct 28 21:16:14 ubuntu [CLOUDINIT] util.py[DEBUG]: Reading from /proc/1062/cmdline (quiet=False)
Oct 28 21:16:14 ubuntu [CLOUDINIT] util.py[DEBUG]: Read 58 bytes from /proc/1062/cmdline
Oct 28 21:16:14 ubuntu [CLOUDINIT] cc_power_
Oct 28 21:16:14 ubuntu [CLOUDINIT] util.py[DEBUG]: Forked child 1080 who will run callback run_after_pid_gone
Oct 28 21:16:14 ubuntu [CLOUDINIT] handlers.py[DEBUG]: finish: modules-
Oct 28 21:16:14 ubuntu [CLOUDINIT] cloud-init[DEBUG]: Ran 11 modules with 1 failures
Oct 28 21:16:14 ubuntu [CLOUDINIT] util.py[DEBUG]: Reading from /proc/1062/cmdline (quiet=False)
Oct 28 21:16:14 ubuntu [CLOUDINIT] util.py[DEBUG]: Read 58 bytes from /proc/1062/cmdline
Oct 28 21:16:14 ubuntu [CLOUDINIT] util.py[DEBUG]: Creating symbolic link from '/run/cloud-
Oct 28 21:16:14 ubuntu [CLOUDINIT] util.py[DEBUG]: Reading from /proc/uptime (quiet=False)
Oct 28 21:16:14 ubuntu [CLOUDINIT] util.py[DEBUG]: Read 12 bytes from /proc/uptime
Oct 28 21:16:14 ubuntu [CLOUDINIT] util.py[DEBUG]: cloud-init mode 'modules' took 0.502 seconds (0.50)
Oct 28 21:16:14 ubuntu [CLOUDINIT] handlers.py[DEBUG]: finish: modules-final: FAIL: running modules for final
Oct 28 21:16:14 ubuntu [CLOUDINIT] util.py[DEBUG]: Cloud-init 0.7.7 received SIGTERM, exiting...#012 Filename: /usr/lib/
Oct 28 21:16:14 ubuntu [CLOUDINIT] util.py[WARNING]: Failed forking and calling callback run_after_pid_gone
Oct 28 21:16:14 ubuntu [CLOUDINIT] util.py[DEBUG]: Failed forking and calling callback run_after_