Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incusd/device/network: Fix Tap interface MTU when in OVN #979

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

trunet
Copy link
Contributor

@trunet trunet commented Jul 9, 2024

When creating a virtual-machine with ovn, the tap interface inherits the MTU from ovs-system and therefore doesn't have the MTU.

This doesn't happen on container veth interface, the logic for containers are working fine.

I believe it's a bug, and this PR fixed the issue for me.

Let me know if you need any changes.

Thanks for the awesome work in incus.

@trunet trunet requested a review from stgraber as a code owner July 9, 2024 20:46
@trunet
Copy link
Contributor Author

trunet commented Jul 9, 2024

If you want more context, my config is like this:

❯ incus network show UPLINK
config:
  bgp.peers.router01.address: [REDACTED]
  bgp.peers.router01.asn: "[REDACTED]"
  bgp.peers.router02.address: [REDACTED]
  bgp.peers.router02.asn: "[REDACTED]"
  dns.nameservers: [REDACTED]
  ipv4.gateway: [REDACTED].9.1/24
  ipv4.ovn.ranges: [REDACTED].50-[REDACTED].254
  ipv4.routes: [REDACTED].12.0/22
  mtu: "9000"
  ovn.ingress_mode: routed
  volatile.last_state.created: "false"
description: ""
name: UPLINK
type: physical
used_by:
- /1.0/networks/ovn-platform
managed: true
status: Created
locations:
- srv-[REDACTED]
- srv-[REDACTED]
- srv-[REDACTED]
project: default
❯ incus network show ovn-platform
config:
  bridge.mtu: "8942"
  ipv4.address: [REDACTED].12.1/24
  ipv4.nat: "false"
  ipv6.address: none
  network: UPLINK
  volatile.network.ipv4.address: [REDACTED].9.50
description: ""
name: ovn-platform
type: ovn
used_by:
- /1.0/instances/u1
- /1.0/instances/u2
managed: true
status: Created
locations:
- srv-[REDACTED]
- srv-[REDACTED]
- srv-[REDACTED]
project: default

before the change:

27: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether ca:a2:3a:67:ee:26 brd ff:ff:ff:ff:ff:ff
43: tap4536cadb: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master ovs-system state UP group default qlen 1000
    link/ether 56:a4:3b:18:f7:e9 brd ff:ff:ff:ff:ff:ff

after the change:

27: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 9a:a5:c0:a8:66:09 brd ff:ff:ff:ff:ff:ff
36: tap14bd52f8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 8942 qdisc mq master ovs-system state UP group default qlen 1000
    link/ether 5e:f9:09:04:32:3d brd ff:ff:ff:ff:ff:ff

@trunet trunet force-pushed the fix-mtu-on-ovn-networks branch 2 times, most recently from f9154b0 to 47d9f5a Compare July 10, 2024 17:59
@trunet
Copy link
Contributor Author

trunet commented Jul 10, 2024

It's done, also rebased. can you review again @stgraber ?

@trunet trunet requested a review from stgraber July 10, 2024 19:13
Signed-off-by: Wagner Sartori Junior <wagner.sartori@luizalabs.com>
@trunet trunet requested a review from stgraber July 10, 2024 20:09
@stgraber stgraber merged commit 058e5ca into lxc:main Jul 11, 2024
30 checks passed
@stgraber
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants