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

Allow adding external interfaces to an OVN network #1263

Merged
merged 4 commits into from
Oct 3, 2024

Conversation

SpiffyEight77
Copy link
Contributor

@SpiffyEight77 SpiffyEight77 commented Sep 29, 2024

Description

Details

  • OS: Ubuntu 24.04
  • Arch: x86_64

Test result

create OVN network with bridge.external_interfaces

# incus network create ext-ifac-ovn bridge.external_interfaces=ens18.10/ens18/10 --type=ovn network=test-network --debug
Network ext-ifac-ovn created

# incus network ls
+--------------+----------+---------+-----------------+---------------------------+-------------+---------+---------+
|     NAME     |   TYPE   | MANAGED |      IPV4       |           IPV6            | DESCRIPTION | USED BY |  STATE  |
+--------------+----------+---------+-----------------+---------------------------+-------------+---------+---------+
| br-int       | bridge   | NO      |                 |                           |             | 0       |         |
+--------------+----------+---------+-----------------+---------------------------+-------------+---------+---------+
| ens18        | physical | NO      |                 |                           |             | 0       |         |
+--------------+----------+---------+-----------------+---------------------------+-------------+---------+---------+
| ens18.10     | vlan     | NO      |                 |                           |             | 0       |         |
+--------------+----------+---------+-----------------+---------------------------+-------------+---------+---------+
| ext-ifac-ovn | ovn      | YES     | 10.6.133.1/24   | fd42:3332:1564:37bd::1/64 |             | 0       | CREATED |
+--------------+----------+---------+-----------------+---------------------------+-------------+---------+---------+
| incusbr0     | bridge   | YES     | 10.46.82.1/24   | fd42:a560:1040:84ee::1/64 |             | 2       | CREATED |
+--------------+----------+---------+-----------------+---------------------------+-------------+---------+---------+
| incusovn2    | bridge   | NO      |                 |                           |             | 0       |         |
+--------------+----------+---------+-----------------+---------------------------+-------------+---------+---------+
| incusovn2a   | unknown  | NO      |                 |                           |             | 0       |         |
+--------------+----------+---------+-----------------+---------------------------+-------------+---------+---------+
| incusovn2b   | unknown  | NO      |                 |                           |             | 0       |         |
+--------------+----------+---------+-----------------+---------------------------+-------------+---------+---------+
| isolated-ovn | ovn      | YES     | 10.168.199.1/24 | fd42:5d7e:c084:dcb0::1/64 |             | 0       | CREATED |
+--------------+----------+---------+-----------------+---------------------------+-------------+---------+---------+
| lo           | loopback | NO      |                 |                           |             | 0       |         |
+--------------+----------+---------+-----------------+---------------------------+-------------+---------+---------+
| lxcbr0       | bridge   | NO      |                 |                           |             | 0       |         |
+--------------+----------+---------+-----------------+---------------------------+-------------+---------+---------+
| ovn-network  | ovn      | YES     | 10.71.151.1/24  | fd42:69ae:dc4b:fb01::1/64 |             | 0       | CREATED |
+--------------+----------+---------+-----------------+---------------------------+-------------+---------+---------+
| ovs-system   | unknown  | NO      |                 |                           |             | 0       |         |
+--------------+----------+---------+-----------------+---------------------------+-------------+---------+---------+
| test-network | bridge   | YES     | 10.97.209.1/24  | fd42:f32:39dc:32b::1/64   |             | 2       | CREATED |
+--------------+----------+---------+-----------------+---------------------------+-------------+---------+---------+

# incus network info ext-ifac-ovn
Name: ext-ifac-ovn
MAC address: 00:16:3e:33:66:9b
MTU: 1500
State: up
Type: broadcast

IP addresses:
  inet  10.6.133.1/24 (link)
  inet6 fd42:3332:1564:37bd::1/64 (link)

Network usage:
  Bytes received: 0B
  Bytes sent: 0B
  Packets received: 0
  Packets sent: 0

OVN:
  Chassis: playground
  Logical router: incus-net39-lr


# ovn-nbctl lsp-get-addresses ens18.10-lsp-router
unknown

delete OVN network with bridge.external_interfaces

# incus network delete ext-ifac-ovn
Network ext-ifac-ovn deleted

# ovn-nbctl lsp-get-addresses ens18.10-lsp-router
ovn-nbctl: ens18.10-lsp-router: port name not found

