Nir Soffer has uploaded a new change for review.
Change subject: build: Use make for generating the test certificates
......................................................................
build: Use make for generating the test certificates
It is easier to use make for creating files during the build instead of
reimplementing it in a shell script.
Change-Id: I543e306deff394fd61b72152b758fc4572b4da86
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M tests/Makefile.am
M tests/run_tests_local.sh.in
2 files changed, 1 insertion(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/26/48226/1
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 61877de..eab7dc7 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -216,7 +216,7 @@
all-local: \
$(nodist_vdsmtests_PYTHON)
-server.crt:
+server.crt server.csr server.key other.crt other.csr other.key:
./makecert.sh
# crossImportsTests.py has to be run separate due to different tests which
diff --git a/tests/run_tests_local.sh.in b/tests/run_tests_local.sh.in
index d19f22c..faf4412 100644
--- a/tests/run_tests_local.sh.in
+++ b/tests/run_tests_local.sh.in
@@ -3,8 +3,4 @@
PYTHON_EXE="@PYTHON@"
fi
-if [ ! -f @top_srcdir@/tests/server.crt ] || [ ! -f @top_srcdir@/tests/server.csr ] || [ ! -f @top_srcdir@/tests/server.key ] || [ ! -f @top_srcdir@/tests/other.crt ] || [ ! -f @top_srcdir@/tests/other.csr ] || [ ! -f @top_srcdir@/tests/other.key ]; then
- @top_srcdir@/tests/makecert.sh
-fi
-
PYTHONDONTWRITEBYTECODE=1 LC_ALL=C PYTHONPATH="@top_srcdir@/lib:@top_srcdir@/vdsm:@top_srcdir@/client:@top_srcdir@/vdsm_api:$PYTHONPATH" "$PYTHON_EXE" @top_srcdir@/tests/testrunner.py --local-modules $@
--
To view, visit https://gerrit.ovirt.org/48226
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I543e306deff394fd61b72152b758fc4572b4da86
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Francesco Romani has uploaded a new change for review.
Change subject: periodic: more cautious return to fast path
......................................................................
periodic: more cautious return to fast path
VDSM samples the VM using the libvirt's bulk stats, trying
to use the most efficient API (most of work is done in the C layer,
and the round trips are minimized). The drawback of this API is that
if one VM gets stuck, we lose stats for all of them.
To handle this case, vm stats use a two-path approach.
- in the fast path (default), we assume everything is fine, and we
just invoke the bulk API, collecting the result
- in the slow path, we assess the responsiveness of each domain,
putting the unresponsive ones into a blacklist (a ExpiringCache),
and sampling only the domain which seem good.
We don't have any other mean to move from the fast path to the slow
path than wait for a timeout, so that's pretty much all about it.
However, we go back in the fast path as soon as we can, when we
don't see any more timeouts (good) and when the blacklist is expired.
And eventually here comes the trouble. When the blacklist expires,
we assume eveything is fine again, but the actual check is done by
the next fast path cycle.
This works, but can leak a thread.
There are circumnstances on which we must take the risk of leaking
one thread, but in this case we can do another cautionary slow path
cycle sampling all domains to see if they seems actually right, and
only after that jump back in the fast path.
Please note that this is approach has still some amount of risk:
maybe a domain gets stuck between the last succesfull slow cycle
and the new fast cycle.
But we don't have any protection for this cases. Adding a cautionary
extra slow path cycles gives us all the protection we can possibly
get.
The drawback of this patch is that the slow path is more consuming,
both cpu-wise and memory-wise, so if things are actually recovered
we are a bit less efficient.
However, this seems better than leak another thread when we can avoid
that.
Change-Id: I40dda0a308d6be6b2c8b8217a26ca5e7e9717546
Backport-To: 3.6
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M vdsm/virt/sampling.py
1 file changed, 10 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/90/48190/1
diff --git a/vdsm/virt/sampling.py b/vdsm/virt/sampling.py
index d4ebd3f..a697dd0 100644
--- a/vdsm/virt/sampling.py
+++ b/vdsm/virt/sampling.py
@@ -489,15 +489,22 @@
self._skip_doms = ExpiringCache(ttl)
self._sampling = threading.Semaphore() # used as glorified counter
self._log = logging.getLogger("virt.sampling.VMBulkSampler")
+ self._on_fast_path = True
def __call__(self):
timestamp = self._stats_cache.clock()
+ # we need to update our state variable here, not after the call,
+ # because if the call get stuck, the update may be stale and harmful
+ prev_on_fast_path = self._on_fast_path
# we are deep in the hot path. bool(ExpiringCache)
# *is* costly so we should avoid it if we can.
- fast_path = (
- self._sampling.acquire(blocking=False) and not self._skip_doms)
+ on_fast_path = (
+ self._sampling.acquire(blocking=False) and
+ not self._skip_doms
+ )
+ self._on_fast_path = on_fast_path
try:
- if fast_path:
+ if on_fast_path and prev_on_fast_path:
# This is expected to be the common case.
# If everything's ok, we can skip all the costly checks.
bulk_stats = self._conn.getAllDomainStats(self._stats_flags)
--
To view, visit https://gerrit.ovirt.org/48190
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I40dda0a308d6be6b2c8b8217a26ca5e7e9717546
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
Tomas Jelinek has posted comments on this change.
Change subject: migration: added support for convergance schedule
......................................................................
Patch Set 4:
(1 comment)
https://gerrit.ovirt.org/#/c/46940/4/vdsm/virt/migration.py
File vdsm/virt/migration.py:
Line 594: self._vm.log.debug('stopping migration monitor thread')
Line 595: self._stop.set()
Line 596:
Line 597: def _next_action(self, stalling):
Line 598: head, tail = self._convSchedule[0], self._convSchedule[1:]
> Right, I overlooked the code. Then maybe something like
done
Line 599: self._vm.log.debug('Stalling for %d seconds, '
Line 600: 'trying to make next action: '
Line 601: '%s, tail: %s', stalling, head, tail)
Line 602: if head.stallingLimit < stalling:
--
To view, visit https://gerrit.ovirt.org/46940
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I989cff12d08ef1cab36bd10df7daaa999a8dac14
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Tomas Jelinek <tjelinek(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-HasComments: Yes
automation(a)ovirt.org has posted comments on this change.
Change subject: migration: Added support for setting the convergenceSchedule
......................................................................
Patch Set 5:
* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
--
To view, visit https://gerrit.ovirt.org/47734
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I09818e6f3283880edb704cb77c1f716392b11abe
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Tomas Jelinek <tjelinek(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-HasComments: No
automation(a)ovirt.org has posted comments on this change.
Change subject: migration: added support for convergance schedule
......................................................................
Patch Set 6:
* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
--
To view, visit https://gerrit.ovirt.org/46940
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I989cff12d08ef1cab36bd10df7daaa999a8dac14
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Tomas Jelinek <tjelinek(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-HasComments: No
automation(a)ovirt.org has posted comments on this change.
Change subject: migration: Added support for setting the convergenceSchedule
......................................................................
Patch Set 4:
* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
--
To view, visit https://gerrit.ovirt.org/47734
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I09818e6f3283880edb704cb77c1f716392b11abe
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Tomas Jelinek <tjelinek(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-HasComments: No
automation(a)ovirt.org has posted comments on this change.
Change subject: migration: added support for convergance schedule
......................................................................
Patch Set 5:
* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
--
To view, visit https://gerrit.ovirt.org/46940
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I989cff12d08ef1cab36bd10df7daaa999a8dac14
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Tomas Jelinek <tjelinek(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-HasComments: No