Commit Graph

682 Commits

Author SHA1 Message Date
2a6df8d538 Merge pull request #7210 from fcarriedo/refactor-common-code
pkg/units: Refactor common code
Upstream-commit: f906f31877f63a7f9fab954157667e0f341210ba
Component: engine
2014-07-28 11:45:46 -07:00
f378b5d004 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)
Upstream-commit: 81c7d28b842844778a652b7353f52332f4276afb
Component: engine
2014-07-26 20:00:18 -07:00
3b6e93d717 pkg/units: Unit constants directly int64
int64 seems sufficient

Docker-DCO-1.1-Signed-off-by: Francisco Carriedo <fcarriedo@gmail.com> (github: fcarriedo)
Upstream-commit: c7a2e86b5186acb58999d7b2b3a85a9bb4421b1f
Component: engine
2014-07-26 20:00:08 -07:00
81918c582c pkg/units: including suggestions and enhancements
Docker-DCO-1.1-Signed-off-by: fcarriedo <fcarriedo@gmail.com> (github: fcarriedo)
Upstream-commit: 2fb63aba0bf991873d56888f244d6aeee0c5fc57
Component: engine
2014-07-25 09:33:04 -07:00
6ae4c9014c update go import path and libcontainer
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: b3ee9ac74e171e00f14027e39278013629e681b8
Component: engine
2014-07-24 22:19:50 +00:00
f664c76057 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)
Upstream-commit: c765134ac954f54f8b6aca6df25cf5e28911b563
Component: engine
2014-07-24 13:19:20 -07:00
22e53a9bae 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)
Upstream-commit: 386d300a6e07c99380a0814497cf0bc672df1e63
Component: engine
2014-07-24 00:03:59 -07:00
088f734e5e 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)
Upstream-commit: e4ab996b9d0d97089b076cfef32405f5f3fedc7c
Component: engine
2014-07-24 00:03:59 -07:00
23fcdf4f5e 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)
Upstream-commit: d512294382c9013dee2820745db02ab63dc2ecdd
Component: engine
2014-07-24 00:03:40 -07:00
9cee4d41c4 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)
Upstream-commit: a4d57d8a851bf288804215b39c9d56a51550a228
Component: engine
2014-07-23 23:45:03 -07:00
fc192c453a pkg/units: Standardized supported sizes
May make sense that both `FromHumanSize()` and `RAMInBytes()` support
the same units. Added 'PB' to the RAMInBytes regex.

Also updated tests.

Note: int64 is overflowed on quantities >= EB

Docker-DCO-1.1-Signed-off-by: Francisco Carriedo <fcarriedo@gmail.com> (github: fcarriedo)
Upstream-commit: 0fd37bd7ac0f92eda0a55cf2bedf77f1996b8472
Component: engine
2014-07-23 23:37:06 -07:00
1e857dc998 pkg/units: Using 'case' instead of trickled ifs
Seems the perfect case for 'case' ;).

Docker-DCO-1.1-Signed-off-by: Francisco Carriedo <fcarriedo@gmail.com> (github: fcarriedo)
Upstream-commit: 03697f0a93b04122a5039db915afddf60ccec448
Component: engine
2014-07-23 20:38:36 -07:00
b62c8f48b7 Merge pull request #7164 from fcarriedo/not-error-as-var-name
pkg/units: Better to not use `error` as var name
Upstream-commit: 604a975303230cec2684bfede67cedbd9bc50d4d
Component: engine
2014-07-23 11:04:03 -07:00
b782732841 Merge pull request #7167 from unclejack/maintainer_truncindex
pkg/truncindex: add unclejack to MAINTAINERS
Upstream-commit: 885cda1ae252b2ca6d256410cc0bb8c0dc7e8823
Component: engine
2014-07-22 17:10:38 -07:00
204cff966e pkg/units: Better to not use error as var name
Better to not use `error` as var name (might eclipse the error type) for
clarity and to prevent subtle bugs.

Docker-DCO-1.1-Signed-off-by: Francisco Carriedo <fcarriedo@gmail.com> (github: fcarriedo)
Upstream-commit: ea7b8ea03f5c2222060afe435e907c1ab855a44b
Component: engine
2014-07-22 15:39:59 -07:00
24cf66b391 pkg/truncindex: add unclejack to MAINTAINERS
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 7407664c6621782101f73162b7f0ad76a53fa46b
Component: engine
2014-07-22 23:08:28 +03:00
10f00b2b3a pkg/units: Remove unused named returns
Remove named returns since not used in function body.  Might prevent
potential subtle bugs.

