From Tal Nisan <tnisan(a)redhat.com>:
Tal Nisan has submitted this change and it was merged.
Change subject: core: auto start vms with lease
core: auto start vms with lease
When detecting that a host is non-responsive we move the VMs that
are supposed to run on that host to Unknown status. This patch
adds to that a special treatment for VMs with leases: for each
VM with a lease, we will try to run the VM on another host.
The lease should prevent us from getting a split-brain. However,
we do not want to try to run the VM on each vds monitoring cycle
(which is by default every 3 seconds) so we define a config value
for setting the frequency of those attempts.
Note that when host becomes non-responsive we get network exceptions
from several places:
1. calls to refresh host capabilities.
2. calls to poll vms (on statistics iterations).
3. every command that interacts with vdsm.
As a result, VdsManager#restartVmsWithLeaseIfNeeded may be called
simultaneously from several threads and that may cause us to skip
a restart attempt. Thus, adding a lock to ensure mutually exclusive
execution of that method.
Signed-off-by: Arik Hadas <ahadas(a)redhat.com>
5 files changed, 57 insertions(+), 0 deletions(-)
Shahar Havivi: Looks good to me, approved
Jenkins CI: Passed CI tests
Arik Hadas: Verified
To view, visit https://gerrit.ovirt.org/69257
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-Owner: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Shahar Havivi <shavivi(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>