Security group code is doing unnecessary work removing chains
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Low
|
Brian Haley |
Bug Description
The security group code is generating a lot of these messages when trying to boot VMs:
Attempted to remove chain sg-chain which does not exist
There's also ones specific to the port. It seems to be calling remove_chain(), even when it's a new port and it's initially setting up it's filter. I dropped a print_stack() in remove_chain() and see tracebacks like this:
Prepare port filter for e8f41910-
Preparing device (e8f41910-
Attempted to remove chain sg-chain which does not exist remove_chain /opt/stack/
File "/usr/local/
result = function(*args, **kwargs)
File "/usr/local/
return func(*args, **kwargs)
File "/opt/stack/
ovs_
File "/opt/stack/
agent.
File "/usr/local/
return f(*args, **kwargs)
File "/opt/stack/
self.
File "/usr/local/
return f(*args, **kwargs)
File "/opt/stack/
port_info, ovs_restarted)
File "/usr/local/
return f(*args, **kwargs)
File "/opt/stack/
port_
File "/opt/stack/
self.
File "/opt/stack/
*args, **kwargs)
File "/opt/stack/
self.
File "/opt/stack/
self.
File "/usr/lib/
self.gen.next()
File "/opt/stack/
self.
File "/opt/stack/
self.
File "/opt/stack/
self.
File "/opt/stack/
self.
File "/opt/stack/
traceback.
Looking at the code, there's a couple of things that are interesting:
1) prepare_
2) in the "defer" case above we always do _remove_
This also led to us timing how long it's taking in the remove_chain() code, since that's where the message is getting printed. As the number of ports and rules grow, it's spending more time spinning through chains and rules. It looks like that can be helped with a small code change, which is just fallout from the real problem. I'll send that out since it helps a little.
More work still required.
Changed in neutron: | |
importance: | Undecided → Low |
Changed in neutron: | |
assignee: | Brian Haley (brian-haley) → Armando Migliaccio (armando-migliaccio) |
Changed in neutron: | |
assignee: | Armando Migliaccio (armando-migliaccio) → Brian Haley (brian-haley) |
Changed in neutron: | |
status: | In Progress → Fix Released |
Fix proposed to branch: master /review. openstack. org/399291
Review: https:/