Skip to content

Commit

Permalink
ovs: improve log message when ofport is not configured
Browse files Browse the repository at this point in the history
This switch the warning to error as we may be in a sitation of no
connectivity and this should never happen.

Also improves the condition for an ofport invalid.

Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@industrialdiscipline.com>
Change-Id: Ic6bd7bfadcba8deb132d8af3e295ec25a8d64b50
  • Loading branch information
sahid committed Jul 21, 2022
1 parent 3ffbf83 commit 5848c0d
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -1848,10 +1848,10 @@ def treat_vif_port(self, vif_port, port_id, network_id, network_type,
# for being treated. If that does not happen, it is a potential
# error condition of which operators should be aware
port_needs_binding = True
if not vif_port.ofport:
LOG.warning("VIF port: %s has no ofport configured, "
"and might not be able to transmit",
vif_port.vif_id)
if not vif_port.ofport or vif_port.ofport == ovs_lib.INVALID_OFPORT:
LOG.error("VIF port: %s has no ofport configured or is invalid, "
"and might not be able to transmit. (ofport=%s)",
vif_port.vif_id, vif_port.ofport)
if vif_port:
if admin_state_up:
port_needs_binding = self.port_bound(
Expand Down

0 comments on commit 5848c0d

Please sign in to comment.