Magnum UI in mitaka fails to initiate magnumclient, throwing "TypeError: __init__() got an unexpected keyword argument 'cacert'"

Bug #1617011 reported by Imran Hayder
42
This bug affects 10 people
Affects Status Importance Assigned to Milestone
Magnum UI
Fix Released
Critical
Imran Hayder

Bug Description

The magnumUI package in mitaka, is throwing following errors in horizon error logs:

[Thu Aug 25 16:59:19.266392 2016] [wsgi:error] [pid 63425:tid 139952756119296] error invoking apiclient
[Thu Aug 25 16:59:19.266413 2016] [wsgi:error] [pid 63425:tid 139952756119296] Traceback (most recent call last):
[Thu Aug 25 16:59:19.266416 2016] [wsgi:error] [pid 63425:tid 139952756119296] File "/srv/www/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/api/rest/utils.py", line 126, in _wrapped
[Thu Aug 25 16:59:19.266418 2016] [wsgi:error] [pid 63425:tid 139952756119296] data = function(self, request, *args, **kw)
[Thu Aug 25 16:59:19.266420 2016] [wsgi:error] [pid 63425:tid 139952756119296] File "/usr/lib/python2.7/site-packages/magnum_ui/api/rest/magnum.py", line 56, in get
[Thu Aug 25 16:59:19.266422 2016] [wsgi:error] [pid 63425:tid 139952756119296] result = magnum.baymodel_list(request)
[Thu Aug 25 16:59:19.266424 2016] [wsgi:error] [pid 63425:tid 139952756119296] File "/usr/lib/python2.7/site-packages/magnum_ui/api/magnum.py", line 88, in baymodel_list
[Thu Aug 25 16:59:19.266426 2016] [wsgi:error] [pid 63425:tid 139952756119296] return magnumclient(request).baymodels.list(limit, marker, sort_key,
[Thu Aug 25 16:59:19.266427 2016] [wsgi:error] [pid 63425:tid 139952756119296] File "/usr/lib/python2.7/site-packages/horizon/utils/memoized.py", line 90, in wrapped
[Thu Aug 25 16:59:19.266436 2016] [wsgi:error] [pid 63425:tid 139952756119296] value = cache[key] = func(*args, **kwargs)
[Thu Aug 25 16:59:19.266438 2016] [wsgi:error] [pid 63425:tid 139952756119296] File "/usr/lib/python2.7/site-packages/magnum_ui/api/magnum.py", line 60, in magnumclient
[Thu Aug 25 16:59:19.266440 2016] [wsgi:error] [pid 63425:tid 139952756119296] cacert=cacert)
[Thu Aug 25 16:59:19.266441 2016] [wsgi:error] [pid 63425:tid 139952756119296] TypeError: __init__() got an unexpected keyword argument 'cacert'

this is because of recent fix to add SSL support however magnumclient in mitaka version doesnt support passing "cacert" it just allows setting "insecure"
https://github.com/openstack/magnum-ui/commit/255eec6bede72d3c7c21cf6575cf3ec9a6502324#diff-bce3c281bf297c36f1604ca31aadfcedR60

as a consequence of this patch we see above error.

however checking source code magnumclient client.py , its confirmed there is no cacert allowed
https://github.com/openstack/python-magnumclient/blob/stable/mitaka/magnumclient/v1/client.py#L31

PROPOSED FIX: remove the cacert as its a feature not available in magnumclient of mitaka version

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to magnum-ui (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/360711

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to magnum-ui (stable/mitaka)

Reviewed: https://review.openstack.org/360711
Committed: https://git.openstack.org/cgit/openstack/magnum-ui/commit/?id=46f58e5cdb02fddba72a5703ef7806d3830f3e87
Submitter: Jenkins
Branch: stable/mitaka

commit 46f58e5cdb02fddba72a5703ef7806d3830f3e87
Author: imran malik <email address hidden>
Date: Thu Aug 25 10:55:02 2016 -0700

    Remove invalid cacert option for magnumclient

    The magnumclient of mitaka doesnt allow passing
    cacert argument while instantiating the client class.
    As a result, TypeError is thrown for cacert.
    This patch fixes it for mitaka magnum-ui since
    the magnumclient in mitaka has no support of passing
    cacert.

    Closes-Bug: 1617011

    or passing kwargs to instance the client class.

    Change-Id: I2eb24cad3375ce2abd09782b6c25f87c24ad752a

tags: added: in-stable-mitaka
Shu Muto (shu-mutou)
Changed in magnum-ui:
importance: Undecided → Critical
assignee: nobody → Imran Hayder (hayderimran7)
status: New → Fix Committed
Shu Muto (shu-mutou)
Changed in magnum-ui:
milestone: none → 1.0.2
Shu Muto (shu-mutou)
Changed in magnum-ui:
status: Fix Committed → 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.