neutron-rootwrap-xen-dom0 not properly closing XenAPI sessions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Medium
|
Alex Oughton | ||
Kilo |
Fix Released
|
Undecided
|
Alex Oughton |
Bug Description
Hello,
When using OpenStack Liberty with XenServer, neutron is not properly closing its XenAPI sessions. Since it creates these so rapidly, the XenServer host eventually exceeds its maximum allowed number of connections:
Mar 17 11:39:05 compute3 xapi: [debug|
This occurs roughly once per minute, with many sessions being invalidated. The effect is that any long-running hypervisor operations (for example a live-migration) will fail with an "unauthorized" error, as their session was invalidated while they were still running:
2016-03-17 11:43:34.483 14310 ERROR nova.virt.
query = [ session_
n-api-libs/1.0 }\\")")']
The fix is to add a line to neutron-
Before:
def run_command(url, username, password, user_args, cmd_input):
try:
session = XenAPI.Session(url)
host = session.
result = session.
host, 'netwrap', 'run_command',
{'cmd': json.dumps(
return json.loads(result)
except Exception as e:
After:
def run_command(url, username, password, user_args, cmd_input):
try:
session = XenAPI.Session(url)
host = session.
result = session.
host, 'netwrap', 'run_command',
{'cmd': json.dumps(
return json.loads(result)
except Exception as e:
After making this change, the logs still show the sessions being rapidly created, but it also shows them being destroyed. The "exceeds limit" error no longer occurs, and live-migrations now succeed.
Regards,
Alex Oughton
Changed in neutron: | |
assignee: | Alex Oughton (alex-oughton) → nobody |
status: | In Progress → New |
Changed in neutron: | |
importance: | Undecided → Medium |
Changed in neutron: | |
status: | New → Confirmed |
Changed in neutron: | |
assignee: | nobody → Alex Oughton (alex-oughton) |
Changed in neutron: | |
status: | New → In Progress |
tags: | added: neutron-proactive-backport-potential |
tags: | removed: neutron-proactive-backport-potential |
Fix proposed to branch: master /review. openstack. org/294230
Review: https:/