Commit Graph

116 Commits

Author SHA1 Message Date
Arash Deshmeh 7f71d0d979 removed logging from command/formatter package tests
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
2017-06-15 14:14:59 -04:00
Daniel Nephin 759e59e4a4 Merge pull request #182 from vdemeester/180-fix-stack-rm-config-endpoint
Do not call the config endpoint if API is lower than 1.30
2017-06-14 14:31:01 -04:00
Arash Deshmeh 751278abe6 removed logging from service/inspect test to clean up the output of running tests
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
2017-06-14 12:38:31 -04:00
Vincent Demeester d209929aab Merge pull request #187 from dnephin/small-cleanup-to-image-remove
Fix some problems with image force remove
2017-06-14 09:59:32 +02:00
Vincent Demeester 4ffefe4a1f Merge pull request #115 from jsoref/spelling
Spelling
2017-06-14 09:58:55 +02:00
Vincent Demeester 2128b3f112
Do not call the config endpoint if API is lower than 1.30
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-06-14 09:56:53 +02:00
Aaron Lehmann 275c488734 Merge pull request #72 from thaJeztah/fix-prefix-matching
Fix prefix-matching for service ps
2017-06-13 14:59:37 -07:00
Aaron Lehmann 25bc9f1ce7 Merge pull request #184 from yongtang/167-network-inspect-scope
Use scope=swarm for service related network inspect and revendor docker/docker
2017-06-13 14:47:20 -07:00
Yong Tang 657457ee2c Use `scope=swarm` for service related network inspect.
This fix use `scope=swarm` for service related network inspect.
The purpose is that, in case multiple networks with the same
name exist in different scopes, it is still possible to obtain
the network for services.

This fix is related to moby/moby#33630 and docker/cli#167

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-06-13 20:26:12 +00:00
Daniel Nephin 676b71eaaa Fix some problems with image remove force.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-06-13 12:12:54 -07:00
Arash Deshmeh 006b9b126d fixed the output leak from error test case for config/remove
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
2017-06-13 12:24:42 -04:00
Vincent Demeester dd924ebf4f
Fix remove_test output duplication
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-06-13 14:02:56 +02:00
Vincent Demeester ecc8e0a204 Merge pull request #160 from e11137/master
fixes #46 Always exit 0 when remove image with force option
2017-06-13 14:02:02 +02:00
Vincent Demeester dd585ad4fb Merge pull request #172 from adshmh/fix-secret-remove-testcase-error-message-leak
fixed the output leak from the error test case for secret/remove command
2017-06-09 21:03:33 +02:00
Arash Deshmeh 77062a09dc fixed the output leak from secret/remove command error test case
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
2017-06-09 13:21:14 -04:00
Arash Deshmeh 852bf0f96d removed the output leaked from stack remove error test case
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
2017-06-09 12:14:18 -04:00
Victor Vieux a74e715b1a Merge pull request #166 from thaJeztah/update-term
Bump docker/docker to cd35e4beee13a7c193e2a89008cd87d38fcd0161
2017-06-08 13:45:32 -07:00
Aaron Lehmann 4d980880f3 Merge pull request #121 from nishanttotla/digest-pinning-stack-deploy
Enable client side digest pinning for stack deploy
2017-06-08 23:20:02 +03:00
Daniel Nephin 0310de5213 Move IsArchive and HeaderSize to build/context
Previously these were in docker/docker/pkg/archive, but unused

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-06-08 16:08:11 -04:00
Rogelio Canedo 5c8d702af5 Always exit whith -1 when remove image with force option
Signed-off-by: Rogelio Canedo <rcanedo@mappy.priv>
2017-06-08 20:15:37 +02:00
Sebastiaan van Stijn ab3ea637b6 Merge pull request #111 from keloyang/attach-restarting-check
Add a restarting check to runAttach
2017-06-08 12:53:15 +02:00
Shukui Yang 90f497302f Add a restarting check to runAttach
Signed-off-by: Shukui Yang <yangshukui@huawei.com>
2017-06-08 07:12:39 +08:00
Shukui Yang e8cc2cf760 Replace command.DockerCli to command.Cli in docker attach/exec command
Signed-off-by: Shukui Yang <yangshukui@huawei.com>
2017-06-08 07:03:52 +08:00
Nishant Totla f790e839fc
Change --no-resolve-image flag to --resolve-image string flag
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2017-06-07 12:30:11 -07:00
Nishant Totla 9f1bea2657
Enable client side digest pinning for stack deploy
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2017-06-07 12:30:11 -07:00
Kenfe-Mickaël Laventure 08cb0bddfd Merge pull request #162 from vdemeester/150-configs-fixes-on-old-daemon
Handle case of configs on old daemon
2017-06-07 12:18:32 -07:00
Aaron Lehmann 9d12d6fc87 Merge pull request #145 from dnephin/improve-compose-secrets-errors
Compose: Improve error messages when resource create/update fails
2017-06-07 18:51:10 +03:00
Vincent Demeester cf5550c426
Handle case of configs on old daemon
If configs are declared for a service and pointing on an old
daemon, error out properly (instead of "page not found").

