Commit Graph

20757 Commits

Author SHA1 Message Date
547bf07eca pkg: authorization: do not register the same plugin
This patches avoids registering (and calling) the same plugin more than
once. Using an helper map which indexes by name guarantees this and keeps
the order.
The behavior of overriding the same name in a flag is consistent with,
for instance, the `docker run -v /test -v /test` flag which register
the volume just once.
Adds integration tests.

Without this patch:
```
Dec 20 19:34:52 localhost.localdomain docker[9988]:
time="2015-12-20T19:34:52.080901676+01:00" level=debug msg="Calling
GET
/v1.22/info"
Dec 20 19:34:52 localhost.localdomain docker[9988]:
time="2015-12-20T19:34:52.081213202+01:00" level=debug msg="AuthZ
request using plugin docker-novolume-plugin"
Dec 20 19:34:52 localhost.localdomain docker[9988]:
time="2015-12-20T19:34:52.081268132+01:00" level=debug
msg="docker-novolume-plugin implements: authz"
Dec 20 19:34:52 localhost.localdomain docker[9988]:
time="2015-12-20T19:34:52.081699788+01:00" level=debug msg="AuthZ
request using plugin docker-novolume-plugin"
Dec 20 19:34:52 localhost.localdomain docker[9988]:
time="2015-12-20T19:34:52.081762507+01:00" level=debug
msg="docker-novolume-plugin implements: authz"
Dec 20 19:34:52 localhost.localdomain docker[9988]:
time="2015-12-20T19:34:52.082092480+01:00" level=debug msg="GET
/v1.22/info"
Dec 20 19:34:52 localhost.localdomain docker[9988]:
time="2015-12-20T19:34:52.628691038+01:00" level=debug msg="AuthZ
response using plugin docker-novolume-plugin"
Dec 20 19:34:52 localhost.localdomain docker[9988]:
time="2015-12-20T19:34:52.629880930+01:00" level=debug msg="AuthZ
response using plugin docker-novolume-plugin"
```

With this patch:
```
Dec 20 19:37:32 localhost.localdomain docker[16620]:
time="2015-12-20T19:37:32.376523958+01:00" level=debug msg="Calling
GET
/v1.22/info"
Dec 20 19:37:32 localhost.localdomain docker[16620]:
time="2015-12-20T19:37:32.376715483+01:00" level=debug msg="AuthZ
request using plugin docker-novolume-plugin"
Dec 20 19:37:32 localhost.localdomain docker[16620]:
time="2015-12-20T19:37:32.376771230+01:00" level=debug
msg="docker-novolume-plugin implements: authz"
Dec 20 19:37:32 localhost.localdomain docker[16620]:
time="2015-12-20T19:37:32.377698897+01:00" level=debug msg="GET
/v1.22/info"
Dec 20 19:37:32 localhost.localdomain docker[16620]:
time="2015-12-20T19:37:32.951016441+01:00" level=debug msg="AuthZ
response using plugin docker-novolume-plugin"
```

Also removes a somehow duplicate debug statement (leaving only the
second one as it's a loop of plugin's manifest):
```
Dec 20 19:52:30 localhost.localdomain docker[25767]:
time="2015-12-20T19:52:30.544090518+01:00" level=debug
msg="docker-novolume-plugin's manifest: &{[authz]}"
Dec 20 19:52:30 localhost.localdomain docker[25767]:
time="2015-12-20T19:52:30.544170677+01:00" level=debug
msg="docker-novolume-plugin implements: authz"
```

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: c28fc06e002e06deed3437da76bc213b7bd752ba
Component: engine
2015-12-23 21:08:40 +01:00
f64ebb2c89 Merge pull request #18794 from thaJeztah/EOL-fedora-21
Remove Fedora 21 from RPM build as it is EOL
Upstream-commit: cc6f0df2e41c7d01dffd8e0630c14275960130fc
Component: engine
2015-12-20 11:53:51 +01:00
0e3b79cb4d Merge pull request #18707 from runcom/update-labels-doc-for-emtpy-lables
update syntax for empty value labels
Upstream-commit: 18925f37ed5cfb9dd54ee10ee99bc5f990f156b0
Component: engine
2015-12-19 21:53:21 -08:00
27d8c0709b Merge pull request #18720 from kytrinyx/unspecific-ubuntu
docs: remove ubuntu version in dockerizing userguide
Upstream-commit: 3d43ebebfae82b4c5cf5ce0987d087e7059829aa
Component: engine
2015-12-19 21:17:38 -08:00
bfd2cf3356 Merge pull request #18667 from bboreham/inspect-json-doc
Improved explanation of docker inspect 'json' function
Upstream-commit: fa720ad98746eb33073af9f4fde16df4f774644f
Component: engine
2015-12-19 21:09:39 -08:00
8c7f988b73 Merge pull request #18795 from thaJeztah/o-oracle-o-oracle-where-art-thou-oracle
Update link to Oracle Linux
Upstream-commit: fbefbc52817ce23a07a5634126abf9a12f83b7f0
Component: engine
2015-12-20 01:33:27 +01:00
007bebfe87 Update link to Oracle Linux
The https://linux.oracle.com/ url results in
too many redirects, which may result in our
link-checker to think the link is broken.

