summaryrefslogtreecommitdiff
path: root/libnetwork/cmd
Commit message (Collapse)AuthorAgeFilesLines
* [chore] clean up reexec.Init() callsCory Snider2023-05-091-5/+0
| | | | | | | | | | | | | | | | | Now that most uses of reexec have been replaced with non-reexec solutions, most of the reexec.Init() calls peppered throughout the test suites are unnecessary. Furthermore, most of the reexec.Init() calls in test code neglects to check the return value to determine whether to exit, which would result in the reexec'ed subprocesses proceeding to run the tests, which would reexec another subprocess which would proceed to run the tests, recursively. (That would explain why every reexec callback used to unconditionally call os.Exit() instead of returning...) Remove unneeded reexec.Init() calls from test and example code which no longer needs it, and fix the reexec.Init() calls which are not inert to exit after a reexec callback is invoked. Signed-off-by: Cory Snider <csnider@mirantis.com>
* libnetwork: remove ovrouter cmdAlbin Kerouanton2023-04-061-171/+0
| | | | | | | | | | This command was useful when overlay networks based on external KV store was developed but is unused nowadays. As the last reference to OverlayBindInterface and OverlayNeighborIP netlabels are in the ovrouter cmd, they're removed too. Signed-off-by: Albin Kerouanton <albinker@gmail.com>
* libnet: convert to new-style driver registrationCory Snider2023-01-271-6/+1
| | | | | | | | | | | | | | | | | Per the Interface Segregation Principle, network drivers should not have to depend on GetPluginGetter methods they do not use. The remote network driver is the only one which needs a PluginGetter, and it is already special-cased in Controller so there is no sense warping the interfaces to achieve a foolish consistency. Replace all other network drivers' Init functions with Register functions which take a driverapi.Registerer argument instead of a driverapi.DriverCallback. Add back in Init wrapper functions for only the drivers which Swarmkit references so that Swarmkit can continue to build. Refactor the libnetwork Controller to use the new drvregistry.Networks and drvregistry.IPAMs driver registries in place of the legacy ones. Signed-off-by: Cory Snider <csnider@mirantis.com>
* libnetwork: use example.com for tests and examplesSebastiaan van Stijn2023-01-101-1/+1
| | | | | | | | Trying to remove the "docker.io" domain from locations where it's not relevant. In these cases, this domain was used as a "random" domain for testing or example purposes. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* fix formatting of "nolint" tags for go1.19Sebastiaan van Stijn2022-07-131-4/+4
| | | | | | | | | | | | | | | | | | | | | | The correct formatting for machine-readable comments is; //<some alphanumeric identifier>:<options>[,<option>...][ // comment] Which basically means: - MUST NOT have a space before `<identifier>` (e.g. `nolint`) - Identified MUST be alphanumeric - MUST be followed by a colon - MUST be followed by at least one `<option>` - Optionally additional `<options>` (comma-separated) - Optionally followed by a comment Any other format will not be considered a machine-readable comment by `gofmt`, and thus formatted as a regular comment. Note that this also means that a `//nolint` (without anything after it) is considered invalid, same for `//#nosec` (starts with a `#`). Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* fix typo (cluser -> cluster)Sebastiaan van Stijn2022-06-271-1/+1
| | | | Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* all: replace strings.Replace with strings.ReplaceAllEng Zer Jun2022-05-091-1/+1
| | | | | | | | strings.ReplaceAll(s, old, new) is a wrapper function for strings.Replace(s, old, new, -1). But strings.ReplaceAll is more readable and removes the hardcoded -1. Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
* refactor: move from io/ioutil to io and os packageEng Zer Jun2021-08-272-6/+5
| | | | | | | | The io/ioutil package has been deprecated in Go 1.16. This commit replaces the existing io/ioutil functions with their new definitions in io and os packages. Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
* Update to Go 1.17.0, and gofmt with Go 1.17Sebastiaan van Stijn2021-08-241-0/+1
| | | | Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Fix gosec complaints in libnetworkBrian Goff2021-06-251-1/+1
| | | | | | | | | These were purposefully ignored before but this goes ahead and "fixes" most of them. Note that none of the things gosec flagged are problematic, just quieting the linter here. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
* Move proxy CLI to main cmd/Brian Goff2021-06-256-801/+0
| | | | | | | Since this command is part of the official distribution and even required for tests, let's move this up to the main cmd's. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
* Remove dnet libnetwork cliBrian Goff2021-06-256-875/+0
| | | | | | | | | This was used for testing purposes when libnetwork was in a separate repo. Now that it is integrated we no longer need it since dockerd and docker cli provide the same function. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
* libnetwork: replace BurntSushi/toml with pelletier/go-tomlSebastiaan van Stijn2021-06-051-2/+6
| | | | | | | | | | The BurntSushi project is no longer maintained, and the container ecosystem is moving to use the pelletier/go-toml project instead. This patch moves libnetwork to use the pelletier/go-toml library, to reduce our dependency tree and use the same library in all places. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* More libnetwork windows test fixesBrian Goff2021-06-021-0/+2
| | | | Signed-off-by: Brian Goff <cpuguy83@gmail.com>
* Fixup libnetwork lint errorsBrian Goff2021-06-017-80/+29
| | | | Signed-off-by: Brian Goff <cpuguy83@gmail.com>
* Fix some windows issues in libnetwork testsBrian Goff2021-06-011-1/+1
| | | | | | Fix build constraints for linux-only network drivers Signed-off-by: Brian Goff <cpuguy83@gmail.com>
* Fix issues running libnetwork tests.Brian Goff2021-06-011-0/+7
| | | | | | | | libnetwork does different stuff depending on if you are running the tests in a container or not... without telling it we are in a container a bunch of the tests actually fail. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
* Fix libnetwork importsBrian Goff2021-06-019-31/+31
| | | | | | | | | After moving libnetwork to this repo, we need to update all the import paths for libnetwork to point to docker/docker/libnetwork instead of docker/libnetwork. This change implements that. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
* Fix IPv6 Port Forwarding for the Bridge DriverArko Dasgupta2020-12-144-3/+28
| | | | | | | | | 1. Allocate either a IPv4 and/or IPv6 Port Binding (HostIP, HostPort, ContainerIP, ContainerPort) based on the input and system parameters 2. Update the userland proxy as well as dummy proxy (inside port mapper) to specifically listen on either the IPv4 or IPv6 network Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
* vendor: docker/docker 7ca355652fe0e2f7401d424d65a81dc248360127Sebastiaan van Stijn2020-09-122-2/+2
| | | | Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Remove dependency on github.com/docker/docker/optsSebastiaan van Stijn2020-09-121-5/+74
| | | | Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Migrate from github.com/codegangsta/cli to github.com/urfave/cliTobias Klauser2020-01-243-3/+3
| | | | | | | The library was moved quite a while ago, adjust the module path. No code changes. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
* Update sctp packageSascha Grunert2019-06-242-4/+4
| | | | | | | | This commit updates the vendored ishidawataru/sctp and adapts its used types. Signed-off-by: Sascha Grunert <sgrunert@suse.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* update docker/docker and dependenciesSebastiaan van Stijn2019-04-081-1/+1
| | | | Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* doc: fix typoYan Zhu2018-09-071-4/+4
| | | | Signed-off-by: Yan Zhu <yanzhu@alauda.io>
* Move SSD image to dockerDani Louca2018-08-141-1/+1
| | | | Signed-off-by: Dani Louca <dani.louca@docker.com>
* Merge pull request #2216 from fcrisciani/netdb-qlen-issueFlavio Crisciani2018-07-052-23/+187
|\ | | | | NetworkDB qlen optimization
| * Enhance testing infraFlavio Crisciani2018-07-022-23/+187
| | | | | | | | | | | | | | Allow to write and delete X number of entries Allow to query the queue length Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
* | Allows to set generic knobs on the SandboxFlavio Crisciani2018-06-281-3/+2
|/ | | | | | | | Refactor the ostweaks file to allows a more easy reuse Add a method on the osl.Sandbox interface to allow setting knobs on the sandbox Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
* Add retry to cluster-peersFlavio Crisciani2018-06-211-15/+36
| | | | | | Add retry field to cluster-peers probe Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
* Enable network-db test image creationFlavio Crisciani2018-05-296-0/+972
| | | | | | | Updated makefile Moved binaries in the bin/ directory Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
* Switch from x/net/context -> contextKir Kolyshkin2018-04-241-1/+1
| | | | | | | | | | | Since Go 1.7, context is a standard package. Since about Go 1.9 time, all x/net/context provides is a few aliases to types in context, meaning "x/net/context" and "context" can be mixed freely. Some vendored packages still use x/net/context, so vendor entry remains for now. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
* Fix README flag and expose orphan network peersFlavio Crisciani2018-03-231-2/+2
| | | | | | | - Readme example was using wrong flag - Network peers were not exposed properly Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
* Add an explicit flag to join network in diagnosticFlavio Crisciani2018-02-233-9/+38
| | | | | | | | | | | | | Usually a diagnostic session wants to check the local state without this flag the network is joined and left every iteration altering actually the daemon status. Also if the diagnostic client is used against a live node, the network leave has a very bad side effect of kicking the node out of the network killing its internal status. For the above reason introducing the flag -a to be explicit so that the current state is always preserved Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
* Merge pull request #2075 from dani-docker/orca-6793Flavio Crisciani2018-02-211-6/+19
|\ | | | | Make SSD portable and useable outside the default image & error check when network on a particular node has no services.
| * Make ssd portable and usuable outside the default image.Dani Louca2018-02-121-6/+19
| | | | | | | | | | | | Add error check when network on a particular node has no services Signed-off-by: Dani Louca <dani.louca@docker.com>
* | Support SCTP port mappingWataru Ishida2018-02-134-12/+167
|/ | | | | Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp> Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
* Import the ssd tool in libnetworkFlavio Crisciani2018-02-073-0/+261
| | | | Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
* Diagnostic clientFlavio Crisciani2018-01-255-0/+455
| | | | | | | | | | | - the client allows to talk to the diagnostic server and decode the internal values of the overlay and service discovery - the tool also allows to remediate in case of orphans entries - added README Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
* bump docker/docker to master and unfork dependenciesSebastiaan van Stijn2017-10-251-6/+5
| | | | | | | | | | | | | | This patch updates all dependencies to match what is used in moby/moby. Making the dependencies match what is used in that repository makes sure we test with the same version as libnetwork is later built with in moby. This also gets rid of some temporary forks that were needed during the migration of Sirupsen/logrus to sirupsen/logrus. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Fix lint issuesFlavio Crisciani2017-09-201-5/+1
| | | | | | | The package updated and now shows new warnings that had to be corrected to let the CI pass Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
* Merge pull request #1830 from huikang/dnet-remove-unused-methodFlavio Crisciani2017-08-231-7/+0
|\ | | | | dnet: remove unused method for dnetConnection struct
| * dnet: remove unused method for dnetConnection structHui Kang2017-07-061-7/+0
| | | | | | | | | | | | | | The cluster provider interface does not need GetNetworkKeys and SetNetworkKeys Signed-off-by: Hui Kang <kangh@us.ibm.com>
* | Update logrus to v1.0.1Derek McGowan2017-08-073-3/+3
| | | | | | | | | | | | | | Fix case sensitivity issue Update docker and runc vendors Signed-off-by: Derek McGowan <derek@mcgstyle.net>
* | Revert "use builtin package context rather than vendored one"Flavio Crisciani2017-07-281-1/+1
| | | | | | | | Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
* | use builtin package context rather than vendored oneallencloud2017-07-131-1/+1
|/ | | | Signed-off-by: allencloud <allen.sun@daocloud.io>
* Revert "Move Cluster provider back to Moby"Flavio Crisciani2017-05-251-5/+5
| | | | Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
* Moved the cluster provider to MobyFlavio Crisciani2017-05-241-5/+5
| | | | | | | Moved the cluster provider interface definition from libnetwork to moby Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
* Fix for swarm/libnetwork init race conditionFlavio Crisciani2017-05-041-4/+5
| | | | | | | | | | | | | | | | | | | | | This change cleans up the SetClusterProvider method. Swarm calls the SetClusterProvider to pass to libnetwork the pointer of the provider from which libnetwork can fetch all the information to initialize the internal agent. The method can be and is called multiple times passing the same value, with the previous logic that was erroneusly spawning multiple go routines that were making possiblea race between an agentInit and an agentClose. The new logic aims to disallow it by checking for the provider passed and ensuring that if the provider is already present there is nothing to do because there is already an active go routine that is ready to process cluster events. Moreover a patch on moby side takes care of clearing up the Cluster Events dispacthing using only 1 channel to handle all the events types. This will also guarantee in order event handling because now all the events are piped into one single channel. Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
* Change GetRemoteAddr to return all managersFlavio Crisciani2017-04-271-2/+2
| | | | | | | | | Change in the provider interface to let the provider return the whole list of managers. This will allow the netwrok db to have multiple choice to establish the first adjacencies Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>