Skip to content
Commit 27ff42e2 authored by Michael Chapman's avatar Michael Chapman Committed by Juan Quintela
Browse files

migration: avoid divide by zero in xbzrle cache miss rate



This bug manifested itself as a VM that could not be resumed by libvirt
following a migration:

  # virsh resume example
  error: Failed to resume domain example
  error: internal error: cannot parse json {"return":
    {"xbzrle-cache":
      {..., "cache-miss-rate": -nan, ...},
      ...
    }
  }: lexical error: malformed number, a digit is required after the minus sign.

This patch also ensures xbzrle_cache_miss_prev and iterations_prev are
cleared at the start of the migration.

Signed-off-by: default avatarMichael Chapman <mike@very.puzzling.org>
Reviewed-by: default avatarAmit Shah <amit.shah@redhat.com>
Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
parent 50e9a629
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment