openstack kilo magnum client 500 error

Bug #1518987 reported by David Botelho
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magnum
New
Undecided
Unassigned

Bug Description

Hello,

We have an Openstack Kilo on Ubuntu 14.04.1 environment running and have installed the stable/kilo magnum branch on our controller node. After the installation completes, we are trying to run a validation test with magnum client but are getting a HTTP 500 error. There are no errors that are sticking out for us and are looking for some guidance. Here is the error we get when running a magnum service-list command.

Traceback (most recent call last):
  File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run
    self.result = application(self.environ, self.start_response)
  File "/root/magnum/magnum/api/middleware/auth_token.py", line 58, in __call__
    return super(AuthTokenMiddleware, self).__call__(env, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/response.py", line 1021, in __call__
    start_response(self.status, headerlist)
  File "/usr/lib/python2.7/wsgiref/handlers.py", line 180, in start_response
    assert type(val) is StringType,"Header values must be strings"
AssertionError: Header values must be strings
10.237.0.122 - - [23/Nov/2015 09:14:31] "GET /v1/mservices HTTP/1.1" 500 59

root@wdsosdoma1:/etc/magnum# python --version
Python 2.7.6

root@wdsosdoma1:/etc/magnum# pip show magnum
---
Metadata-Version: 1.1
Name: magnum
Version: 2015.1.1.dev11
Summary: Container Management project for OpenStack
Home-page: http://www.openstack.org/
Author: OpenStack
Author-email: <email address hidden>
License: UNKNOWN
Location: /root/magnum
Requires: pbr, Babel, requests, oslo.concurrency, oslo.config, oslo.context, oslo.db, oslo.messaging, oslo.serialization, oslo.utils, oslo.versionedobjects, paramiko, pecan, keystonemiddleware, oslo.i18n, python-heatclient, python-keystoneclient, python-glanceclient, python-kubernetes, six, SQLAlchemy, taskflow, WSME, docker-py, jsonpatch
Entry-points:
  [console_scripts]
  magnum-api = magnum.cmd.api:main
  magnum-conductor = magnum.cmd.conductor:main
  magnum-db-manage = magnum.cmd.db_manage:main
  magnum-template-manage = magnum.cmd.template_manage:main
  [magnum.template_definitions]
  magnum_vm_atomic_k8s = magnum.conductor.template_definition:AtomicK8sTemplateDefinition
  magnum_vm_atomic_swarm = magnum.conductor.template_definition:AtomicSwarmTemplateDefinition
  magnum_vm_coreos_k8s = magnum.conductor.template_definition:CoreOSK8sTemplateDefinition
  [oslo.config.opts]
  magnum = magnum.opts:list_opts

Any ideas of why we're receiving this error? Let me know what you need.

Revision history for this message
David Botelho (david-botelho) wrote :

We think we figured out our issue. We rolled back our magnumclient to the stable/kilo release, dropped /recreated the database and now we can got past the 500 error. The only issue we are seeing now ... or not seeing is our conductor in the service-list.

root@wdsosdoma1:~# magnum service-list
+------+------+----------+
| uuid | name | bay_uuid |
+------+------+----------+
+------+------+----------+

Dave

Revision history for this message
Jacob (jacob-fraser) wrote :

Jacob here.. I work with Dave.. hoping that this community can help us out.

it seems the Conductor is not registering itself. all the documentation out there has very different results comming back with a magnum service-list.. like columns
 | id | host | binary | state |
not sure whats going on.. perhaps our database table did not create correctly..?

When I try to run a baymodel-create..

magnum --debug baymodel-create --name k8sbaymodel --image-id 7ed5d04d-f983-4ab3-b960-119cb1019014 --keypair-id testkey --external-network-id 620fc7dd-b620-47c3-b1a6-52eb7d74515d --dns-nameserver 8.8.8.8 --flavor-id m1.small --docker-volume-size 5 --coe kubernetes

I am getting a BadStatusLIne.. which I assume means that the Conductor is not reporting its status..

DEBUG (shell:577) ''
Traceback (most recent call last):
  File "/root/python-magnumclient/magnumclient/shell.py", line 574, in main
    OpenStackMagnumShell().main(map(encodeutils.safe_decode, sys.argv[1:]))
  File "/root/python-magnumclient/magnumclient/shell.py", line 519, in main
    args.func(self.cs, args)
  File "/root/python-magnumclient/magnumclient/v1/shell.py", line 202, in do_baymodel_create
    baymodel = cs.baymodels.create(**opts)
  File "/root/python-magnumclient/magnumclient/v1/baymodels.py", line 94, in create
    return self._create(self._path(), new)
  File "/root/python-magnumclient/magnumclient/common/base.py", line 49, in _create
    resp, body = self.api.json_request('POST', url, body=body)
  File "/root/python-magnumclient/magnumclient/common/httpclient.py", line 196, in json_request
    resp, body_iter = self._http_request(url, method, **kwargs)
  File "/root/python-magnumclient/magnumclient/common/httpclient.py", line 152, in _http_request
    resp = conn.getresponse()
  File "/usr/lib/python2.7/httplib.py", line 1051, in getresponse
    response.begin()
  File "/usr/lib/python2.7/httplib.py", line 415, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python2.7/httplib.py", line 379, in _read_status
    raise BadStatusLine(line)
BadStatusLine: ''
ERROR: ''

Adrian Otto (aotto)
Changed in magnum:
milestone: none → mitaka-1
Revision history for this message
Jacob (jacob-fraser) wrote :

Does Magnum require barbican to be install and running? It seems the default is this.. cert_manager_type = barbican for cert_manager. I tried to make this cert_manager_type = local but I then got errors about some common module not found.

reason I am asking is when we create a bay after we create a baymodel successfully we are getting:
2015-11-24 12:13:17.942 97662 ERROR oslo_messaging.rpc.dispatcher [req-8a22afcb-4411-4351-9768-6eb174d502d4 admin admin - - -] Exception during message handling: unexpected keystone client error occurred: publicURL endpoint for key-manager service not found

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.