Commit graph

360 commits

Author SHA1 Message Date
Soshi Katsuta
5759b95e7e integration-cli: fix printf verbs of wrong types
Signed-off-by: Soshi Katsuta <katsuta_soshi@cyberagent.co.jp>
2015-08-19 17:47:33 +09:00
Zhang Kun
1ed15550f5 fix in daemon side
Signed-off-by: Zhang Kun <zkazure@gmail.com>

goformat

Signed-off-by: Zhang Kun <zkazure@gmail.com>

fix small

Signed-off-by: Zhang Kun <zkazure@gmail.com>

change to rm

Signed-off-by: Zhang Kun <zkazure@gmail.com>

handler other error

Signed-off-by: Zhang Kun <zkazure@gmail.com>

unique ERR

Signed-off-by: Zhang Kun <zkazure@gmail.com>

setHostConfig_fail_test

Signed-off-by: Zhang Kun <zkazure@gmail.com>

format

Signed-off-by: Zhang Kun <zkazure@gmail.com>

err handle and modify test

Signed-off-by: Zhang Kun <zkazure@gmail.com>

golint error

Signed-off-by: Zhang Kun <zkazure@gmail.com>
2015-08-18 10:06:36 +08:00
Arnaud Porterie
bf892dcfcc Merge pull request #15420 from vlajos/typofixes-vlajos-20150807
typofix - https://github.com/vlajos/misspell_fixer
2015-08-08 01:08:49 -07:00
David Calavera
196aa6d62d Merge pull request #14965 from stefanberger/nohidevols2
Have network files mounted read-only when -v parameter has 'ro' passed
2015-08-07 19:10:59 -07:00
Veres Lajos
5146232723 typofix - https://github.com/vlajos/misspell_fixer
Signed-off-by: Veres Lajos <vlajos@gmail.com>
2015-08-07 23:25:49 +01:00
Stefan Berger
38295d4b48 Have network files mounted read-only when -v parameter has 'ro' passed
Have network files mounted read-only when mounted using the -v
open and -v parameter has 'ro' passed.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-08-06 20:37:28 -04:00
Mohammed Aaqib Ansari
84c9a6684f skipping test TestRunCapAddSYSTIME on lxc
Signed-off-by: Mohammed Aaqib Ansari <maaquib@gmail.com>
2015-07-31 22:07:40 -04:00
Brian Goff
5276655b69 Merge pull request #14463 from sunyuan3/TestRunCapAddSYSTIME
Add TestRunCapAddSYSTIME test case.
2015-07-31 09:40:12 -04:00
Yuan Sun
a5e2fa2b2e Add TestRunCapAddSYSTIME test case.
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
2015-07-31 12:53:46 +08:00
Jessica Frazelle
f12e18d7ef fix lxc test machine
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-07-30 21:30:47 -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
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
Michael Crosby
bfc51cf660 Don't mount /proc as ro
This caused a regression with LSM labeling.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-07-30 10:57:50 -07:00
Eric Windisch
5832715052 Fix the proc integration test & include missing AA profile
Integration tests were failing due to proc filter behavior
changes with new apparmor policies.

Also include the missing docker-unconfined policy resolving
potential startup errors. This policy is complain-only so
it should behave identically to the standard unconfined policy,
but will not apply system path-based policies within containers.

Signed-off-by: Eric Windisch <eric@windisch.us>
2015-07-29 17:08:51 -04:00
Alexander Morozov
0f85fadb4e Merge pull request #15133 from dmcgowan/notary-fix-test-date
Skip notary tests which update system clock
2015-07-29 12:51:05 -07:00
Derek McGowan
bf3c1e6a3a Skip notary tests which update system clock
Currently some notary tests change the system clock to check for expiration.
Skip these tests until the code can be refactored to not rely on updating the system clock.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-07-29 12:09:40 -07:00
Eric Windisch
3edc88f76d Restore AppArmor profile generation
Will attempt to load profiles automatically. If loading fails
but the profiles are already loaded, execution will continue.

