Commit Graph

135 Commits

Author SHA1 Message Date
Arnaud Porterie 8f1f53f735 Merge pull request #16277 from runcom/add-oom-score-adj
Add OomScoreAdj
2015-12-02 11:49:51 -08:00
Brian Goff f411b101ac Merge pull request #18285 from hqhq/hq_fix_swappiness
Set default MemorySwappiness when adapt
2015-12-02 14:25:08 -05:00
Dan Walsh b3e527dfd2 This patch adds --tmpfs as a option for mounting tmpfs on directories
It will Tar up contents of child directory onto tmpfs if mounted over

This patch will use the new PreMount and PostMount hooks to "tar"
up the contents of the base image on top of tmpfs mount points.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2015-12-02 10:06:59 -05:00
Antonio Murdaca 2969abc6c5 Move defaultSHMSize in daemon pkg
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-12-02 10:28:10 +01:00
Qiang Huang 4089b4e440 Set default MemorySwappiness when adapt
It makes the inspect result consistent between cli and REST api
when MemorySwappiness is not set.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-12-02 10:53:52 +08:00
Antonio Murdaca ef1d410b02 fix shm size handling
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-12-01 16:29:40 +01:00
Antonio Murdaca d3af7f283d Add OomScoreAdj to configure container oom killer preferences
libcontainer v0.0.4 introduces setting `/proc/self/oom_score_adj` to
better tune oom killing preferences for container process. This patch
simply integrates OomScoreAdj libcontainer's config option and adjust
the cli with this new option.

Signed-off-by: Antonio Murdaca <amurdaca@redhat.com>
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-11-30 11:19:04 +01:00
Tonis Tiigi 4352da7803 Update daemon and docker core to use new content addressable storage
Add distribution package for managing pulls and pushes. This is based on
the old code in the graph package, with major changes to work with the
new image/layer model.

Add v1 migration code.

