unable to create alarm using aodh

Bug #1676897 reported by Akshay on 2017-03-28
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-aodhclient
Undecided
Unassigned

Bug Description

I have installed devstack on ubuntu 16.04 and aodh and trying to create alarm using aodh
Created mysql aodh db as well.

stack@enm:~/devstack$
stack@enm:~/devstack$ aodh
(aodh) alarm create --name test --type event --event-type compute
object of type 'NoneType' has no len() (HTTP 400) (Request-ID: req-93aebd4c-5295-490e-aba6-edd6905c125b)
Could not clean up: 'description'

with debug enable

(aodh) stack@enm:~/devstack$ aodh --debug alarm create --name asdf --type event --event-type blah
REQ: curl -g -i -X GET http://10.0.2.15:5000/v2.0 -H "Accept: application/json" -H "User-Agent: keystoneauth1/2.4.3 python-requests/2.9.1 CPython/2.7.12"
Starting new HTTP connection (1): 10.0.2.15
"GET /v2.0 HTTP/1.1" 200 335
RESP: [200] Content-Length: 335 Vary: X-Auth-Token Keep-Alive: timeout=5, max=100 Server: Apache/2.4.18 (Ubuntu) Connection: Keep-Alive Date: Tue, 28 Mar 2017 13:58:33 GMT Content-Type: application/json x-openstack-request-id: req-4212cc88-31c8-4443-b923-d600a732c417
RESP BODY: {"version": {"status": "stable", "updated": "2014-04-17T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json"}], "id": "v2.0", "links": [{"href": "http://10.0.2.15:5000/v2.0/", "rel": "self"}, {"href": "http://docs.openstack.org/", "type": "text/html", "rel": "describedby"}]}}

Making authentication request to http://10.0.2.15:5000/v2.0/tokens
"POST /v2.0/tokens HTTP/1.1" 400 101
Request returned failure status: 400
object of type 'NoneType' has no len() (HTTP 400) (Request-ID: req-d9760dbc-8788-40c1-8e9e-af7e40325ebd)
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 346, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/cliff/display.py", line 79, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/lib/python2.7/dist-packages/aodhclient/v2/alarm_cli.py", line 303, in take_action
    alarm=self._alarm_from_args(parsed_args))
  File "/usr/lib/python2.7/dist-packages/aodhclient/v2/alarm.py", line 52, in create
    data=jsonutils.dumps(alarm)).json()
  File "/usr/lib/python2.7/dist-packages/aodhclient/v2/base.py", line 41, in _post
    return self.client.api.post(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/adapter.py", line 179, in post
    return self.request(url, 'POST', **kwargs)
  File "/usr/lib/python2.7/dist-packages/aodhclient/client.py", line 35, in request
    **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/adapter.py", line 98, in request
    return self.session.request(url, method, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/positional/__init__.py", line 94, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/session.py", line 387, in request
    auth_headers = self.get_auth_headers(auth)
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/session.py", line 647, in get_auth_headers
    return auth.get_headers(self, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/plugin.py", line 84, in get_headers
    token = self.get_token(session)
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/identity/base.py", line 90, in get_token
    return self.get_access(session).auth_token
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/identity/base.py", line 136, in get_access
    self.auth_ref = self.get_auth_ref(session)
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/identity/generic/base.py", line 181, in get_auth_ref
    return self._plugin.get_auth_ref(session, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/identity/v2.py", line 65, in get_auth_ref
    authenticated=False, log=False)
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/session.py", line 595, in post
    return self.request(url, 'POST', **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/positional/__init__.py", line 94, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/session.py", line 484, in request
    raise exceptions.from_response(resp, method, url)
BadRequest: object of type 'NoneType' has no len() (HTTP 400) (Request-ID: req-d9760dbc-8788-40c1-8e9e-af7e40325ebd)
'description'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 353, in run_subcommand
    self.clean_up(cmd, result, err)
  File "/usr/lib/python2.7/dist-packages/aodhclient/shell.py", line 139, in clean_up
    print(error['description'])
KeyError: 'description'
Traceback (most recent call last):
  File "/usr/bin/aodh", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/dist-packages/aodhclient/shell.py", line 186, in main
    return AodhShell().run(args)
  File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 226, in run
    result = self.run_subcommand(remainder)
  File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 353, in run_subcommand
    self.clean_up(cmd, result, err)
  File "/usr/lib/python2.7/dist-packages/aodhclient/shell.py", line 139, in clean_up
    print(error['description'])
KeyError: 'description'

Julien Danjou (jdanjou) on 2017-03-28
affects: aodh → python-aodhclient
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers