On Azure, this fails: Sep 15 16:59:19 localhost [CLOUDINIT] util.py[DEBUG]: Running command ['snappy', 'list'] with allowed return codes [0] (shell=False, ca pture=True) Sep 15 16:59:19 localhost [CLOUDINIT] cc_snappy.py[DEBUG]: setting enablement of ssh to: False Sep 15 16:59:19 localhost [CLOUDINIT] util.py[DEBUG]: Running command ['systemctl', 'stop', 'ssh'] with allowed return codes [0] (shell =False, capture=True) Sep 15 16:59:19 localhost [CLOUDINIT] util.py[DEBUG]: Writing to /etc/ssh/sshd_not_to_be_run - wb: [420] 11 bytes Sep 15 16:59:19 localhost [CLOUDINIT] handlers.py[DEBUG]: finish: modules-config/config-snappy: SUCCESS: config-snappy ran successfully Sep 15 16:59:19 localhost [CLOUDINIT] stages.py[DEBUG]: Running module grub-dpkg (<module 'cloudinit.config.cc_grub_dpkg' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_grub_dpkg.py'>) with frequency once-per-instance Sep 15 16:59:19 localhost [CLOUDINIT] handlers.py[DEBUG]: start: modules-config/config-grub-dpk
And then on EC2: Sep 15 17:28:13 localhost [CLOUDINIT] util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-8cd9432f/sem/config_snappy - wb: [420] 24 bytes Sep 15 17:28:13 localhost [CLOUDINIT] helpers.py[DEBUG]: Running config-snappy using lock (<FileLock using file '/var/lib/cloud/instances/i-8cd9432f/sem/config_snappy'>) Sep 15 17:28:13 localhost [CLOUDINIT] util.py[DEBUG]: Reading from /etc/system-image/channel.ini (quiet=True) Sep 15 17:28:13 localhost [CLOUDINIT] util.py[DEBUG]: Read 212 bytes from /etc/system-image/channel.ini Sep 15 17:28:13 localhost [CLOUDINIT] cc_snappy.py[DEBUG]: snappy command is 'snappy' Sep 15 17:28:13 localhost [CLOUDINIT] util.py[DEBUG]: Running command ['snappy', 'list'] with allowed return codes [0] (shell=False, capture=True) Sep 15 17:28:13 localhost [CLOUDINIT] cc_snappy.py[DEBUG]: setting enablement of ssh to: False Sep 15 17:28:13 localhost [CLOUDINIT] util.py[DEBUG]: Running command ['systemctl', 'stop', 'ssh'] with allowed return codes [0] (shell=False, capture=True) Sep 15 17:28:13 localhost [CLOUDINIT] util.py[DEBUG]: Writing to /etc/ssh/sshd_not_to_be_run - wb: [420] 11 bytes
But interestingly enough, SSH is still running and I am able to login.
It looks like this is a problem: === modified file 'cloudinit/config/cc_snappy.py' --- cloudinit/config/cc_snappy.py 2015-09-11 20:52:26 +0000 +++ cloudinit/config/cc_snappy.py 2015-09-15 17:36:18 +0000 @@ -280,7 +280,7 @@ pkg_op['op'], pkg_op['name'], e)
# Default to disabling SSH - ssh_enabled = mycfg.get('ssh_enabled', "auto") + ssh_enabled = cfgin.get('ssh_enabled', "auto")
# If the user has not explicitly enabled or disabled SSH, then enable it # when password SSH authentication is requested or there are SSH keys
On Azure, this fails: py[DEBUG] : setting enablement of ssh to: False sshd_not_ to_be_run - wb: [420] 11 bytes config/ config- snappy: SUCCESS: config-snappy ran successfully config. cc_grub_ dpkg' from '/usr/lib/ python3/ dist-packages/ cloudinit/ config/ cc_grub_ dpkg.py' >) with frequency once-per-instance config/ config- grub-dpk
Sep 15 16:59:19 localhost [CLOUDINIT] util.py[DEBUG]: Running command ['snappy', 'list'] with allowed return codes [0] (shell=False, ca
pture=True)
Sep 15 16:59:19 localhost [CLOUDINIT] cc_snappy.
Sep 15 16:59:19 localhost [CLOUDINIT] util.py[DEBUG]: Running command ['systemctl', 'stop', 'ssh'] with allowed return codes [0] (shell
=False, capture=True)
Sep 15 16:59:19 localhost [CLOUDINIT] util.py[DEBUG]: Writing to /etc/ssh/
Sep 15 16:59:19 localhost [CLOUDINIT] handlers.py[DEBUG]: finish: modules-
Sep 15 16:59:19 localhost [CLOUDINIT] stages.py[DEBUG]: Running module grub-dpkg (<module 'cloudinit.
Sep 15 16:59:19 localhost [CLOUDINIT] handlers.py[DEBUG]: start: modules-
And then on EC2: cloud/instances /i-8cd9432f/ sem/config_ snappy - wb: [420] 24 bytes cloud/instances /i-8cd9432f/ sem/config_ snappy' >) image/channel. ini (quiet=True) image/channel. ini py[DEBUG] : snappy command is 'snappy' py[DEBUG] : setting enablement of ssh to: False sshd_not_ to_be_run - wb: [420] 11 bytes
Sep 15 17:28:13 localhost [CLOUDINIT] util.py[DEBUG]: Writing to /var/lib/
Sep 15 17:28:13 localhost [CLOUDINIT] helpers.py[DEBUG]: Running config-snappy using lock (<FileLock using file '/var/lib/
Sep 15 17:28:13 localhost [CLOUDINIT] util.py[DEBUG]: Reading from /etc/system-
Sep 15 17:28:13 localhost [CLOUDINIT] util.py[DEBUG]: Read 212 bytes from /etc/system-
Sep 15 17:28:13 localhost [CLOUDINIT] cc_snappy.
Sep 15 17:28:13 localhost [CLOUDINIT] util.py[DEBUG]: Running command ['snappy', 'list'] with allowed return codes [0] (shell=False, capture=True)
Sep 15 17:28:13 localhost [CLOUDINIT] cc_snappy.
Sep 15 17:28:13 localhost [CLOUDINIT] util.py[DEBUG]: Running command ['systemctl', 'stop', 'ssh'] with allowed return codes [0] (shell=False, capture=True)
Sep 15 17:28:13 localhost [CLOUDINIT] util.py[DEBUG]: Writing to /etc/ssh/
But interestingly enough, SSH is still running and I am able to login.
It looks like this is a problem: config/ cc_snappy. py' config/ cc_snappy. py 2015-09-11 20:52:26 +0000 config/ cc_snappy. py 2015-09-15 17:36:18 +0000
pkg_op[ 'op'], pkg_op['name'], e)
=== modified file 'cloudinit/
--- cloudinit/
+++ cloudinit/
@@ -280,7 +280,7 @@
# Default to disabling SSH 'ssh_enabled' , "auto") 'ssh_enabled' , "auto")
- ssh_enabled = mycfg.get(
+ ssh_enabled = cfgin.get(
# If the user has not explicitly enabled or disabled SSH, then enable it
# when password SSH authentication is requested or there are SSH keys