Revision 9de92521

b/lib/backend.py
1838 1838
    rdev = None
1839 1839
  if rdev is not None:
1840 1840
    r_path = rdev.dev_path
1841
    try:
1842
      rdev.Remove()
1843
    except errors.BlockDeviceError, err:
1844
      msgs.append(str(err))
1841

  
1842
    def _TryRemove():
1843
      try:
1844
        rdev.Remove()
1845
        return []
1846
      except errors.BlockDeviceError, err:
1847
        return [str(err)]
1848

  
1849
    msgs.extend(utils.SimpleRetry([], _TryRemove,
1850
                                  constants.DISK_REMOVE_RETRY_INTERVAL,
1851
                                  constants.DISK_REMOVE_RETRY_TIMEOUT))
1852

  
1845 1853
    if not msgs:
1846 1854
      DevCacheManager.RemoveCache(r_path)
1847 1855

  
b/lib/constants.py
2508 2508
  OPCODE_REASON_SRC_USER,
2509 2509
  ])
2510 2510

  
2511
# disk removal timeouts
2512
DISK_REMOVE_RETRY_INTERVAL = 3
2513
DISK_REMOVE_RETRY_TIMEOUT = 30
2514

  
2511 2515
# Do not re-export imported modules
2512 2516
del re, _vcsversion, _autoconf, socket, pathutils, compat

Also available in: Unified diff