Commit graph

17462 commits

Author SHA1 Message Date
Doug Davis
5ced3ab323 Add a test to make sure that --tlsverify=false turn on tls in daemon
Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-07-30 21:21:24 -07:00
Tibor Vass
500a314713 Merge pull request #15179 from Microsoft/10662-yetmoretodos
Windows: Tidy verifyContainerSettings
2015-07-30 23:58:16 -04:00
Tibor Vass
b48d744b07 Merge pull request #15175 from MHBauer/cliconfig-lint
additional lint fix and enable linter for cliconfig package
2015-07-30 23:07:19 -04:00
Tibor Vass
ad96fc310b Merge pull request #14970 from tiborvass/windows-registry-endpoint
registry: Change default endpoint on windows to a windows-specific one
2015-07-30 22:41:34 -04:00
Tibor Vass
9a9a12b351 Merge pull request #15123 from ewindisch/seed-pkgrand-cryptorand
Prefer crypto rand seed for pkg/rand
2015-07-30 22:41:17 -04:00
Tibor Vass
8d2739df98 Merge pull request #15146 from kolyshkin/mkdirall
Simplify and fix MkdirAll usage
2015-07-30 22:40:57 -04:00
Tibor Vass
0b089bc7d5 Merge pull request #15186 from brahmaroutu/btrfs_test_failure
fix unit test breakage due to lint changes
2015-07-30 22:39:40 -04:00
Stephen Day
e49ab10556 Merge pull request #15190 from tiborvass/bump-distrib
Update distribution to fix uuid.Loggerf initialization logic
2015-07-30 19:19:36 -07:00
Tibor Vass
e496d40107 Merge pull request #15189 from jrabbit/fix-restart-policy-link
Docs: Actually link to restart policy information
2015-07-30 21:44:16 -04:00
Tibor Vass
3face3c521 Use default no-op uuid.Loggerf for client cli
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-07-30 21:19:51 -04:00
Tibor Vass
084af30f39 Add missing LICENSE files for docker/notary
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-07-30 21:19:18 -04:00
jrabbit
d2cd142ce1 Actually link to the information
Signed-off-by: jrabbit <jackjrabbit@gmail.com>
2015-07-30 21:16:45 -04:00
Tibor Vass
0cce1fb37f Vendor docker/distribution to 7dc8d4a26b689bd4892f2f2322dbce0b7119d686
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-07-30 21:14:39 -04:00
Alessandro Boch
4964ab0821 Add test code to cover issue #14859
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-07-30 17:37:11 -07:00
Alessandro Boch
91274625ba Vendoring libnetwork 31139cdb513aea5ad1ed08b60d4350a68b4c96db
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-07-30 17:28:40 -07:00
Srini Brahmaroutu
22873eae31 fix unit test breakage due to lint changes
Addresses #14756

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-07-31 00:22:28 +00:00
David Calavera
ffeec2bdd1 Merge pull request #15184 from jfrazelle/fix-install
fix regression
2015-07-30 16:59:13 -07:00
Tibor Vass
e2b2c2ae81 Merge pull request #15180 from tiborvass/fix-v1-mirror-fallback
registry: allow fallback on unknown errors
2015-07-30 19:54:48 -04:00
Phil Estes
044b56e94f Merge pull request #15174 from Microsoft/10662-top
Windows: Top (non-)implementation
2015-07-30 19:49:15 -04:00
Jessica Frazelle
b0af811272 fix regression
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-07-30 16:38:51 -07:00
Eric Windisch
f8f4deb0b2 Merge pull request #15154 from stefanberger/apparmor-engine
contrib: Extend engine apparmor profile for tools needed by devicemapper
2015-07-30 19:22:28 -04:00
Jessie Frazelle
5b65284649 Merge pull request #15103 from Djelibeybi/fix14924
Seperate lsb_dist detection from dist_version detection
2015-07-30 16:21:35 -07:00
Tibor Vass
a21ba12f4e registry: allow fallback on unknown errors
This patch fixes a bug where a user specifies a v1 mirror for
--registry-mirror and pull an image from the Hub.