If there is no configs declared, don't call convertServiceConfigObjs
to avoid having an error.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-06-07 17:02:46 +02:00
Vincent Demeester 44ac80881f
Update vendoring of docker/docker
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-06-06 00:23:21 +02:00
Daniel Nephin 3718833f2c Add unit tests for service/ps
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-06-02 11:29:19 -04:00
Sebastiaan van Stijn a0066a150b Merge pull request #143 from thaJeztah/remove-email-flag
Remove deprecated -e/--email flag from docker login
2017-06-02 08:56:07 +02:00
Daniel Nephin 729d07a371 Compose: Improve error messages when resource creation/updates fail.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-06-01 15:03:04 -04:00
Daniel Nephin b5baffde44 Fix complexity of service/ps.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-06-01 11:49:16 -04:00
Sebastiaan van Stijn f10f29df8d
Allow --detach and --quiet flags when using --rollback
Commit 78c204ef79 added
(f9bd8ec8b268581f93095c5a80679f0a8ff498bf in the moby repo)
a validation to prevent `--rollback` from being used
in combination with other flags that update the
service spec.

This validation was not taking into account that
some flags only affect the CLI behavior, and
are okay to be used when rolling back.

This patch updates the validation, and adds
`--quiet` and `--detach` to the list of allowed
flags.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-01 16:31:07 +02:00
Sebastiaan van Stijn 8b383d2351
Remove deprecated -e/--email flag from docker login
The `docker login -e` / `docker login --email` option was deprecated in
Docker 1.11 (https://github.com/moby/moby/releases/tag/v1.11.0) through
aee260d4eb3aa0fc86ee5038010b7bbc24512ae5 (April 2016), and when used has
been outputing a deprecation warning since;

    Flag --email has been deprecated, will be removed in 17.06.

Originally this option was scheduled to be removed in docker 1.13, but
extended to docker 17.06 due to a change in our deprecation policy.

Given that only docker 1.10 and older use this flag (which is EOL, including
for CS versions, as of February 2017), will now be removed.

With this patch, `docker login` will now produce an Error if the flag
is used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-01 12:55:04 +02:00
Vincent Demeester efaadcf465 Merge pull request #132 from mavenugo/stack-host
Host and Bridge network support in docker stack deploy
2017-05-31 15:07:56 -07:00
Sebastiaan van Stijn 6279612443
Fix prefix-matching for service ps
The docker CLI matches objects either by ID _prefix_
or a full name match, but not partial name matches.

The correct order of resolution is;

- Full ID match (a name should not be able to mask an ID)
- Full name
- ID-prefix

This patch changes the way services are matched.

Also change to use the first matching service, if there's a
full match (by ID or Name) instead of continue looking for
other possible matches.

Error handling changed;

- Do not error early if multiple services were requested
  and one or more services were not found. Print the
  services that were not found after printing those that
  _were_ found instead
- Print an error if ID-prefix matching is ambiguous

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-05-31 21:43:56 +02:00
Kenfe-Mickaël Laventure f3cb13c550 Merge pull request #118 from cpuguy83/no_prune_volume
Don't prune volumes on `docker system prune`
2017-05-30 10:21:15 -07:00
Brian Goff 37fd6128dc Don't prune volumes on `docker system prune`
Volumes tend to carry important data and pruning them on `docker system
prune` can easily cause unwanted data loss.

Let's play it safe and not prune volumes on `system prune` by default,
and instead provide an option.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-05-30 12:50:30 -04:00
John Stephens f05cd11ee2
Remove stack configs on stack removal
Signed-off-by: John Stephens <johnstep@docker.com>
2017-05-26 18:17:43 -07:00
Marcus Martins 862649707e
Handle a Docker daemon without registry info
The current implementation of the ElectAuthServer doesn't handle well when the
default Registry server is not included in the response from the daemon Info
endpoint.

That leads to the storage and usage of the credentials for the default registry
(`https://index.docker.io/v1/`) under an empty string on the client config file.

Sample config file after a login via a Docker Daemon without Registry
information:
```json
{
	"auths": {
		"": {
			"auth": "***"
		}
	}
}
```

That can lead to duplication of the password for the default registry and
authentication failures against the default registry if a pull/push is performed
without first authenticating via the misbehaving daemon.

Also, changes the output of the warning message from stdout to sdterr as
per dnephin suggestion.

Signed-off-by: Marcus Martins <marcus@docker.com>
2017-05-26 14:46:39 -07:00
Daniel Nephin 341703d21e Add tests for verifyExternalNetwork
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-26 12:21:04 -04:00
Madhu Venugopal 123f0bfd98 With the introduction of node-local network support, docker services can
be attached to special networks such as host and bridge. This fix brings
in the required changes to make sure the stack file accepts these
networks as well.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2017-05-25 19:50:08 -07:00
Sebastiaan van Stijn 61c0b9f78d Merge pull request #102 from keloyang/attach-block
Recheck the container's state to avoid attach block.
2017-05-24 12:09:38 +01:00
Josh Soref 70a9905ee5 Spelling fixes
* appropriate
* assumption
* attach
* because
* building
* customized
* mapping
* propagated

Signed-off-by: Josh Soref <jsoref@gmail.com>
2017-05-22 01:39:06 +00:00
Shukui Yang f9dc3337f9 Recheck the container's state to avoid attach block.
If use docker attach command to attach to a stop container, it will return
"You cannot attach to a stopped container" error, it's ok, but when
attach to a running container, it(docker attach) use inspect to check
the container's state, if it pass the state check on the client side,
and then the container is stopped, docker attach command still attach to
the container and not exit.

Signed-off-by: Shukui Yang <yangshukui@huawei.com>
2017-05-20 08:02:06 +08:00
Sebastiaan van Stijn eea4a38cd6 Merge pull request #77 from vdemeester/move-duration-opts
Move duration opts into an opts package
2017-05-18 11:15:30 +02:00
Abhinandan Prativadi 40341ae089 Adding network options to service create/update
Changes added to accept network specific options in
docker service create/update

Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
2017-05-17 21:07:48 -07:00
Madhu Venugopal d156151ba1 Merge pull request #49 from aboch/nlo2
Add network create flags --scope, --config-only, --config-from
2017-05-17 20:08:23 -07:00
Sebastiaan van Stijn 74cc280521 Merge pull request #30 from nishanttotla/rename-trust-function
Moving docker service digest pinning to client side
2017-05-18 03:05:48 +02:00