Ying Li
4615c92f66
Fix warning in docker CLI when swarm ca --ca-cert, etc. flags are passed,
...
and add a test.
Signed-off-by: Ying Li <ying.li@docker.com >
2017-07-12 14:56:28 -07:00
Daniel Nephin
f27934376d
Fix test and lint failures
...
Split test cases.
Signed-off-by: Daniel Nephin <dnephin@docker.com >
2017-07-12 11:37:35 -04:00
Vincent Demeester and GitHub
87345ed117
Merge pull request #277 from thaJeztah/dont-remove-what-isnt-there
...
Don't attempt to remove unsupported resources on older daemon
2017-07-12 10:43:54 +02:00
Vincent Demeester and GitHub
fa7687a362
Merge pull request #299 from dnephin/less-verbose-fake-cli
...
Less verbose fake cli
2017-07-12 09:56:43 +02:00
Daniel Nephin
42a3800783
Update some tests to remove unnecessary buffers.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com >
2017-07-11 17:52:43 -04:00
Daniel Nephin
3da0cbfdd1
Remove unnecessary use of SetConfigfile
...
Signed-off-by: Daniel Nephin <dnephin@docker.com >
2017-07-11 14:49:30 -04:00
Daniel Nephin
69b142b52a
Update FakeCli to remove duplication in tests.
...
Use byte buffers by default, since that is what is done most of the time.
Signed-off-by: Daniel Nephin <dnephin@docker.com >
2017-07-11 14:49:30 -04:00
Daniel Nephin
102a8f0c9d
Pin all tools used in the Dockerfiles
...
Also update gometalinter to use the official version. The update
found some new gosimple errors, which are fixed.
Also update the filewatcher script for the latest version of filewatcher.
Signed-off-by: Daniel Nephin <dnephin@docker.com >
2017-07-11 14:23:27 -04:00
Sebastiaan van Stijn
2429f15672
Don't attempt to remove unsupported resources on older daemon
...
When running `docker stack rm <some stack>` against an older daemon,
a warning was printed for "configs" being ignored;
WARNING: ignoring "configs" (requires API version 1.30, but the Docker daemon API version is 1.26)
Given that an old daemon cannot _have_ configs, there should not be
a need to warn, or _attempt_ to remove these resources.
This patch removes the warning, and skips fetching (and removing)
configs.
A check if _secrets_ are supported by the daemon is also added,
given that this would result in an error when attempted against
an older (pre 1.13) daemon.
There is one situation where this could lead to secrets or
configs being left behind; if the client is connecting to a
daemon that _does_ support secrets, configs, but the API version
is overridden using `DOCKER_API_VERSION`, no warning is printed,
and secrets and configs are not attempted to be removed.
Given that `DOCKER_API_VERSION` is regarded a feature for
debugging / "power users", it should be ok to ignore this.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2017-07-11 10:29:03 -07:00
Sebastiaan van Stijn
d8a2972cb1
Remove unused prune functions
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2017-07-10 13:27:19 -07:00
Vincent Demeester and GitHub
af6c0896f5
Merge pull request #298 from dnephin/fix-stack-out-stream
...
Fix stack output stream
2017-07-10 09:23:23 +02:00
Sebastiaan van Stijn and GitHub
7ae9bc141c
Merge pull request #259 from aaronlehmann/service-progress-surface-error
...
progress: Show task error in place of progress bar
2017-07-09 00:04:38 -07:00
Sebastiaan van Stijn and GitHub
c99530b1d2
Merge pull request #270 from tych0/warn-only-about-password-on-cli
...
login: print a big warning when using --password
2017-07-08 16:37:40 -07:00
Aaron Lehmann
c9b92a328d
progress: Light refactor
...
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com >
2017-07-06 10:40:35 -07:00
Yassine TIJANI
45b0e7cf1a
fixing SIGSEGV when running containers
...
Signed-off-by: Yassine TIJANI <yasstij11@gmail.com >
moving the deffering of the close after the error checking
Signed-off-by: Yassine TIJANI <yasstij11@gmail.com >
fixing SIGSEGV when running containers
Signed-off-by: Yassine TIJANI <yasstij11@gmail.com >
2017-07-06 18:57:36 +02:00
Vincent Demeester and GitHub
1aa82bc7df
Merge pull request #211 from ksouf/issue-37-add-tests-on-commands
...
adding network_create tests
2017-07-06 08:59:15 +02:00
Aaron Lehmann and GitHub
e672589ec0
Merge pull request #296 from thaJeztah/fix-error-overwrite
...
Fix error variable being overwritten
2017-07-05 19:26:27 -07:00
khaled souf
57c1551991
adding unit tests to network
...
Signed-off-by: khaled souf <khaled.souf@gmail.com >
2017-07-06 00:54:30 +02:00
Sebastiaan van Stijn
4d4c789cac
Fix error variable being overwritten
...
The `err` variable was set in a loop, so only
the last result was taken into account to return
"failure" or not.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2017-07-05 13:54:57 -07:00
Daniel Nephin
0030bfea9f
Remove duplication in task formatting.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com >
2017-07-05 13:40:47 -04:00
Daniel Nephin
fb6deb1077
Fix stream for 'nothing found in stack' message
...
Signed-off-by: Daniel Nephin <dnephin@docker.com >
2017-07-05 13:32:54 -04:00
Sebastiaan van Stijn
e8080dd7e5
update tests for new image struct
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2017-07-04 20:34:24 -07:00
Daniel Nephin and GitHub
3554d02f33
Merge pull request #276 from adshmh/add-unit-tests-to-checkpoint-package
...
add unit tests to checkpoint package
2017-07-04 11:17:25 -04:00
Victor Vieux and GitHub
43fb4a4547
Merge pull request #243 from vieux/scale2
...
add `--detach` to docker scale
2017-07-04 16:36:59 +02:00
Vincent Demeester and GitHub
85b41c3e71
Merge pull request #213 from dnephin/improve-swarm-ca-cmd
...
Refactor and UI changes to `swarm ca` command
2017-07-03 17:02:45 +02:00
Tycho Andersen
c269ad26e8
login: print a big warning when using --password
...
Task command lines are world readable via /proc/pid/cmdline, so this isn't
safe.
Signed-off-by: Tycho Andersen <tycho@tycho.ws >
2017-07-03 08:47:20 -06:00
Victor Vieux
58d3fc24b1
scale all services at once
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com >
2017-07-03 13:40:54 +02:00
Arash Deshmeh
b296abd542
add unit tests to cli/command/checkpoint package
...
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com >
2017-06-30 17:17:47 -04:00
Daniel Nephin and GitHub
379b762495
Merge pull request #273 from adshmh/add-unit-tests-to-task-package
...
add unit tests to task package
2017-06-30 11:41:24 -04:00
Arash Deshmeh
244e28f41f
add unit tests to task package
...
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com >
2017-06-29 17:57:31 -04:00
Daniel Nephin
81e9837859
Refactor caCommand
...
Split out a swarmCAOptions struct for options that are shared between
the ca and update commands.
Change the 'no trust root' message to an error.
Add some unit tests.
Signed-off-by: Daniel Nephin <dnephin@docker.com >
2017-06-29 17:57:06 -04:00
Daniel Nephin
a04aa8fe28
Compress after rewriting the archive.
...
Write a test showing compress failure.
Signed-off-by: Daniel Nephin <dnephin@docker.com >
2017-06-29 13:18:10 -04:00
Vincent Demeester and GitHub
74af31be7f
Merge pull request #227 from dnephin/expose-config
...
expose config credentials without needing the Cli
2017-06-29 19:11:37 +02:00
Kenfe-Mickaël Laventure and GitHub
64486d7820
Merge pull request #255 from albers/system-prune-volume-warning
...
system prune: only warn for volumes if --volumes is given
2017-06-29 08:50:16 -07:00
Harald Albers
849b0e96a0
system prune: only warn about volumes if --volumes is given
...
Signed-off-by: Harald Albers <github@albersweb.de >
2017-06-29 15:07:21 +02:00
Aaron Lehmann
dd3eae84e1
progress: Add unit tests
...
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com >
2017-06-28 17:53:56 -07:00
Charlie Drage
d3f9a6c610
on_failure -> on-failure in compose code
...
on_failure should be on-failure
Signed-off-by: Charlie Drage <charlie@charliedrage.com >
2017-06-28 11:10:02 -04:00
Aaron Lehmann
1ef585f65d
progress: Show task error in place of progress bar
...
If a task encounters an error, the interactive "service create" and
"service update" commands should show that error instead of showing a
stuck progress bar.
To validate:
docker service create --detach=false --name broken --restart-condition=none --replicas 3 busybox asdf
and
docker service create --detach=false --name broken --mode global --restart-condition none busybox asdf
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com >
2017-06-27 15:12:31 -07:00
Aaron Lehmann
82e069026b
progress: Show success message when finished counting down
...
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com >
2017-06-27 15:07:10 -07:00
Victor Vieux
6c6b1091d9
add --detach to docker scale
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com >
2017-06-27 09:55:10 -07:00
Vincent Demeester
105b21d1ab
Rename NewConfigFile to New in configfile package
...
Signed-off-by: Vincent Demeester <vincent@sbr.pm >
2017-06-27 16:31:38 +02:00
Daniel Nephin and Vincent Demeester
62dfbef4d8
Add missing unit tests.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com >
2017-06-27 13:46:47 +02:00
Daniel Nephin and Vincent Demeester
a3cbc70147
Move credential getting functions to the ConfigFile.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com >
2017-06-27 13:46:47 +02:00
Daniel Nephin and Vincent Demeester
33cbb70270
Cleanup config/credentials, remove dependency on config file.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com >
2017-06-27 13:45:50 +02:00
Daniel Nephin and Vincent Demeester
a8c70e43a3
Move config file loading to more appropriate packages.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com >
2017-06-27 13:45:50 +02:00
Sebastiaan van Stijn and GitHub
cfff0e2259
Merge pull request #207 from cyli/warn-swarm-ca-command
...
If `docker swarm ca` is not called with the `--rotate` flag, warn if other flags are passed
2017-06-26 20:56:54 -07:00
Victor Vieux
db60f25561
hide --detach for docker < 17.05
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com >
2017-06-26 18:55:30 -07:00
Victor Vieux and GitHub
0133e13353
Merge pull request #231 from tonistiigi/client-session-fssession
...
Incrementally sending build context
2017-06-26 17:15:34 -07:00
Sebastiaan van Stijn and GitHub
2f58992f85
Merge pull request #237 from aaronlehmann/progress-before-assignment
...
progress: Show progress of replicated tasks before they are assigned
2017-06-26 17:14:07 -07:00
Tonis Tiigi
b95638a5ac
Use long running session in builder
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com >
Add incremental context send support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com >
2017-06-26 16:30:01 -07:00