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 creating isolated OVN networks (no uplink) #1070

Merged
merged 6 commits into from
Aug 9, 2024

Conversation

SpiffyEight77
Copy link
Contributor

@SpiffyEight77 SpiffyEight77 commented Aug 3, 2024

Description

Details

  • OS: Ubuntu 24.04
  • Arch: x86_64

Test result

root@playground:~/incus# incus network create ovn-none --type ovn network=none --debug
Network ovn-none created

root@playground:~/incus# incus network list
+------------+----------+---------+-----------------+---------------------------+-------------+---------+---------+
|    NAME    |   TYPE   | MANAGED |      IPV4       |           IPV6            | DESCRIPTION | USED BY |  STATE  |
+------------+----------+---------+-----------------+---------------------------+-------------+---------+---------+
| br-int     | bridge   | false   |                 |                           |             | 0       |         |
+------------+----------+---------+-----------------+---------------------------+-------------+---------+---------+
| enp1s0     | physical | false   |                 |                           |             | 0       |         |
+------------+----------+---------+-----------------+---------------------------+-------------+---------+---------+
| incusbr0   | bridge   | true    | 10.216.127.1/24 | fd42:fa48:9935:6601::1/64 |             | 1       | CREATED |
+------------+----------+---------+-----------------+---------------------------+-------------+---------+---------+
| lo         | loopback | false   |                 |                           |             | 0       |         |
+------------+----------+---------+-----------------+---------------------------+-------------+---------+---------+
| lxcbr0     | bridge   | false   |                 |                           |             | 0       |         |
+------------+----------+---------+-----------------+---------------------------+-------------+---------+---------+
| ovn-none   | ovn      | true    | 10.94.120.1/24  | fd42:d331:623f:c870::1/64 |             | 0       | CREATED |
+------------+----------+---------+-----------------+---------------------------+-------------+---------+---------+
| ovs-system | unknown  | false   |                 |                           |             | 0       |         |
+------------+----------+---------+-----------------+---------------------------+-------------+---------+---------+


@SpiffyEight77 SpiffyEight77 requested a review from stgraber as a code owner August 3, 2024 04:12
@SpiffyEight77 SpiffyEight77 marked this pull request as draft August 4, 2024 08:04
@SpiffyEight77 SpiffyEight77 force-pushed the feat/isolated-ovn-networks branch 6 times, most recently from 1ea015a to 8d6ec49 Compare August 4, 2024 15:12
@stgraber
Copy link
Member

stgraber commented Aug 9, 2024

Thanks, I'm going to pull that one and take a look, see if I can get it over the finish line.

@stgraber stgraber force-pushed the feat/isolated-ovn-networks branch from 8d6ec49 to 17548ee Compare August 9, 2024 01:09
@stgraber
Copy link
Member

stgraber commented Aug 9, 2024

Did a quick rebase on current main branch.

@stgraber stgraber force-pushed the feat/isolated-ovn-networks branch from 17548ee to 54bb0c5 Compare August 9, 2024 01:28
@stgraber
Copy link
Member

stgraber commented Aug 9, 2024

So far I just did some basic rebasing and renaming of commits.

Next once I'm back on my desktop I'll push that logic to a test cluster so I can see what's going on with the addressing side of things and validate the rest of the logic.

Hopefully there isn't too much to it and I can sneak that one in just before tagging 6.4 :)

@stgraber stgraber force-pushed the feat/isolated-ovn-networks branch from 54bb0c5 to b475aca Compare August 9, 2024 04:04
@stgraber stgraber marked this pull request as ready for review August 9, 2024 04:04
@github-actions github-actions bot added Documentation Documentation needs updating API Changes to the REST API labels Aug 9, 2024
stgraber and others added 6 commits August 9, 2024 00:04
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Signed-off-by: Ruihua Wen <spiffyeight77@gmail.com>
Signed-off-by: Ruihua Wen <spiffyeight77@gmail.com>
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
@stgraber stgraber force-pushed the feat/isolated-ovn-networks branch from b475aca to 86b4da1 Compare August 9, 2024 04:05
@stgraber
Copy link
Member

stgraber commented Aug 9, 2024

Got it working. I managed to simplify a bit of the logic you had, I then had to add a bit more logic to handle the initial setup of the network which was failing and had to tweak the DHCPv4, DHCPv6 and RA code paths to just skip the DNS part. That was the issue you had with lacking DHCP.

I also had to add a bit of logic to the nic device to skip the uplink if it's "none" and lastly tweak the deletion logic so it doesn't fail due to missing router ports.

@stgraber
Copy link
Member

stgraber commented Aug 9, 2024

Just waiting for doc and static analysis tests to complete, the rest isn't relevant as OVN tests happen separately through CI.