It used to not fallback because of an unexpected error returned when
trying to JSON marshal nginx output.

We now ensure that any unexpected error falls back to the next endpoint
in the list.

Signed-off-by: Tibor Vass <tibor@docker.com>
2015-07-30 19:03:38 -04:00
John Howard
3fea79bfd8 Windows: Address more todos
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-07-30 15:28:11 -07:00
David Calavera
c1e2e4d9c6 Merge pull request #15176 from Microsoft/10662-removesometodos
Windows: Remove some TODOs
2015-07-30 15:26:06 -07:00
David Calavera
86a6e4914f Merge pull request #14922 from rhatdan/netlabel
Label /etc/resolv.conf, /etc/hosts ... correctly in shared network co…
2015-07-30 15:03:49 -07:00
John Howard
f50b916ca6 Windows: Remove some TODOs
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-07-30 14:46:51 -07:00
Morgan Bauer
e809919e26
lint fix and enable linter for cliconfig package
Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
2015-07-30 14:37:37 -07:00
Tibor Vass
5c9e5bfb0f Merge pull request #15106 from jgkamat/links
Fix a couple broken links
2015-07-30 17:28:11 -04:00
Aaron Lehmann
d4836cd7ec Documentation improvements and code cleanups for graph package
Expand the godoc documentation for the graph package.

Centralize DefaultTag in the graphs/tag package instead of defining it
twice.

Remove some unnecessary "config" structs that are only used to pass
a few parameters to a function.

Simplify the GetParentsSize function - there's no reason for it to take
an accumulator argument.

Unexport some functions that aren't needed outside the package.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-30 14:27:10 -07:00
John Howard
0a9ec21818 Windows: Top (non-)implementation
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-07-30 14:25:15 -07:00
Tibor Vass
41d9270a40 Merge pull request #15170 from runcom/i-like-cleaning
Remove HostConfig,SetHostConfig from daemon.container
2015-07-30 17:23:58 -04:00
Alexander Morozov
8505183252 Merge pull request #14950 from ottok/master
Multiple fixes to 'docker stats' output
2015-07-30 14:02:35 -07:00
David Calavera
030f61df3d Merge pull request #14885 from jlhawn/fix_cp_symlink
Fix copying of symlinks in containers
2015-07-30 13:42:40 -07:00
Alexander Morozov
9431acbc0a Merge pull request #15169 from Microsoft/10662-tidydiff
Tidy platform common bits in diff
2015-07-30 13:42:27 -07:00
Antonio Murdaca
f95333010e Remove HostConfig,SetHostConfig from daemon.container
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-07-30 22:25:31 +02:00
John Howard
5ab9654bc4 Tidy platform common bits in diff
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-07-30 13:04:49 -07:00
Tibor Vass
2f1a7c903f Merge pull request #14844 from WeiZhang555/golint-api
fix golint errors/warnings of pkg api/
2015-07-30 16:02:06 -04:00
Alexander Morozov
75c082c4b2 Merge pull request #15168 from Microsoft/10662-daemonconfiglocation
Windows: [TP3] Move daemon config directory
2015-07-30 12:56:52 -07:00
Tibor Vass
2d730c93b4 Merge pull request #15148 from hqhq/hq_golint_native
Add back golint for daemon/execdriver/native
2015-07-30 15:51:06 -04:00
John Howard
9ed4400baf Windows: Move daemon config directory
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-07-30 12:39:19 -07:00
Josh Hawn
75f6929b44 Fix docker cp Behavior With Symlinks
[pkg/archive] Update archive/copy path handling

  - Remove unused TarOptions.Name field.
  - Add new TarOptions.RebaseNames field.
  - Update some of the logic around path dir/base splitting.
  - Update some of the logic behind archive entry name rebasing.

[api/types] Add LinkTarget field to PathStat

[daemon] Fix stat, archive, extract of symlinks

  These operations *should* resolve symlinks that are in the path but if the
  resource itself is a symlink then it *should not* be resolved. This patch
  puts this logic into a common function `resolvePath` which resolves symlinks
  of the path's dir in scope of the container rootfs but does not resolve the
  final element of the path. Now archive, extract, and stat operations will
  return symlinks if the path is indeed a symlink.