Replacing the link, per discussion in
https://github.com/docker/docker/pull/18534#issuecomment-164202592

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 579d35e33c161fa20bf6cf8d0e41969d9821e378
Component: engine
2015-12-20 00:52:12 +01:00
8d399a7fd9 Remove Fedora 21 from RPM build as it is EOL
Fedora 21 is EOL'd as of December 1st, 2015.

Announcement:
https://lists.fedoraproject.org/pipermail/announce/2015-November/003296.html

Fedora 21 will reach end of life on 2015-12-01, and no further updates
will be pushed out after that time. Additionally, with the recent
release of Fedora 23, no new packages will be added to the Fedora 21
collection.

Please see https://fedoraproject.org/wiki/DNF_system_upgrade for more
information on upgrading from Fedora 21 to a newer release.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a08c955e30d6790d1f69483d5e33e2a81a08b100
Component: engine
2015-12-20 00:42:17 +01:00
36350c1926 Merge pull request #18792 from moxiegirl/fix-typo
Fixing typo reported by @projectvalis
Upstream-commit: fb879e849d6a895edab097c8feed3b5f71f33770
Component: engine
2015-12-19 22:21:41 +01:00
ba3901d719 Fixing typo reported by @projectvalis
Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 55a65e18c08e2612b5cc7384119e6ec44e476da7
Component: engine
2015-12-19 12:47:24 -08:00
cd79f6b524 Merge pull request #18767 from wenchma/add_checkduplicate_test
Add network create api test on CheckDuplicate
Upstream-commit: 58c049595fba7cb509d8a6656ecce6389c34a5a5
Component: engine
2015-12-19 10:46:11 -05:00
8acdb0b4d5 Merge pull request #18684 from cdauth/volume-docs
Add note to volume docs that data is not copied to mounted volumes
Upstream-commit: 69fbdf4294b9c062bc711b978efcde82e40a293f
Component: engine
2015-12-19 15:29:44 +01:00
ea70c9d5d6 Add network create api test on CheckDuplicate
Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
Upstream-commit: 5649dae89bbbb356a24560c1d3164722b2207344
Component: engine
2015-12-19 22:29:30 +08:00
3c6477529c Merge pull request #18769 from runcom/docs-auth-1
docs: extend: authorization.md: add a note about confidential stuff in Err
Upstream-commit: eaf7932fafdfdbcefa3be3ccacab016938969cf4
Component: engine
2015-12-19 14:53:25 +01:00
295cafe7dd docs: userguide: labels-custom-metadsata.md: update syntax for emtpy value labels
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: aada8d81177de793db38845ff3a26949436e1ed6
Component: engine
2015-12-19 09:04:29 +01:00
fdba0e61b5 Merge pull request #18779 from aditirajagopal/18750-new-string-method
pkg/version.Version: use the new String() method
Upstream-commit: 7ff61dd592335c7b3673b41153d9cf8995e468a3
Component: engine
2015-12-18 21:21:17 -05:00
ce07d20209 Merge pull request #18763 from calavera/fix_raw_inspect
Print the raw inspected elements when there is no template for `docker inspect`.
Upstream-commit: 58ebc71272d3facec798664366cc169aa8df8449
Component: engine
2015-12-18 15:25:38 -08:00
4b736dc17f Merge pull request #18651 from vbatts/dm-cleanup
loopback (and devicemapper) cleanup
Upstream-commit: 54f945994a0eb79c43c8c34fc77625dc56c0c421
Component: engine
2015-12-18 15:13:28 -08:00
76f3bf50c1 pkg/version.Version: use the new String() method
Resolves #18750

Signed-off-by: Aditi Rajagopal <arajagopal@us.ibm.com>
Upstream-commit: 278e75800c7be10ca43ffb11de25cd342da106fe
Component: engine
2015-12-18 15:29:32 -05:00
cc50cf65a0 Merge pull request #18761 from anusha-ragunathan/add-build-routes
Create build router separate from image router.
Upstream-commit: 92605b823d4facbe9076b58dd0b0d77101529ad9
Component: engine
2015-12-18 21:09:43 +01:00
d33438344b Merge pull request #18727 from tonistiigi/partial-load
Add support for partial load
Upstream-commit: 6ee7c94263e367cfc03c6f08af3bdcd28f70ed7a
Component: engine
2015-12-18 11:10:55 -08:00
d5f830baed Merge pull request #18771 from runcom/authz-fixes-1
authZ: more fixes
Upstream-commit: b714e03fddc71b0d1af7a27198ae5a342b8ce39f
Component: engine
2015-12-18 17:58:02 +01:00
e5974f1fbd Merge pull request #18773 from runcom/rej-gitignore
.gitignore: do not ignore *.rej
Upstream-commit: 7f62d311bdf11f2bd8792c7e90e38edf2f77ef82
Component: engine
2015-12-18 17:48:36 +01:00
3a6aede7f5 Merge pull request #18721 from tiborvass/remove-dependencies-from-builder
Remove image and daemon dependencies from builder
Upstream-commit: 64d70de0a2aa29f565336e896b76c23c879a9a98
Component: engine
2015-12-18 17:19:55 +01:00
a04ac83e2f .gitignore: do not ignore *.rej
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: fa7d676891d0dda30119ccfcf675a8f49c93073f
Component: engine
2015-12-18 17:12:54 +01:00
dcc6022170 Merge pull request #18561 from hqhq/hq_adapt_at_start
Adapt container settings when start
Upstream-commit: 1ca6690b4fbef191d242265c813cc1a4dd8ece25
Component: engine
2015-12-18 11:07:43 -05:00
8b5a2050f9 loopback: separate loop logic from devicemapper
The loopback logic is not technically exclusive to the devicemapper
driver. This reorganizes the code such that the loopback code is usable
outside of the devicemapper package and driver.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: af597527121c0ad973e9d0ae4f9cf970da1513cc
Component: engine
2015-12-18 10:57:43 -05:00
e963d775a7 devicemapper: remove unused type mapping
Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: a292c04c01cbe4a6c9f74e7cf3b0315249ed8993
Component: engine
2015-12-18 10:44:06 -05:00
760531cbbc Merge pull request #18730 from calavera/remove_sockets_dependency
Remove api client lib dependency on tlsconfig and sockets packages.
Upstream-commit: b708a2249bfa7d9a7bff74b28264fd40ca4e6d1e
Component: engine
2015-12-18 10:35:51 -05:00
d63981ab4d authZ: more fixes
- fix naming and formatting
- provide more context when erroring auth
- do not capitalize errors
- fix wrong documentation
- remove ugly remoteError{}

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 5a64c8027ecd2bebe773c9abd2e73c2fd7d23de1
Component: engine
2015-12-18 16:29:01 +01:00
871c2bc240 Merge pull request #18741 from WeiZhang555/debug-info
Better debug message for post form data
Upstream-commit: 47060efdb763305ed7c406ac3a62062d9f51ef21
Component: engine
2015-12-18 16:06:07 +01:00
7d0507241f docs: extend: authorization.md: add a note about confidential stuff in Err
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 1e28f04fec70affd8fae57f4bdd23a84853f4efc
Component: engine
2015-12-18 11:28:28 +01:00
50b12bd7e1 Print the raw inspected elements when there is no template for docker inspect.
Otherwise we're ignoring the fields that Swarm adds to the output.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 1f5674363e4dd81c9ecd52ef3e1f252c76784697
Component: engine
2015-12-17 23:17:52 -05:00
71b76682f6 Create build router separate from image router.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: f8dc044aecd6fa00c33dc6a72321a3e249a0b40d
Component: engine
2015-12-17 16:56:11 -08:00
c737574605 Merge pull request #18759 from mikedanese/doc-fix
daemon/logger: fix typo in godoc
Upstream-commit: 6bf8844f1179108b9fabd271a655bf9eaaf1ee8c
Component: engine
2015-12-17 19:26:41 -05:00
da94425c54 Remove api client lib dependency on tlsconfig and sockets packages.
- Let consumers to configure the http transport initially and apply or
  defaults on top.
