Commit graph

683 commits

Author SHA1 Message Date
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
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
Francisco Carriedo
f26b6b00d3 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)
2014-07-23 23:37:06 -07:00
Francisco Carriedo
299020949f 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)
2014-07-23 20:38:36 -07:00
Michael Crosby
5b5f71a7e6 Merge pull request #7164 from fcarriedo/not-error-as-var-name
pkg/units: Better to not use `error` as var name
2014-07-23 11:04:03 -07:00
Michael Crosby
b91d46a05c Merge pull request #7167 from unclejack/maintainer_truncindex
pkg/truncindex: add unclejack to MAINTAINERS
2014-07-22 17:10:38 -07:00
Francisco Carriedo
c5a5c6dff1 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)
2014-07-22 15:39:59 -07:00
unclejack
bfd14970fe pkg/truncindex: add unclejack to MAINTAINERS
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-07-22 23:08:28 +03:00
Francisco Carriedo
6f59de0294 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)
2014-07-22 12:16:50 -07:00
Francisco Carriedo
23f29beb82 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)
2014-07-22 09:56:58 -07:00
Michael Crosby
fdff0c00b0 Merge pull request #7061 from muchweb/rms
Can't believe you forgot RMS
2014-07-21 12:02:45 -07:00
Michael Crosby
837a8cf572 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)
2014-07-16 16:57:19 -07:00
s-ko
b828dfcb6f Removed :neckbeard: RMS test case
Docker-DCO-1.1-Signed-off-by: Aleksandrs Fadins <aleks@s-ko.net> (github: muchweb)
2014-07-16 23:22:21 +01:00
s-ko
4054fe2898 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)
2014-07-16 22:45:08 +01:00
Victor Vieux
b4ab982c97 Merge pull request #6720 from fabiofalci/relax_dns_search
Relax dns search to accept empty domain
2014-07-07 15:12:29 -07:00
unclejack
4748fa1590 Merge pull request #6645 from snitm/dmthinp-devel
Dmthinp devel
2014-07-07 21:20:31 +03:00
Fabio Falci
74071a4fba 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)
2014-07-04 09:33:53 +01:00
Tibor Vass
fe44c2e2a8 Merge pull request #6748 from LK4D4/increase_max_patricia_prefix
Increase max patricia prefix
2014-07-01 19:03:30 -04:00
Alexandr Morozov
bb7ecbd92c Implement tail for docker logs
Fixes #4330
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
2014-07-01 23:44:12 +04:00
LK4D4
52171c4961 Increase patricia.MaxPrefixPerNode
It allows to avoid redundant prefix splits
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
2014-06-28 12:27:44 +04:00
Jonathan Boulle
1d8231b230 sort flags with the same name in a consistent order
Docker-DCO-1.1-Signed-off-by: Jonathan Boulle <jonathanboulle@gmail.com> (github: jonboulle)
2014-06-27 01:46:59 +00:00
Michael Crosby
0959287cb7 Merge pull request #6657 from unclejack/refactor_truncindex
refactor TruncIndex to use a trie & vendor deps
2014-06-26 16:53:49 -07:00
Solomon Hykes
6b0ba784b6 Merge pull request #6625 from vieux/remove_dockerscript
remove dockerscript
2014-06-26 14:56:22 -07:00
unclejack
bf6177dbd2 refactor TruncIndex to use a trie & vendor deps
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-06-26 16:57:54 +03:00
Solomon Hykes
e68d8598ca Merge pull request #6218 from vieux/update_maintainers 2014-06-25 17:00:32 -07:00
Michael Crosby
e18289a2c0 Merge pull request #6646 from tiborvass/fix-workdir
Fix --workdir=/
2014-06-25 15:19:51 -07:00
Victor Vieux
97d4485c95 Merge pull request #6664 from LK4D4/bench_on_truncindex_delete
Add benchmarks on TrucnIndex.Delete
2014-06-25 14:30:28 -07:00
Peter Waller
48a09f34bd 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)
2014-06-25 22:06:24 +01:00
LK4D4
e57a8a9d2c Combined AddGet benchmark
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
2014-06-25 22:49:38 +04:00
Tibor Vass
09930dae8f add integration test for --workdir=/
Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
2014-06-25 11:02:59 -04:00
Tibor Vass
517b10352f fix bug in FollowSymlinkInScope when link == root
Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
2014-06-25 11:02:59 -04:00
Alexandr Morozov
1515b32fb9 Add benchmarks on TrucnIndex.Delete
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
2014-06-25 09:37:39 +04:00
unclejack
3b2cc0082b Merge pull request #6595 from LK4D4/env_benchmarks
Benchmarks for engine/env
2014-06-24 23:35:00 +03:00
LK4D4
36543c1541 Benchmarks for engine/env
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
2014-06-24 21:48:16 +04:00
LK4D4
133374f530 Improve truncindex benchmarks
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
2014-06-24 21:41:51 +04:00
LK4D4
fbaca9698c Move truncindex in separate package in pkg/
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
2014-06-24 21:19:15 +04:00
Mike Snitzer
b5dee24bb6 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)
2014-06-24 12:10:14 -04:00
Victor Vieux
1b4ca55744 Merge pull request #4812 from kzys/freebsd-mount
FreeBSD support on pkg/mount
2014-06-23 17:45:25 -07:00
Victor Vieux
a6ecdba762 remove dockerscript
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-06-23 22:52:03 +00:00
Victor Vieux
087f008fc2 Merge pull request #6527 from subhraveti/cap-whitelist
Maintain a whitelist of capabilities rather than droplist
2014-06-19 14:48:38 -07:00
Michael Crosby
9759b506eb Merge pull request #6493 from vieux/fix_cp_mac_os
allow utimes on mac os, only lutimes isn't supported
2014-06-19 14:00:59 -07:00
Michael Crosby
2818f4a410 Use libcontainer cap drop method
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-06-19 16:00:53 -04:00
Vincent Batts
fae2508cfa sqlite-3.6.20-1 unique constraint message
https://github.com/dotcloud/docker/issues/6551

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
2014-06-19 15:24:22 -04:00
LK4D4
f78264e329 Fix go vet errors
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)

Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-06-18 17:39:57 +00:00
Victor Vieux
ce1fb5a1c9 allow utimes on mac os, only lutimes isn't supported
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-06-17 23:19:42 +00:00
Victor Vieux
d18d9ffeaa prevent panic when empty flag
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-06-17 20:45:57 +00:00