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
Choose a base branch
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 cni branch 3 times, most recently from e01e64e to 6cd0565 Compare October 12, 2017 18:34
abhi and others added 6 commits October 12, 2017 11:38
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 cni branch 4 times, most recently from fe4d15e to 3358103 Compare October 12, 2017 19:38
Copy link
Contributor

@mavenugo mavenugo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

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

COPY bin/dnet /var/libnetwork/bin/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls remove this.

@abhi abhi force-pushed the cni branch 8 times, most recently from 8261c85 to 6ea2fb3 Compare October 13, 2017 06:10
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
@@ -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/
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

What's current status?

@olljanat
Copy link
Contributor

@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 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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants