Commit Graph

4434 Commits

Author SHA1 Message Date
Lifubang
2d3a4f99ec should no defer when detach
Signed-off-by: Lifubang <lifubang@acmcoder.com>
2018-12-03 19:18:57 +08:00
Michael Crosby
09a5b1f8af
Merge pull request #2839 from jhowardmsft/jjh/service
Windows: Allow running as a service
2018-11-30 11:11:16 -05:00
Michael Crosby
620d56aa42
Merge pull request #2846 from thaJeztah/mask_asound
Add /proc/asound to masked paths
2018-11-30 10:58:01 -05:00
Sebastiaan van Stijn
70084ea6c3
Add /proc/asound to masked paths
While looking through the Moby source code was found /proc/asound to be shared
with containers as read-only.

This can lead to two information leaks.

---

**Leak of media playback status of the host**

Steps to reproduce the issue:

 - Listen to music/Play a YouTube video/Do anything else that involves sound
   output
 - Execute docker run --rm ubuntu:latest bash -c "sleep 7; cat
   /proc/asound/card*/pcm*p/sub*/status | grep state | cut -d ' ' -f2 | grep
   RUNNING || echo 'not running'"
 - See that the containerized process is able to check whether someone on the
   host is playing music as it prints RUNNING
 - Stop the music output
 - Execute the command again (The sleep is delaying the output because
   information regarding playback status isn't propagated instantly)
 - See that it outputs not running

**Describe the results you received:**

A containerized process is able to gather information on the playback
status of an audio device governed by the host. Therefore a process of a
container is able to check whether and what kind of user activity is
present on the host system. Also, this may indicate whether a container
runs on a desktop system or a server as media playback rarely happens on
server systems.

The description above is in regard to media playback - when examining
`/proc/asound/card*/pcm*c/sub*/status` (`pcm*c` instead of `pcm*p`) this
can also leak information regarding capturing sound, as in recording
audio or making calls on the host system.

Reported-by: Philipp Schmied <pschmied@mailbox.org>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-11-30 14:27:08 +01:00
Derek McGowan
d5f00ed913
Merge pull request #2844 from jstarks/wrapf_fix
Eliminate misuses of errors.Wrapf
2018-11-29 16:31:32 -08:00
John Starks
6daf8b7782 Eliminate misuses of errors.Wrapf
In many cases code is calling errors.Wrapf with an arbitrary string
instead of a format string. This causes confusing errors when the
wrapped error message contains '%' characters.

This change replaces such calls with calls to errors.Wrap.

Signed-off-by: John Starks <jostarks@microsoft.com>
2018-11-29 14:26:53 -08:00
Michael Crosby
b0b375f605
Merge pull request #2841 from estesp/add-new-adopters
Add more adopters
2018-11-29 09:49:55 -05:00
Phil Estes
a404f27a09
Add more adopters
Add the newly announced AWS Firecracker and the Kata containers
integration work.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2018-11-29 04:53:52 -05:00
Ace-Tang
6593399e9f cr: support checkpoint/restore without image
support checkpoint without committing a checkpoint dir into a
checkpoint image and restore without untar image into checkpoint
directory. support for both v1 and v2 runtime

Signed-off-by: Ace-Tang <aceapril@126.com>
2018-11-29 10:19:39 +08:00
Derek McGowan
a0fe7f0f78
Merge pull request #2829 from ZYecho/fix-error
fix: fix error info start capitalized
2018-11-28 13:59:21 -08:00
Derek McGowan
82c57a3a38
Merge pull request #2828 from jterry75/ctr_isolation
Move ctr run --isolation to Windows only
2018-11-28 10:36:50 -08:00
Phil Estes
9e372ff01d
Merge pull request #2836 from jterry75/exe_search_path
Cache shim v2 exec.LookPath results
2018-11-28 11:51:03 +00:00
Phil Estes
1ce733a5ea
Merge pull request #2837 from jterry75/containerd_dump_stacks
Add dumpStacks support for containerd on Windows
2018-11-28 11:38:58 +00:00
Phil Estes
3ef95e0ff3
Merge pull request #2838 from thaJeztah/update_runc_1.0-rc6
Update runc to v1.0.0-rc6
2018-11-28 10:55:50 +00:00
zhangyue
996c60616a fix: fix error info start capitalized
Signed-off-by: zhangyue <zy675793960@yeah.net>
2018-11-28 15:26:16 +08:00
Justin Terry (VM)
b4a642f6a5 Add dumpStacks support for containerd on Windows
Resolves: #1763

Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
2018-11-27 21:02:32 -08:00
John Howard
40d898a820 Windows: Allow running as a service
Signed-off-by: John Howard <jhoward@microsoft.com>

Allows containerd.exe to run as a Windows service. eg

Register: `.\containerd.exe --register-service`

Start: `net start containerd`
...
Stop: `net stop containerd`

Unregister: `.\containerd.exe --unregister-service`

When running as a service, logs will go to the Windows application
event log.
2018-11-27 17:28:04 -08:00
Sebastiaan van Stijn
97dd5df66f
Update runc to v1.0.0-rc6
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-11-28 00:51:18 +01:00
Justin Terry (VM)
09bf314bfd Cache shim v2 exec.LookPath results
Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
2018-11-27 15:11:04 -08:00
Phil Estes
dcb82064d3
Merge pull request #2826 from lifubang/statemachineforpid
Fixes: shim service event blocked when waiting for IO finished
2018-11-27 15:46:28 -05:00
Michael Crosby
3eae8b9c3f
Merge pull request #2631 from masters-of-cats/shim-io-redirect
Use named pipes for shim logs
2018-11-27 10:44:00 -05:00
Ace-Tang
fd16bf6d46 runtimev2: add image-path and work-path for c/r
add ImagePath and WorkPath for checkpoint process, add CriuImagePath
and CriuWorkPath for create process in runtime v2 protobuf

Signed-off-by: Ace-Tang <aceapril@126.com>
2018-11-24 23:08:25 +08:00
Ace-Tang
83ebcf9992 runtimev1: add image-path and work-path for c/r
add ImagePath and WorkPath for checkpoint process, add CriuImagePath
and CriuWorkPath for create process in runtime v1 protobuf

Signed-off-by: Ace-Tang <aceapril@126.com>
2018-11-24 23:08:25 +08:00
Justin Terry (VM)
f90e5d564a Move ctr run --isolation to Windows only
Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
2018-11-23 17:11:59 -08:00
Derek McGowan
75c490c5c4
Merge pull request #2825 from Ace-Tang/ctr_fix_runtime
fix: should get runtime name from container info
2018-11-23 13:19:27 -08:00
Lifubang
bbc2a995f9 use state machine management for exec.Pid()
Signed-off-by: Lifubang <lifubang@acmcoder.com>
2018-11-23 17:46:32 +08:00
Ace-Tang
461222dba8 fix: should get runtime name from container info
when use `ctr t checkpoint`, runtime name should get from container
info, but not passed by flag, since task has already running with
specified runtime

Signed-off-by: Ace-Tang <aceapril@126.com>
2018-11-23 15:39:43 +08:00
Derek McGowan
32aa0cd79b
Merge pull request #2632 from ehazlett/checkpoint-restore
Refactor checkpoint and restore to client
2018-11-20 16:31:08 -08:00
Derek McGowan
b8631c750c
Merge pull request #2751 from Charliekenney23/add-useragent-resolver-option
Add custom headers resolver option
2018-11-20 10:51:10 -08:00
Derek McGowan
0b064b0f9d
Merge pull request #2813 from lifubang/deleteexec
add ctr delete --exec-id to help debug DeleteProcess
2018-11-20 10:49:13 -08:00
Michael Crosby
c0a3b6e823
Merge pull request #2812 from tonistiigi/credential-nil-check
remotes: avoid panic with default resolver conf
2018-11-20 10:19:38 -05:00
Phil Estes
181a522142
Merge pull request #2807 from lifubang/shimlockwhenstdinclose
fix pipe in broken may cause shim lock forever
2018-11-20 22:38:22 +08:00
Phil Estes
1a62577719
Merge pull request #2811 from Random-Liu/lock-kill-all
Lock `KillAll`.
2018-11-20 22:36:30 +08:00
Lifubang
2101b1362e add ctr delete --exec-id to debug DeleteProcess
Signed-off-by: Lifubang <lifubang@acmcoder.com>
2018-11-20 19:53:06 +08:00
Tonis Tiigi
a2e8ab9ff7 remotes: avoid panic with default resolver conf
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-11-19 17:33:59 -08:00
Phil Estes
55baf50b5a
Merge pull request #2798 from lifubang/execd
add flag -d for ctr t exec to run a service in container
2018-11-20 08:34:29 +08:00
Lantao Liu
7d91d631e0 Lock KillAll.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-11-19 15:19:35 -08:00
Phil Estes
f801661dcf
Merge pull request #2809 from HusterWan/zr/octet-stream-fix
refactor: no need so many defer in closeAll function
2018-11-20 06:23:30 +08:00
Michael Wan
9639db5522 refactor: no need defer in closeAll
Signed-off-by: Michael Wan <zirenwan@gmail.com>
2018-11-19 09:41:38 -05:00
Michael Crosby
aa537a67b3
Merge pull request #2797 from lifubang/createcmd
change args usage for ctr c create
2018-11-19 09:36:52 -05:00
Lifubang
e76a8879eb fix pipe in broken may cause shim lock forever for runtime v1
Signed-off-by: Lifubang <lifubang@acmcoder.com>
2018-11-19 09:25:43 +08:00
Lifubang
b3438f7a6f fix pipe in broken may cause shim lock forever for runtime v2
Signed-off-by: Lifubang <lifubang@acmcoder.com>
2018-11-19 09:02:49 +08:00
Akihiro Suda
e1383c3d23
Merge pull request #2799 from BSWANG/patch-1
Add build requirement doc on fedora/centos
2018-11-17 13:05:22 +09:00
Phil Estes
d8621e258c
Merge pull request #2800 from crosbymichael/revert-dropped
Revert v2 dropped events
2018-11-17 09:01:58 +08:00
Michael Crosby
d48d7464ad
Merge pull request #2773 from crosbymichael/state-locking
Fix process locking and state management
2018-11-16 14:15:04 -05:00
Michael Crosby
ee41ce3f8c
Merge pull request #2788 from crosbymichael/runc-bump
Update runc to 10d38b660a77168360df3522881e2dc2be
2018-11-16 12:39:47 -05:00
Michael Crosby
956e49a36b Revert v2 dropped events
Partial revert of #2748

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2018-11-16 11:34:15 -05:00
Julia Nedialkova
1d4105cacf Use named pipes for shim logs
Relating to issue [#2606](https://github.com/containerd/containerd/issues/2606)

Co-authored-by: Oliver Stenbom <ostenbom@pivotal.io>
Co-authored-by: Georgi Sabev <georgethebeatle@gmail.com>
Co-authored-by: Giuseppe Capizzi <gcapizzi@pivotal.io>
Co-authored-by: Danail Branekov <danailster@gmail.com>

Signed-off-by: Oliver Stenbom <ostenbom@pivotal.io>
Signed-off-by: Georgi Sabev <georgethebeatle@gmail.com>
Signed-off-by: Giuseppe Capizzi <gcapizzi@pivotal.io>
Signed-off-by: Danail Branekov <danailster@gmail.com>
2018-11-16 16:11:43 +02:00
Bingshen Wang
581a63ce4e Add build requirement doc on fedora/centos
Signed-off-by: bingshen.wbs <bingshen.wbs@alibaba-inc.com>
2018-11-16 18:53:15 +08:00
Lifubang
01f5aa3878 add flag -d for ctr t exec to run a service in container
Signed-off-by: Lifubang <lifubang@acmcoder.com>
2018-11-16 14:29:45 +08:00