In the RouterInfo._process_internal_ports() method when it process
old ports and port belongs to the subnet with CIDR assigned by
Prefix Delegation it will try to remove subnet_id key from the
pd_subnets dict.
However it seems that in some case it may happen that such subnet_id key
is not added to the pd_subnets dict and processing of ports fails.
We shouldn't fail in such case, if there is no subnet_id key in this
dict we should be good as we want to delete it simply. So this patch
changes that to not raise KeyError in such case.
Change-Id: I6e6d890c196716c0ef4bcc2922f1ec4c142a6e79
Closes-Bug: #1892364
(cherry picked from commit 13b894288e9354b9eb0833a635fe4a624bb068a9)
Reviewed: https:/ /review. opendev. org/747845 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=a95ddf8ae85 3d0bd3b5dba89dc 3e63a916bd52b2
Committed: https:/
Submitter: Zuul
Branch: stable/train
commit a95ddf8ae853d0b d3b5dba89dc3e63 a916bd52b2
Author: Slawek Kaplonski <email address hidden>
Date: Thu Aug 20 22:39:04 2020 +0200
Fix deletion of subnet_id from pd_subnets
In the RouterInfo. _process_ internal_ ports() method when it process
old ports and port belongs to the subnet with CIDR assigned by
Prefix Delegation it will try to remove subnet_id key from the
pd_subnets dict.
However it seems that in some case it may happen that such subnet_id key
is not added to the pd_subnets dict and processing of ports fails.
We shouldn't fail in such case, if there is no subnet_id key in this
dict we should be good as we want to delete it simply. So this patch
changes that to not raise KeyError in such case.
Change-Id: I6e6d890c196716 c0ef4bcc2922f1e c4c142a6e79 9eb0833a635fe4a 624bb068a9)
Closes-Bug: #1892364
(cherry picked from commit 13b894288e9354b