Skip to content

Commit 0e27811

Browse files
committed
feat(control): add RestartZone RPC
Add a RestartZone RPC to ControlService, with RestartZoneRequest carrying the zone id and an empty RestartZoneReply, mirroring DestroyZone. Restart lets a client tear a zone's runtime down and re-create it from its stored spec, re-launching its workloads, instead of a manual destroy and recreate. The daemon decides which states are restartable and refuses control-plane-owned zones, so the request needs no fields beyond the zone id. Signed-off-by: Steven Noonan <steven@edera.dev>
1 parent f98e8a7 commit 0e27811

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

protect/control/v1/control.proto

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ service ControlService {
2727

2828
rpc CreateZone(CreateZoneRequest) returns (CreateZoneReply);
2929
rpc DestroyZone(DestroyZoneRequest) returns (DestroyZoneReply);
30+
rpc RestartZone(RestartZoneRequest) returns (RestartZoneReply);
31+
3032
rpc SuspendZone(SuspendZoneRequest) returns (SuspendZoneReply);
3133
rpc ResumeZone(ResumeZoneRequest) returns (ResumeZoneReply);
3234
rpc ForkZone(ForkZoneRequest) returns (ForkZoneReply);
@@ -114,6 +116,18 @@ message DestroyZoneRequest {
114116

115117
message DestroyZoneReply {}
116118

119+
// Restart tears a zone's runtime down and re-creates it from its stored spec,
120+
// re-launching its workloads. Valid from Failed (retry a crashed/failed zone),
121+
// Ready, and Created (an explicit destroy-and-recreate); rejected while the
122+
// zone is mid-transition. The daemon determines validity and refuses
123+
// control-plane-owned (e.g. CRI/Kubernetes) zones, so no extra request fields
124+
// are needed here.
125+
message RestartZoneRequest {
126+
string zone_id = 1;
127+
}
128+
129+
message RestartZoneReply {}
130+
117131
// Cooperatively suspends a running Edera zone. The guest is asked to quiesce its
118132
// devices and self-suspend; the zone stays resident in memory and can later be
119133
// resumed with `ResumeZoneRequest`.

0 commit comments

Comments
 (0)