@SpiffyEight77 SpiffyEight77 force-pushed the feat/ovn-external-interfaces branch 2 times, most recently from 01af7f8 to 39cf9e1 Compare October 2, 2024 14:07
@github-actions github-actions bot added the Documentation Documentation needs updating label Oct 2, 2024
@SpiffyEight77 SpiffyEight77 marked this pull request as ready for review October 2, 2024 14:45
@stgraber
Copy link
Member

stgraber commented Oct 2, 2024

Looks good. I'll just keep it open a tiny bit longer as I want to do:

  • Add API extension for this
  • Test behavior in a cluster where we would want this key to be per-server rather than global
  • Try to de-duplicate the parsing logic between the bridge and ovn drivers

@stgraber stgraber self-assigned this Oct 2, 2024
@stgraber stgraber added this to the incus-6.6 milestone Oct 2, 2024
Signed-off-by: Ruihua Wen <spiffyeight77@gmail.com>
…eter

Signed-off-by: Ruihua Wen <spiffyeight77@gmail.com>
@stgraber stgraber force-pushed the feat/ovn-external-interfaces branch from dddeaa5 to 1fdca52 Compare October 3, 2024 03:45
@github-actions github-actions bot added the API Changes to the REST API label Oct 3, 2024
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
@stgraber stgraber force-pushed the feat/ovn-external-interfaces branch from 1fdca52 to 270438a Compare October 3, 2024 03:46
@stgraber stgraber merged commit 596df89 into lxc:main Oct 3, 2024
30 checks passed
@SpiffyEight77 SpiffyEight77 deleted the feat/ovn-external-interfaces branch October 3, 2024 06:05
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Oct 17, 2024
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [lxc/incus](https://github.com/lxc/incus) | minor | `v6.5.0` -> `v6.6.0` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>lxc/incus (lxc/incus)</summary>

### [`v6.6.0`](https://github.com/lxc/incus/releases/tag/v6.6.0): Incus 6.6

[Compare Source](lxc/incus@v6.5.0...v6.6.0)

### Announcement

https://discuss.linuxcontainers.org/t/incus-6-6-has-been-released/21762

#### What's Changed

-   Fix capitalization in `incus network list` by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1191
-   incusd/storage/drivers/lvm: Cache VG extent size by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1192
-   incusd/network/ovn: LSP dynamic allocation can't be done per protocol by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1195
-   incusd/instance/qemu: Always re-generate the nvram symlink by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1193
-   incusd/instance/qemu: Set O_DIRECT when passing in FDs by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1196
-   Translations update from Hosted Weblate by [@&#8203;weblate](https://github.com/weblate) in lxc/incus#1194
-   incusd/apparmor: Only initialize with the daemon by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1197
-   Various fixes by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1198
-   doc: Fix limits.memory default value unit by [@&#8203;kznrluk](https://github.com/kznrluk) in lxc/incus#1199
-   incusd/storage/zfs: Make sure the zvol is a block device by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1204
-   incusd/apparmor: Don't attempt unloading profiles when apparmor is di… by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1206
-   Translations update from Hosted Weblate by [@&#8203;weblate](https://github.com/weblate) in lxc/incus#1208
-   Translations update from Hosted Weblate by [@&#8203;weblate](https://github.com/weblate) in lxc/incus#1212
-   doc/installing: Add Rocky Linux 9 by [@&#8203;sspencerwire](https://github.com/sspencerwire) in lxc/incus#1213
-   Translations update from Hosted Weblate by [@&#8203;weblate](https://github.com/weblate) in lxc/incus#1219
-   Fix storage volume snapshot listings by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1218
-   internal/server/instance/drivers: Disable 9p and vsock for Windows VMs by [@&#8203;gibmat](https://github.com/gibmat) in lxc/incus#1217
-   Add qcow2 and vmdk support to incus-migrate by [@&#8203;gibmat](https://github.com/gibmat) in lxc/incus#1214
-   scripts: fix empty-incus.sh instances delete by [@&#8203;itviewer](https://github.com/itviewer) in lxc/incus#1222
-   doc/installing: Add link to Arch Wiki for Incus by [@&#8203;simos](https://github.com/simos) in lxc/incus#1227
-   Properly handle `--project` in CLI error messages by [@&#8203;bensmrs](https://github.com/bensmrs) in lxc/incus#1230
-   Allow VMs to pull console history similar to containers by [@&#8203;gibmat](https://github.com/gibmat) in lxc/incus#1228
-   incus/console: Add completion by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1231
-   Various bugfixes by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1236
-   Don't return an error if console log file doesn't exist by [@&#8203;gibmat](https://github.com/gibmat) in lxc/incus#1241
-   incusd/instance/qemu: Properly plumb I/O limits by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1242
-   cleanup: Replace use of os.IsNotExist(err) with errors.Is(err, fs.ErrNotExist) by [@&#8203;gibmat](https://github.com/gibmat) in lxc/incus#1245
-   Allow to use `dns.search` when only IPv4 is enabled by [@&#8203;pmoranga](https://github.com/pmoranga) in lxc/incus#1244
-   apparmor: Allow all mounts in unprivileged containers by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1243
-   doc: add note for Nvidia usage when building from source in OpenSUSE by [@&#8203;javiertoledos](https://github.com/javiertoledos) in lxc/incus#1232
-   Add operating system details to instance state by [@&#8203;gibmat](https://github.com/gibmat) in lxc/incus#1234
-   Translations update from Hosted Weblate by [@&#8203;weblate](https://github.com/weblate) in lxc/incus#1247
-   tests: Don't over-provision test volumes by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1246
-   cmd/incus-migrate: Don't copy converted VM image by [@&#8203;gibmat](https://github.com/gibmat) in lxc/incus#1248
-   doc: add prerequisites section for building documentation by [@&#8203;javiertoledos](https://github.com/javiertoledos) in lxc/incus#1233
-   Fix cross-cluster image transfer by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1249
-   Translations update from Hosted Weblate by [@&#8203;weblate](https://github.com/weblate) in lxc/incus#1250
-   Add OVN load balancer state API by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1251
-   Add missing placement scriptlet calls by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1254
-   VM console log fixes by [@&#8203;gibmat](https://github.com/gibmat) in lxc/incus#1255
-   Fix alias handling by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1256
-   incusd/instance/qemu: Fix issues with old NVRAM by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1257
-   Added ability for user to specify the macvlan mode using the mode key… by [@&#8203;farsonic](https://github.com/farsonic) in lxc/incus#1258
-   Translations update from Hosted Weblate by [@&#8203;weblate](https://github.com/weblate) in lxc/incus#1269
-   Allows the VM's limits.memory configuration to be set to a percentage value by [@&#8203;itviewer](https://github.com/itviewer) in lxc/incus#1270
-   incusd/network/ovn: Fix CIDR size check by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1271
-   incusd/instance/lxc: Mount /run if the path exists by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1275
-   Run cluster evacuate and restore in parallel by [@&#8203;gibmat](https://github.com/gibmat) in lxc/incus#1262
-   Documentation fixes by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1276
-   client: Capture original OCI image identifier by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1277
-   docs: mention alpine edge repository in alpine installation by [@&#8203;thebigbone](https://github.com/thebigbone) in lxc/incus#1260
-   Change incus file delete operation to sftp by [@&#8203;HassanAlsamahi](https://github.com/HassanAlsamahi) in lxc/incus#1266
-   Translations update from Hosted Weblate by [@&#8203;weblate](https://github.com/weblate) in lxc/incus#1279
-   Allow fully creating LVM cluster pools through the API by [@&#8203;gibmat](https://github.com/gibmat) in lxc/incus#1278
-   Allow adding external interfaces to an OVN network by [@&#8203;SpiffyEight77](https://github.com/SpiffyEight77) in lxc/incus#1263
-   Fix VM race conditions by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1280
-   Various bugfixes by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1283

#### New Contributors

-   [@&#8203;kznrluk](https://github.com/kznrluk) made their first contribution in lxc/incus#1199
-   [@&#8203;sspencerwire](https://github.com/sspencerwire) made their first contribution in lxc/incus#1213
-   [@&#8203;gibmat](https://github.com/gibmat) made their first contribution in lxc/incus#1217
-   [@&#8203;itviewer](https://github.com/itviewer) made their first contribution in lxc/incus#1222
-   [@&#8203;pmoranga](https://github.com/pmoranga) made their first contribution in lxc/incus#1244
-   [@&#8203;javiertoledos](https://github.com/javiertoledos) made their first contribution in lxc/incus#1232
-   [@&#8203;farsonic](https://github.com/farsonic) made their first contribution in lxc/incus#1258
-   [@&#8203;thebigbone](https://github.com/thebigbone) made their first contribution in lxc/incus#1260

**Full Changelog**: lxc/incus@v6.5.0...v6.6.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Changes to the REST API Documentation Documentation needs updating
Development

Successfully merging this pull request may close these issues.

Allow adding external interfaces to an OVN network
2 participants