A hard failure will only occur if Docker cannot load
the profiles *and* they have not already been loaded via
some other means.

Also introduces documentation for AppArmor.

Signed-off-by: Eric Windisch <eric@windisch.us>
2015-07-28 17:45:51 -04:00
Brian Goff
693ba98cb9 Don't pass check.C to dockerCmdWithError
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-07-27 14:33:32 -04:00
Tibor Vass
afb831d35e Merge pull request #14979 from runcom/fix-flacky-TestRunNonRootUserResolvName
Fix TestRunNonRootUserResolvName flackiness
2015-07-24 21:50:44 -04:00
Antonio Murdaca
30d4c70d28 Fix TestRunNonRootUserResolvName flackiness
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-07-25 02:45:17 +02:00
Arnaud Porterie
4f5b677fd9 Merge pull request #14546 from dmcgowan/trusted-notary-integration
Notary integration
2015-07-24 17:44:14 -07:00
Derek McGowan
259cadb0b1 Rename to flags and environment variables to content trust
Update help line to allow 90 characters instead of 80

The trust flag pushes out the help description column wider, requiring more room to display help messages.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-07-24 16:31:18 -07:00
Diogo Monica
3e90b12d42 Added tests for expired snapshots and timestamps
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-24 16:31:18 -07:00
Nathan McCauley
268fa5af47 Add tests simulating an evil server
Signed-off-by: Nathan McCauley <nathan.mccauley@docker.com>
2015-07-24 16:31:18 -07:00
Derek McGowan
871d2b96ed Add build integration cli tests
Clean up tests to remove duplicate code

Add tests which run pull and create in an isolated configuration directory.
Add build test for untrusted tag

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-07-24 16:31:12 -07:00
Jessica Frazelle
0a5b8c40c0 ignore certain tests on lxc driver
Signed-off-by: Jessica Frazelle <princess@docker.com>
2015-07-24 16:10:59 -07:00
Zhang Kun
0547b5fb2a #14474 skip DockerSuite.TestRunCapAddCHOWN on lxc
Signed-off-by: Zhang Kun <zkazure@gmail.com>
2015-07-24 15:16:07 -07:00
Nathan McCauley
1406cb35fd Add trust tests for Docker create, run, push, and pull
Created date util function

Signed-off-by: Nathan McCauley <nathan.mccauley@docker.com>
2015-07-24 14:08:20 -07:00
Tibor Vass
9c0bb22571 Merge pull request #14925 from calavera/fix_volume_symlink_test
Remove reference to old Volumes field in inspect struct.
2015-07-24 10:41:00 -04:00
Shishir Mahajan
e7fc632147 Add and modify tests for legacy and new daemon invokations
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-07-23 20:31:43 -04:00
David Calavera
bb43bdf6c5 Remove reference to old Volumes field in inspect struct.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-07-23 16:10:31 -07:00
Brian Goff
d106a2ea2a Merge pull request #14613 from stefanberger/nohidevols2
Do not hide user provided network mounts [v2]
2015-07-22 16:24:22 -04:00
Stefan Berger
6bd389b9db Do not hide user provided network mounts [v2]
Prevent the docker daemon from mounting the created network files over
those provided by the user via -v command line option. This would otherwise
hide the one provide by the user.
The benefit of this is that a user can provide these network files using the
-v command line option and place them in a size-limited filesystem.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2015-07-22 13:44:21 -04:00
Ben Firshman
6b3c928140 Fix golint warnings for integration-cli
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2015-07-22 14:03:50 +01:00
Sebastiaan van Stijn
50d2597e49 Merge pull request #13711 from calavera/version_volumes_inspect
Expose new mount points structs in inspect.
2015-07-22 09:02:00 +02:00
David Calavera
1c3cb2d31e Expose new mount points structs in inspect.
Keep old hashes around for old api version calls.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-07-21 15:33:05 -07:00
Brian Goff
6c95040e3b Merge pull request #14765 from runcom/fix-dockerCmd-refactor
Refactor missed dockerCmd changes
2015-07-21 11:53:28 -04:00
Eric Windisch
80d99236c1 Move AppArmor policy to contrib & deb packaging
The automatic installation of AppArmor policies prevents the
management of custom, site-specific apparmor policies for the
default container profile. Furthermore, this change will allow
a future policy for the engine itself to be written without demanding
the engine be able to arbitrarily create and manage AppArmor policies.