Update registry, api/*, and daemon packages to use the reference
package's types where applicable.

Update daemon package to use image/layer/tag stores instead of the graph
package

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-11-24 09:40:25 -08:00
NIWA Hideyuki 5aeaf2a0c4 Addition of "--shm-size" to which size of /dev/shm is changed.
- Optional "--shm-size=" was added to the sub-command(run, create,and build).
- The size of /dev/shm in the container can be changed
  when container is made.
- Being able to specify is a numerical value that applies number,
  b, k, m, and g.
- The default value is 64MB, when this option is not set.
- It deals with both native and lxc drivers.

Signed-off-by: NIWA Hideyuki <niwa.hiedyuki@jp.fujitsu.com>
2015-11-20 09:24:18 +09:00
Alexander Morozov 24fb3659df Merge pull request #18076 from rhvgoyal/unmount-recursive
Unmount recursively to unmount volumes
2015-11-19 13:46:48 -08:00
Vivek Goyal b9e701b203 Use lazy unmount to unmount volumes
Volumes can have more mount points beneath them and unmount will fail. This
is the case when a bind mounted directory on host already had a mount point
underneath it. So use lazy unmount instead.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2015-11-19 20:46:07 +00:00
David Calavera 060f4ae617 Remove the container initializers per platform.
By removing deprecated volume structures, now that windows mount volumes we don't need a initializer per platform.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-11-18 08:41:46 -05:00
John Howard 208ad80605 Remove TODO Windows
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-11-13 13:07:27 -08:00
Vincent Demeester 812a1c149a Merge pull request #13959 from Mashimiao/add-support-blkio_weight_device
Add support for blkio.weight_device
2015-11-12 20:42:13 +01:00
David Calavera 8cf38b6a8b Merge pull request #17589 from Microsoft/jjh/refactorprocessconfig
Refactor ProcessConfig
2015-11-12 07:28:32 -08:00
Brian Goff 5b046c71d8 Merge pull request #17916 from Microsoft/jjh/fix-cp-with-volumes
Windows [TP4] Fix docker cp when volumes
2015-11-11 19:35:05 -05:00
John Howard 3a852d8442 Windows [TP4] Fix docker cp when volumes
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-11-11 14:02:07 -08:00
Ma Shimiao 0fbfa1449d Add support for blkio.weight_device
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2015-11-11 23:06:36 +08:00
David Calavera 470fc94f38 Merge pull request #17476 from coolljt0725/prevent_connect_to_host
Fix connect to host and prevent disconnect from host for host network
2015-11-10 09:48:33 -08:00
John Howard 5fa2e4d4f2 Refactor ProcessConfig
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-11-09 09:51:09 -08:00
Lei Jitang a2d8c93fc6 Prevent connecting to host and prevent disconnecting from host
Container has private network namespace can not to connect to host
and container with host network can not be disconnected from host.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-11-09 10:19:53 +08:00
Bryan Boreham 93405dd037 Fix typo in error message
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2015-11-08 18:05:34 +00:00
Lei Jitang 451b79d691 Test to verify --mac-address doesn't get applied to new endpoint
created on network connect.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2015-11-06 14:52:35 -08:00
Santhosh Manohar dedcf6a6ff Allow port mapping only for endpoint created on docker run
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2015-11-06 13:54:17 -08:00
Solomon Hykes 2519f46550 Merge pull request #17700 from calavera/remove_lxc
Remove LXC support.
2015-11-05 15:22:37 -08:00
David Calavera 3b5fac462d Remove LXC support.
The LXC driver was deprecated in Docker 1.8.
Following the deprecation rules, we can remove a deprecated feature
after two major releases. LXC won't be supported anymore starting on Docker 1.10.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-11-05 17:09:57 -05:00
Antonio Murdaca 77826333fe Fix errors format
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-11-05 18:17:37 +01:00
Alessandro Boch 54d22cbd9a Verify Endpoint.Info() before accessing it
- During concurrent operations in multihost environment,
  it is possible that the implementer of `EndpointInfo`
  is nil. It simply means the endpoint is no longer
  available in the datastore.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-11-04 13:27:17 -08:00
David Calavera 63efc12070 Remove further references to the daemon within containers.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-11-04 12:28:54 -05:00
David Calavera 669949d6b4 Decouple daemon and container to manage networks.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-11-04 12:27:48 -05:00
David Calavera 019c337b93 Decouple daemon and container to cleanup containers.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-11-04 12:27:48 -05:00
David Calavera 3a49765046 Decouple daemon and container to mount and unmount filesystems.
Side effects:
- Decouple daemon and container to start containers.
- Decouple daemon and container to copy files.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-11-04 12:27:47 -05:00
David Calavera 4f2a5ba360 Decouple daemon and container to stop and kill containers.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-11-04 12:27:47 -05:00
Jess Frazelle 562a1263f2 Merge pull request #17665 from LK4D4/setupwd_refactor
Reorder code slightly in setupWorkingDirectory
2015-11-03 15:56:10 -08:00
Alexander Morozov bb66c16871 Reorder code slightly in setupWorkingDirectory
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-11-03 14:33:31 -08:00
Alexander Morozov 944ea3134d Merge pull request #17554 from calavera/warm_ipc_unmounts
Turn IPC unmount errors into warnings.
2015-11-02 14:25:39 -08:00
David Calavera beeec6d103 Merge pull request #17558 from aboch/nw
Fix bug in initializeNetwork()
2015-11-02 12:15:41 -08:00
Alessandro Boch 45e71a7984 Fix bug in initializeNetwork()
- On `docker run --net <network id> ...`
  the bug would cause the container to attempt
  to connect to the network two times
- Also made sure endpoint creation rollback will
  be executed on failures in `func (container *Container) connectToNetwork()`

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-11-02 11:20:15 -08:00
Jana Radhakrishnan 10e1b9f02e Vendoring libnetwork
Vendoring libnetwork @ 05a5a1510f85977f374a9b9804a116391bab5089

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-11-02 08:33:52 -08:00
Alexander Morozov b087846c0e Fix error formatting
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-11-02 06:51:48 -08:00
Madhu Venugopal 401632c756 fixing ungraceful daemon restart case where nw connect is not persisted
For graceful restart case it was done when the container was brought
down. But for ungraceful cases, the persistence is missing for nw
connect

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-30 16:24:02 -07:00
David Calavera a54d5932e3 Turn IPC unmount errors into warnings.
And do not try to unmount empty paths.

Because nobody should be woken up in the middle of the night for them.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-10-30 19:13:52 -04:00
David Calavera 0c991f3d68 Merge pull request #16779 from Microsoft/10662-execdrivercommand
Windows: Refactor execdriver.Command
2015-10-30 14:59:59 -07:00
John Howard 9d14866d71 Windows: Refactor execdriver.Command
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-10-30 13:53:00 -07:00
Brian Goff 78bd17e805 Force IPC mount to unmount on daemon shutdown/init
Instead of using `MNT_DETACH` to unmount the container's mqueue/shm
mounts, force it... but only on daemon init and shutdown.

This makes sure that these IPC mounts are cleaned up even when the
daemon is killed.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-10-30 15:41:48 -04:00
Brian Goff 17a8fbeaeb Merge pull request #17514 from mavenugo/ugr
Fixing a case of dangling endpoint during ungraceful daemon restart
2015-10-30 13:38:27 -04:00
Michael Crosby aadae4b503 Merge pull request #16412 from Microsoft/10662-hyper-v-containers
Windows [TP4]: Adds support for Hyper-V Containers
2015-10-30 09:34:16 -07:00
Vincent Demeester 81c5b1ce4a Merge pull request #17492 from aidanhs/aphs-remove-dead-code
Remove dead code
2015-10-30 08:50:54 +01:00
Madhu Venugopal 0c07096b7d Fixes a case of dangling endpoint during ungraceful daemon restart
When a container restarts after a ungraceful daemon restart, first
cleanup any unclean sandbox before trying to allocate network resources.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-29 18:56:56 -07:00
John Howard 15e35c4470 Windows: Adds support for Hyper-V Containers
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-10-29 16:18:52 -07:00