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

Network: Generate OVN PTR records for instance NIC IPs #14956

Merged
merged 5 commits into from
Feb 11, 2025

Conversation

tomponline
Copy link
Member

@tomponline tomponline commented Feb 10, 2025

Fixes #14812

Before

ping c2.lxd -4
PING c2 (10.210.189.3) 56(84) bytes of data.
64 bytes from 10.210.189.3: icmp_seq=1 ttl=64 time=0.029 ms
64 bytes from 10.210.189.3: icmp_seq=2 ttl=64 time=0.079 ms

ping c2.lxd -6
PING c2 (fd42:7ea7:895b:ecac:216:3eff:fe5c:698b) 56 data bytes
64 bytes from fd42:7ea7:895b:ecac:216:3eff:fe5c:698b: icmp_seq=1 ttl=255 time=0.749 ms
64 bytes from fd42:7ea7:895b:ecac:216:3eff:fe5c:698b: icmp_seq=2 ttl=255 time=0.074 ms

After

ping c2.lxd -4
PING c2 (10.210.189.3) 56(84) bytes of data.
64 bytes from c2.lxd (10.210.189.3): icmp_seq=1 ttl=64 time=0.671 ms
64 bytes from c2.lxd (10.210.189.3): icmp_seq=2 ttl=64 time=0.062 ms

ping c2.lxd -6
PING c2 (fd42:7ea7:895b:ecac:216:3eff:fe5c:698b) 56 data bytes
64 bytes from c2.lxd (fd42:7ea7:895b:ecac:216:3eff:fe5c:698b): icmp_seq=1 ttl=255 time=0.720 ms
64 bytes from c2.lxd (fd42:7ea7:895b:ecac:216:3eff:fe5c:698b): icmp_seq=2 ttl=255 time=0.121 ms

@tomponline tomponline self-assigned this Feb 10, 2025
@tomponline tomponline force-pushed the tp-ovn-ptr branch 10 times, most recently from e03475f to c2a4e5f Compare February 11, 2025 19:19
@tomponline tomponline marked this pull request as ready for review February 11, 2025 19:20
@tomponline tomponline requested a review from escabo February 11, 2025 19:38
@tomponline
Copy link
Member Author

FYI @fnordahl

simondeziel
simondeziel previously approved these changes Feb 11, 2025
lxd/network/openvswitch/ovn.go Outdated Show resolved Hide resolved
To make available to other packages and to avoid duplicate constant definitions for PTR suffixes.

Signed-off-by: Thomas Parrott <[email protected]>
And use dnsutil.IsReverse function.

Signed-off-by: Thomas Parrott <[email protected]>
Signed-off-by: Thomas Parrott <[email protected]>
@tomponline
Copy link
Member Author

@roosterfish @simondeziel re https://github.com/canonical/lxd/actions/runs/13271508119/job/37052332137?pr=14956 do we need to call the "waitready" equivalent command for micro* apps here?

@tomponline tomponline merged commit 5f8e6aa into canonical:main Feb 11, 2025
25 of 26 checks passed
@tomponline tomponline deleted the tp-ovn-ptr branch February 11, 2025 21:05
@simondeziel
Copy link
Member

@roosterfish @simondeziel re https://github.com/canonical/lxd/actions/runs/13271508119/job/37052332137?pr=14956 do we need to call the "waitready" equivalent command for micro* apps here?

I'm not aware of any waitready equivalent for microovn. Sounds like a (rare) race worth fixing. @fnordahl

tomponline added a commit that referenced this pull request Feb 12, 2025
tomponline added a commit to tomponline/lxd-pkg-snap that referenced this pull request Feb 12, 2025
tomponline added a commit to canonical/lxd-pkg-snap that referenced this pull request Feb 12, 2025
tomponline added a commit to tomponline/lxd that referenced this pull request Feb 13, 2025
…s field that contains PTR records

Fixes bug introduced with canonical#14956

Signed-off-by: Thomas Parrott <[email protected]>
tomponline added a commit to tomponline/lxd that referenced this pull request Feb 13, 2025
…s field that contains PTR records

Fixes bug introduced with canonical#14956

Signed-off-by: Thomas Parrott <[email protected]>
tomponline added a commit that referenced this pull request Feb 14, 2025
…eld that contains PTR records (#14978)

Fixes bug introduced with #14956
that caused instance port SNAT rules to not be cleaned up, as LXD parses
the port's DNS records to get the IPs to remove.

```
==> Check NAT rules got cleaned up
++ ovn-nbctl --bare --format=csv --column=external_ip,logical_ip,type find nat
+ out='10.10.10.200,10.91.99.0/24,snat
198.51.100.2,198.51.100.2,dnat_and_snat
fd42:4242:4242:1010::200,2001:db8:1:2::/64,snat'
++ wc -l
+ natRulesAfter=3
+ '[' 2 -ne 3 ']'
+ echo 'NAT rules left over. Started with 2 now have 3'
NAT rules left over. Started with 2 now have 3
```


https://github.com/canonical/lxd-ci/actions/runs/13301968521/job/37144917599
tomponline added a commit to tomponline/lxd that referenced this pull request Feb 14, 2025
…s field that contains PTR records

Fixes bug introduced with canonical#14956

Signed-off-by: Thomas Parrott <[email protected]>
(cherry picked from commit f419130)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

network/ovn: LXD does not create records for reverse DNS.
2 participants