Reviewed:  https://review.openstack.org/505390
Committed: 
https://git.openstack.org/cgit/openstack/neutron/commit/?id=017185496c9f3f30b4b819ead86dd5bfe5a72597
Submitter: Jenkins
Branch:    master

commit 017185496c9f3f30b4b819ead86dd5bfe5a72597
Author: Kevin Benton <ke...@benton.pub>
Date:   Tue Sep 19 12:41:47 2017 -0700

    Ensure default security group before port update
    
    The default security group can be deleted and updating
    a port will recreate it. However, we should do this in
    the BEFORE_UPDATE event handler rather than waiting for
    it to happen inside of the port update transaction which
    violates the transaction semantics of the security group
    callbacks.
    
    Closes-Bug: #1718282
    Change-Id: I1ce8b558b0a831adcebead512d97554173423955


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1718282

Title:
  Port update failed with 500 when trying to recreate default security
  group

Status in neutron:
  Fix Released

Bug description:
  On port update, default security group may be missing. In this case,
  port update will first create the group, then proceed to port object.
  The problem is that when it recreates the group, it uses AFTER_UPDATE
  event, which contradicts the transactional semantics of
  _ensure_default_security_group_handler.

  Logs wise, we get this in neutron-server log:

  Sep 14 12:03:03.604813 ubuntu-xenial-2-node-rax-dfw-10932230 neutron-
  server[30503]: WARNING neutron.plugins.ml2.ovo_rpc [None req-
  71600acd-c114-4dbd-a599-a9126fae14fb tempest-
  NetworkDefaultSecGroupTest-1846858447 tempest-
  NetworkDefaultSecGroupTest-1846858447] This handler is supposed to
  handle AFTER events, as in 'AFTER it's committed', not BEFORE.
  Offending resource event: security_group, after_create. Location:

  And then later:

  Sep 14 12:03:04.038599 ubuntu-xenial-2-node-rax-dfw-10932230 
neutron-server[30503]: ERROR neutron.pecan_wsgi.hooks.translation   File 
"/opt/stack/new/neutron/neutron/plugins/ml2/plugin.py", line 1332, in 
update_port
  Sep 14 12:03:04.038761 ubuntu-xenial-2-node-rax-dfw-10932230 
neutron-server[30503]: ERROR neutron.pecan_wsgi.hooks.translation     
context.session.expire(port_db)
  Sep 14 12:03:04.038924 ubuntu-xenial-2-node-rax-dfw-10932230 
neutron-server[30503]: ERROR neutron.pecan_wsgi.hooks.translation   File 
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1533, 
in expire
  Sep 14 12:03:04.039083 ubuntu-xenial-2-node-rax-dfw-10932230 
neutron-server[30503]: ERROR neutron.pecan_wsgi.hooks.translation     
self._expire_state(state, attribute_names)
  Sep 14 12:03:04.039243 ubuntu-xenial-2-node-rax-dfw-10932230 
neutron-server[30503]: ERROR neutron.pecan_wsgi.hooks.translation   File 
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1536, 
in _expire_state
  Sep 14 12:03:04.039406 ubuntu-xenial-2-node-rax-dfw-10932230 
neutron-server[30503]: ERROR neutron.pecan_wsgi.hooks.translation     
self._validate_persistent(state)
  Sep 14 12:03:04.041280 ubuntu-xenial-2-node-rax-dfw-10932230 
neutron-server[30503]: ERROR neutron.pecan_wsgi.hooks.translation   File 
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1976, 
in _validate_persistent
  Sep 14 12:03:04.041453 ubuntu-xenial-2-node-rax-dfw-10932230 
neutron-server[30503]: ERROR neutron.pecan_wsgi.hooks.translation     
state_str(state))
  Sep 14 12:03:04.041658 ubuntu-xenial-2-node-rax-dfw-10932230 
neutron-server[30503]: ERROR neutron.pecan_wsgi.hooks.translation 
InvalidRequestError: Instance '<Port at 0x7fec2d31a190>' is not persistent 
within this Session

  Logs can be found in: http://logs.openstack.org/21/504021/1/check
  /gate-tempest-dsvm-neutron-dvr-multinode-scenario-ubuntu-xenial-
  nv/c6647c4/logs/screen-q-svc.txt.gz#_Sep_14_12_03_04_041658

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1718282/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to