diff --git a/waagent b/waagent index 835e85d..139f3c8 100644 --- a/waagent +++ b/waagent @@ -1858,23 +1858,6 @@ class Agent(Util): # we have succeeded loading the ata_piix mod if it can be done. - - def SetStarageDeviceTimeout(self): - try: - timeout = Config.get("OS.RootDeviceScsiTimeout") - if timeout == None: - timeout = 300 - if not os.path.exists('/etc/udev/rules.d/waagent.rules'): - for i in range(3): - device=DeviceForIdePort(i) - if device: - SetFileContents("/sys/block/" + device + "/device/timeout", timeout) - # we need scsi to have timeout of (timeout) - we create a waagent.rules file. It will run last - rules = """ACTION=="add", SUBSYSTEMS=="scsi", RUN+="/bin/sh -c 'echo """ + str(timeout) + """ >/sys$DEVPATH/device/timeout'" """ - SetFileContents('/etc/udev/rules.d/waagent.rules',rules) - except: - pass - def Provision(self): enabled = Config.get("Provisioning.Enabled") if enabled != None and enabled.lower().startswith("n"): @@ -1974,7 +1957,13 @@ class Agent(Util): self.EnvMonitor = EnvMonitor() # Set SCSI timeout on root device - self.SetStarageDeviceTimeout() + try: + timeout = Config.get("OS.RootDeviceScsiTimeout") + if timeout != None: + SetFileContents("/sys/block/" + DeviceForIdePort(0) + "/device/timeout", timeout) + except: + pass + global Openssl Openssl = Config.get("OS.OpensslPath") if Openssl == None: @@ -2428,7 +2417,6 @@ 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