forked from microsoft/hcsshim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new gcs hooks, add expected mounts to security policy (microsoft#…
…1258) Introduce a new `wait-paths` binary, which polls file system until requested paths are available or a timeout is reached. Security policy has been updated to have `ExpectedMounts` entries, which will be used in conjunction with "wait-paths" hook for synchronization purposes. Refactor oci-hook logic into its own internal package and update existing code to use that package. Copy runc HookName and constants definitions to break dependency on runc Introduce `ExpectedMounts` as part of security policy language and the logic to enforce the policy, which resolves the expected mounts in the UVM and adds a wait-paths hook to the spec. Add positive and negative CRI tests. Signed-off-by: Maksim An <maksiman@microsoft.com>
- Loading branch information
Showing
20 changed files
with
220 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package guestpath | ||
|
||
const ( | ||
// LCOWNvidiaMountPath is the path format in LCOW UVM where nvidia tools are mounted | ||
// keep this value in sync with opengcs | ||
LCOWNvidiaMountPath = "/run/nvidia" | ||
// LCOWRootPrefixInUVM is the path inside UVM where LCOW container's root file system will be mounted | ||
LCOWRootPrefixInUVM = "/run/gcs/c" | ||
// WCOWRootPrefixInUVM is the path inside UVM where WCOW container's root file system will be mounted | ||
WCOWRootPrefixInUVM = `C:\c` | ||
// SandboxMountPrefix is mount prefix used in container spec to mark a sandbox-mount | ||
SandboxMountPrefix = "sandbox://" | ||
// HugePagesMountPrefix is mount prefix used in container spec to mark a huge-pages mount | ||
HugePagesMountPrefix = "hugepages://" | ||
// LCOWMountPathPrefixFmt is the path format in the LCOW UVM where non global mounts, such | ||
// as Plan9 mounts are added | ||
LCOWMountPathPrefixFmt = "/mounts/m%d" | ||
// LCOWGlobalMountPrefixFmt is the path format in the LCOW UVM where global mounts are added | ||
LCOWGlobalMountPrefixFmt = "/run/mounts/m%d" | ||
// WCOWGlobalMountPrefixFmt is the path prefix format in the WCOW UVM where mounts are added | ||
WCOWGlobalMountPrefixFmt = "C:\\mounts\\m%d" | ||
// RootfsPath is part of the container's rootfs path | ||
RootfsPath = "rootfs" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.