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

L3Out Loopback IP Overlap With L3Out Interfaces not showing valid results #180

Open
almo-ina opened this issue Oct 25, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@almo-ina
Copy link

Pre-upgrade validation script is showing the test 41/67 with invalid output that seems misleading as it doesn't mention any IPs or where to start looking for the issue.

Script output

[Check 41/67] L3Out Loopback IP Overlap With L3Out Interfaces...
Error: invalid literal for int() with base 16: '1/128'...

To Reproduce
I trust you will need to have IPv6 as loopback with /128

Expected behavior

If this is a true issue, then at least the script should tell us where to find the issue.

Additional context
node-1# moquery l3extLoopBackIfP | grep dn | grep /128
dn : uni/tn-ADM/out-cr_bgp_de1crt01-1/lnodep-1207-1208/rsnodeL3OutAtt-[topology/pod-2/node-1207]/lbp-[2a01:887:190f:2::1/128]

@almo-ina almo-ina added the bug Something isn't working label Oct 25, 2024
@kshcheku
Copy link
Collaborator

kshcheku commented Oct 25, 2024

def l3out_overlapping_loopback_check(index, total_checks, **kwargs):
..................
    if IPAddress.ip_in_subnet(loopback['addr'], interface['addr']): <<<< we pass here loopback ipv6 address with subnet mask

However, in the ip_in_subnet class method, we never split it, which leads to the error.

    @classmethod
    def ip_in_subnet(cls, ip, subnet): 
        if "/" not in subnet:
            return False
        subnet_ip, subnet_pfxlen = subnet.split("/") <<<<<< We split for the "subnet" but not for the "ip" variable.
        subnet_network = cls.get_network_binary(subnet_ip, subnet_pfxlen)
        ip_network = cls.get_network_binary(ip, subnet_pfxlen)
        return ip_network == subnet_network

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants