LGTM, thanks

On Tue, Apr 8, 2014 at 10:18 AM, Thomas Thrainer <[email protected]>wrote:

> If a user manually pauses the DRBD sync, Ganeti started to poll the node
> daemon without any waiting between request. This caused heavy load on
> the node. This patch fixes this by waiting at least 5 secondes between
> two polls if no sensible estimate for the remaining sync time could be
> made.
>
> Fixes issue 792
>
> Signed-off-by: Thomas Thrainer <[email protected]>
> ---
>  lib/cmdlib/instance_storage.py | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/lib/cmdlib/instance_storage.py
> b/lib/cmdlib/instance_storage.py
> index 94e2d6d..2fed266 100644
> --- a/lib/cmdlib/instance_storage.py
> +++ b/lib/cmdlib/instance_storage.py
> @@ -1181,6 +1181,7 @@ def WaitForSync(lu, instance, disks=None,
> oneshot=False):
>            max_time = mstat.estimated_time
>          else:
>            rem_time = "no time estimate"
> +          max_time = 5 # sleep at least a bit between retries
>          lu.LogInfo("- device %s: %5.2f%% done, %s",
>                     disks[i].iv_name, mstat.sync_percent, rem_time)
>
> --
> 1.9.1.423.g4596e3a
>
>

Reply via email to