Since docker/docker removed mflag package and libnetwork relies on it
create a copy of mflag package in libnetwork project.
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
Currently ther `service ls` output does not show the
sandbox ID. This adds that to the output so that it can
be used in dnet program.
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
- Enhance dnet to use codegansta/cli as the frontend
- Add `container create/rm` commands only in dnet
- With the above dnet enhancements add more integration tests
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
- it is supposed to be called after lookupContainerID()
but the latter is not guaranteed to succeed and in
case of connection error will return what was passed
to it.
So in order to be able to operate with both long and short
container ids in case of lookupContainerID() failure,
always search by `partial-container-id`
Signed-off-by: Alessandro Boch <aboch@docker.com>
CmdServiceDetach() incorrectly uses containerID where sandboxID is
expected. Thus, procDeleteSandbox() fails to find the corresponding
sandbox and returns the "Resource not found" error.
Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
fix bug for `docker service ls` error:
"Failed to retrieve backend list for service xxx (json: cannot
unmarshal object into Go value of type []client.sandboxResource)"
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
- Maps 1 to 1 with container's networking stack
- It holds container's specific nw options which
before were incorrectly owned by Endpoint.
- Sandbox creation no longer coupled with Endpoint Join,
sandbox and endpoint have now separate lifecycle.
- LeaveAll naturally replaced by Sandbox.Delete
- some pkg and file renaming in order to have clear
mapping between structure name and entity ("sandbox")
- Revisited hosts and resolv.conf handling
- Removed from JoinInfo interface capability of setting hosts and resolv.conf paths
- Changed etchosts.Build() to first write the search domains and then the nameservers
Signed-off-by: Alessandro Boch <aboch@docker.com>
1. replaced --net option for service UI with SERVICE.[NETWORK] format
2. Making using of the default network/driver backend support
3. NetworkName and NetworkType from the UI/API can be empty string
and it will be replaced with DefaultNetwork and DefaultDriver
As per the design goals, we wanted to keep libnetwork core free of
handling defaults. Rather, the clients (docker & dnet) must handle the
defaultness of these entities.
Also, since there is no API to get these Default values from the
backend, UI will not handle the default values either. Hence, this falls
under the responsibility of the API layer to handle this specific case.
Signed-off-by: Madhu Venugopal <madhu@docker.com>
The configuration format for docker runtime is based on daemon flags and
hence adjusting the libnetwork configuration to accomodate it by moving
the TOML based configuration to the dnet tool.
Also changed the controller configuration via options
Signed-off-by: Madhu Venugopal <madhu@docker.com>
In prep for the UI/API updates on Docker to integrate the network and
endpoints, this PR removes the experimental tag from dnet and moving it
to docker UI and API and wrap the top-level "network" and "service"
under experimental.
Signed-off-by: Madhu Venugopal <madhu@docker.com>
In order to support the docker experimental feature build, moving the
service commands under experimental tag. Please refer to :
https://github.com/docker/docker/pull/13338/ for more information
Signed-off-by: Madhu Venugopal <madhu@docker.com>