From e092529c987a5091e63c326479407b88aa71ca67 Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Tue, 23 Oct 2018 23:33:08 +0530 Subject: [PATCH] systemvm: Ensure cloud service reboots after failure (#2916) This fixes an issue for systemvms (CPVM and SSVM) on VMware, as eth0 is not programmed (link-local) the networking.service fails to start which is a dependency for cloud-postinit service. When cloud-postinit service fails to start/run, it fails to start the agent (cloud) process. This fixes the smoketest failures we saw in case of VMware 6.5 with 4.11. Signed-off-by: Rohit Yadav --- systemvm/debian/etc/systemd/system/cloud-postinit.service | 1 - systemvm/debian/etc/systemd/system/cloud.service | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/systemvm/debian/etc/systemd/system/cloud-postinit.service b/systemvm/debian/etc/systemd/system/cloud-postinit.service index a9abff443fa..cb20aaf7c06 100644 --- a/systemvm/debian/etc/systemd/system/cloud-postinit.service +++ b/systemvm/debian/etc/systemd/system/cloud-postinit.service @@ -2,7 +2,6 @@ Description=CloudStack post-patching init script After=cloud-early-config.service network.target local-fs.target Before=ssh.service -Requires=networking.service [Install] WantedBy=multi-user.target diff --git a/systemvm/debian/etc/systemd/system/cloud.service b/systemvm/debian/etc/systemd/system/cloud.service index 9c61be46eba..22439239caa 100644 --- a/systemvm/debian/etc/systemd/system/cloud.service +++ b/systemvm/debian/etc/systemd/system/cloud.service @@ -9,5 +9,4 @@ WantedBy=multi-user.target Type=simple WorkingDirectory=/usr/local/cloud/systemvm ExecStart=/usr/local/cloud/systemvm/_run.sh -Restart=always -RestartSec=5 +Restart=on-failure