From 39f41a94f3e8b104f195f5f2f4f4836cfdff6b9e Mon Sep 17 00:00:00 2001 From: Eric Gable Date: Fri, 5 Apr 2013 11:22:49 -0700 Subject: [PATCH] Fix 748843 Set scsi timeout to 300 by creating /etc/udev/rules.d/waagent.rules Changed: Install() Uninstall() --- waagent | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/waagent b/waagent index 3843505..ee4566f 100644 --- a/waagent +++ b/waagent @@ -2308,6 +2308,10 @@ def Install(): shutil.move(a, ".") Warn("Moved " + a + " -> " + LibDir + "/" + GetLastPathElement(a) ) + # we need scsi to have timeout of 300 - we create a waagent.rules file. It will run last + rules = """ACTION=="add", SUBSYSTEMS=="scsi", RUN+="/bin/sh -c 'echo 300 >/sys$DEVPATH/device/timeout'" """ + SetFileContents('/etc/udev/rules.d/waagent.rules',rules) + if IsUbuntu() and not IsPackagedUbuntu(): # Support for Ubuntu's upstart configuration filename="waagent.conf" @@ -2377,6 +2381,7 @@ def Uninstall(): "/etc/waagent.conf", "/etc/logrotate.d/waagent", "/etc/sudoers.d/waagent", + "/etc/udev/rules.d/waagent.rules", ] # For packaged Ubuntu, the script should let the packaging