Revision fbafd7a8 lib/cmdlib.py
b/lib/cmdlib.py | ||
---|---|---|
1608 | 1608 |
lu.cfg.SetDiskID(dev, node) |
1609 | 1609 |
|
1610 | 1610 |
retries = 0 |
1611 |
degr_retries = 10 # in seconds, as we sleep 1 second each time |
|
1611 | 1612 |
while True: |
1612 | 1613 |
max_time = 0 |
1613 | 1614 |
done = True |
... | ... | |
1640 | 1641 |
rem_time = "no time estimate" |
1641 | 1642 |
lu.proc.LogInfo("- device %s: %5.2f%% done, %s" % |
1642 | 1643 |
(instance.disks[i].iv_name, perc_done, rem_time)) |
1644 |
|
|
1645 |
# if we're done but degraded, let's do a few small retries, to |
|
1646 |
# make sure we see a stable and not transient situation; therefore |
|
1647 |
# we force restart of the loop |
|
1648 |
if (done or oneshot) and cumul_degraded and degr_retries > 0: |
|
1649 |
logging.info("Degraded disks found, %d retries left", degr_retries) |
|
1650 |
degr_retries -= 1 |
|
1651 |
time.sleep(1) |
|
1652 |
continue |
|
1653 |
|
|
1643 | 1654 |
if done or oneshot: |
1644 | 1655 |
break |
1645 | 1656 |
|
Also available in: Unified diff