Use safer methods to get security groups on security group logging
There is a chance on real environment that a port group doesn't have any
correspondent security group (and there are maintenance tasks that will
remove them). This patch avoids a DriverError from Neutron in case we
are in an environment with a port group that was mistakenly left over
due to any reason. Instead, a Warning log will be raised.
Related-bug: #2032929
Change-Id: I42208557c8522d6fbc29df8a3c7d0367cace31e4
(cherry picked from commit 67bd591c5b9280f1af7c8a4942dcbb3bd1270cfb)
Reviewed: https:/ /review. opendev. org/c/openstack /neutron/ +/896614 /opendev. org/openstack/ neutron/ commit/ 7066974509bb0ec 9c6d389feea4c3e 1600ab4da2
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/2023.1
commit 7066974509bb0ec 9c6d389feea4c3e 1600ab4da2
Author: Elvira García <email address hidden>
Date: Fri Sep 15 16:33:43 2023 +0200
Use safer methods to get security groups on security group logging
There is a chance on real environment that a port group doesn't have any
correspondent security group (and there are maintenance tasks that will
remove them). This patch avoids a DriverError from Neutron in case we
are in an environment with a port group that was mistakenly left over
due to any reason. Instead, a Warning log will be raised.
Related-bug: #2032929 6fbc29df8a3c7d0 367cace31e4 1af7c8a4942dcbb 3bd1270cfb)
Change-Id: I42208557c8522d
(cherry picked from commit 67bd591c5b9280f