Description of problem: Trying to update port with different number of security groups attached to it than it had before fails with Error 500 Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: I created automation test in https://review.openstack.org/#/c/504021/ If you run it will fail on action of updating port that has 2 security groups attached to have only one security group Actual results: An action of update port with security group fails Expected results: An action of update port with security group should succeed Additional info: 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 Sep 14 12:03:04.041827 ubuntu-xenial-2-node-rax-dfw-10932230 neutron-server[30503]: ERROR neutron.pecan_wsgi.hooks.translation Sep 14 12:03:04.041982 ubuntu-xenial-2-node-rax-dfw-10932230 neutron-server[30503]: DEBUG neutron.pecan_wsgi.hooks.notifier [None req-71600acd-c114-4dbd-a599-a9126fae14fb tempest-NetworkDefaultSecGroupTest-1846858447 tempest-NetworkDefaultSecGroupTest-1846858447] No notification will be sent due to unsuccessful status code: 500 {{(pid=30595) after /opt/stack/new/neutron/neutron/pecan_wsgi/hooks/notifier.py:79}} Sep 14 12:03:04.042150 ubuntu-xenial-2-node-rax-dfw-10932230 neutron-server[30503]: INFO neutron.wsgi [None req-71600acd-c114-4dbd-a599-a9126fae14fb tempest-NetworkDefaultSecGroupTest-1846858447 tempest-NetworkDefaultSecGroupTest-1846858447] 10.208.129.14 "PUT /v2.0/ports/0bbf1d90-942c-46a0-964e-76faa4799312 HTTP/1.1" status: 500 len: 363 time: 0.7773969
The fix can be validated by the fact the original test case that triggered the failure passes: https://review.openstack.org/#/c/508278/ ; or with the new api test case that was added as part of the fix: https://review.openstack.org/#/c/507926/1/neutron/tests/tempest/api/admin/test_security_groups.py
Verified by running the above automatic test on Pike
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2017:3462