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

CNI compatible libnetwork drivers #1978

Open
wants to merge 8 commits into
base: master
from
Open

CNI compatible libnetwork drivers #1978

wants to merge 8 commits into from

Conversation

@abhi
Copy link
Contributor

@abhi abhi commented Oct 12, 2017

This is an initial PR to make Libnetwork drivers such as bridge and overlay work as CNI plugins. A full detailed design doc will be submitted soon.

@abhi abhi force-pushed the abhi:cni branch 3 times, most recently from e01e64e to 6cd0565 Oct 12, 2017
abhi and others added 6 commits Sep 5, 2017
This commit contains the initial set of changes to add
CNI sevice to libnetwork drivers. This is done using
a cniserver which acts as a side car for libnetwork daemon
to process CNI requests.

Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
* Support HostAccess overlay option
* Make HostMode configurable via overlay driver label
* Disble SD and start in host-mode by default for CNI dnet
* Moving the default dnet port from 2385 to 2389
* Fix hostAccess iptables rules
* Implement JoinInfo and LeaveInfo interfaces on all builtin drivers
* Enhance JoinInfo and LeaveInfo to allow ip allocation for gateway-ip
* Make use of the RequestAddress feature for hostAccess overlay network
* HostAccess network must also handle traffic from bridge to ! bridge. This is required for the ingress cases

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
Signed-off-by: Madhu Venugopal <madhu@docker.com>
This commit contains changes related to dynamically
create networks depending on the CNI config and
the current network state in libnetwork instance

Signed-off-by: Abhinandan Prativadi <abhi@docker.com>

CNI libnetwork files

Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
* Make VXLAN and Gossip port configurable
* Configurable Default gateway network name
* Add DataDir configuration params

Signed-off-by: Madhu Venugopal <madhu@docker.com>
This commit introduces configurable IPAM setting
for cni configs. This would allow used to configure the
network level ipam configs in the cni config

Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
@abhi abhi force-pushed the abhi:cni branch 4 times, most recently from fe4d15e to 3358103 Oct 12, 2017
Copy link
Contributor

@mavenugo mavenugo left a comment

Can you slso pls remove the binary files that is inadvertently checked in ?

iptables \
&& rm -rf /var/lib/apt/lists/*

COPY bin/cniserver /var/libnetwork/bin/

This comment has been minimized.

@mavenugo

mavenugo Oct 12, 2017
Contributor

Shouldnt this be ../bin/ (this Dockerfile is in install directory

This comment has been minimized.

@abhi

abhi Oct 13, 2017
Author Contributor

Since its out of build context I have script to copy to the install. will rectify this later.


COPY bin/cniserver /var/libnetwork/bin/
COPY cniserver.sh /var/libnetwork/
COPY bin/cnictl /var/libnetwork/bin/

This comment has been minimized.

@mavenugo

mavenugo Oct 12, 2017
Contributor

Same here.

iptables \
&& rm -rf /var/lib/apt/lists/*

COPY bin/dnet /var/libnetwork/bin/

This comment has been minimized.

@mavenugo

mavenugo Oct 12, 2017
Contributor

same here

sandbox.go Outdated
@@ -619,6 +620,7 @@ func (sb *sandbox) resolveName(req string, networkName string, epList []*endpoin
}

func (sb *sandbox) SetKey(basePath string) error {
fmt.Printf("SetKey: %s \n", basePath)

This comment has been minimized.

@mavenugo

mavenugo Oct 12, 2017
Contributor

Pls remove this.

@abhi abhi force-pushed the abhi:cni branch 8 times, most recently from 8261c85 to 6ea2fb3 Oct 13, 2017
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
@abhi abhi force-pushed the abhi:cni branch from 6ea2fb3 to 9d9b50b Oct 13, 2017
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
@abhi abhi force-pushed the abhi:cni branch from 9d9b50b to 7da1b8f Oct 13, 2017
@@ -36,7 +36,8 @@ build-local:
@mkdir -p "bin"
go build -tags experimental -o "bin/dnet" ./cmd/dnet
go build -o "bin/docker-proxy" ./cmd/proxy

go build -o "bin/cniserver" ./cmd/cni_server
go build -o "bin/cnictl" ./cmd/dnet_cni/

This comment has been minimized.

@ijc

ijc Nov 1, 2017

I think this needs to be statically built since you don't control the environment it will end up running in -- it is run in the context of the runtime (so maybe cri or docker, perhaps in a container) and not in a container/env supplied by libnetwork.

@AkihiroSuda
Copy link
Member

@AkihiroSuda AkihiroSuda commented Feb 2, 2018

What's current status?

@olljanat
Copy link
Contributor

@olljanat olljanat commented May 15, 2018

@abhi is your plan still to get this one merged?
If that helps I fixed merge issues on my fork. You can see them example on here: olljanat/libnetwork#1

@abhi
Copy link
Contributor Author

@abhi abhi commented Jun 8, 2018

@olljanat @AkihiroSuda at this point this is put on hold.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.