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/ +/897470 /opendev. org/openstack/ neutron/ commit/ 373d8ee969e7b38 7960952919794d9 724ce2bcfc
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/zed
commit 373d8ee969e7b38 7960952919794d9 724ce2bcfc
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