Eli Mesika has posted comments on this change.

Change subject: core: Delay fencing until host storage lease renewal interval 
passed
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.ovirt.org/#/c/31087/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsNotRespondingTreatmentCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsNotRespondingTreatmentCommand.java:

Line 93: 
Line 94:             if (fencingPolicy.isSkipFencingIfSDActive()) {
Line 95:                 // host storage lease should be renewed each 
ConfigValues.HostStorageLeaseAliveInterval
Line 96:                 // so we need to be sure not to execute fencing before 
host is non responsive for longer time
Line 97:                 long interval = 
Config.<Integer>getValue(ConfigValues.HostStorageLeaseAliveCheckingInterval) * 
1000;
I would use :

TimeUnit.MILLISECONDS.toSeconds
Line 98:                 long difference = System.currentTimeMillis() - 
getParameters().getLastUpdate();
Line 99:                 if (difference < interval) {
Line 100:                     int sleepMs = (int)(interval - difference);
Line 101:                     log.debug(String.format("Sleeping %s ms before 
proceeding with fence execution", sleepMs));


-- 
To view, visit http://gerrit.ovirt.org/31087
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I45da28ae8a3007ed124d145a303f6201474a0f1c
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Peřina <mper...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Martin Peřina <mper...@redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to