fuel-qa: cannot deploy a node with plugin-role

Bug #1543962 reported by Swann Croiset
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Swann Croiset
8.0.x
Fix Released
High
Swann Croiset

Bug Description

The fuel-qa didn't evolve to fully support new plugin api.

when using self.fuel_web.update_plugin_settings() to update plugin settings, the plugin is never enabled.
This should works with plugin which don't declare a role but for plugin-as-role, the plugin must be enabled to expose the new role.

see review for the code: https://review.openstack.org/#/c/275309/

./utils/jenkins/system_tests.sh -t test -w /home/osadmin/fuel-qa -k -V /home/osadmin/.virtualenvs/devops -i /home/osadmin/iso/fuel-8.0-529-2016-02-05_13-56-13.iso -o --group=deploy_lma_toolchain
...
[snip]
...
2016-02-09 17:50:36,179 - INFO fuel_web_client.py:1114 -- Task finished. Took 195.634392977 seconds.
 status ready
 name dump
 cluster None
 result {}
 progress 100
 message /api/dump/fuel-snapshot-2016-02-09_17-43-41.tar.xz
 id 1
 uuid 0c33db32-12f9-41d3-86bb-fd3ae6d0491a
2016-02-09 17:50:36,180 - DEBUG __init__.py:61 -- Done: task_wait with result: {u'status': u'ready', u'name': u'dump', u'cluster': None, u'result': {}, u'progress': 100, u'message': u'/api/d
ump/fuel-snapshot-2016-02-09_17-43-41.tar.xz', u'id': 1, u'uuid': u'0c33db32-12f9-41d3-86bb-fd3ae6d0491a'}
2016-02-09 17:50:36,180 - DEBUG __init__.py:55 -- Calling: get_admin_node_ip with args: ([<class 'fuelweb_test.models.environment.EnvironmentModel'>(0x7f67715b8590), ip:10.109.35.2],) {}
2016-02-09 17:50:36,189 - DEBUG __init__.py:61 -- Done: get_admin_node_ip with result: 10.109.35.2
2016-02-09 17:50:36,189 - INFO decorators.py:49 -- Saving logs to "/home/osadmin/logs/fail_error_deploy_lma_toolchain-fuel-snapshot-2016-02-09_17-43-41.tar.xz" file
2016-02-09 17:50:36,432 - DEBUG decorators.py:104 -- (<tests.plugins.plugin_lma_collector.test_plugin_lma_collector.TestLmaCollectorPlugin object at 0x7f67701c3150>,)
2016-02-09 17:52:22,869 - DEBUG __init__.py:55 -- Calling: get_admin_node_ip with args: ([<class 'fuelweb_test.models.environment.EnvironmentModel'>(0x7f67715b8590), ip:10.109.35.2],) {}
2016-02-09 17:52:23,249 - DEBUG __init__.py:61 -- Done: get_admin_node_ip with result: 10.109.35.2
2016-02-09 17:52:23,249 - INFO decorators.py:307 -- <<<<<****************************************************************************************************>>>>>
2016-02-09 17:52:23,249 - INFO decorators.py:308 -- Failed in method 'deploy_lma_toolchain'. Make snapshot: error_deploy_lma_toolchain
2016-02-09 17:52:23,249 - INFO decorators.py:318 -- You could revert and ssh to master node: [source /home/osadmin/.virtualenvs/devops/bin/activate; dos.py revert-resume lma_8.rc1 error_depl
oy_lma_toolchain && ssh root@10.109.35.2]
2016-02-09 17:52:23,249 - INFO decorators.py:320 -- <<<<<****************************************************************************************************>>>>>
2016-02-09 17:52:23,275 - ERROR decorators.py:112 -- Traceback (most recent call last):
  File "/home/osadmin/fuel-qa/fuelweb_test/helpers/decorators.py", line 83, in wrapper
    result = func(*args, **kwargs)
  File "/home/osadmin/fuel-qa/fuelweb_test/tests/plugins/plugin_lma_collector/test_plugin_lma_collector.py", line 192, in deploy_lma_toolchain
    self.fuel_web.deploy_cluster_wait(cluster_id)
  File "/home/osadmin/fuel-qa/fuelweb_test/helpers/decorators.py", line 441, in wrapper
    result = func(*args, **kwargs)
  File "/home/osadmin/fuel-qa/fuelweb_test/helpers/decorators.py", line 426, in wrapper
    result = func(*args, **kwargs)
  File "/home/osadmin/fuel-qa/fuelweb_test/helpers/decorators.py", line 477, in wrapper
    return func(*args, **kwargs)
  File "/home/osadmin/fuel-qa/fuelweb_test/helpers/decorators.py", line 487, in wrapper
    result = func(*args, **kwargs)
  File "/home/osadmin/fuel-qa/fuelweb_test/helpers/decorators.py", line 368, in wrapper
    return func(*args, **kwargs)
  File "/home/osadmin/fuel-qa/fuelweb_test/models/fuel_web_client.py", line 735, in deploy_cluster_wait
    task = self.deploy_cluster(cluster_id)
  File "/home/osadmin/fuel-qa/fuelweb_test/__init__.py", line 59, in wrapped
    result = func(*args, **kwargs)
  File "/home/osadmin/fuel-qa/fuelweb_test/models/fuel_web_client.py", line 787, in deploy_cluster
    return self.client.deploy_cluster_changes(cluster_id)
  File "/home/osadmin/fuel-qa/fuelweb_test/__init__.py", line 59, in wrapped
    result = func(*args, **kwargs)
  File "/home/osadmin/fuel-qa/fuelweb_test/helpers/decorators.py", line 135, in wrapped
    response = func(*args, **kwargs)
  File "/home/osadmin/fuel-qa/fuelweb_test/models/nailgun_client.py", line 154, in deploy_cluster_changes
    "/api/clusters/{}/changes/".format(cluster_id)
  File "/home/osadmin/fuel-qa/fuelweb_test/helpers/http.py", line 86, in put
    return self._open(req)
  File "/home/osadmin/fuel-qa/fuelweb_test/helpers/http.py", line 95, in _open
    return self._get_response(req)
  File "/home/osadmin/fuel-qa/fuelweb_test/helpers/http.py", line 119, in _get_response
    return self.opener.open(req)
  File "/usr/lib/python2.7/urllib2.py", line 410, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 448, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
2016-02-09 17:52:23,276 - INFO decorators.py:113 -- <<<<<****************************************************************************************************>>>>>
ERROR

======================================================================
ERROR: Deploy cluster in HA mode with the LMA toolchain
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/osadmin/.virtualenvs/devops/local/lib/python2.7/site-packages/proboscis/case.py", line 296, in testng_method_mistake_capture_func
    compatability.capture_type_error(s_func)
  File "/home/osadmin/.virtualenvs/devops/local/lib/python2.7/site-packages/proboscis/compatability/exceptions_2_6.py", line 27, in capture_type_error
    func()
  File "/home/osadmin/.virtualenvs/devops/local/lib/python2.7/site-packages/proboscis/case.py", line 350, in func

  File "/home/osadmin/.virtualenvs/devops/local/lib/python2.7/site-packages/proboscis/case.py", line 350, in func
    func(test_case.state.get_state())
  File "/home/osadmin/fuel-qa/fuelweb_test/helpers/decorators.py", line 83, in wrapper
    result = func(*args, **kwargs)
  File "/home/osadmin/fuel-qa/fuelweb_test/tests/plugins/plugin_lma_collector/test_plugin_lma_collector.py", line 192, in deploy_lma_toolchain
    self.fuel_web.deploy_cluster_wait(cluster_id)
  File "/home/osadmin/fuel-qa/fuelweb_test/helpers/decorators.py", line 441, in wrapper
    result = func(*args, **kwargs)
  File "/home/osadmin/fuel-qa/fuelweb_test/helpers/decorators.py", line 426, in wrapper
    result = func(*args, **kwargs)
  File "/home/osadmin/fuel-qa/fuelweb_test/helpers/decorators.py", line 477, in wrapper
    return func(*args, **kwargs)
  File "/home/osadmin/fuel-qa/fuelweb_test/helpers/decorators.py", line 487, in wrapper
    result = func(*args, **kwargs)
  File "/home/osadmin/fuel-qa/fuelweb_test/helpers/decorators.py", line 368, in wrapper
    return func(*args, **kwargs)
  File "/home/osadmin/fuel-qa/fuelweb_test/models/fuel_web_client.py", line 735, in deploy_cluster_wait
    task = self.deploy_cluster(cluster_id)
  File "/home/osadmin/fuel-qa/fuelweb_test/__init__.py", line 59, in wrapped
    result = func(*args, **kwargs)
  File "/home/osadmin/fuel-qa/fuelweb_test/models/fuel_web_client.py", line 787, in deploy_cluster
    return self.client.deploy_cluster_changes(cluster_id)
  File "/home/osadmin/fuel-qa/fuelweb_test/__init__.py", line 59, in wrapped
    result = func(*args, **kwargs)
  File "/home/osadmin/fuel-qa/fuelweb_test/helpers/decorators.py", line 135, in wrapped
    response = func(*args, **kwargs)
  File "/home/osadmin/fuel-qa/fuelweb_test/models/nailgun_client.py", line 154, in deploy_cluster_changes
    "/api/clusters/{}/changes/".format(cluster_id)
  File "/home/osadmin/fuel-qa/fuelweb_test/helpers/http.py", line 86, in put
    return self._open(req)
  File "/home/osadmin/fuel-qa/fuelweb_test/helpers/http.py", line 95, in _open
    return self._get_response(req)
  File "/home/osadmin/fuel-qa/fuelweb_test/helpers/http.py", line 119, in _get_response
    return self.opener.open(req)
  File "/usr/lib/python2.7/urllib2.py", line 410, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 448, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 500: Internal Server Error

Tags: area-qa
Changed in fuel:
assignee: nobody → Swann Croiset (swann-w)
status: New → In Progress
Changed in fuel:
milestone: none → 9.0
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-qa (master)

Reviewed: https://review.openstack.org/277471
Committed: https://git.openstack.org/cgit/openstack/fuel-qa/commit/?id=06fd4c348acf7312b34d9dbc4557d1d87c13c999
Submitter: Jenkins
Branch: master

commit 06fd4c348acf7312b34d9dbc4557d1d87c13c999
Author: Swann Croiset <email address hidden>
Date: Mon Feb 8 17:02:12 2016 +0100

    Enable plugins when setting attributes

    without this patch plugin are not enabled and Nailgun fails
    with error 500 when trying to assign node with a role defined by the
    plugin.

    Fixes-bug: #1543962

    Change-Id: Ie22ff85c3eb65a0524d594ccfb2116ea87bd082f

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-qa (stable/8.0)

Fix proposed to branch: stable/8.0
Review: https://review.openstack.org/278297

Revision history for this message
Swann Croiset (swann-w) wrote :

we also need to backport the patch to stable/0.8

https://review.openstack.org/#/c/278297/

tags: added: area-qa non-release
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-qa (stable/8.0)

Reviewed: https://review.openstack.org/278297
Committed: https://git.openstack.org/cgit/openstack/fuel-qa/commit/?id=4013e663e9e2a0c6dbc1c788f5309c33c76d8961
Submitter: Jenkins
Branch: stable/8.0

commit 4013e663e9e2a0c6dbc1c788f5309c33c76d8961
Author: Swann Croiset <email address hidden>
Date: Mon Feb 8 17:02:12 2016 +0100

    Enable plugins when setting attributes

    without this patch plugin are not enabled and Nailgun fails
    with error 500 when trying to assign node with a role defined by the
    plugin.

    Fixes-bug: #1543962

    Change-Id: Ie22ff85c3eb65a0524d594ccfb2116ea87bd082f
    (cherry picked from commit 06fd4c348acf7312b34d9dbc4557d1d87c13c999)

tags: removed: non-release
Revision history for this message
Nastya Urlapova (aurlapova) wrote :

I think that LMA tests work, so it was moved to "Fix Released".

Changed in fuel:
status: Fix Committed → Won't Fix
status: Won't Fix → Fix Released
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.