@stgraber stgraber merged commit 8be6b15 into lxc:main Aug 9, 2024
30 checks passed
@SpiffyEight77 SpiffyEight77 deleted the feat/isolated-ovn-networks branch August 9, 2024 04:17
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Aug 10, 2024
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [lxc/incus](https://github.com/lxc/incus) | minor | `v6.3.0` -> `v6.4.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.4.0`](https://github.com/lxc/incus/releases/tag/v6.4.0): Incus 6.4

[Compare Source](lxc/incus@v6.3.0...v6.4.0)

### Announcement

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

#### What's Changed

-   incus-simplestreams: Fix split images by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#987
-   incusd/instance/edk2: Support OVMF filenames on arm64 by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#991
-   Import LXD changes from stable-5.0 by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#988
-   incusd/instance/drivers/qemu: Limit CPU flag calculation to x86\_64 by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#992
-   doc: Add OCI mentions by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#990
-   incusd/instance/qemu: Fix architecture check being backward by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1000
-   incus/s3: Fix mcli minio client executable name check by [@&#8203;apophys](https://github.com/apophys) in lxc/incus#998
-   OCI container fixes by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1001
-   incus-simplestreams: Handle removal of combined images by [@&#8203;melato](https://github.com/melato) in lxc/incus#995
-   Change RunDir file mode to 0711 by [@&#8203;bketelsen](https://github.com/bketelsen) in lxc/incus#1004
-   incusd/apparmor/qemu: Relax apparmor rules a bit by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1007
-   incusd/instance/lxc: Handle OCI containers using real PID1 by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1005
-   incusd/apparmor/qemu: Fix typo in rule by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1009
-   incusd/apparmor/dnsmasq: Relax rules a bit by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1011
-   incusd/storage: Use writeback mode for qemu-img convert by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1015
-   Relax cluster upgrade requirements around API extensions by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1012
-   incusd/cgroup: Handle unknown devices in io.stat by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1016
-   incusd/instance_post: Always set the target project by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1019
-   Fix LVM locking issues by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1021
-   Make run-parts running compatible with different versions by [@&#8203;nanjj](https://github.com/nanjj) in lxc/incus#1018
-   Properly handle request retries on OIDC by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1024
-   Fix storage clustering handling by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1022
-   CLI tweaks/improvements by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1029
-   Use qemu-img convert output to update progress by [@&#8203;nanjj](https://github.com/nanjj) in lxc/incus#1025
-   Tweak EDK2 paths by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1033
-   Introduce cluster group configuration by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1034
-   Improve resource API CPU sorting by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1036
-   Fix some clustering issues by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1039
-   Add support for per-instance LXCFS by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1041
-   Fix automatic re-send of unseekable POST queries by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1042
-   VM related improvements by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1043
-   Translations update from Hosted Weblate by [@&#8203;weblate](https://github.com/weblate) in lxc/incus#1045
-   Varied cluster fixes by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1044
-   incus/top: Properly filter disk usage by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1047
-   More clustering fixes by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1049
-   OCI related fixes by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1052
-   Various bugfixes by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1054
-   incusd/storage/zfs: Always call tryGetVolumeDiskPathFromDataset by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1060
-   doc: add colima instructions by [@&#8203;abiosoft](https://github.com/abiosoft) in lxc/incus#1058
-   doc: Update incus_alias.md by [@&#8203;simos](https://github.com/simos) in lxc/incus#1061
-   incusd/network/ovn: Require functional uplink by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1063
-   OVN related fixes by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1068
-   doc/instances: Cover incus agent installation by [@&#8203;simos](https://github.com/simos) in lxc/incus#1067
-   Various bugfixes by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1071
-   doc/storage_volume: Fix snapshot command by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1072
-   Improve lifecycle events on evacuation by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1073
-   More lifecycle fixes by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1074
-   doc/clustering: Better document healing by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1075
-   incus-migrate: Properly handle projects by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1077
-   incusd/apparmor: Allow mounting zfs when delegation is supported by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1078
-   doc/clustering: Add howto on cluster access by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1079
-   Fix handling of long running connections by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1080
-   Handle Ceph config in unusual location by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1081
-   Translations update from Hosted Weblate by [@&#8203;weblate](https://github.com/weblate) in lxc/incus#1082
-   incusd/instance/lxc: Respect LXCFS_OPTS by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1083
-   Allow per cluster group CPU definitions by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1088
-   Make connecting to OVN more reliable by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1089
-   incus: Add support for environment file (.env) by [@&#8203;bketelsen](https://github.com/bketelsen) in lxc/incus#1085
-   Translations update from Hosted Weblate by [@&#8203;weblate](https://github.com/weblate) in lxc/incus#1091
-   Fix some LVM activation bugs by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1090
-   incusd/device/disk: Allow relative paths within custom volumes by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1092
-   Add image cache for CLI client by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1094
-   incus/image/alias: Add column flag by [@&#8203;HassanAlsamahi](https://github.com/HassanAlsamahi) in lxc/incus#1095
-   incusd/main_forknet: Make it so our DHCP client never fails by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1100
-   Add per storage pool project limits by [@&#8203;stgraber](https://github.com/stgraber) in lxc/incus#1098
-   Translations update from Hosted Weblate by [@&#8203;weblate](https://github.com/weblate) in lxc/incus#1099
-   Allow creating isolated OVN networks (no uplink) by [@&#8203;SpiffyEight77](https://github.com/SpiffyEight77) in lxc/incus#1070

#### New Contributors

-   [@&#8203;apophys](https://github.com/apophys) made their first contribution in lxc/incus#998
-   [@&#8203;abiosoft](https://github.com/abiosoft) made their first contribution in lxc/incus#1058
-   [@&#8203;HassanAlsamahi](https://github.com/HassanAlsamahi) made their first contribution in lxc/incus#1095

**Full Changelog**: lxc/incus@v6.3.0...v6.4.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 creating isolated OVN networks (no uplink)
2 participants