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

fix: parse addr use wrong function #9

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ehloo
Copy link

@ehloo ehloo commented Aug 31, 2023

What this PR does / why we need it:

➡️ I want set macPrefix but got error:

> {"level":"ERROR","ts":"2023-08-31T17:06:07.128+0800","caller":"networking/mac.go:52","msg":"failed to ParsePrefix","Action":"Add","ContainerID":"740978ee3c4f8de88d35f44eee0b5ef5aa5333d95531697eaae84984e4ad537b","PodUID":"885ef2ab-132e-4241-8e2e-f290c7192bae","PodName":"sre-demo-769965497c-xqtlp","PodNamespace":"default","IfName":"eth0","error":"netip.ParsePrefix("10.246.132.202"): no '/'"}

➡️ My net-attach-def:

{
        "cniVersion": "0.3.1",
        "name": "macvlan-conf",
        "plugins": [
            {
                "type": "macvlan",
                "master": "br0",
                "mode": "bridge",
                "ipam": {
                    "type": "spiderpool"
                }
            },{
                  "type": "veth",
                  "cluster_cidr": ["172.16.0.0/12"],
                  "service_cidr": ["172.10.0.0/16"],
                  "hardware_prefix": "06:08"
              }
        ]
    }

➡️ Coordinator plugin is right:
https://github.com/spidernet-io/spiderpool/blob/main/pkg/networking/networking/mac.go

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

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.

1 participant