update user password fails when machine does not have openssh installed
This bug was originally filed in Launchpad as LP: #1901761
Launchpad details
affected_projects = [] assignee = None assignee_name = None date_closed = None date_created = 2020-10-27T20:15:44.000418+00:00 date_fix_committed = None date_fix_released = None id = 1901761 importance = low is_complete = False lp_url = https://bugs.launchpad.net/cloud-init/+bug/1901761 milestone = None owner = lamoura owner_name = Lucas Albuquerque Medeiros de Moura private = False status = triaged submitter = lamoura submitter_name = Lucas Albuquerque Medeiros de Moura tags = [] duplicates = []
Launchpad user Lucas Albuquerque Medeiros de Moura(lamoura) wrote on 2020-10-27T20:15:44.000418+00:00
When creating a machine with the following userdata:
#cloud-config
chpasswd:
list: |
ubuntu:passw0rd
ssh_pwauth: True
cloud-init will fails if the machine does not have openssh installed on it. That happens because pasasword module will try to run the following command:
service ssh restart
Which will fail if the machine does not have openssh installed.
How to reproduce:
Just launch an lxd vm with the provided userdata using the following image as base: images:ubuntu/16.04/cloud
Launchpad user Lucas Albuquerque Medeiros de Moura(lamoura) wrote on 2020-10-27T20:15:44.000418+00:00
Launchpad attachments: cloud-init.log