[api/client] Update cp path hanling

[docs/reference/api] Update description of stat

  Add the linkTarget field to the header of the archive endpoint.
  Remove path field.

[integration-cli] Fix/Add cp symlink test cases

  Copying a symlink should do just that: copy the symlink NOT
  copy the target of the symlink. Also, the resulting file from
  the copy should have the name of the symlink NOT the name of
  the target file.

  Copying to a symlink should copy to the symlink target and not
  modify the symlink itself.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2015-07-30 12:14:28 -07:00
Tibor Vass
a687448c4d Merge pull request #15163 from crosbymichael/proc-ro
Don't mount /proc as ro
2015-07-30 15:12:29 -04:00
Tibor Vass
5fa26e3df8 Merge pull request #15161 from ewindisch/fix-netns
Only explicitly deny ptrace for container-originated procs
2015-07-30 15:11:12 -04:00
Brian Goff
b149d9d0d9 Merge pull request #15156 from duglin/AddErrTruncIndex
Add missing typed error in truncindex
2015-07-30 14:55:40 -04:00
Tibor Vass
4a92b8a0ef registry: Change default endpoint on windows to a windows-specific one
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-07-30 14:52:41 -04:00
Tibor Vass
06668de15e Merge pull request #15167 from tiborvass/better-tlsconf-error-msg
tlsconfig: better format for error message in tlsconfig
2015-07-30 14:51:35 -04:00
Kir Kolyshkin
a83a769347 Simplify and fix os.MkdirAll() usage
TL;DR: check for IsExist(err) after a failed MkdirAll() is both
redundant and wrong -- so two reasons to remove it.

Quoting MkdirAll documentation:

> MkdirAll creates a directory named path, along with any necessary
> parents, and returns nil, or else returns an error. If path
> is already a directory, MkdirAll does nothing and returns nil.

This means two things:

1. If a directory to be created already exists, no error is returned.

2. If the error returned is IsExist (EEXIST), it means there exists
a non-directory with the same name as MkdirAll need to use for
directory. Example: we want to MkdirAll("a/b"), but file "a"
(or "a/b") already exists, so MkdirAll fails.

The above is a theory, based on quoted documentation and my UNIX
knowledge.

3. In practice, though, current MkdirAll implementation [1] returns
ENOTDIR in most of cases described in #2, with the exception when
there is a race between MkdirAll and someone else creating the
last component of MkdirAll argument as a file. In this very case
MkdirAll() will indeed return EEXIST.

Because of #1, IsExist check after MkdirAll is not needed.

Because of #2 and #3, ignoring IsExist error is just plain wrong,
as directory we require is not created. It's cleaner to report
the error now.

Note this error is all over the tree, I guess due to copy-paste,
or trying to follow the same usage pattern as for Mkdir(),
or some not quite correct examples on the Internet.

[v2: a separate aufs commit is merged into this one]

[1] https://github.com/golang/go/blob/f9ed2f75/src/os/path.go

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
2015-07-30 11:48:08 -07:00
Morgan Bauer
3754ad5737
Fix FAQ links
- don't use relative references '..'
 - registry-index-spec became hub-registry-spec
 - reference new 'glossary' instead of old 'terms'

Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
2015-07-30 11:46:39 -07:00
Eric Windisch
f5c388b35a Only explicitly deny ptrace for container-originated procs
The 'deny ptrace' statement was supposed to only ignore
ptrace failures in the AUDIT log. However, ptrace was implicitly
allowed from unconfined processes (such as the docker daemon and
its integration tests) due to the abstractions/base include.

This rule narrows the definition such that it will only ignore
the failures originating inside of the container and will not
cause denials when the daemon or its tests ptrace inside processes.

Introduces positive and negative tests for ptrace /w apparmor.

Signed-off-by: Eric Windisch <eric@windisch.us>
2015-07-30 14:40:28 -04:00