[OVN] Prevent deleting the only IP of a router port
Neutron allows deleting the only IP of a router port but
the OVN NB DB doesn't, since it expects that the
network value of a port is greater than 0. This should
not be possible since it causes that the DB are not
perfectly sync.
It is needed to check BEFORE_UPDATE if the port
that will be updated is of type router owned and
if it will have an IP after the update. If not
an error needs to be raised.
Compared to master patch, this has changed payload to kwargs
Conflicts: neutron/services/ovn_l3/plugin.py
Closes-Bug: #1948457
Change-Id: I206c31201470f178efdde8839622be7900c6ae3e
(cherry picked from commit 935c88032bd3c0e501c70a18c0f1eb3cfc67c1f0)
Reviewed: https:/ /review. opendev. org/c/openstack /neutron/ +/823401 /opendev. org/openstack/ neutron/ commit/ f7f083c9da48106 ae2450fcb94aa16 b9f41de71b
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/victoria
commit f7f083c9da48106 ae2450fcb94aa16 b9f41de71b
Author: Arnau Verdaguer <email address hidden>
Date: Wed Nov 17 16:59:28 2021 +0100
[OVN] Prevent deleting the only IP of a router port
Neutron allows deleting the only IP of a router port but
the OVN NB DB doesn't, since it expects that the
network value of a port is greater than 0. This should
not be possible since it causes that the DB are not
perfectly sync.
It is needed to check BEFORE_UPDATE if the port
that will be updated is of type router owned and
if it will have an IP after the update. If not
an error needs to be raised.
Compared to master patch, this has changed payload to kwargs
neutron/ services/ ovn_l3/ plugin. py
Conflicts:
Closes-Bug: #1948457 78efdde8839622b e7900c6ae3e 501c70a18c0f1eb 3cfc67c1f0)
Change-Id: I206c31201470f1
(cherry picked from commit 935c88032bd3c0e