Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
Merge pull request #330 from kata-containers/stable-1.2.1-candidate
Browse files Browse the repository at this point in the history
Stable 1.2.1 candidate
  • Loading branch information
bergwolf authored Aug 30, 2018
2 parents fcfa054 + ae3d9c3 commit 761f80c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@ const (

var (
// cgroup fs is mounted at /sys/fs when systemd is the init process
cgroupPath = "/sys/fs/cgroup"
cgroupCpusetPath = cgroupPath + "/cpuset"
cgroupPath = "/sys/fs/cgroup"
cgroupCpusetPath = cgroupPath + "/cpuset"
cgroupMemoryPath = cgroupPath + "/memory"
cgroupMemoryUseHierarchyPath = cgroupMemoryPath + "/memory.use_hierarchy"
cgroupMemoryUseHierarchyMode = os.FileMode(0400)
)

var initRootfsMounts = []initMount{
Expand Down Expand Up @@ -859,7 +862,10 @@ func cgroupsMount() error {
return err
}
}
return nil

// Enable memory hierarchical account.
// For more information see https://www.kernel.org/doc/Documentation/cgroup-v1/memory.txt
return ioutil.WriteFile(cgroupMemoryUseHierarchyPath, []byte{'1'}, cgroupMemoryUseHierarchyMode)
}

// initAgentAsInit will do the initializations such as setting up the rootfs
Expand Down
2 changes: 1 addition & 1 deletion protocols/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const (
vsockSocketScheme = "vsock"
)

var defaultDialTimeout = 5 * time.Second
var defaultDialTimeout = 15 * time.Second

// AgentClient is an agent gRPC client connection wrapper for agentgrpc.AgentServiceClient
type AgentClient struct {
Expand Down

0 comments on commit 761f80c

Please sign in to comment.