- Add deb package suggests for apparmor.
- Ubuntu postinst use aa-status & fix policy path
- Add the policies to the debian packages.
- Add apparmor tests for writing proc files
Additional restrictions against modifying files in proc
are enforced by AppArmor. Ensure that AppArmor is preventing
access to these files, not simply Docker's configuration of proc.
- Remove /proc/k?mem from AA policy
The path to mem and kmem are in /dev, not /proc
and cannot be restricted successfully through AppArmor.
The device cgroup will need to be sufficient here.
- Load contrib/apparmor during integration tests
Note that this is somewhat dirty because we
cannot restore the host to its original configuration.
However, it should be noted that prior to this patch
series, the Docker daemon itself was loading apparmor
policy from within the tests, so this is no dirtier or
uglier than the status-quo.

Signed-off-by: Eric Windisch <eric@windisch.us>
2015-07-21 11:05:53 -04:00
Antonio Murdaca
bd328da555 Refactor missed dockerCmd changes
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-07-20 20:55:57 +02:00
Hu Keping
27ac154d05 CI: use dockercmd when possible
Signed-off-by: Hu Keping <hukeping@huawei.com>
2015-07-21 04:40:15 +08:00
Qiang Huang
6f8ddec1d0 Simplify swappiness check
As suggested in https://github.com/docker/docker/pull/14004/files#r34022527

The concern there is we can't differentiate whether user explicitly
asked for an invalid value of -1 or he did not specify anything.

I don't think this would be a problem, because:
 - like all other default values like zero, we can't differentiate
   user specify it or not, most of which, zeros are also invalid, so
   default is default, we show these default values in help info,
   so users would know if they set value as default, it'll be like
   they set nothing.
 - we can't do this kind of string check in REST api request, so
   it'll make the behave different from docker command and RESTapi.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-07-20 16:10:10 +08:00
Mrunal Patel
0b7938e845 Adds test for additional groups.
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2015-07-13 14:47:28 -04:00
Raghavendra K T
921da495d2 Add the memory swappiness tuning option to docker.
Memory swappiness option takes 0-100, and helps to tune swappiness
behavior per container.
For example, When a lower value of swappiness is chosen
the container will see minimum major faults. When no value is
specified for memory-swappiness in docker UI, it is inherited from
parent cgroup. (generally 60 unless it is changed).

Signed-off-by: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
2015-07-12 13:16:33 +05:30
Jessie Frazelle
703248da20 Merge pull request #13669 from ewindisch/readonly-proc
Make /proc, /sys, & /dev readonly for readonly containers
2015-07-10 15:32:13 -07:00
Jessie Frazelle
56e8a99b61 Merge pull request #14480 from Microsoft/fix-windows-ci
Fix Windows CI fail due to GH13866
2015-07-09 16:37:41 -07:00
John Howard
c1b524486c Fix Windows CI fail due to GH13866 and patch up tests
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-07-09 10:09:45 -07:00
David Calavera
3d029c3bf3 Fix volumes-from mount references.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-07-09 09:01:57 -06:00
Michael Crosby
a5283d2ff3 Merge pull request #13866 from brahmaroutu/runOOM_13766
RunOOM test should check to see if Oom Control is enabled
2015-07-07 16:21:46 -07:00
root
e7fb38410d RunOOM test should check to see if Oom Control is enabled
closes #13766
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-07-06 21:15:55 +00:00
Yuan Sun
230179c8dc add TestRunCapAddCHOWN test case
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
2015-07-03 23:25:52 +08:00