Unable to tune KeepAlive in wsgi template

Bug #1916038 reported by Andrey Pavlov
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Nova Cloud Controller Charm
Triaged
Wishlist
Unassigned

Bug Description

Sometimes during testing setup we can catch strange exception in client code

  File "/usr/local/lib/python3.6/site-packages/novaclient/base.py", line 192, in get
    new = self.manager.get(self.id)
  File "/usr/local/lib/python3.6/site-packages/novaclient/v2/servers.py", line 855, in get
    return self._get("/servers/%s" % base.getid(server), "server")
  File "/usr/local/lib/python3.6/site-packages/novaclient/base.py", line 353, in _get
    resp, body = self.api.client.get(url)
  File "/usr/local/lib/python3.6/site-packages/keystoneauth1/adapter.py", line 386, in get
    return self.request(url, 'GET', **kwargs)
  File "/usr/local/lib/python3.6/site-packages/novaclient/client.py", line 72, in request
    **kwargs)
  File "/usr/local/lib/python3.6/site-packages/keystoneauth1/adapter.py", line 545, in request
    resp = super(LegacyJsonAdapter, self).request(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/keystoneauth1/adapter.py", line 248, in request
    return self.session.request(url, method, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/keystoneauth1/session.py", line 913, in request
    resp = send(**kwargs)
  File "/usr/local/lib/python3.6/site-packages/keystoneauth1/session.py", line 1020, in _send_request
    raise exceptions.ConnectFailure(msg)
keystoneauth1.exceptions.connection.ConnectFailure: Unable to establish connection to http://252.1.200.72:8774/v2.1/servers/1c2fd218-52af-4615-b2ae-0e230e6024fb: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))

After some investigation we found that root cause is in KeepAlive options in wsgi template.
Here is the similar test case https://github.com/mikem23/keepalive-race

So we want to set "KeepAlive Off" in charm-nova-cloud-controller/templates/wsgi-api-os-compute.conf for this particular environment. (https://github.com/openstack/charm-nova-cloud-controller/blob/master/charmhelpers/contrib/openstack/templates/wsgi-openstack-api.conf)

Revision history for this message
Andrey Pavlov (apavlov-e) wrote :
description: updated
Revision history for this message
Chris MacNaughton (chris.macnaughton) wrote :

Marking this as Triaged as it's a new feature request and doesn't need to sit in New forever.

Changed in charm-nova-cloud-controller:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Nobuto Murata (nobuto) wrote :

I've bumped the KeepAlive timeout to mitigate this known race condition:
https://bugs.launchpad.net/charm-helpers/+bug/1947010
It's going to be applied in the next release. It doesn't allow the customization of the value or on/off though.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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