From 0bf5284cd73a07f2bd2006c20189d63c995d6229 Mon Sep 17 00:00:00 2001 From: Yue Zhang Date: Fri, 20 Mar 2015 15:18:22 +0800 Subject: [PATCH] Change log level to warning for first mount failure --- waagent | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/waagent b/waagent index cbd005b..3dba4c1 100644 --- a/waagent +++ b/waagent @@ -499,8 +499,9 @@ class AbstractDistro(object): if existingFS == "7" and fs != "ntfs": Run("sfdisk -c " + device + " 1 83") Run("mkfs." + fs + " " + partition) - if Run("mount " + partition + " " + mountpoint): + if Run("mount " + partition + " " + mountpoint, chk_err=False): #If mount failed, try to format the partition and mount again + Warn("Failed to mount resource disk. Retry mounting.") Run("mkfs." + fs + " " + partition + " -F") if Run("mount " + partition + " " + mountpoint): Error("ActivateResourceDisk: Failed to mount resource disk (" + partition + ").")