diff --git a/README_nestedapp.md b/README_nestedapp.md index eacb4605..e4c28c0e 100644 --- a/README_nestedapp.md +++ b/README_nestedapp.md @@ -63,3 +63,21 @@ Return codes: Response: The body will contain the NestedAppRuntimeDiskMetric structure in protobuf form. + +### Runtime Status + +To retrieve the status of config applied to a runtime such as cloud-init networking config +a runtime will return a RuntimeStatus protobuf structure at the following endpoint. EVE +should read the error present in the RuntimeStatus and set it in the ZInfoApp for the +App Instance containing the runtime. + +GET /api/v1/runtime/status + +Return codes: + +* Metric Object Returned: `200` +* Non-Get type request: `405` + +Response: + +The body will contain the RuntimeStatus structure in protobuf form. diff --git a/proto/nestedappinstancemetrics/runtimestatus.proto b/proto/nestedappinstancemetrics/runtimestatus.proto new file mode 100644 index 00000000..66107c1b --- /dev/null +++ b/proto/nestedappinstancemetrics/runtimestatus.proto @@ -0,0 +1,29 @@ +// Copyright(c) 2025 Zededa, Inc. +// SPDX-License-Identifier: Apache-2.0 + +syntax = "proto3"; + +import "info/info.proto"; +import "google/protobuf/timestamp.proto"; + +package org.lfedge.eve.nestedappinstancemetrics; +option go_package = "github.com/lf-edge/eve-api/go/nestedappinstancemetrics"; + +// Errors in response to the application of configuration +message RuntimeErrorInfo { + string description = 1; + google.protobuf.Timestamp timestamp = 2; // Timestamp at which error had occurred +} + +// RuntimeStatus represents the status of a runtime on EVE-OS +// which may reside in an AppInstance. +// A single RuntimeStatus in protobuf form will be returned from +// GET /api/v1/runtime/status for every AppInstance where +// AppInstanceConfig.runtime_type!=APP_RUNTIME_TYPE_UNSPECIFIED +message RuntimeStatus { + // Id is the uuid of the runtime app instance + string id = 1; + + // Errors reported by a runtime when applying config eg. cloud-init + RuntimeErrorInfo err = 2; +} \ No newline at end of file