2018-01-15 04:02:35 |
hongbin |
description |
On processing the request to add a security group to a container, it failed with a NotFound error on performing a neutron API call:
http://paste.openstack.org/show/643335/
This bug was introduced by: https://review.openstack.org/#/c/531561/ . That patch has a side effect that makes the context elevation ineffective. As a result, the neutron API call was made by a non-admin context thus failing to add the security group to the port. |
Description
===========
On processing the request to add a security group to a container, it failed with a NotFound error on performing a neutron API call:
http://paste.openstack.org/show/643335/
This bug was introduced by: https://review.openstack.org/#/c/531561/ . That patch has a side effect that makes the context elevation ineffective. As a result, the neutron API call was made by a non-admin context thus failing to add the security group to the port.
Reproduce
=========
#### create container in demo tenant ####
$ source /opt/stack/devstack/openrc demo demo
$ openstack appcontainer run --name test nginx
$ CONTAINER_PORT=1709b046-44ae-4e89-b399-81f4c84221f4
#### populate neutron port in admin tenant ####
$ source /opt/stack/devstack/openrc admin admin
$ openstack security group create adminsg
$ openstack port set --security-group adminsg $CONTAINER_PORT
#### add security group in demo tenant ####
$ source /opt/stack/devstack/openrc demo demo
$ openstack security group create demosg
$ openstack appcontainer add security group test demosg
# check the log of devstack@zun-compute, it should fail |
|