Francesco Romani has uploaded a new change for review. Change subject: virt: avoid spam logs with periodic false negative ......................................................................
virt: avoid spam logs with periodic false negative Consolidate the periodic.Operation.required checks in a VM helper function, and make it a bit more paranoid, adding check to ensure that Vm._dom is not None. If we get that far and Vm._dom is None, proably something strange already happened (and no chance to recover), so adding this check here skips some annoying log spam. Change-Id: I3f0f5a46bcb8ed1197fe389a0b2904fa6939659d Signed-off-by: Francesco Romani <[email protected]> --- M vdsm/virt/periodic.py M vdsm/virt/vm.py 2 files changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/59/41659/1 diff --git a/vdsm/virt/periodic.py b/vdsm/virt/periodic.py index f226424..efc1d4b 100644 --- a/vdsm/virt/periodic.py +++ b/vdsm/virt/periodic.py @@ -267,7 +267,7 @@ @property def required(self): # Avoid queries from storage during recovery process - return (not self._vm.isMigrating() and + return (self._vm.isDomainQueryable() and self._vm.isDisksStatsCollectionEnabled()) @property @@ -326,7 +326,7 @@ @property def required(self): # Avoid queries from storage during recovery process - return (not self._vm.isMigrating() and + return (self._vm.isDomainQueryable() and self._vm.isDisksStatsCollectionEnabled()) @property diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index 0b6773b..894194c 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -2580,6 +2580,10 @@ return 'NOERR' + def isDomainQueryable(self): + # TODO: need better name + return (self._dom is not None and not self.isMigrating()) + def isDomainReadyForCommands(self): """ Returns True if the domain is reported to be in the safest condition -- To view, visit https://gerrit.ovirt.org/41659 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3f0f5a46bcb8ed1197fe389a0b2904fa6939659d Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
