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

About etcd version #1191

Closed
smarkm opened this issue Sep 26, 2019 · 9 comments
Closed

About etcd version #1191

smarkm opened this issue Sep 26, 2019 · 9 comments
Labels

Comments

@smarkm
Copy link
Contributor

smarkm commented Sep 26, 2019

Current Behavior

flannel can not working well with etcd 3

Possible Solution

  1. Whether to plan to support etcd 3 as dataStore?
  2. If no plan, please make clear for only support etcd 2 now

Your Environment

  • Flannel version: 0.5.3+git
  • Etcd version: 3.5
@meibin353
Copy link

Set the parameter --enable-v2 to true in etcd, etcd supports flannel access.

@zkzhu0110
Copy link

Thanks for reminding us of this. Currently, I have also came across this problem.

When I set the network for etcd 3 to connect docker network between hosts as this command,

etcdctl put /coreos.com/network/config '{"Network":"172.16.0.0/12", "Backend":{"Type":"vxlan"}}'

I came across the following problem after input "flanneld":

I1028 17:10:54.868704   79569 main.go:514] Determining IP address of default interface
I1028 17:10:54.869922   79569 main.go:527] Using interface with name enp59s0f0 and address 10.10.2.41
I1028 17:10:54.869942   79569 main.go:544] Defaulting external address to interface address (10.10.2.41)
I1028 17:10:54.870460   79569 main.go:244] Created subnet manager: Etcd Local Manager with Previous Subnet: None
I1028 17:10:54.870487   79569 main.go:247] Installing signal handlers
E1028 17:10:54.872134   79569 main.go:382] Couldn't fetch network config: client: response is invalid json. The endpoint is probably not valid etcd cluster endpoint.
timed out
E1028 17:10:55.872961   79569 main.go:382] Couldn't fetch network config: client: response is invalid json. The endpoint is probably not valid etcd cluster endpoint.
timed out

@KeepMovingNo1
Copy link

@zkzhu0110 I have encountered the problem too.
Couldn't fetch network config: client: response is invalid json. The endpoint is probably not valid etcd cluster endpoint,

How did you solve it,
Version:
Flannel: 0.12
etcd: V3.4.9

@taomaree
Copy link

works for etcd 3.4.10:
etcd server: add --enable-v2
etcd client: ETCDCTL_API=2 etcdctl set /coreos.com/network/config '{ "Network": "10.5.0.0/16", "Backend": {"Type": "vxlan"}}'

@cucker0
Copy link

cucker0 commented Sep 14, 2021

Environment

  • etcd 3.5.0 run on docker
  • flannerl 0.14.0

Cause of this problem

  • Since etcd 3.4 introduced api v3 as default.
  • flannel 0.14.0 or lower version just support etcd v2 api.

Solution

Running etcd

docker run -d --restart=always --name etcd-server \
    --publish 2379:2379 \
    --publish 2380:2380 \
    --env ALLOW_NONE_AUTHENTICATION=yes \
    --env ETCD_ADVERTISE_CLIENT_URLS=http://<etcd-server-ip>:2379 \
    bitnami/etcd:3.5.0 "/opt/bitnami/scripts/etcd/run.sh" --enable-v2

Add flannel network information to etcd

  • cat /root/flannel-config.json

    {
      "Network": "10.2.0.0/16",
      "SubnetLen": 24,
      "Backend": {
        "Type": "vxlan"
      }
    }
  • add to etcd

    docker exec -i -e ETCDCTL_API=2 etcd-server etcdctl --endpoints=http://<etcd-server-ip>:2379 set /docker-test/network/config 
    < /root/flannel-config.json

@ydp
Copy link

ydp commented Feb 7, 2022

Hi team, since etcd 3.6 start to deprecate V2 API, probably removed in 3.7 or later, the workaround will not work, do we have any schedule to support V3 API?

@wjun
Copy link

wjun commented Feb 9, 2022

@luthermonson @manuelbuil May I know any plan for v3 support?

@manuelbuil
Copy link
Collaborator

@luthermonson @manuelbuil May I know any plan for v3 support?

Not from my side :(. I hope somebody jumps in and contributes with a PR to fix the problem

@stale
Copy link

stale bot commented Jan 25, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jan 25, 2023
@stale stale bot closed this as completed Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants