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


** Changed in: cloud-init (Ubuntu)
       Status: Fix Released => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in Ubuntu.
https://bugs.launchpad.net/bugs/1494816

Title:
  Snappy should enable SSH when credentials are provided

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1494816/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to