Skip to content

Commit

Permalink
Adds auto_restart to containerz.StopRequest.
Browse files Browse the repository at this point in the history
As there is no containerz.Restart() RPC it is
possible to loose access to the device after
calling Stop() on the contaier implementing
the gNOI.containerz service.

Adding the auto_restart field to the Stop() RPC
solves this problem.
  • Loading branch information
tomek-US committed Oct 31, 2023
1 parent 97f5628 commit 0b9f304
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 62 deletions.
120 changes: 68 additions & 52 deletions containerz/containerz.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion containerz/containerz.proto
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import "google/rpc/status.proto";
import "types/types.proto";

option go_package = "github.com/openconfig/gnoi/containerz";
option (types.gnoi_version) = "0.1.1";
option (types.gnoi_version) = "0.1.2";

service Containerz {
// Deploy sets a container image on the target. The container is sent as
Expand Down Expand Up @@ -258,6 +258,10 @@ message StopRequest {

// If force is set, the target should attempt to forcibly kill the container.
bool force = 2;

// If auto_restart is set, the target should start the container immediately
// after stopping it.
bool auto_restart = 3;
}

message StopResponse {
Expand Down
51 changes: 42 additions & 9 deletions containerz/containerz_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0b9f304

Please sign in to comment.