diff --git a/cmd/ateom-microvm/internal/third_party/kata/agentpb/agent.proto b/cmd/ateom-microvm/internal/third_party/kata/agentpb/agent.proto index d5719b494..462dc9732 100644 --- a/cmd/ateom-microvm/internal/third_party/kata/agentpb/agent.proto +++ b/cmd/ateom-microvm/internal/third_party/kata/agentpb/agent.proto @@ -19,311 +19,309 @@ import "google/protobuf/empty.proto"; // unstable service AgentService { - // execution - rpc CreateContainer(CreateContainerRequest) returns (google.protobuf.Empty); - rpc StartContainer(StartContainerRequest) returns (google.protobuf.Empty); - - // RemoveContainer will tear down an existing container by forcibly terminating - // all processes running inside that container and releasing all internal - // resources associated with it. - // RemoveContainer will wait for all processes termination before returning. - // If any process can not be killed or if it can not be killed after - // the RemoveContainerRequest timeout, RemoveContainer will return an error. - rpc RemoveContainer(RemoveContainerRequest) returns (google.protobuf.Empty); - rpc ExecProcess(ExecProcessRequest) returns (google.protobuf.Empty); - rpc SignalProcess(SignalProcessRequest) returns (google.protobuf.Empty); - rpc WaitProcess(WaitProcessRequest) returns (WaitProcessResponse); // wait & reap like waitpid(2) - rpc UpdateContainer(UpdateContainerRequest) returns (google.protobuf.Empty); - rpc UpdateEphemeralMounts(UpdateEphemeralMountsRequest) returns (google.protobuf.Empty); - rpc StatsContainer(StatsContainerRequest) returns (StatsContainerResponse); - rpc PauseContainer(PauseContainerRequest) returns (google.protobuf.Empty); - rpc ResumeContainer(ResumeContainerRequest) returns (google.protobuf.Empty); - rpc RemoveStaleVirtiofsShareMounts(RemoveStaleVirtiofsShareMountsRequest) returns (google.protobuf.Empty); - rpc GetDiagnosticData(GetDiagnosticDataRequest) returns (GetDiagnosticDataResponse); - - // stdio - rpc WriteStdin(WriteStreamRequest) returns (WriteStreamResponse); - rpc ReadStdout(ReadStreamRequest) returns (ReadStreamResponse); - rpc ReadStderr(ReadStreamRequest) returns (ReadStreamResponse); - rpc CloseStdin(CloseStdinRequest) returns (google.protobuf.Empty); - rpc TtyWinResize(TtyWinResizeRequest) returns (google.protobuf.Empty); - - // networking - rpc UpdateInterface(UpdateInterfaceRequest) returns (types.Interface); - rpc UpdateRoutes(UpdateRoutesRequest) returns (Routes); - rpc ListInterfaces(ListInterfacesRequest) returns(Interfaces); - rpc ListRoutes(ListRoutesRequest) returns (Routes); - rpc AddARPNeighbors(AddARPNeighborsRequest) returns (google.protobuf.Empty); - rpc GetIPTables(GetIPTablesRequest) returns (GetIPTablesResponse); - rpc SetIPTables(SetIPTablesRequest) returns (SetIPTablesResponse); - - // observability - rpc GetMetrics(GetMetricsRequest) returns (Metrics); - - // mem-agent - rpc MemAgentMemcgSet(MemAgentMemcgConfig) returns (google.protobuf.Empty); - rpc MemAgentCompactSet(MemAgentCompactConfig) returns (google.protobuf.Empty); - - // misc (TODO: some rpcs can be replaced by hyperstart-exec) - rpc CreateSandbox(CreateSandboxRequest) returns (google.protobuf.Empty); - rpc DestroySandbox(DestroySandboxRequest) returns (google.protobuf.Empty); - rpc OnlineCPUMem(OnlineCPUMemRequest) returns (google.protobuf.Empty); - rpc ReseedRandomDev(ReseedRandomDevRequest) returns (google.protobuf.Empty); - rpc GetGuestDetails(GuestDetailsRequest) returns (GuestDetailsResponse); - rpc MemHotplugByProbe(MemHotplugByProbeRequest) returns (google.protobuf.Empty); - rpc SetGuestDateTime(SetGuestDateTimeRequest) returns (google.protobuf.Empty); - rpc CopyFile(CopyFileRequest) returns (google.protobuf.Empty); - rpc GetOOMEvent(GetOOMEventRequest) returns (OOMEvent); - rpc AddSwap(AddSwapRequest) returns (google.protobuf.Empty); - rpc AddSwapPath(AddSwapPathRequest) returns (google.protobuf.Empty); - rpc GetVolumeStats(VolumeStatsRequest) returns (VolumeStatsResponse); - rpc ResizeVolume(ResizeVolumeRequest) returns (google.protobuf.Empty); - rpc SetPolicy(SetPolicyRequest) returns (google.protobuf.Empty); + // execution + rpc CreateContainer(CreateContainerRequest) returns (google.protobuf.Empty); + rpc StartContainer(StartContainerRequest) returns (google.protobuf.Empty); + + // RemoveContainer will tear down an existing container by forcibly terminating + // all processes running inside that container and releasing all internal + // resources associated with it. + // RemoveContainer will wait for all processes termination before returning. + // If any process can not be killed or if it can not be killed after + // the RemoveContainerRequest timeout, RemoveContainer will return an error. + rpc RemoveContainer(RemoveContainerRequest) returns (google.protobuf.Empty); + rpc ExecProcess(ExecProcessRequest) returns (google.protobuf.Empty); + rpc SignalProcess(SignalProcessRequest) returns (google.protobuf.Empty); + rpc WaitProcess(WaitProcessRequest) returns (WaitProcessResponse); // wait & reap like waitpid(2) + rpc UpdateContainer(UpdateContainerRequest) returns (google.protobuf.Empty); + rpc UpdateEphemeralMounts(UpdateEphemeralMountsRequest) returns (google.protobuf.Empty); + rpc StatsContainer(StatsContainerRequest) returns (StatsContainerResponse); + rpc PauseContainer(PauseContainerRequest) returns (google.protobuf.Empty); + rpc ResumeContainer(ResumeContainerRequest) returns (google.protobuf.Empty); + rpc RemoveStaleVirtiofsShareMounts(RemoveStaleVirtiofsShareMountsRequest) returns (google.protobuf.Empty); + rpc GetDiagnosticData(GetDiagnosticDataRequest) returns (GetDiagnosticDataResponse); + + // stdio + rpc WriteStdin(WriteStreamRequest) returns (WriteStreamResponse); + rpc ReadStdout(ReadStreamRequest) returns (ReadStreamResponse); + rpc ReadStderr(ReadStreamRequest) returns (ReadStreamResponse); + rpc CloseStdin(CloseStdinRequest) returns (google.protobuf.Empty); + rpc TtyWinResize(TtyWinResizeRequest) returns (google.protobuf.Empty); + + // networking + rpc UpdateInterface(UpdateInterfaceRequest) returns (types.Interface); + rpc UpdateRoutes(UpdateRoutesRequest) returns (Routes); + rpc ListInterfaces(ListInterfacesRequest) returns (Interfaces); + rpc ListRoutes(ListRoutesRequest) returns (Routes); + rpc AddARPNeighbors(AddARPNeighborsRequest) returns (google.protobuf.Empty); + rpc GetIPTables(GetIPTablesRequest) returns (GetIPTablesResponse); + rpc SetIPTables(SetIPTablesRequest) returns (SetIPTablesResponse); + + // observability + rpc GetMetrics(GetMetricsRequest) returns (Metrics); + + // mem-agent + rpc MemAgentMemcgSet(MemAgentMemcgConfig) returns (google.protobuf.Empty); + rpc MemAgentCompactSet(MemAgentCompactConfig) returns (google.protobuf.Empty); + + // misc (TODO: some rpcs can be replaced by hyperstart-exec) + rpc CreateSandbox(CreateSandboxRequest) returns (google.protobuf.Empty); + rpc DestroySandbox(DestroySandboxRequest) returns (google.protobuf.Empty); + rpc OnlineCPUMem(OnlineCPUMemRequest) returns (google.protobuf.Empty); + rpc ReseedRandomDev(ReseedRandomDevRequest) returns (google.protobuf.Empty); + rpc GetGuestDetails(GuestDetailsRequest) returns (GuestDetailsResponse); + rpc MemHotplugByProbe(MemHotplugByProbeRequest) returns (google.protobuf.Empty); + rpc SetGuestDateTime(SetGuestDateTimeRequest) returns (google.protobuf.Empty); + rpc CopyFile(CopyFileRequest) returns (google.protobuf.Empty); + rpc GetOOMEvent(GetOOMEventRequest) returns (OOMEvent); + rpc AddSwap(AddSwapRequest) returns (google.protobuf.Empty); + rpc AddSwapPath(AddSwapPathRequest) returns (google.protobuf.Empty); + rpc GetVolumeStats(VolumeStatsRequest) returns (VolumeStatsResponse); + rpc ResizeVolume(ResizeVolumeRequest) returns (google.protobuf.Empty); + rpc SetPolicy(SetPolicyRequest) returns (google.protobuf.Empty); } message CreateContainerRequest { - string container_id = 1; - string exec_id = 2; - StringUser string_user = 3; - repeated Device devices = 4; - repeated Storage storages = 5; - Spec OCI = 6; - - // This field is used to indicate if the container needs to join - // sandbox shared pid ns or create a new namespace. This field is - // meant to override the NEWPID config settings in the OCI spec. - // The agent would receive an OCI spec with PID namespace cleared - // out altogether and not just the pid ns path. - bool sandbox_pidns = 7; - - // This field is used to declare a set of shared mount points - // that support cross-container sharing of mount objects. - repeated SharedMount shared_mounts = 8; - - // These fields are the host-side vport numbers of passfd streams - // pre-created by runtime-rs, and used as identifiers for the agent - // to select the right streams for init process's stdin/stdout/stderr. - // Disable the feature by setting the associated port to 0. - uint32 stdin_port = 9; - uint32 stdout_port = 10; - uint32 stderr_port = 11; + string container_id = 1; + string exec_id = 2; + StringUser string_user = 3; + repeated Device devices = 4; + repeated Storage storages = 5; + Spec OCI = 6; + + // This field is used to indicate if the container needs to join + // sandbox shared pid ns or create a new namespace. This field is + // meant to override the NEWPID config settings in the OCI spec. + // The agent would receive an OCI spec with PID namespace cleared + // out altogether and not just the pid ns path. + bool sandbox_pidns = 7; + + // This field is used to declare a set of shared mount points + // that support cross-container sharing of mount objects. + repeated SharedMount shared_mounts = 8; + + // These fields are the host-side vport numbers of passfd streams + // pre-created by runtime-rs, and used as identifiers for the agent + // to select the right streams for init process's stdin/stdout/stderr. + // Disable the feature by setting the associated port to 0. + uint32 stdin_port = 9; + uint32 stdout_port = 10; + uint32 stderr_port = 11; } message StartContainerRequest { - string container_id = 1; + string container_id = 1; } message RemoveContainerRequest { - string container_id = 1; + string container_id = 1; - // RemoveContainer will return an error if - // it could not kill some container processes - // after timeout seconds. - // Setting timeout to 0 means RemoveContainer will - // wait for ever. - uint32 timeout = 2; + // RemoveContainer will return an error if + // it could not kill some container processes + // after timeout seconds. + // Setting timeout to 0 means RemoveContainer will + // wait for ever. + uint32 timeout = 2; } message ExecProcessRequest { - string container_id = 1; - string exec_id = 2; - StringUser string_user = 3; - Process process = 4; + string container_id = 1; + string exec_id = 2; + StringUser string_user = 3; + Process process = 4; - // These fields are the host-side vport numbers of passfd streams - // pre-created by runtime-rs, and used as identifiers for the agent - // to select the right streams for process's stdin/stdout/stderr. - // Disable the feature by setting the associated port to 0. - uint32 stdin_port = 5; - uint32 stdout_port = 6; - uint32 stderr_port = 7; + // These fields are the host-side vport numbers of passfd streams + // pre-created by runtime-rs, and used as identifiers for the agent + // to select the right streams for process's stdin/stdout/stderr. + // Disable the feature by setting the associated port to 0. + uint32 stdin_port = 5; + uint32 stdout_port = 6; + uint32 stderr_port = 7; } message SignalProcessRequest { - string container_id = 1; + string container_id = 1; - // Special case for SignalProcess(): exec_id can be empty(""), - // which means to send the signal to all the processes including their descendants. - // Other APIs with exec_id should treat empty exec_id as an invalid request. - string exec_id = 2; - uint32 signal = 3; + // Special case for SignalProcess(): exec_id can be empty(""), + // which means to send the signal to all the processes including their descendants. + // Other APIs with exec_id should treat empty exec_id as an invalid request. + string exec_id = 2; + uint32 signal = 3; } message WaitProcessRequest { - string container_id = 1; - string exec_id = 2; + string container_id = 1; + string exec_id = 2; } message WaitProcessResponse { - int32 status = 1; + int32 status = 1; } message UpdateContainerRequest { - string container_id = 1; - LinuxResources resources = 2; + string container_id = 1; + LinuxResources resources = 2; } message StatsContainerRequest { - string container_id = 1; + string container_id = 1; } message PauseContainerRequest { - string container_id = 1; + string container_id = 1; } message ResumeContainerRequest { - string container_id = 1; + string container_id = 1; } message CpuUsage { - uint64 total_usage = 1; - repeated uint64 percpu_usage = 2; - uint64 usage_in_kernelmode = 3; - uint64 usage_in_usermode = 4; + uint64 total_usage = 1; + repeated uint64 percpu_usage = 2; + uint64 usage_in_kernelmode = 3; + uint64 usage_in_usermode = 4; } message ThrottlingData { - uint64 periods = 1; - uint64 throttled_periods = 2; - uint64 throttled_time = 3; + uint64 periods = 1; + uint64 throttled_periods = 2; + uint64 throttled_time = 3; } message CpuStats { - CpuUsage cpu_usage = 1; - ThrottlingData throttling_data = 2; + CpuUsage cpu_usage = 1; + ThrottlingData throttling_data = 2; } message PidsStats { - uint64 current = 1; - uint64 limit = 2; + uint64 current = 1; + uint64 limit = 2; } message MemoryData { - uint64 usage = 1; - uint64 max_usage = 2; - uint64 failcnt = 3; - uint64 limit = 4; + uint64 usage = 1; + uint64 max_usage = 2; + uint64 failcnt = 3; + uint64 limit = 4; } message MemoryStats { - uint64 cache = 1; - MemoryData usage = 2; - MemoryData swap_usage = 3; - MemoryData kernel_usage = 4; - bool use_hierarchy = 5; - map stats = 6; + uint64 cache = 1; + MemoryData usage = 2; + MemoryData swap_usage = 3; + MemoryData kernel_usage = 4; + bool use_hierarchy = 5; + map stats = 6; } - message BlkioStatsEntry { - uint64 major = 1; - uint64 minor = 2; - string op = 3; - uint64 value = 4; + uint64 major = 1; + uint64 minor = 2; + string op = 3; + uint64 value = 4; } message BlkioStats { - repeated BlkioStatsEntry io_service_bytes_recursive = 1; // number of bytes transferred to and from the block device - repeated BlkioStatsEntry io_serviced_recursive = 2; - repeated BlkioStatsEntry io_queued_recursive = 3; - repeated BlkioStatsEntry io_service_time_recursive = 4; - repeated BlkioStatsEntry io_wait_time_recursive = 5; - repeated BlkioStatsEntry io_merged_recursive = 6; - repeated BlkioStatsEntry io_time_recursive = 7; - repeated BlkioStatsEntry sectors_recursive = 8; + repeated BlkioStatsEntry io_service_bytes_recursive = 1; // number of bytes transferred to and from the block device + repeated BlkioStatsEntry io_serviced_recursive = 2; + repeated BlkioStatsEntry io_queued_recursive = 3; + repeated BlkioStatsEntry io_service_time_recursive = 4; + repeated BlkioStatsEntry io_wait_time_recursive = 5; + repeated BlkioStatsEntry io_merged_recursive = 6; + repeated BlkioStatsEntry io_time_recursive = 7; + repeated BlkioStatsEntry sectors_recursive = 8; } message HugetlbStats { - uint64 usage = 1; - uint64 max_usage = 2; - uint64 failcnt = 3; + uint64 usage = 1; + uint64 max_usage = 2; + uint64 failcnt = 3; } message CgroupStats { - CpuStats cpu_stats = 1; - MemoryStats memory_stats = 2; - PidsStats pids_stats = 3; - BlkioStats blkio_stats = 4; - map hugetlb_stats = 5; // the map is in the format "size of hugepage: stats of the hugepage" - + CpuStats cpu_stats = 1; + MemoryStats memory_stats = 2; + PidsStats pids_stats = 3; + BlkioStats blkio_stats = 4; + map hugetlb_stats = 5; // the map is in the format "size of hugepage: stats of the hugepage" } message NetworkStats { - string name = 1; - uint64 rx_bytes = 2; - uint64 rx_packets = 3; - uint64 rx_errors = 4; - uint64 rx_dropped = 5; - uint64 tx_bytes = 6; - uint64 tx_packets = 7; - uint64 tx_errors = 8; - uint64 tx_dropped = 9; + string name = 1; + uint64 rx_bytes = 2; + uint64 rx_packets = 3; + uint64 rx_errors = 4; + uint64 rx_dropped = 5; + uint64 tx_bytes = 6; + uint64 tx_packets = 7; + uint64 tx_errors = 8; + uint64 tx_dropped = 9; } message StatsContainerResponse { - CgroupStats cgroup_stats = 1; - repeated NetworkStats network_stats = 2; + CgroupStats cgroup_stats = 1; + repeated NetworkStats network_stats = 2; } message WriteStreamRequest { - string container_id = 1; - string exec_id = 2; - bytes data = 3; + string container_id = 1; + string exec_id = 2; + bytes data = 3; } message WriteStreamResponse { - uint32 len = 1; + uint32 len = 1; } message ReadStreamRequest { - string container_id = 1; - string exec_id = 2; - uint32 len = 3; + string container_id = 1; + string exec_id = 2; + uint32 len = 3; } message ReadStreamResponse { - bytes data = 1; + bytes data = 1; } message CloseStdinRequest { - string container_id = 1; - string exec_id = 2; + string container_id = 1; + string exec_id = 2; } message TtyWinResizeRequest { - string container_id = 1; - string exec_id = 2; - uint32 row = 3; - uint32 column = 4; + string container_id = 1; + string exec_id = 2; + uint32 row = 3; + uint32 column = 4; } message KernelModule { - // This field is the name of the kernel module. - string name = 1; - // This field are the parameters for the kernel module which are - // whitespace-delimited key=value pairs passed to modprobe(8). - repeated string parameters = 2; + // This field is the name of the kernel module. + string name = 1; + // This field are the parameters for the kernel module which are + // whitespace-delimited key=value pairs passed to modprobe(8). + repeated string parameters = 2; } message CreateSandboxRequest { - string hostname = 1; - repeated string dns = 2; - repeated Storage storages = 3; - - // This field means that a pause process needs to be created by the - // agent. This pid namespace of the pause process will be treated as - // a shared pid namespace. All containers created will join this shared - // pid namespace. - bool sandbox_pidns = 4; - // SandboxId identifies which sandbox is using the agent. We allow only - // one sandbox per agent and implicitly require that CreateSandbox is - // called before other sandbox/network calls. - string sandbox_id = 5; - // This field, if non-empty, designates an absolute path to a directory - // that the agent will search for OCI hooks to run within the guest. - string guest_hook_path = 6; - // This field is the list of kernel modules to be loaded in the guest kernel. - repeated KernelModule kernel_modules = 7; + string hostname = 1; + repeated string dns = 2; + repeated Storage storages = 3; + + // This field means that a pause process needs to be created by the + // agent. This pid namespace of the pause process will be treated as + // a shared pid namespace. All containers created will join this shared + // pid namespace. + bool sandbox_pidns = 4; + // SandboxId identifies which sandbox is using the agent. We allow only + // one sandbox per agent and implicitly require that CreateSandbox is + // called before other sandbox/network calls. + string sandbox_id = 5; + // This field, if non-empty, designates an absolute path to a directory + // that the agent will search for OCI hooks to run within the guest. + string guest_hook_path = 6; + // This field is the list of kernel modules to be loaded in the guest kernel. + repeated KernelModule kernel_modules = 7; } message DestroySandboxRequest { @@ -332,23 +330,23 @@ message DestroySandboxRequest { message RemoveStaleVirtiofsShareMountsRequest {} message Interfaces { - repeated types.Interface Interfaces = 1; + repeated types.Interface Interfaces = 1; } message Routes { - repeated types.Route Routes = 1; + repeated types.Route Routes = 1; } message UpdateInterfaceRequest { - types.Interface interface = 1; + types.Interface interface = 1; } message UpdateRoutesRequest { - Routes routes = 1; + Routes routes = 1; } message UpdateEphemeralMountsRequest { - repeated Storage storages = 1; + repeated Storage storages = 1; } message ListInterfacesRequest { @@ -358,301 +356,301 @@ message ListRoutesRequest { } message ARPNeighbors { - repeated types.ARPNeighbor ARPNeighbors = 1; + repeated types.ARPNeighbor ARPNeighbors = 1; } message AddARPNeighborsRequest { - ARPNeighbors neighbors = 1; + ARPNeighbors neighbors = 1; } message GetIPTablesRequest { - bool is_ipv6 = 1; + bool is_ipv6 = 1; } -message GetIPTablesResponse{ - // raw stdout from iptables-save or ip6tables-save - bytes data = 1; +message GetIPTablesResponse { + // raw stdout from iptables-save or ip6tables-save + bytes data = 1; } message SetIPTablesRequest { - bool is_ipv6 = 1; + bool is_ipv6 = 1; - // iptables, in raw format expected to be passed to stdin - // of iptables-save or ip6tables-save - bytes data = 2; + // iptables, in raw format expected to be passed to stdin + // of iptables-save or ip6tables-save + bytes data = 2; } -message SetIPTablesResponse{ - // raw stdout from iptables-restore or ip6tables-restore - bytes data = 1; +message SetIPTablesResponse { + // raw stdout from iptables-restore or ip6tables-restore + bytes data = 1; } message OnlineCPUMemRequest { - // Wait specifies if the caller waits for the agent to online all resources. - // If true the agent returns once all resources have been connected, otherwise all - // resources are connected asynchronously and the agent returns immediately. - bool wait = 1; + // Wait specifies if the caller waits for the agent to online all resources. + // If true the agent returns once all resources have been connected, otherwise all + // resources are connected asynchronously and the agent returns immediately. + bool wait = 1; - // NbCpus specifies the number of CPUs that should be onlined in the guest. - // Special value 0 means agent will skip this check. - uint32 nb_cpus = 2; + // NbCpus specifies the number of CPUs that should be onlined in the guest. + // Special value 0 means agent will skip this check. + uint32 nb_cpus = 2; - // CpuOnly specifies whether only online CPU or not. - bool cpu_only = 3; + // CpuOnly specifies whether only online CPU or not. + bool cpu_only = 3; } message ReseedRandomDevRequest { - // Data specifies the random data used to reseed the guest crng. - bytes data = 2; + // Data specifies the random data used to reseed the guest crng. + bytes data = 2; } // AgentDetails provides information to the client about the running agent. message AgentDetails { - // Semantic version of agent (see https://semver.org). - string version = 1; + // Semantic version of agent (see https://semver.org). + string version = 1; - // Set if the agent is running as PID 1. - bool init_daemon = 2; + // Set if the agent is running as PID 1. + bool init_daemon = 2; - // List of available device handlers. - repeated string device_handlers = 3; + // List of available device handlers. + repeated string device_handlers = 3; - // List of available storage handlers. - repeated string storage_handlers = 4; + // List of available storage handlers. + repeated string storage_handlers = 4; - // Set only if the agent is built with seccomp support and the guest - // environment supports seccomp. - bool supports_seccomp = 5; + // Set only if the agent is built with seccomp support and the guest + // environment supports seccomp. + bool supports_seccomp = 5; - // List of additional features enabled at agent build time. - repeated string extra_features = 6; + // List of additional features enabled at agent build time. + repeated string extra_features = 6; } message GuestDetailsRequest { - // MemBlockSize asks server to return the system memory block size that can be used - // for memory hotplug alignment. Typically the server returns what's in - // /sys/devices/system/memory/block_size_bytes. - bool mem_block_size = 1; + // MemBlockSize asks server to return the system memory block size that can be used + // for memory hotplug alignment. Typically the server returns what's in + // /sys/devices/system/memory/block_size_bytes. + bool mem_block_size = 1; - // MemoryHotplugProbe asks server to return whether guest kernel supports memory hotplug - // via probeinterface. Typically the server will check if the path - // /sys/devices/system/memory/probe exists. - bool mem_hotplug_probe = 2; + // MemoryHotplugProbe asks server to return whether guest kernel supports memory hotplug + // via probeinterface. Typically the server will check if the path + // /sys/devices/system/memory/probe exists. + bool mem_hotplug_probe = 2; } message GuestDetailsResponse { - // MemBlockSizeBytes returns the system memory block size in bytes. - uint64 mem_block_size_bytes = 1; + // MemBlockSizeBytes returns the system memory block size in bytes. + uint64 mem_block_size_bytes = 1; - AgentDetails agent_details = 2; + AgentDetails agent_details = 2; - bool support_mem_hotplug_probe = 3; + bool support_mem_hotplug_probe = 3; } message MemHotplugByProbeRequest { - // server needs to send the value of memHotplugProbeAddr into file /sys/devices/system/memory/probe, - // in order to notify the guest kernel about hot-add memory event - repeated uint64 memHotplugProbeAddr = 1; + // server needs to send the value of memHotplugProbeAddr into file /sys/devices/system/memory/probe, + // in order to notify the guest kernel about hot-add memory event + repeated uint64 memHotplugProbeAddr = 1; } message SetGuestDateTimeRequest { - // Sec the second since the Epoch. - int64 Sec = 1; - // Usec the microseconds portion of time since the Epoch. - int64 Usec = 2; + // Sec the second since the Epoch. + int64 Sec = 1; + // Usec the microseconds portion of time since the Epoch. + int64 Usec = 2; } // FSGroup consists of the group id and group ownership change policy // that a volume should have its ownership changed to. message FSGroup { - // GroupID is the ID that the group ownership of the - // files in the mounted volume will need to be changed to. - uint32 group_id = 2; - // GroupChangePolicy specifies the policy for applying group id - // ownership change on a mounted volume. - types.FSGroupChangePolicy group_change_policy = 3; + // GroupID is the ID that the group ownership of the + // files in the mounted volume will need to be changed to. + uint32 group_id = 2; + // GroupChangePolicy specifies the policy for applying group id + // ownership change on a mounted volume. + types.FSGroupChangePolicy group_change_policy = 3; } // SharedMount declares a set of shared mount points that support // cross-container sharing of mount objects. message SharedMount { - // Name is used to identify a pair of shared mount points. - string name = 1; - // Src_ctr is used to specify the name of the source container. - string src_ctr = 2; - // Src_path is used to specify the path of the mount point. If the path doesn't - // exist in the rootfs, it will be created. - string src_path = 3; - // Dst_ctr is used to specify the name of the destination container. - string dst_ctr = 4; - // Dst_path is used to specify the path of the mount point. If the path doesn't - // exist in the rootfs, it will be created. - string dst_path = 5; + // Name is used to identify a pair of shared mount points. + string name = 1; + // Src_ctr is used to specify the name of the source container. + string src_ctr = 2; + // Src_path is used to specify the path of the mount point. If the path doesn't + // exist in the rootfs, it will be created. + string src_path = 3; + // Dst_ctr is used to specify the name of the destination container. + string dst_ctr = 4; + // Dst_path is used to specify the path of the mount point. If the path doesn't + // exist in the rootfs, it will be created. + string dst_path = 5; } // Storage represents both the rootfs of the container, and any volume that // could have been defined through the Mount list of the OCI specification. message Storage { - // Driver is used to define the way the storage is passed through the - // virtual machine. It can be "blk", or something else, but for - // all cases, this will define if some extra steps are required before - // this storage gets mounted into the container. - string driver = 1; - // DriverOptions allows the caller to define a list of options such - // as block sizes, numbers of luns, ... which are very specific to - // every device and cannot be generalized through extra fields. - repeated string driver_options = 2; - // Source can be anything representing the source of the storage. This - // will be handled by the proper handler based on the Driver used. - // For instance, it can be a very simple path if the caller knows the - // name of device inside the VM, or it can be some sort of identifier - // to let the agent find the device inside the VM. - string source = 3; - // Fstype represents the filesystem that needs to be used to mount the - // storage inside the VM. For instance, it could be "xfs" for block - // device, or "tmpfs" for shared /dev/shm. - string fstype = 4; - // Options describes the additional options that might be needed to - // mount properly the storage filesystem. - repeated string options = 5; - // MountPoint refers to the path where the storage should be mounted - // inside the VM. - string mount_point = 6; - // FSGroup consists of the group ID and group ownership change policy - // that the mounted volume must have its group ID changed to when specified. - FSGroup fs_group = 7; - // Shared indicates this storage is shared across multiple containers - // (e.g., block-based emptyDirs). When true, the agent should not clean up - // the storage when a container using it exits, as other containers - // may still need it. Cleanup will happen when the sandbox is destroyed. - bool shared = 8; + // Driver is used to define the way the storage is passed through the + // virtual machine. It can be "blk", or something else, but for + // all cases, this will define if some extra steps are required before + // this storage gets mounted into the container. + string driver = 1; + // DriverOptions allows the caller to define a list of options such + // as block sizes, numbers of luns, ... which are very specific to + // every device and cannot be generalized through extra fields. + repeated string driver_options = 2; + // Source can be anything representing the source of the storage. This + // will be handled by the proper handler based on the Driver used. + // For instance, it can be a very simple path if the caller knows the + // name of device inside the VM, or it can be some sort of identifier + // to let the agent find the device inside the VM. + string source = 3; + // Fstype represents the filesystem that needs to be used to mount the + // storage inside the VM. For instance, it could be "xfs" for block + // device, or "tmpfs" for shared /dev/shm. + string fstype = 4; + // Options describes the additional options that might be needed to + // mount properly the storage filesystem. + repeated string options = 5; + // MountPoint refers to the path where the storage should be mounted + // inside the VM. + string mount_point = 6; + // FSGroup consists of the group ID and group ownership change policy + // that the mounted volume must have its group ID changed to when specified. + FSGroup fs_group = 7; + // Shared indicates this storage is shared across multiple containers + // (e.g., block-based emptyDirs). When true, the agent should not clean up + // the storage when a container using it exits, as other containers + // may still need it. Cleanup will happen when the sandbox is destroyed. + bool shared = 8; } // Device represents only the devices that could have been defined through the // Linux Device list of the OCI specification. message Device { - // Id can be used to identify the device inside the VM. Some devices - // might not need it to be identified on the VM, and will rely on the - // provided VmPath instead. - string id = 1; - // Type defines the type of device described. This can be "blk", - // "scsi", "vfio", ... - // Particularly, this should be used to trigger the use of the - // appropriate device handler. - string type = 2; - // VmPath can be used by the caller to provide directly the path of - // the device as it will appear inside the VM. For some devices, the - // device id or the list of options passed might not be enough to find - // the device. In those cases, the caller should predict and provide - // this vm_path. - string vm_path = 3; - // ContainerPath defines the path where the device should be found inside - // the container. This path should match the path of the device from - // the device list listed inside the OCI spec. This is used in order - // to identify the right device in the spec and update it with the - // right options such as major/minor numbers as they appear inside - // the VM for instance. Note that an empty ctr_path should be used - // to make sure the device handler inside the agent is called, but - // no spec update needs to be performed. This has to happen for the - // case of rootfs, when a device has to be waited for after it has - // been hotplugged. An equivalent Storage entry should be defined if - // any mount needs to be performed afterwards. - string container_path = 4; - // Options allows the caller to define a list of options such as block - // sizes, numbers of luns, ... which are very specific to every device - // and cannot be generalized through extra fields. - repeated string options = 5; + // Id can be used to identify the device inside the VM. Some devices + // might not need it to be identified on the VM, and will rely on the + // provided VmPath instead. + string id = 1; + // Type defines the type of device described. This can be "blk", + // "scsi", "vfio", ... + // Particularly, this should be used to trigger the use of the + // appropriate device handler. + string type = 2; + // VmPath can be used by the caller to provide directly the path of + // the device as it will appear inside the VM. For some devices, the + // device id or the list of options passed might not be enough to find + // the device. In those cases, the caller should predict and provide + // this vm_path. + string vm_path = 3; + // ContainerPath defines the path where the device should be found inside + // the container. This path should match the path of the device from + // the device list listed inside the OCI spec. This is used in order + // to identify the right device in the spec and update it with the + // right options such as major/minor numbers as they appear inside + // the VM for instance. Note that an empty ctr_path should be used + // to make sure the device handler inside the agent is called, but + // no spec update needs to be performed. This has to happen for the + // case of rootfs, when a device has to be waited for after it has + // been hotplugged. An equivalent Storage entry should be defined if + // any mount needs to be performed afterwards. + string container_path = 4; + // Options allows the caller to define a list of options such as block + // sizes, numbers of luns, ... which are very specific to every device + // and cannot be generalized through extra fields. + repeated string options = 5; } message StringUser { - string uid = 1; - string gid = 2; - repeated string additionalGids = 3; + string uid = 1; + string gid = 2; + repeated string additionalGids = 3; } message CopyFileRequest { - // Path is the destination file in the guest. It must be absolute, - // canonical and below /run. - string path = 1; - // FileSize is the expected file size, for security reasons write operations - // are made in a temporary file, once it has the expected size, it's moved - // to the destination path. - int64 file_size = 2; - // FileMode is the file mode. - uint32 file_mode = 3; - // DirMode is the mode for the parent directories of destination path. - uint32 dir_mode = 4; - // Uid is the numeric user id. - int32 uid = 5; - // Gid is the numeric group id. - int32 gid = 6; - // Offset for the next write operation. - int64 offset = 7; - // Data to write in the destination file. - bytes data = 8; + // Path is the destination file in the guest. It must be absolute, + // canonical and below /run. + string path = 1; + // FileSize is the expected file size, for security reasons write operations + // are made in a temporary file, once it has the expected size, it's moved + // to the destination path. + int64 file_size = 2; + // FileMode is the file mode. + uint32 file_mode = 3; + // DirMode is the mode for the parent directories of destination path. + uint32 dir_mode = 4; + // Uid is the numeric user id. + int32 uid = 5; + // Gid is the numeric group id. + int32 gid = 6; + // Offset for the next write operation. + int64 offset = 7; + // Data to write in the destination file. + bytes data = 8; } message GetOOMEventRequest {} message OOMEvent { - string container_id = 1; + string container_id = 1; } message AddSwapRequest { - repeated uint32 PCIPath = 1; + repeated uint32 PCIPath = 1; } message AddSwapPathRequest { - string path = 1; + string path = 1; } message GetMetricsRequest {} message Metrics { - string metrics = 1; + string metrics = 1; } message VolumeStatsRequest { - // The volume path on the guest outside the container - string volume_guest_path = 1; + // The volume path on the guest outside the container + string volume_guest_path = 1; } message ResizeVolumeRequest { - // Full VM guest path of the volume (outside the container) - string volume_guest_path = 1; - uint64 size = 2; + // Full VM guest path of the volume (outside the container) + string volume_guest_path = 1; + uint64 size = 2; } message SetPolicyRequest { - string policy = 1; + string policy = 1; } message GetDiagnosticDataRequest { - string log_type = 1; - string container_id = 2; + string log_type = 1; + string container_id = 2; } message GetDiagnosticDataResponse { - string data = 1; + string data = 1; } message MemAgentMemcgConfig { - optional bool disabled = 1; - optional bool swap = 2; - optional uint32 swappiness_max = 3; - optional uint64 period_secs = 4; - optional uint32 period_psi_percent_limit = 5; - optional uint32 eviction_psi_percent_limit = 6; - optional uint64 eviction_run_aging_count_min = 7; + optional bool disabled = 1; + optional bool swap = 2; + optional uint32 swappiness_max = 3; + optional uint64 period_secs = 4; + optional uint32 period_psi_percent_limit = 5; + optional uint32 eviction_psi_percent_limit = 6; + optional uint64 eviction_run_aging_count_min = 7; } message MemAgentCompactConfig { - optional bool disabled = 1; - optional uint64 period_secs = 2; - optional uint32 period_psi_percent_limit = 3; - optional uint32 compact_psi_percent_limit = 4; - optional int64 compact_sec_max = 5; - optional uint32 compact_order = 6; - optional uint64 compact_threshold = 7; - optional uint64 compact_force_times = 8; + optional bool disabled = 1; + optional uint64 period_secs = 2; + optional uint32 period_psi_percent_limit = 3; + optional uint32 compact_psi_percent_limit = 4; + optional int64 compact_sec_max = 5; + optional uint32 compact_order = 6; + optional uint64 compact_threshold = 7; + optional uint64 compact_force_times = 8; } diff --git a/cmd/ateom-microvm/internal/third_party/kata/agentpb/oci.proto b/cmd/ateom-microvm/internal/third_party/kata/agentpb/oci.proto index cad5fd83d..1d47dd604 100644 --- a/cmd/ateom-microvm/internal/third_party/kata/agentpb/oci.proto +++ b/cmd/ateom-microvm/internal/third_party/kata/agentpb/oci.proto @@ -11,466 +11,466 @@ option go_package = "github.com/agent-substrate/substrate/cmd/ateom-microvm/inte package grpc; message Spec { - // Version of the Open Container Initiative Runtime Specification with which the bundle complies. - string Version = 1; + // Version of the Open Container Initiative Runtime Specification with which the bundle complies. + string Version = 1; - // Process configures the container process. - Process Process = 2; + // Process configures the container process. + Process Process = 2; - // Root configures the container's root filesystem. - Root Root = 3; + // Root configures the container's root filesystem. + Root Root = 3; - // Hostname configures the container's hostname. - string Hostname = 4; + // Hostname configures the container's hostname. + string Hostname = 4; - // Mounts configures additional mounts (on top of Root). - repeated Mount Mounts = 5; + // Mounts configures additional mounts (on top of Root). + repeated Mount Mounts = 5; - // Hooks configures callbacks for container lifecycle events. - Hooks Hooks = 6; + // Hooks configures callbacks for container lifecycle events. + Hooks Hooks = 6; - // Annotations contains arbitrary metadata for the container. - map Annotations = 7; + // Annotations contains arbitrary metadata for the container. + map Annotations = 7; - // Linux is platform-specific configuration for Linux based containers. - Linux Linux = 8; + // Linux is platform-specific configuration for Linux based containers. + Linux Linux = 8; - // Solaris is platform-specific configuration for Solaris based containers. - Solaris Solaris = 9; - // Windows is platform-specific configuration for Windows based containers. - Windows Windows = 10; + // Solaris is platform-specific configuration for Solaris based containers. + Solaris Solaris = 9; + // Windows is platform-specific configuration for Windows based containers. + Windows Windows = 10; } message Process { - // Terminal creates an interactive terminal for the container. - bool Terminal = 1; + // Terminal creates an interactive terminal for the container. + bool Terminal = 1; - // ConsoleSize specifies the size of the console. - Box ConsoleSize = 2; + // ConsoleSize specifies the size of the console. + Box ConsoleSize = 2; - // User specifies user information for the process. - User User = 3; + // User specifies user information for the process. + User User = 3; - // Args specifies the binary and arguments for the application to execute. - repeated string Args = 4; + // Args specifies the binary and arguments for the application to execute. + repeated string Args = 4; - // Env populates the process environment for the process. - repeated string Env = 5; + // Env populates the process environment for the process. + repeated string Env = 5; - // Cwd is the current working directory for the process and must be - // relative to the container's root. - string Cwd = 6; + // Cwd is the current working directory for the process and must be + // relative to the container's root. + string Cwd = 6; - // Capabilities are Linux capabilities that are kept for the process. - LinuxCapabilities Capabilities = 7; + // Capabilities are Linux capabilities that are kept for the process. + LinuxCapabilities Capabilities = 7; - // Rlimits specifies rlimit options to apply to the process. - repeated POSIXRlimit Rlimits = 8; + // Rlimits specifies rlimit options to apply to the process. + repeated POSIXRlimit Rlimits = 8; - // NoNewPrivileges controls whether additional privileges could be gained by processes in the container. - bool NoNewPrivileges = 9; + // NoNewPrivileges controls whether additional privileges could be gained by processes in the container. + bool NoNewPrivileges = 9; - // ApparmorProfile specifies the apparmor profile for the container. - string ApparmorProfile = 10; + // ApparmorProfile specifies the apparmor profile for the container. + string ApparmorProfile = 10; - // Specify an oom_score_adj for the container. - int64 OOMScoreAdj = 11; + // Specify an oom_score_adj for the container. + int64 OOMScoreAdj = 11; - // SelinuxLabel specifies the selinux context that the container process is run as. - string SelinuxLabel = 12; + // SelinuxLabel specifies the selinux context that the container process is run as. + string SelinuxLabel = 12; } message Box { - // Height is the vertical dimension of a box. - uint32 Height = 1; + // Height is the vertical dimension of a box. + uint32 Height = 1; - // Width is the horizontal dimension of a box. - uint32 Width = 2; + // Width is the horizontal dimension of a box. + uint32 Width = 2; } message User { - // UID is the user id. - uint32 UID = 1; + // UID is the user id. + uint32 UID = 1; - // GID is the group id. - uint32 GID = 2; + // GID is the group id. + uint32 GID = 2; - // AdditionalGids are additional group ids set for the container's process. - repeated uint32 AdditionalGids = 3; + // AdditionalGids are additional group ids set for the container's process. + repeated uint32 AdditionalGids = 3; - // Username is the user name. - string Username = 4; + // Username is the user name. + string Username = 4; } message LinuxCapabilities { - // Bounding is the set of capabilities checked by the kernel. - repeated string Bounding = 1; + // Bounding is the set of capabilities checked by the kernel. + repeated string Bounding = 1; - // Effective is the set of capabilities checked by the kernel. - repeated string Effective = 2; + // Effective is the set of capabilities checked by the kernel. + repeated string Effective = 2; - // Inheritable is the capabilities preserved across execve. - repeated string Inheritable = 3; + // Inheritable is the capabilities preserved across execve. + repeated string Inheritable = 3; - // Permitted is the limiting superset for effective capabilities. - repeated string Permitted = 4; + // Permitted is the limiting superset for effective capabilities. + repeated string Permitted = 4; - // Ambient is the ambient set of capabilities that are kept. - repeated string Ambient = 5; + // Ambient is the ambient set of capabilities that are kept. + repeated string Ambient = 5; } message POSIXRlimit { - // Type of the rlimit to set - string Type = 1; + // Type of the rlimit to set + string Type = 1; - // Hard is the hard limit for the specified type - uint64 Hard = 2; + // Hard is the hard limit for the specified type + uint64 Hard = 2; - // Soft is the soft limit for the specified type - uint64 Soft = 3; + // Soft is the soft limit for the specified type + uint64 Soft = 3; } message Mount { - // destination is the path inside the container expect when it starts with "tmp:/" - string destination = 1; - - // source is the path inside the container expect when it starts with "vm:/dev/" or "tmp:/" - // the path which starts with "vm:/dev/" refers the guest vm's "/dev", - // especially, "vm:/dev/hostfs/" refers to the shared filesystem. - // "tmp:/" is a temporary directory which is used for temporary mounts. - string source = 2; - string type = 3; - repeated string options = 4; + // destination is the path inside the container expect when it starts with "tmp:/" + string destination = 1; + + // source is the path inside the container expect when it starts with "vm:/dev/" or "tmp:/" + // the path which starts with "vm:/dev/" refers the guest vm's "/dev", + // especially, "vm:/dev/hostfs/" refers to the shared filesystem. + // "tmp:/" is a temporary directory which is used for temporary mounts. + string source = 2; + string type = 3; + repeated string options = 4; } message Root { - // Path is the absolute path to the container's root filesystem. - string Path = 1; + // Path is the absolute path to the container's root filesystem. + string Path = 1; - // Readonly makes the root filesystem for the container readonly before the process is executed. - bool Readonly = 2; + // Readonly makes the root filesystem for the container readonly before the process is executed. + bool Readonly = 2; } message Hooks { - // Prestart is a list of hooks to be run before the container process is executed. - repeated Hook Prestart = 1; + // Prestart is a list of hooks to be run before the container process is executed. + repeated Hook Prestart = 1; - // Poststart is a list of hooks to be run after the container process is started. - repeated Hook Poststart = 2; + // Poststart is a list of hooks to be run after the container process is started. + repeated Hook Poststart = 2; - // Poststop is a list of hooks to be run after the container process exits. - repeated Hook Poststop = 3; + // Poststop is a list of hooks to be run after the container process exits. + repeated Hook Poststop = 3; - // Createruntime is a list of hooks to be run during the creation of runtime(sandbox). - repeated Hook CreateRuntime = 4; + // Createruntime is a list of hooks to be run during the creation of runtime(sandbox). + repeated Hook CreateRuntime = 4; - // CreateContainer is a list of hooks to be run after VM is started, and before container is created. - repeated Hook CreateContainer = 5; + // CreateContainer is a list of hooks to be run after VM is started, and before container is created. + repeated Hook CreateContainer = 5; - // StartContainer is a list of hooks to be run after container is created, but before it is started. - repeated Hook StartContainer = 6; + // StartContainer is a list of hooks to be run after container is created, but before it is started. + repeated Hook StartContainer = 6; } message Hook { - // Path is the absolute path to the container's root filesystem. - string Path = 1; + // Path is the absolute path to the container's root filesystem. + string Path = 1; - // Arguments used for the binary, including the binary name itself. - repeated string Args = 2; + // Arguments used for the binary, including the binary name itself. + repeated string Args = 2; - // Additional `key=value` environment variables. - repeated string Env = 3; + // Additional `key=value` environment variables. + repeated string Env = 3; - // Timeout is the number of seconds before aborting the hook. If set, timeout MUST be greater than zero. - int64 Timeout = 4; + // Timeout is the number of seconds before aborting the hook. If set, timeout MUST be greater than zero. + int64 Timeout = 4; } message Linux { - // UIDMapping specifies user mappings for supporting user namespaces. - repeated LinuxIDMapping UIDMappings = 1; + // UIDMapping specifies user mappings for supporting user namespaces. + repeated LinuxIDMapping UIDMappings = 1; - // GIDMapping specifies group mappings for supporting user namespaces. - repeated LinuxIDMapping GIDMappings = 2; + // GIDMapping specifies group mappings for supporting user namespaces. + repeated LinuxIDMapping GIDMappings = 2; - // Sysctl are a set of key value pairs that are set for the container on start - map Sysctl = 3; + // Sysctl are a set of key value pairs that are set for the container on start + map Sysctl = 3; - // Resources contain cgroup information for handling resource constraints - // for the container - LinuxResources Resources = 4; + // Resources contain cgroup information for handling resource constraints + // for the container + LinuxResources Resources = 4; - // CgroupsPath specifies the path to cgroups that are created and/or joined by the container. - // The path is expected to be relative to the cgroups mountpoint. - // If resources are specified, the cgroups at CgroupsPath will be updated based on resources. - string CgroupsPath = 5; + // CgroupsPath specifies the path to cgroups that are created and/or joined by the container. + // The path is expected to be relative to the cgroups mountpoint. + // If resources are specified, the cgroups at CgroupsPath will be updated based on resources. + string CgroupsPath = 5; - // Namespaces contains the namespaces that are created and/or joined by the container - repeated LinuxNamespace Namespaces = 6; + // Namespaces contains the namespaces that are created and/or joined by the container + repeated LinuxNamespace Namespaces = 6; - // Devices are a list of device nodes that are created for the container - repeated LinuxDevice Devices = 7; + // Devices are a list of device nodes that are created for the container + repeated LinuxDevice Devices = 7; - // Seccomp specifies the seccomp security settings for the container. - LinuxSeccomp Seccomp = 8; + // Seccomp specifies the seccomp security settings for the container. + LinuxSeccomp Seccomp = 8; - // RootfsPropagation is the rootfs mount propagation mode for the container. - string RootfsPropagation = 9; + // RootfsPropagation is the rootfs mount propagation mode for the container. + string RootfsPropagation = 9; - // MaskedPaths masks over the provided paths inside the container. - repeated string MaskedPaths = 10; + // MaskedPaths masks over the provided paths inside the container. + repeated string MaskedPaths = 10; - // ReadonlyPaths sets the provided paths as RO inside the container. - repeated string ReadonlyPaths = 11; + // ReadonlyPaths sets the provided paths as RO inside the container. + repeated string ReadonlyPaths = 11; - // MountLabel specifies the selinux context for the mounts in the container. - string MountLabel = 12; + // MountLabel specifies the selinux context for the mounts in the container. + string MountLabel = 12; - // IntelRdt contains Intel Resource Director Technology (RDT) information - // for handling resource constraints (e.g., L3 cache) for the container - LinuxIntelRdt IntelRdt = 13; + // IntelRdt contains Intel Resource Director Technology (RDT) information + // for handling resource constraints (e.g., L3 cache) for the container + LinuxIntelRdt IntelRdt = 13; } message Windows { - // Dummy string, never used. - string dummy = 1; + // Dummy string, never used. + string dummy = 1; } message Solaris { - // Dummy string, never used. - string dummy = 1; + // Dummy string, never used. + string dummy = 1; } message LinuxIDMapping { - // HostID is the starting UID/GID on the host to be mapped to 'ContainerID' - uint32 HostID = 1; + // HostID is the starting UID/GID on the host to be mapped to 'ContainerID' + uint32 HostID = 1; - // ContainerID is the starting UID/GID in the container - uint32 ContainerID = 2; + // ContainerID is the starting UID/GID in the container + uint32 ContainerID = 2; - // Size is the number of IDs to be mapped - uint32 Size = 3; + // Size is the number of IDs to be mapped + uint32 Size = 3; } message LinuxNamespace { - // Type is the type of namespace - string Type = 1; + // Type is the type of namespace + string Type = 1; - // Path is a path to an existing namespace persisted on disk that can be joined - // and is of the same type - string Path = 2; + // Path is a path to an existing namespace persisted on disk that can be joined + // and is of the same type + string Path = 2; } message LinuxDevice { - // Path to the device. - string Path = 1; + // Path to the device. + string Path = 1; - // Device type, block, char, etc. - string Type = 2; + // Device type, block, char, etc. + string Type = 2; - // Major is the device's major number. - int64 Major = 3; + // Major is the device's major number. + int64 Major = 3; - // Minor is the device's minor number. - int64 Minor = 4; + // Minor is the device's minor number. + int64 Minor = 4; - // FileMode permission bits for the device. - uint32 FileMode = 5; + // FileMode permission bits for the device. + uint32 FileMode = 5; - // UID of the device. - uint32 UID = 6; + // UID of the device. + uint32 UID = 6; - // Gid of the device. - uint32 GID = 7; + // Gid of the device. + uint32 GID = 7; } message LinuxResources { - // Devices configures the device whitelist. - repeated LinuxDeviceCgroup Devices = 1; + // Devices configures the device whitelist. + repeated LinuxDeviceCgroup Devices = 1; - // Memory restriction configuration - LinuxMemory Memory = 2; + // Memory restriction configuration + LinuxMemory Memory = 2; - // CPU resource restriction configuration - LinuxCPU CPU = 3; + // CPU resource restriction configuration + LinuxCPU CPU = 3; - // Task resource restriction configuration. - LinuxPids Pids = 4; + // Task resource restriction configuration. + LinuxPids Pids = 4; - // BlockIO restriction configuration - LinuxBlockIO BlockIO = 5; + // BlockIO restriction configuration + LinuxBlockIO BlockIO = 5; - // Hugetlb limit (in bytes) - repeated LinuxHugepageLimit HugepageLimits = 6; + // Hugetlb limit (in bytes) + repeated LinuxHugepageLimit HugepageLimits = 6; - // Network restriction configuration - LinuxNetwork Network = 7; + // Network restriction configuration + LinuxNetwork Network = 7; } message LinuxMemory { - // Memory limit (in bytes). - int64 Limit = 1; + // Memory limit (in bytes). + int64 Limit = 1; - // Memory reservation or soft_limit (in bytes). - int64 Reservation = 2; + // Memory reservation or soft_limit (in bytes). + int64 Reservation = 2; - // Total memory limit (memory + swap). - int64 Swap = 3; + // Total memory limit (memory + swap). + int64 Swap = 3; - // Kernel memory limit (in bytes). - int64 Kernel = 4; + // Kernel memory limit (in bytes). + int64 Kernel = 4; - // Kernel memory limit for tcp (in bytes) - int64 KernelTCP = 5; + // Kernel memory limit for tcp (in bytes) + int64 KernelTCP = 5; - // How aggressive the kernel will swap memory pages. - uint64 Swappiness = 6; + // How aggressive the kernel will swap memory pages. + uint64 Swappiness = 6; - // DisableOOMKiller disables the OOM killer for out of memory conditions - bool DisableOOMKiller = 7; + // DisableOOMKiller disables the OOM killer for out of memory conditions + bool DisableOOMKiller = 7; } message LinuxCPU { - // CPU shares (relative weight (ratio) vs. other cgroups with cpu shares). - uint64 Shares = 1; + // CPU shares (relative weight (ratio) vs. other cgroups with cpu shares). + uint64 Shares = 1; - // CPU hardcap limit (in usecs). Allowed cpu time in a given period. - int64 Quota = 2; + // CPU hardcap limit (in usecs). Allowed cpu time in a given period. + int64 Quota = 2; - // CPU period to be used for hardcapping (in usecs). - uint64 Period = 3; + // CPU period to be used for hardcapping (in usecs). + uint64 Period = 3; - // How much time realtime scheduling may use (in usecs). - int64 RealtimeRuntime = 4; + // How much time realtime scheduling may use (in usecs). + int64 RealtimeRuntime = 4; - // CPU period to be used for realtime scheduling (in usecs). - uint64 RealtimePeriod = 5; + // CPU period to be used for realtime scheduling (in usecs). + uint64 RealtimePeriod = 5; - // CPUs to use within the cpuset. Default is to use any CPU available. - string Cpus = 6; + // CPUs to use within the cpuset. Default is to use any CPU available. + string Cpus = 6; - // List of memory nodes in the cpuset. Default is to use any available memory node. - string Mems = 7; + // List of memory nodes in the cpuset. Default is to use any available memory node. + string Mems = 7; } message LinuxWeightDevice { - // Major is the device's major number. - int64 Major = 1; + // Major is the device's major number. + int64 Major = 1; - // Minor is the device's minor number. - int64 Minor = 2; + // Minor is the device's minor number. + int64 Minor = 2; - // Weight is the bandwidth rate for the device. - uint32 Weight = 3; + // Weight is the bandwidth rate for the device. + uint32 Weight = 3; - // LeafWeight is the bandwidth rate for the device while competing with the cgroup's child cgroups, CFQ scheduler only - uint32 LeafWeight = 4; + // LeafWeight is the bandwidth rate for the device while competing with the cgroup's child cgroups, CFQ scheduler only + uint32 LeafWeight = 4; } message LinuxThrottleDevice { - // Major is the device's major number. - int64 Major = 1; + // Major is the device's major number. + int64 Major = 1; - // Minor is the device's minor number. - int64 Minor = 2; + // Minor is the device's minor number. + int64 Minor = 2; - // Rate is the IO rate limit per cgroup per device - uint64 Rate = 3; + // Rate is the IO rate limit per cgroup per device + uint64 Rate = 3; } message LinuxBlockIO { - // Specifies per cgroup weight - uint32 Weight = 1; + // Specifies per cgroup weight + uint32 Weight = 1; - // Specifies tasks' weight in the given cgroup while competing with the cgroup's child cgroups, CFQ scheduler only - uint32 LeafWeight = 2; + // Specifies tasks' weight in the given cgroup while competing with the cgroup's child cgroups, CFQ scheduler only + uint32 LeafWeight = 2; - // Weight per cgroup per device, can override BlkioWeight - repeated LinuxWeightDevice WeightDevice = 3; + // Weight per cgroup per device, can override BlkioWeight + repeated LinuxWeightDevice WeightDevice = 3; - // IO read rate limit per cgroup per device, bytes per second - repeated LinuxThrottleDevice ThrottleReadBpsDevice = 4; + // IO read rate limit per cgroup per device, bytes per second + repeated LinuxThrottleDevice ThrottleReadBpsDevice = 4; - // IO write rate limit per cgroup per device, bytes per second - repeated LinuxThrottleDevice ThrottleWriteBpsDevice = 5; + // IO write rate limit per cgroup per device, bytes per second + repeated LinuxThrottleDevice ThrottleWriteBpsDevice = 5; - // IO read rate limit per cgroup per device, IO per second - repeated LinuxThrottleDevice ThrottleReadIOPSDevice = 6; + // IO read rate limit per cgroup per device, IO per second + repeated LinuxThrottleDevice ThrottleReadIOPSDevice = 6; - // IO write rate limit per cgroup per device, IO per second - repeated LinuxThrottleDevice ThrottleWriteIOPSDevice = 7; + // IO write rate limit per cgroup per device, IO per second + repeated LinuxThrottleDevice ThrottleWriteIOPSDevice = 7; } message LinuxPids { - // Maximum number of PIDs. Default is "no limit". - int64 Limit = 1; + // Maximum number of PIDs. Default is "no limit". + int64 Limit = 1; } message LinuxDeviceCgroup { - // Allow or deny - bool Allow = 1; + // Allow or deny + bool Allow = 1; - // Device type, block, char, etc. - string Type = 2; + // Device type, block, char, etc. + string Type = 2; - // Major is the device's major number. - int64 Major = 3; + // Major is the device's major number. + int64 Major = 3; - // Minor is the device's minor number. - int64 Minor = 4; + // Minor is the device's minor number. + int64 Minor = 4; - // Cgroup access permissions format, rwm. - string Access = 5; + // Cgroup access permissions format, rwm. + string Access = 5; } message LinuxNetwork { - // Set class identifier for container's network packets - uint32 ClassID = 1; + // Set class identifier for container's network packets + uint32 ClassID = 1; - // Set priority of network traffic for container - repeated LinuxInterfacePriority Priorities = 2; + // Set priority of network traffic for container + repeated LinuxInterfacePriority Priorities = 2; } message LinuxHugepageLimit { - // Pagesize is the hugepage size - string Pagesize = 1; + // Pagesize is the hugepage size + string Pagesize = 1; - // Limit is the limit of "hugepagesize" hugetlb usage - uint64 Limit = 2; + // Limit is the limit of "hugepagesize" hugetlb usage + uint64 Limit = 2; } message LinuxInterfacePriority { - // Name is the name of the network interface - string Name = 1; + // Name is the name of the network interface + string Name = 1; - // Priority for the interface - uint32 Priority = 2; + // Priority for the interface + uint32 Priority = 2; } message LinuxSeccomp { - string DefaultAction = 1; - repeated string Architectures = 2; - repeated string Flags = 3; - repeated LinuxSyscall Syscalls = 4; + string DefaultAction = 1; + repeated string Architectures = 2; + repeated string Flags = 3; + repeated LinuxSyscall Syscalls = 4; } message LinuxSeccompArg { - uint64 Index = 1; - uint64 Value = 2; - uint64 ValueTwo = 3; - string Op = 4; + uint64 Index = 1; + uint64 Value = 2; + uint64 ValueTwo = 3; + string Op = 4; } message LinuxSyscall { - repeated string Names = 1; - string Action = 2; - oneof ErrnoRet { - uint32 errnoret = 3; - } - repeated LinuxSeccompArg Args = 4; + repeated string Names = 1; + string Action = 2; + oneof ErrnoRet { + uint32 errnoret = 3; + } + repeated LinuxSeccompArg Args = 4; } message LinuxIntelRdt { - // The schema for L3 cache id and capacity bitmask (CBM) - // Format: "L3:=;=;..." - string L3CacheSchema = 1; + // The schema for L3 cache id and capacity bitmask (CBM) + // Format: "L3:=;=;..." + string L3CacheSchema = 1; } diff --git a/cmd/ateom-microvm/internal/third_party/kata/agentpb/types.proto b/cmd/ateom-microvm/internal/third_party/kata/agentpb/types.proto index 1d10b1845..0b1f626e9 100644 --- a/cmd/ateom-microvm/internal/third_party/kata/agentpb/types.proto +++ b/cmd/ateom-microvm/internal/third_party/kata/agentpb/types.proto @@ -12,60 +12,60 @@ option go_package = "github.com/agent-substrate/substrate/cmd/ateom-microvm/inte package types; enum IPFamily { - v4 = 0; - v6 = 1; + v4 = 0; + v6 = 1; } // FSGroupChangePolicy defines the policy for applying group id ownership change on a mounted volume. enum FSGroupChangePolicy { - // Always indicates that the volume ownership will always be changed. - Always = 0; - // OnRootMismatch indicates that the volume ownership will be changed only - // when the ownership of the root directory does not match with the expected group id for the volume. - OnRootMismatch = 1; + // Always indicates that the volume ownership will always be changed. + Always = 0; + // OnRootMismatch indicates that the volume ownership will be changed only + // when the ownership of the root directory does not match with the expected group id for the volume. + OnRootMismatch = 1; } message IPAddress { - IPFamily family = 1; - string address = 2; - string mask = 3; + IPFamily family = 1; + string address = 2; + string mask = 3; } message Interface { - string device = 1; - string name = 2; - repeated IPAddress IPAddresses = 3; - uint64 mtu = 4; - string hwAddr = 5; + string device = 1; + string name = 2; + repeated IPAddress IPAddresses = 3; + uint64 mtu = 4; + string hwAddr = 5; - // Path for the device (see the pci::Path (Rust) and types.PciPath - // (Go) or ccw::Device (Rust) and types.CcwDevice (Go) types for - // format details, depending on architecture) - string devicePath = 6; + // Path for the device (see the pci::Path (Rust) and types.PciPath + // (Go) or ccw::Device (Rust) and types.CcwDevice (Go) types for + // format details, depending on architecture) + string devicePath = 6; - // Type defines the type of interface described by this structure. - // The expected values are the one that are defined by the netlink - // library, regarding each type of link. Here is a non exhaustive - // list: "veth", "macvtap", "vlan", "macvlan", "tap", ... - string type = 7; - uint32 raw_flags = 8; + // Type defines the type of interface described by this structure. + // The expected values are the one that are defined by the netlink + // library, regarding each type of link. Here is a non exhaustive + // list: "veth", "macvtap", "vlan", "macvlan", "tap", ... + string type = 7; + uint32 raw_flags = 8; } message Route { - string dest = 1; - string gateway = 2; - string device = 3; - string source = 4; - uint32 scope = 5; - IPFamily family = 6; - uint32 flags = 7; - uint32 mtu = 8; + string dest = 1; + string gateway = 2; + string device = 3; + string source = 4; + uint32 scope = 5; + IPFamily family = 6; + uint32 flags = 7; + uint32 mtu = 8; } message ARPNeighbor { - IPAddress toIPAddress = 1; - string device = 2; - string lladdr = 3; - int32 state = 4; - int32 flags = 5; + IPAddress toIPAddress = 1; + string device = 2; + string lladdr = 3; + int32 state = 4; + int32 flags = 5; } diff --git a/hack/update/proto-fmt.sh b/hack/update/proto-fmt.sh new file mode 100755 index 000000000..493c71d97 --- /dev/null +++ b/hack/update/proto-fmt.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -o errexit -o nounset -o pipefail + +ROOT="$(git rev-parse --show-toplevel)" +cd "${ROOT}" + +# Find clang-format in the PATH, and exit if not found. +tool="clang-format" +clangfmt="$(which "$tool" 2>/dev/null || true)" +if [[ ! -x "${clangfmt}" ]]; then + echo "Failed to find ${tool}: please make sure it is in your PATH" >&2 + exit 1 +fi + +# Find all top-level directories containing proto files, and run clangfmt on them. +# shellcheck disable=SC2207 # reading array +files=( + $(git ls-files \ + -cmo \ + --exclude-standard \ + -- \ + ':(glob)**/*.proto' \ + ':!:vendor/*' \ + ':!:**/vendor/*' \ + ':!:LICENSES/*' \ + | sort \ + | uniq) +) + +# Run clang-format on the found files. +# +# Don't reflow long lines, wince those tend to be comments which then require +# re-running the proto generators, which makes "update-all" awkward. +"${clangfmt}" \ + -i \ + --style="{BasedOnStyle: LLVM, ColumnLimit: 0}" \ + "${files[@]}" diff --git a/hack/verify/proto-fmt.sh b/hack/verify/proto-fmt.sh new file mode 100755 index 000000000..ea6a97ef1 --- /dev/null +++ b/hack/verify/proto-fmt.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -o errexit -o nounset -o pipefail + +ROOT="$(git rev-parse --show-toplevel)" +cd "${ROOT}" + +./hack/third_party/kubernetes/verify-generated.sh proto-fmt "$@" diff --git a/internal/proto/ateletpb/atelet.proto b/internal/proto/ateletpb/atelet.proto index c2fe29bb7..ee501b2e8 100644 --- a/internal/proto/ateletpb/atelet.proto +++ b/internal/proto/ateletpb/atelet.proto @@ -39,7 +39,7 @@ message RunRequest { string actor_id = 3; string actor_template_namespace = 4; - string actor_template_name = 5; + string actor_template_name = 5; WorkloadSpec spec = 6; @@ -69,20 +69,20 @@ message ArchAssets { // architecture (GOARCH) and then by asset name. atelet's backend code // interprets the asset names (gVisor expects "runsc"). message SandboxAssets { - string sandbox_class = 1; // e.g. "gvisor" + string sandbox_class = 1; // e.g. "gvisor" map assets = 2; // arch -> {name -> file} } // WorkloadSpec parallels Pod, but with far fewer configurable fields. message WorkloadSpec { - repeated Container containers = 1; - string pause_image = 2; - repeated Volume volumes = 3; + repeated Container containers = 1; + string pause_image = 2; + repeated Volume volumes = 3; } enum VolumeType { - VOLUME_TYPE_UNSPECIFIED = 0; - VOLUME_TYPE_DURABLE_DIR = 1; + VOLUME_TYPE_UNSPECIFIED = 0; + VOLUME_TYPE_DURABLE_DIR = 1; } message DurableDirVolume { @@ -93,27 +93,27 @@ message Volume { VolumeType type = 2; - oneof source{ + oneof source { DurableDirVolume durable_dir = 3; } } -message VolumeMount{ +message VolumeMount { string name = 1; string mount_path = 2; } message Container { - string name = 1; - string image = 2; - repeated string command = 3; - repeated EnvEntry env = 4; - Readyz readyz = 5; + string name = 1; + string image = 2; + repeated string command = 3; + repeated EnvEntry env = 4; + Readyz readyz = 5; repeated VolumeMount volume_mounts = 6; } message EnvEntry { - string name = 1; + string name = 1; string value = 2; } @@ -128,7 +128,7 @@ message HTTPGetAction { // Path to access on the HTTP server. Empty means "/readyz". string path = 1; // TCP port to connect to (1..65535). - int32 port = 2; + int32 port = 2; } message RunResponse { @@ -158,7 +158,7 @@ enum CheckpointType { // Should never happen CHECKPOINT_TYPE_UNSPECIFIED = 0; // Save snapshot only in local filesystem - CHECKPOINT_TYPE_LOCAL = 1; + CHECKPOINT_TYPE_LOCAL = 1; // Save snapshot to object storage CHECKPOINT_TYPE_EXTERNAL = 2; } @@ -182,7 +182,7 @@ message CheckpointRequest { string actor_id = 3; string actor_template_namespace = 4; - string actor_template_name = 5; + string actor_template_name = 5; // Sandbox binary config is not sent on checkpoint: atelet uses the version the // actor is currently running (recorded with the actor's on-node state at @@ -193,7 +193,7 @@ message CheckpointRequest { // The checkpoint configuration, depending on the type. oneof config { - LocalCheckpointConfiguration local_config = 8; + LocalCheckpointConfiguration local_config = 8; ExternalCheckpointConfiguration external_config = 9; } @@ -202,7 +202,6 @@ message CheckpointRequest { } message CheckpointResponse { - } message RestoreRequest { @@ -212,7 +211,7 @@ message RestoreRequest { string actor_id = 3; string actor_template_namespace = 4; - string actor_template_name = 5; + string actor_template_name = 5; // Sandbox binary config is not sent on restore: the snapshot is // self-describing. atelet reads the snapshot manifest to recover the pinned @@ -223,7 +222,7 @@ message RestoreRequest { // The checkpoint configuration, depending on the type. oneof config { - LocalCheckpointConfiguration local_config = 8; + LocalCheckpointConfiguration local_config = 8; ExternalCheckpointConfiguration external_config = 9; } @@ -232,5 +231,4 @@ message RestoreRequest { } message RestoreResponse { - } diff --git a/internal/proto/ateompb/ateom.proto b/internal/proto/ateompb/ateom.proto index 9d22357b8..82f2a09a5 100644 --- a/internal/proto/ateompb/ateom.proto +++ b/internal/proto/ateompb/ateom.proto @@ -52,7 +52,7 @@ message RunWorkloadRequest { string actor_id = 2; string actor_template_namespace = 3; - string actor_template_name = 4; + string actor_template_name = 4; string runsc_path = 5; @@ -71,8 +71,8 @@ message WorkloadSpec { } message Container { - string name = 1; - Readyz readyz = 2; + string name = 1; + Readyz readyz = 2; repeated string durable_dir_volumes = 3; } @@ -87,7 +87,7 @@ message HTTPGetAction { // Path to access on the HTTP server. Empty means "/readyz". string path = 1; // TCP port to connect to (1..65535). - int32 port = 2; + int32 port = 2; } message RunWorkloadResponse { @@ -110,7 +110,7 @@ message CheckpointWorkloadRequest { string actor_id = 2; string actor_template_namespace = 3; - string actor_template_name = 4; + string actor_template_name = 4; string runsc_path = 5; @@ -146,7 +146,7 @@ message RestoreWorkloadRequest { string actor_id = 2; string actor_template_namespace = 3; - string actor_template_name = 4; + string actor_template_name = 4; string runsc_path = 5; @@ -164,5 +164,4 @@ message RestoreWorkloadRequest { } message RestoreWorkloadResponse { - } diff --git a/internal/proto/glutton/glutton.proto b/internal/proto/glutton/glutton.proto index 3a7d4efb3..f2b2c91c9 100644 --- a/internal/proto/glutton/glutton.proto +++ b/internal/proto/glutton/glutton.proto @@ -21,89 +21,88 @@ option go_package = "github.com/agent-substrate/substrate/internal/proto/glutton // A glutton is a single small piece of a larger benchmarking suite. It is designed to be instantiated // multiple times, with each piece configured to do different units of work. service Glutton { - // Tells glutton to write to RAM, either overwriting previously-used - // RAM or allocating additional RAM per request instructions. Data written - // will be random bytes. - rpc WriteRAM(WriteRAMRequest) returns (WriteRAMResponse) {} - - // Tells glutton to write to disk using the specified mode. Data - // written will be random bytes. - rpc WriteDisk(WriteDiskRequest) returns (WriteDiskResponse) {} - - // Tells glutton to make sure it has the specified number of file - // descriptors open. It will open or close file descriptors to - // hit the desired count (note this count is in addition to the other - // FDs needed to run the process). - rpc OpenFD(OpenFDRequest) returns (OpenFDResponse) {} - - // Send a request to the glutton, expecting the same response back. - rpc Ping(PingRequest) returns (PingResponse) {} - - // Tells the glutton to send network traffic to a peer glutton. - // messages will be sent on regular intervals separated by delay_ms. - rpc Gossip(GossipRequest) returns (GossipResponse) {} + // Tells glutton to write to RAM, either overwriting previously-used + // RAM or allocating additional RAM per request instructions. Data written + // will be random bytes. + rpc WriteRAM(WriteRAMRequest) returns (WriteRAMResponse) {} + + // Tells glutton to write to disk using the specified mode. Data + // written will be random bytes. + rpc WriteDisk(WriteDiskRequest) returns (WriteDiskResponse) {} + + // Tells glutton to make sure it has the specified number of file + // descriptors open. It will open or close file descriptors to + // hit the desired count (note this count is in addition to the other + // FDs needed to run the process). + rpc OpenFD(OpenFDRequest) returns (OpenFDResponse) {} + + // Send a request to the glutton, expecting the same response back. + rpc Ping(PingRequest) returns (PingResponse) {} + + // Tells the glutton to send network traffic to a peer glutton. + // messages will be sent on regular intervals separated by delay_ms. + rpc Gossip(GossipRequest) returns (GossipResponse) {} } enum WriteMode { - // Overwrite the destination entirely - WRITE_MODE_TRUNCATE = 0; + // Overwrite the destination entirely + WRITE_MODE_TRUNCATE = 0; - // Write on top of the existing data - WRITE_MODE_OVERWRITE = 1; + // Write on top of the existing data + WRITE_MODE_OVERWRITE = 1; } message WriteRAMRequest { - // name of the array to be written to - string key = 1; - - // size of bytes to be written - int32 size = 2; + // name of the array to be written to + string key = 1; - WriteMode write_mode = 3; + // size of bytes to be written + int32 size = 2; + + WriteMode write_mode = 3; } message WriteRAMResponse { } message WriteDiskRequest { - // name of the file to be written to - string key = 1; - - // size of bytes to be written - int32 size = 2; + // name of the file to be written to + string key = 1; + + // size of bytes to be written + int32 size = 2; - WriteMode write_mode = 3; + WriteMode write_mode = 3; } -message WriteDiskResponse { +message WriteDiskResponse { } message OpenFDRequest { - // The total number of FDs for the glutton to open - int32 count = 1; + // The total number of FDs for the glutton to open + int32 count = 1; } message OpenFDResponse { - } message PingRequest { - // The message to be echoed back from the ping - string message = 1; + // The message to be echoed back from the ping + string message = 1; } message PingResponse { - // The message echoed back - string message = 1; + // The message echoed back + string message = 1; } message GossipRequest { - repeated Peer peers = 1; + repeated Peer peers = 1; } message GossipResponse {} message Peer { - string host = 1; - int32 delay_ms = 2; + string host = 1; + int32 delay_ms = 2; } diff --git a/pkg/proto/ateapipb/ateapi.proto b/pkg/proto/ateapipb/ateapi.proto index 249d13c7d..43da38c9b 100644 --- a/pkg/proto/ateapipb/ateapi.proto +++ b/pkg/proto/ateapipb/ateapi.proto @@ -20,7 +20,6 @@ package ateapi; option go_package = "github.com/agent-substrate/substrate/pkg/proto/ateapipb"; - // Control is the primary RPC interface for Agentic Substrate. service Control { // Get an Actor. @@ -68,8 +67,8 @@ service Control { enum SnapshotType { SNAPSHOT_TYPE_UNSPECIFIED = 0; - SNAPSHOT_TYPE_LOCAL = 1; - SNAPSHOT_TYPE_EXTERNAL = 2; + SNAPSHOT_TYPE_LOCAL = 1; + SNAPSHOT_TYPE_EXTERNAL = 2; } message ExternalSnapshotInfo { @@ -86,7 +85,7 @@ message SnapshotInfo { SnapshotType type = 1; oneof data { ExternalSnapshotInfo external = 2; - LocalSnapshotInfo local = 3; + LocalSnapshotInfo local = 3; } } @@ -98,30 +97,30 @@ message Selector { message Actor { string actor_id = 1; - int64 version = 2; + int64 version = 2; string actor_template_namespace = 3; - string actor_template_name = 4; + string actor_template_name = 4; enum Status { STATUS_UNSPECIFIED = 0; - STATUS_RESUMING = 1; - STATUS_RUNNING = 2; - STATUS_SUSPENDING = 3; - STATUS_SUSPENDED = 4; - STATUS_PAUSING = 5; - STATUS_PAUSED = 6; + STATUS_RESUMING = 1; + STATUS_RUNNING = 2; + STATUS_SUSPENDING = 3; + STATUS_SUSPENDED = 4; + STATUS_PAUSING = 5; + STATUS_PAUSED = 6; } Status status = 5; string ateom_pod_namespace = 6; - string ateom_pod_name = 7; - string ateom_pod_ip = 8; + string ateom_pod_name = 7; + string ateom_pod_ip = 8; // last_snapshot reserved 9; string in_progress_snapshot = 10; - string ateom_pod_uid = 11; + string ateom_pod_uid = 11; SnapshotInfo latest_snapshot_info = 12; // worker_selector is the per-actor placement constraint. The scheduler @@ -151,7 +150,7 @@ message Atespace { // ActorRef identifies an actor: a name is only unique within its atespace. message ActorRef { string atespace = 1; - string name = 2; + string name = 2; } message CreateAtespaceRequest { @@ -288,15 +287,15 @@ message ListActorsResponse { message Worker { string worker_namespace = 1; - string worker_pool = 2; - string worker_pod = 3; + string worker_pool = 2; + string worker_pod = 3; Assignment assignment = 4; - string ip = 5; - int64 version = 6; - string worker_pod_uid = 7; - string node_name = 8; + string ip = 5; + int64 version = 6; + string worker_pod_uid = 7; + string node_name = 8; } message Assignment { @@ -306,7 +305,7 @@ message Assignment { message KubeNamespacedObjectRef { string namespace = 1; - string name = 2; + string name = 2; } message DebugClearRequest {} @@ -344,8 +343,8 @@ service SessionIdentity { message MintJWTRequest { repeated string audience = 1; - string app_id = 2; - string user_id = 3; + string app_id = 2; + string user_id = 3; string session_id = 4; } @@ -372,8 +371,8 @@ message MintJWTResponse { } message MintCertRequest { - string app_id = 1; - string user_id = 2; + string app_id = 1; + string user_id = 2; string session_id = 3; // Request contains DER encoded bytes of a x509 certificate signing request.