Bug 1493175

Summary: Update of VM port to have different number of security groups fails with Error 500
Product: Red Hat OpenStack Reporter: GenadiC <gcheresh>
Component: openstack-neutronAssignee: Ihar Hrachyshka <ihrachys>
Status: CLOSED ERRATA QA Contact: Toni Freger <tfreger>
Severity: high Docs Contact:
Priority: high    
Version: 12.0 (Pike)CC: amuller, chrisw, ihrachys, jlibosva, nyechiel, srevivo
Target Milestone: betaKeywords: AutomationBlocker, Triaged
Target Release: 12.0 (Pike)   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: openstack-neutron-11.0.2-0.20171020230401.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-13 22:10:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description GenadiC 2017-09-19 14:06:06 UTC
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

Comment 1 Ihar Hrachyshka 2017-10-24 18:13:11 UTC
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

Comment 3 GenadiC 2017-11-02 08:14:31 UTC
Verified by running the above automatic test on Pike

Comment 7 errata-xmlrpc 2017-12-13 22:10:20 UTC
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