diff mbox series

[ovs-dev,v2,2/2] controller: Do not bind container port if parent is not bound.

Message ID 20241015133543.1391024-2-xsimonar@redhat.com
State New
Headers show
Series [ovs-dev,v2,1/2] controller: Update related ports when parent of container is deleted. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_ovn-kubernetes success github build: passed

Commit Message

Xavier Simonart Oct. 15, 2024, 1:35 p.m. UTC
Signed-off-by: Xavier Simonart <xsimonar@redhat.com>
---
 controller/binding.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/controller/binding.c b/controller/binding.c
index f3df5edb7..327c71094 100644
--- a/controller/binding.c
+++ b/controller/binding.c
@@ -1754,8 +1754,10 @@  consider_container_lport(const struct sbrec_port_binding *pb,
 
     ovs_assert(parent_b_lport && parent_b_lport->pb);
     /* cannot bind to this chassis if the parent_port cannot be bounded. */
+    /* Do not bind neither if parent is postponed */
     bool can_bind = lport_can_bind_on_this_chassis(b_ctx_in->chassis_rec,
                                                    parent_b_lport->pb) &&
+                    !is_postponed_port(parent_b_lport->pb->logical_port) &&
                     lport_can_bind_on_this_chassis(b_ctx_in->chassis_rec, pb);
 
     return consider_vif_lport_(pb, can_bind, b_ctx_in, b_ctx_out,