Docker-DCO-1.1-Signed-off-by: Francisco Carriedo <fcarriedo@gmail.com> (github: fcarriedo)
Upstream-commit: 588090c49bf2ec077626d89196515e6bef1f7a69
Component: engine
2014-07-22 12:16:50 -07:00
64c32c0b31 pkg/units: Increased test coverage. Closes #7159.
Increased coverage:

  * Added test cases to size_test.go
  * Added coverage for duration.go

Docker-DCO-1.1-Signed-off-by: Francisco Carriedo <fcarriedo@gmail.com> (github: fcarriedo)
Upstream-commit: c47ab1425f0cf08168af7e5561e39ff2e39625e0
Component: engine
2014-07-22 09:56:58 -07:00
fabec654d7 Merge pull request #7061 from muchweb/rms
Can't believe you forgot RMS
Upstream-commit: 86f20e561f1030e5177f3919394b7b8b7f88a410
Component: engine
2014-07-21 12:02:45 -07:00
81d8d08389 Don't create pty slave in the daemon for native driver
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
Upstream-commit: 1501c342d815e3a128dac393b69e23f6ec39c2d7
Component: engine
2014-07-16 16:57:19 -07:00
9b124873a6 Removed :neckbeard: RMS test case
Docker-DCO-1.1-Signed-off-by: Aleksandrs Fadins <aleks@s-ko.net> (github: muchweb)
Upstream-commit: b0e9d370c28ebe6d783f0008c3c0d513c8c030e8
Component: engine
2014-07-16 23:22:21 +01:00
03e13dfc55 Added :neckbeard: RMS the founder of 🐃 GNU and 🆓 as in 🆓dom software
Docker-DCO-1.1-Signed-off-by: Aleksandrs Fadins <aleks@s-ko.net> (github: muchweb)
Upstream-commit: 352909dd54e864186d6050f4601d2fb78d889810
Component: engine
2014-07-16 22:45:08 +01:00
75cb3255af Merge pull request #6720 from fabiofalci/relax_dns_search
Relax dns search to accept empty domain
Upstream-commit: 170609e36957fc044723789bc66918bd7d189702
Component: engine
2014-07-07 15:12:29 -07:00
efbfc9bcff Merge pull request #6645 from snitm/dmthinp-devel
Dmthinp devel
Upstream-commit: 2e4f99d99c34edaba2d37270545af2b8fd753dab
Component: engine
2014-07-07 21:20:31 +03:00
525592aa62 Relax dns search to accept empty domain
In that case /etc/resolv.conf will be generated with no search
option. Usage: --dns-search=.

Docker-DCO-1.1-Signed-off-by: Fabio Falci <fabiofalci@gmail.com> (github: fabiofalci)
Upstream-commit: 804b00cd7d1f084a872211e5043d255c454c8e51
Component: engine
2014-07-04 09:33:53 +01:00
684f8af215 Merge pull request #6748 from LK4D4/increase_max_patricia_prefix
Increase max patricia prefix
Upstream-commit: b0824edc7c93db4c2e880931a4041ca1188a2edd
Component: engine
2014-07-01 19:03:30 -04:00
c1f6739a06 Implement tail for docker logs
Fixes #4330
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: 1dc0caf9c0170ab8e7f5a2f77f2dbdacff322eff
Component: engine
2014-07-01 23:44:12 +04:00
4a9952978a Increase patricia.MaxPrefixPerNode
It allows to avoid redundant prefix splits
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: 095cb7a81800512b99474aec7245bddddd1b2278
Component: engine
2014-06-28 12:27:44 +04:00
f94025a466 sort flags with the same name in a consistent order
Docker-DCO-1.1-Signed-off-by: Jonathan Boulle <jonathanboulle@gmail.com> (github: jonboulle)
Upstream-commit: d14cfc8d435dbef0d70b6444b275a025e60ac171
Component: engine
2014-06-27 01:46:59 +00:00
0256ecf832 Merge pull request #6657 from unclejack/refactor_truncindex
refactor TruncIndex to use a trie & vendor deps
Upstream-commit: cab7894808d5b43590ec230c2391108536c34108
Component: engine
2014-06-26 16:53:49 -07:00
92fe778319 Merge pull request #6625 from vieux/remove_dockerscript
remove dockerscript
Upstream-commit: 69ec5824c3aec1dafb95264577807eac5afd9865
Component: engine
2014-06-26 14:56:22 -07:00
55be9bc370 refactor TruncIndex to use a trie & vendor deps
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: e0dad305791a7406cf819a27fa5a079a46a62acc
Component: engine
2014-06-26 16:57:54 +03:00
9a4ed6541e Merge pull request #6218 from vieux/update_maintainers
Upstream-commit: c9e647e42f3019b619b0ef47ff944831c226624c
Component: engine
2014-06-25 17:00:32 -07:00
2437455209 Merge pull request #6646 from tiborvass/fix-workdir
Fix --workdir=/
Upstream-commit: d91b8bcf0b21f7abf23b06872ad960ebd25e733a
Component: engine
2014-06-25 15:19:51 -07:00
9b24606fc1 Merge pull request #6664 from LK4D4/bench_on_truncindex_delete
Add benchmarks on TrucnIndex.Delete
Upstream-commit: 17f653548260b7e1892dc5dd2153e508938af63f
Component: engine
2014-06-25 14:30:28 -07:00
8897c337e6 Allow re-mounting an existing mount with "remount"
Without this line of code, if a volume is present in /proc/mounts,
it cannot be remounted with new mount options.

