mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-28 11:44:38 +00:00
Merge pull request #9383 from Apokleos/unified-cgrp-cmdline
kata-agent: enabling cgroups-v2 by systemd.unified_cgroup_hierarchy
This commit is contained in:
commit
fa8049af6c
@ -133,7 +133,7 @@ The kata agent has the ability to configure agent options in guest kernel comman
|
||||
| `agent.passfd_listener_port` | File descriptor passthrough IO listener port | Allow to set the file descriptor passthrough IO listener port | integer | `0` |
|
||||
| `agent.server_addr` | Server address | Allow the ttRPC server address to be specified | string | `"vsock://-1:1024"` |
|
||||
| `agent.trace` | Trace mode | Allow to static tracing | boolean | `false` |
|
||||
| `agent.unified_cgroup_hierarchy` | `Cgroup hierarchy` | Allow to setup v2 cgroups | boolean | `false` |
|
||||
| `systemd.unified_cgroup_hierarchy` | `Cgroup hierarchy` | Allow to setup v2 cgroups | boolean | `false` |
|
||||
|
||||
> **Note:** Accepted values for some agent options
|
||||
> - `agent.config_file`: If we enable `agent.config_file` in guest kernel command line,
|
||||
@ -145,7 +145,7 @@ The kata agent has the ability to configure agent options in guest kernel comman
|
||||
> - `agent.log`: "critical"("fatal" | "panic") | "error" | "warn"("warning") | "info" | "debug"
|
||||
> - `agent.server_addr`: "{VSOCK_ADDR}:{VSOCK_PORT}"
|
||||
> - `agent.trace`: true | false
|
||||
> - `agent.unified_cgroup_hierarchy`: true | false
|
||||
> - `systemd.unified_cgroup_hierarchy`: true | false
|
||||
|
||||
For instance, you can enable the debug console and set the agent log level to debug by configuring the guest kernel command line in the configuration file:
|
||||
```toml
|
||||
|
@ -24,7 +24,7 @@ const HOTPLUG_TIMOUT_OPTION: &str = "agent.hotplug_timeout";
|
||||
const DEBUG_CONSOLE_VPORT_OPTION: &str = "agent.debug_console_vport";
|
||||
const LOG_VPORT_OPTION: &str = "agent.log_vport";
|
||||
const CONTAINER_PIPE_SIZE_OPTION: &str = "agent.container_pipe_size";
|
||||
const UNIFIED_CGROUP_HIERARCHY_OPTION: &str = "agent.unified_cgroup_hierarchy";
|
||||
const UNIFIED_CGROUP_HIERARCHY_OPTION: &str = "systemd.unified_cgroup_hierarchy";
|
||||
const CONFIG_FILE: &str = "agent.config_file";
|
||||
|
||||
// Configure the proxy settings for HTTPS requests in the guest,
|
||||
@ -625,28 +625,28 @@ mod tests {
|
||||
..Default::default()
|
||||
},
|
||||
TestData {
|
||||
contents: "agent.devmode agent.debug_console agent.hotplug_timeout=100 agent.unified_cgroup_hierarchy=a",
|
||||
contents: "agent.devmode agent.debug_console agent.hotplug_timeout=100 systemd.unified_cgroup_hierarchy=a",
|
||||
debug_console: true,
|
||||
dev_mode: true,
|
||||
hotplug_timeout: time::Duration::from_secs(100),
|
||||
..Default::default()
|
||||
},
|
||||
TestData {
|
||||
contents: "agent.devmode agent.debug_console agent.hotplug_timeout=0 agent.unified_cgroup_hierarchy=11",
|
||||
contents: "agent.devmode agent.debug_console agent.hotplug_timeout=0 systemd.unified_cgroup_hierarchy=11",
|
||||
debug_console: true,
|
||||
dev_mode: true,
|
||||
unified_cgroup_hierarchy: true,
|
||||
..Default::default()
|
||||
},
|
||||
TestData {
|
||||
contents: "agent.devmode agent.debug_console agent.container_pipe_size=2097152 agent.unified_cgroup_hierarchy=false",
|
||||
contents: "agent.devmode agent.debug_console agent.container_pipe_size=2097152 systemd.unified_cgroup_hierarchy=false",
|
||||
debug_console: true,
|
||||
dev_mode: true,
|
||||
container_pipe_size: 2097152,
|
||||
..Default::default()
|
||||
},
|
||||
TestData {
|
||||
contents: "agent.devmode agent.debug_console agent.container_pipe_size=100 agent.unified_cgroup_hierarchy=true",
|
||||
contents: "agent.devmode agent.debug_console agent.container_pipe_size=100 systemd.unified_cgroup_hierarchy=true",
|
||||
debug_console: true,
|
||||
dev_mode: true,
|
||||
container_pipe_size: 100,
|
||||
@ -654,13 +654,13 @@ mod tests {
|
||||
..Default::default()
|
||||
},
|
||||
TestData {
|
||||
contents: "agent.devmode agent.debug_console agent.container_pipe_size=0 agent.unified_cgroup_hierarchy=0",
|
||||
contents: "agent.devmode agent.debug_console agent.container_pipe_size=0 systemd.unified_cgroup_hierarchy=0",
|
||||
debug_console: true,
|
||||
dev_mode: true,
|
||||
..Default::default()
|
||||
},
|
||||
TestData {
|
||||
contents: "agent.devmode agent.debug_console agent.container_pip_siz=100 agent.unified_cgroup_hierarchy=1",
|
||||
contents: "agent.devmode agent.debug_console agent.container_pip_siz=100 systemd.unified_cgroup_hierarchy=1",
|
||||
debug_console: true,
|
||||
dev_mode: true,
|
||||
unified_cgroup_hierarchy: true,
|
||||
|
Loading…
Reference in New Issue
Block a user