Commit graph

777 commits

Author SHA1 Message Date
unclejack
65f57a95bb pkg/ioutils: add NewBufReaderWithDrainbufAndBuffer
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-03 11:36:21 +03:00
unclejack
028b28e406 pkg/ioutils: add WriteCloserWrapper
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-03 11:36:21 +03:00
unclejack
27a8494fa3 move some io related utils to pkg/ioutils
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-03 11:36:21 +03:00
Michael Crosby
d5de317844 Merge pull request #7809 from LK4D4/use_increment
Use increment operator
2014-09-01 11:16:25 -07:00
Alexandr Morozov
11c8ff4db8 Use increment operator
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
2014-08-30 21:43:48 +04:00
Sven Dowideit
6a1cc969fc fs.Visit() returns nil flag
Signed-off-by: Sven Dowideit <SvenDowideit@docker.com>
2014-08-29 15:38:03 +10:00
Michael Crosby
47f57a7b7c Merge pull request #7647 from ewindisch/erw-tarsum-maintainer
Add Eric Windisch to MAINTAINER for tarsum
2014-08-27 20:00:19 -07:00
Erik Hollensbe
e404a69123 pkg/networkfs/etchosts: tests for Update method
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-08-27 18:23:41 -07:00
Erik Hollensbe
a7d05377b1 pkg/graphdb: tests for Parents and Children
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-08-27 18:23:41 -07:00
Victor Vieux
527e568217 Update /etc/hosts when linked container is restarted
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-08-27 18:23:41 -07:00
Victor Vieux
241f52bc17 Merge pull request #7708 from SvenDowideit/programatic-usage-options
add the [OPTIONS] string automatically if there are flags defined
2014-08-27 16:40:17 -07:00
SvenDowideit
cf3dfd3d8b add the [OPTIONS] string automatically if there are flags defined
Signed-off-by: SvenDowideit <SvenDowideit@home.org.au>

Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
2014-08-28 08:50:50 +10:00
Victor Vieux
590f57752e Revert "--help option and help command should print to stdout not stderr"
This reverts commit 61b129d81802e3c988cc0e67e488b24968dd748a.

Signed-off-by: Victor Vieux <vieux@docker.com>
2014-08-27 18:59:13 +00:00
Dan Walsh
7b9f693120 --help option and help command should print to stdout not stderr
--help and help are successful commands so output should not go to error.

QE teams have requested this change, also users doing docker help | less
or docker run --help | less would expect this to work.

Usage statement should only be printed when the user asks for it.
Errors should print error message and then suggest the docker COMMAND --help
command to see usage information.

The current behaviour causes the user to have to search for the error message
and sometimes scrolls right off the screen.  For example a error on a
"docker run" command is very difficult to diagnose.

Finally erros should always exit with a non 0 exit code, if the user
makes a CLI error.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2014-08-21 15:35:20 -04:00
Eric Windisch
1387c03c49 Add Eric Windisch to MAINTAINER for tarsum
This code is vital to the security of the project and it is important
we assure it is well-maintained and guarded.

I am vested in assuring this code maintains security and
provides as much compatibility as possible between releases.

Signed-off-by: Eric Windisch <eric@windisch.us>
2014-08-20 11:19:46 -07:00
unclejack
1595a81343 pkg/tarsum: avoid buf2 allocation in Read
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-08-17 14:45:11 +03:00
Erik Hollensbe
e53a7b767a move utils.Fataler to pkg/log.Fataler
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-08-13 15:32:41 -07:00
Josiah Kiehl
6d4b3605f7 Extract log utils into pkg/log
Docker-DCO-1.1-Signed-off-by: Josiah Kiehl <josiah@capoferro.net> (github: capoferro)
2014-08-13 15:18:15 -07:00
Michael Crosby
f5d12e100c Exit after receiving SIGTERM
Signed-off-by: Michael Crosby <michael@docker.com>
2014-08-13 12:18:23 -07:00
Alexandr Morozov
e4ec7eadc3 Fix deadlock on failed dial in UDP userland proxy
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
2014-08-13 17:18:37 +04:00
lalyos
76c1b1371b Fix equal short-long version number comparison
Signed-off-by: Lajos Papp <lajos.papp@sequenceiq.com>
2014-08-11 23:40:35 +02:00
lalyos
12bfdf1727 Add test case for identical short and long version numbers
Signed-off-by: Lajos Papp <lajos.papp@sequenceiq.com>
2014-08-11 23:36:09 +02:00
Solomon Hykes
327067ef34 Move signal handling code to pkg/signal.Trap
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-08-06 17:56:11 +00:00
Michael Crosby
82b1b477ac Merge pull request #7329 from erikh/move_broadcastwriter
Cleanup: utils/broadcastwriter -> pkg/broadcastwriter
2014-08-07 14:51:42 -07:00
Michael Crosby
cfa9032def Graphtest is ok to compile normally
The graphtest package is only imported in the test files of other
packages therefore we do not leak testing flags.

Signed-off-by: Michael Crosby <michael@docker.com>
2014-08-07 14:33:09 -07:00
Peter Bourgon
1543060953 Only import "testing" from *_test.go
This prevents the testing package flags from leaking into the flagsets
of binaries that import docker. I left integration-cli alone.

Docker-DCO-1.1-Signed-off-by: Peter Bourgon <peter@bourgon.org> (github: peterbourgon)
2014-08-07 14:25:21 -07:00
Erik Hollensbe
cc2edda3b8 utils.Debugf -> log.Printf, move jsonlog to own package.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-08-06 16:39:01 -07:00
Erik Hollensbe
e722184c25 utils/broadcastwriter -> pkg/broadcastwriter
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-08-06 16:37:01 -07:00
Tianon Gravi
286bd69270 Replace "amd64" build tags with "cgo" as appropriate, and remove where unnecessary
Signed-off-by: Andrew Page <admwiggin@gmail.com>
2014-08-06 17:20:21 -06:00
Tianon Gravi
dec28e592c Purge the bits of pkg/system that moved to libcontainer/system
Signed-off-by: Andrew Page <admwiggin@gmail.com>
2014-08-02 01:35:04 -06:00
Michael Crosby
5ba812967e Merge pull request #7312 from tianon/update-libcontainer
Bump libcontainer dep
2014-07-31 15:20:07 -07:00
Tibor Vass
6b2fccd531 Merge pull request #7324 from erikh/move_tarsum
Move tarsum to pkg/
2014-07-31 16:56:24 -04:00
Tianon Gravi
f8d5101f19 Remove pkg/user now that it's embedded in libcontainer
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-07-31 12:46:39 -06:00
Erik Hollensbe
241c9b56dd utils.Debugf -> fmt.Printf
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-07-30 08:42:53 -07:00
Tibor Vass
f7cec086a6 Add OS to docker info
Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
2014-07-30 10:37:52 -04:00
Erik Hollensbe
07cec009c8 move testdata to tarsum package.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-07-30 06:52:24 -07:00
Erik Hollensbe
7c58e704bc utils/tarsum* -> pkg/tarsum
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-07-30 06:42:12 -07:00
Erik Hollensbe
c91872166b Move parsing functions to pkg/parsers and the specific kernel handling
functions to pkg/parsers/kernel, and parsing filters to
pkg/parsers/filter. Adjust imports and package references.

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-07-29 13:09:10 -07:00
Victor Vieux
de3aec0865 Merge pull request #7272 from unclejack/create_httputils_pkg
move resumablerequestreader to pkg/httputils
2014-07-29 12:18:10 -07:00
unclejack
1d56b93f84 move resumablerequestreader to pkg
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-07-29 16:30:45 +03:00
Victor Vieux
9f4db5ab98 Merge pull request #7210 from fcarriedo/refactor-common-code
pkg/units: Refactor common code
2014-07-28 11:45:46 -07:00
Francisco Carriedo
2261fc98e1 pkg/units: Updated tests with unit constants
Also, now that I was at it, gave them a small refactor.

Docker-DCO-1.1-Signed-off-by: Francisco Carriedo <fcarriedo@gmail.com> (github: fcarriedo)
2014-07-26 20:00:18 -07:00
Francisco Carriedo
804ea3b58e pkg/units: Unit constants directly int64
int64 seems sufficient

Docker-DCO-1.1-Signed-off-by: Francisco Carriedo <fcarriedo@gmail.com> (github: fcarriedo)
2014-07-26 20:00:08 -07:00
fcarriedo
16fedac8f0 pkg/units: including suggestions and enhancements
Docker-DCO-1.1-Signed-off-by: fcarriedo <fcarriedo@gmail.com> (github: fcarriedo)
2014-07-25 09:33:04 -07:00
Victor Vieux
bb2a94eeef update go import path and libcontainer
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-07-24 22:19:50 +00:00
fcarriedo
5b2827a2f4 pkg/units: Updated Compile() to MustCompile()
We were doing exactly what `regexp.MustCompile()` already does.

Docker-DCO-1.1-Signed-off-by: fcarriedo <fcarriedo@gmail.com> (github: fcarriedo)
2014-07-24 13:19:20 -07:00
Francisco Carriedo
cf6402681b pkg/units: Refactored common code to single func
Both functions perform the same logic and they just vary on the base
multiplication units. We can refactor the common code into a single
place.

Docker-DCO-1.1-Signed-off-by: Francisco Carriedo <fcarriedo@gmail.com> (github: fcarriedo)
2014-07-24 00:03:59 -07:00
Francisco Carriedo
e8322a7fd7 pkg/units: Moved 'units' out of function
No need to initialize every time the function executes since it works as
a catalog.

Docker-DCO-1.1-Signed-off-by: Francisco Carriedo <fcarriedo@gmail.com> (github: fcarriedo)
2014-07-24 00:03:59 -07:00
Francisco Carriedo
7595bd19d8 pkg/units: Compacted var declaration and initialization
No need to have two lines. The type is even explicit when type casting
to `float64(size)`

Docker-DCO-1.1-Signed-off-by: Francisco Carriedo <fcarriedo@gmail.com> (github: fcarriedo)
2014-07-24 00:03:40 -07:00
Francisco Carriedo
d56f2248e4 pkg/units: Refactor regexp.Compile to init()
No need to recompile a fixed regular expression each time the function
executes. Abstracting it to the `init()` method.

Docker-DCO-1.1-Signed-off-by: Francisco Carriedo <fcarriedo@gmail.com> (github: fcarriedo)
2014-07-23 23:45:03 -07:00