- Add function to initialize a new client based on environment
  variables, useful for integrators.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: defd1519f77ef0caaab2cfeeb6433c8a24c62ffc
Component: engine
2015-12-17 19:04:49 -05:00
f814dbe783 daemon/logger: fix typo in godoc
Signed-off-by: Mike Danese <mikedanese@google.com>
Upstream-commit: 881a30c707141b06af0cc7a076b62ff338615f2b
Component: engine
2015-12-17 15:52:33 -08:00
5eac08b5e9 Merge pull request #18395 from LK4D4/default_cgroup_is_not_daemon
Use /docker as cgroup parent instead of docker
Upstream-commit: ff69b23dc09e544fb8ae9dccbd1f7992d2005b70
Component: engine
2015-12-17 13:59:00 -08:00
0f2a0bed09 Merge pull request #18744 from runcom/plugins-deadcode
pkg: plugins: remove dead code
Upstream-commit: 5553aab705d7ffed1bee94b8df860a36af767a20
Component: engine
2015-12-17 10:50:04 -08:00
ef849e6c0d Merge pull request #18716 from clnperez/fix-blkio-tests
Update TestRunWithBlkioInvalidDevice Tests
Upstream-commit: 406da8616ccc13795cb85b9a34c459d3cda2ae82
Component: engine
2015-12-17 10:23:59 -08:00
fb0251b9a3 Merge pull request #18745 from runcom/pkg-version-String
pkg: version: add String method
Upstream-commit: 9681f0f0d4457f0e8dfb0c0473557a97e0cfef2b
Component: engine
2015-12-17 16:58:41 +01:00
1f6b8ad3e8 builder: remove daemon dependency in ContainerAttach
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: b0d947615335fe115b5b93c0c09912a4888e5b29
Component: engine
2015-12-17 16:57:08 +01:00
49f762b669 builder: remove daemon dependency in ContainerCreate()
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 03a170c48d660be72c387f1821ca48a713dd1cea
Component: engine
2015-12-17 16:57:08 +01:00
1dd48fd37d Merge pull request #18739 from wenchma/typo
Fix typo error and update index
Upstream-commit: 742fd4fa633bfb105e501b74cc27871a972e8001
Component: engine
2015-12-17 15:43:14 +01:00
177c044c3a Merge pull request #18590 from aaronlehmann/limit-v1-fallbacks
Limit v1 protocol fallbacks
Upstream-commit: 98be580794923df223ea623c55311c290d402c54
Component: engine
2015-12-17 14:44:05 +01:00
5d75803e83 Merge pull request #18743 from wenchma/plugin_not_found
Sync the docker network create api docs with the error code
Upstream-commit: 3f4dc492102bf4bceea92a59c78439420f7527c9
Component: engine
2015-12-17 12:16:23 +01:00
babed83c58 pkg: version: add String method
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 0d9f1e344a629e5abcd6a385952d22d19555f125
Component: engine
2015-12-17 11:52:23 +01:00
ce29ee35b2 Merge pull request #18662 from runcom/pkg-authZ-response
pkg: authorization: add Err to tweak response status code
Upstream-commit: 5baa93c04ef4a195df397914baf0a980c93d1271
Component: engine
2015-12-17 11:12:27 +01:00
98eeaeab93 pkg: authorization: add Err to tweak response status code
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 46e3a249a1971f8697ca338c9b02e27d36ddab12
Component: engine
2015-12-17 11:08:47 +01:00
6862b2ec45 pkg: plugins: remove dead code
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 1d2b62ceae17238f842bb2a7febf1bead8a982d5
Component: engine
2015-12-17 11:05:50 +01:00