Docker-DCO-1.1-Signed-off-by: Peter Waller <p@pwaller.net> (github: pwaller)
Upstream-commit: f87afda12344b726c1bfb49b2dc8b5995f86f4ab
Component: engine
2014-06-25 22:06:24 +01:00
bc0ef19fac Combined AddGet benchmark
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: 04a9fe1e62345d282985724b9eb0cd7446c08449
Component: engine
2014-06-25 22:49:38 +04:00
2ab25c0f86 add integration test for --workdir=/
Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
Upstream-commit: baacc7006b35badb2e9ba807451ab158936d7832
Component: engine
2014-06-25 11:02:59 -04:00
3325b6e290 fix bug in FollowSymlinkInScope when link == root
Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
Upstream-commit: 385c9b1a08aeaf7e08363007e5bb79bf30225b7e
Component: engine
2014-06-25 11:02:59 -04:00
e76ace6106 Add benchmarks on TrucnIndex.Delete
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: 7c8445826fdce3e46253a6e194a33407ed9bd154
Component: engine
2014-06-25 09:37:39 +04:00
7c1e43e819 Merge pull request #6595 from LK4D4/env_benchmarks
Benchmarks for engine/env
Upstream-commit: 1059e166fd4fbe88a05f182139b6fc5fc95ab6b3
Component: engine
2014-06-24 23:35:00 +03:00
a93d5dc92d Benchmarks for engine/env
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: 01b424028ed0ab7d673c7ae2221457ae12304557
Component: engine
2014-06-24 21:48:16 +04:00
c72045b105 Improve truncindex benchmarks
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: 7eb425ccd167487b8424ff680e46216d99fa237a
Component: engine
2014-06-24 21:41:51 +04:00
1ce22444ec Move truncindex in separate package in pkg/
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: ed032ddfd68a8654671a13d676c0f7539e36a10b
Component: engine
2014-06-24 21:19:15 +04:00
d61150b2d4 devmapper: use RAMInBytes() rather than FromHumanSize()
Device Mapper needs device sizes in binary (1024) multiples.  Otherwise
kernel checks can find that the specified thin-pool device sizes aren't
a multiple of the specified thin-pool blocksize.

The name for "RAMInBytes" is likely too narrow given the new consumers
but... Also add "tebibyte" support to RAMInBytes.

Docker-DCO-1.1-Signed-off-by: Mike Snitzer <snitzer@redhat.com> (github: snitm)
Upstream-commit: 2470a5ed999d9dc8d4b9bd250727ac13964db5b3
Component: engine
2014-06-24 12:10:14 -04:00
6d58de7959 Merge pull request #4812 from kzys/freebsd-mount
FreeBSD support on pkg/mount
Upstream-commit: d7587aa97686b83b5ab30e342f95425a16480fcb
Component: engine
2014-06-23 17:45:25 -07:00
41bf695f2f remove dockerscript
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: 431a6736d27fa6eced36793099f579d940fc1e94
Component: engine
2014-06-23 22:52:03 +00:00
cd49e29a76 Merge pull request #6527 from subhraveti/cap-whitelist
Maintain a whitelist of capabilities rather than droplist
Upstream-commit: 7ba8788919bf6ddb5de626f3b1b89c497eed4b86
Component: engine
2014-06-19 14:48:38 -07:00
5d2f394b9a Merge pull request #6493 from vieux/fix_cp_mac_os
allow utimes on mac os, only lutimes isn't supported
Upstream-commit: abda245ddc38200b6ad24f79d194e6f4125a0100
Component: engine
2014-06-19 14:00:59 -07:00
1316dc9e2d Use libcontainer cap drop method
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
Upstream-commit: d31ae5aed80eeb40a461930776ad2b507804bf4e
Component: engine
2014-06-19 16:00:53 -04:00