Ensure all SSH keys are created before restarting SSH daemon

Signed-off-by: Brendan Dixon <brendand@microsoft.com>
This commit is contained in:
Brendan Dixon
2016-08-11 09:58:01 -07:00
parent 93054a44e9
commit d820daf01c
+1 -2
View File
@@ -67,6 +67,7 @@ class ProvisionHandler(object):
self.provision(ovfenv)
fileutil.write_file(provisioned, "")
thumbprint = self.reg_ssh_host_key()
self.osutil.restart_ssh_service()
logger.info("Finished provisioning")
except ProvisionError as e:
logger.error("Provision failed: {0}", e)
@@ -142,8 +143,6 @@ class ProvisionHandler(object):
if sel:
self.osutil.set_selinux_enforce(1)
self.osutil.restart_ssh_service()
def save_customdata(self, ovfenv):
customdata = ovfenv.customdata
if customdata is None: