Perfomance tests fail because of deploying unprovisioned nodes

Bug #1447949 reported by Sebastian Kalinowski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Sebastian Kalinowski

Bug Description

After patch https://review.openstack.org/#/c/174385/ performance tests are failing: https://ci.fuel-infra.org/job/nailgun_performance_tests/3/console

They should not try to deploy unprovisioned nodes.

______________ ClusterOperationsLoadTest.test_put_stop_deployment ______________

args = (<nailgun.test.performance.unit.test_cluster_operations.ClusterOperationsLoadTest testMethod=test_put_stop_deployment>,)
keywargs = {}, extra_args = []
entered_patchers = [<mock._patch object at 0x6056610>, <mock._patch object at 0x6056710>, <mock._patch object at 0x6056790>, <mock._patch object at 0x6056850>]
exc_info = (<class 'webtest.app.AppError'>, AppError(u'Bad response: 400 Bad Request (not 200 OK or 3xx redirect for http:..., 699, 700] are not provisioned yet for cluster with id 6.", "errors": []}\'',), <traceback object at 0x1bc9b9e0>)
patching = <mock._patch object at 0x6056610>
arg = <functools.partial object at 0x5c60c58>

    @wraps(func)
    def patched(*args, **keywargs):
        # don't use a with here (backwards compatability with Python 2.4)
        extra_args = []
        entered_patchers = []

        # can't use try...except...finally because of Python 2.4
        # compatibility
        exc_info = tuple()
        try:
            try:
                for patching in patched.patchings:
                    arg = patching.__enter__()
                    entered_patchers.append(patching)
                    if patching.attribute_name is not None:
                        keywargs.update(arg)
                    elif patching.new is DEFAULT:
                        extra_args.append(arg)

                args += tuple(extra_args)
> return func(*args, **keywargs)

.tox/py26/lib/python2.6/site-packages/mock.py:1190:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
nailgun/test/performance/base.py:320: in wrapper
    f(*args, **kwargs)
nailgun/test/performance/unit/test_cluster_operations.py:235: in test_put_stop_deployment
    handler_kwargs={'cluster_id': self.cluster['id']}
nailgun/test/performance/base.py:155: in put_handler
    headers=self.default_headers
.tox/py26/lib/python2.6/site-packages/webtest/app.py:277: in put
    content_type=content_type,
.tox/py26/lib/python2.6/site-packages/webtest/app.py:626: in _gen_request
    expect_errors=expect_errors)
.tox/py26/lib/python2.6/site-packages/webtest/app.py:521: in do_request
    self._check_status(status, res)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <webtest.app.TestApp object at 0x18623a50>, status = None
res = <400 Bad Request text/html body='{"message... []}'/634>

    def _check_status(self, status, res):
        if status == '*':
            return
        res_status = res.status
        if (isinstance(status, string_types) and '*' in status):
            if re.match(fnmatch.translate(status), res_status, re.I):
                return
        if isinstance(status, (list, tuple)):
            if res.status_int not in status:
                raise AppError(
                    "Bad response: %s (not one of %s for %s)\n%s",
                    res_status, ', '.join(map(str, status)),
                    res.request.url, res)
            return
        if status is None:
            if res.status_int >= 200 and res.status_int < 400:
                return
            raise AppError(
                "Bad response: %s (not 200 OK or 3xx redirect for %s)\n%s",
                res_status, res.request.url,
> res)
E AppError: Bad response: 400 Bad Request (not 200 OK or 3xx redirect for http://localhost/api/clusters/6/deploy/)
E '{"message": "Deployment operation cannot be started as nodes with uids [601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700] are not provisioned yet for cluster with id 6.", "errors": []}'

Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Sebastian Kalinowski (prmtl)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (master)

Fix proposed to branch: master
Review: https://review.openstack.org/177150

Changed in fuel:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (master)

Reviewed: https://review.openstack.org/177150
Committed: https://git.openstack.org/cgit/stackforge/fuel-web/commit/?id=15ca7b96e6360dd0bf217c2060ea5439eb92f1be
Submitter: Jenkins
Branch: master

commit 15ca7b96e6360dd0bf217c2060ea5439eb92f1be
Author: Sebastian Kalinowski <email address hidden>
Date: Fri Apr 24 12:06:06 2015 +0200

    Fix deployment of unprovisioned node in perf tests

    After merging I7405ba54d90f6bc986befb5d035b213e4c0f6a73 a bug appear
    in performance tests - in one of the tests there was a try to run deploy
    on nodes that was "unprovisioned". This fix simulates "provisioned" nodes.

    Change-Id: If178ccc9597a2b159082d430f5744aa1220ab5e5
    Closes-Bug: #1447949

Changed in fuel:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.