diff --git a/protect/control/v1/common.proto b/protect/control/v1/common.proto index 0a24486..8b9d33a 100644 --- a/protect/control/v1/common.proto +++ b/protect/control/v1/common.proto @@ -26,6 +26,9 @@ message ZoneSpec { ZoneVirtualizationOptionsSpec virtualization_options = 9; ZoneScratchDiskSpec scratch_disk = 10; repeated OciImageSpec addons = 11; + // When set, this zone is a fork of the named parent zone; the reconciler + // forks the child from the parent rather than building it from scratch. + string fork_parent_zone_id = 12; } enum ZoneResourceAdjustmentPolicy { @@ -215,6 +218,7 @@ enum ZoneState { ZONE_STATE_SUSPENDING = 8; ZONE_STATE_SUSPENDED = 9; ZONE_STATE_RESUMING = 10; + ZONE_STATE_FORKING = 11; } enum ZoneNetworkIpVersion { diff --git a/protect/control/v1/control.proto b/protect/control/v1/control.proto index c9796a0..df48240 100644 --- a/protect/control/v1/control.proto +++ b/protect/control/v1/control.proto @@ -24,6 +24,7 @@ service ControlService { rpc DestroyZone(DestroyZoneRequest) returns (DestroyZoneReply); rpc SuspendZone(SuspendZoneRequest) returns (SuspendZoneReply); rpc ResumeZone(ResumeZoneRequest) returns (ResumeZoneReply); + rpc ForkZone(ForkZoneRequest) returns (ForkZoneReply); rpc ResolveZoneId(ResolveZoneIdRequest) returns (ResolveZoneIdReply); rpc ResolveZoneIds(ResolveZoneIdsRequest) returns (ResolveZoneIdsReply); @@ -113,6 +114,21 @@ message ResumeZoneRequest { message ResumeZoneReply {} +// Forks a running Edera zone into a new memory-shared child zone (Xen VM-fork). +// The parent is cooperatively suspended for the fork and then resumed; the child +// is a copy-on-write clone that boots with its own identity (UUID, network). +message ForkZoneRequest { + // The zone to fork from. + string zone_id = 1; + // Optional name for the forked child zone. + string name = 2; +} + +// Returns the UUID of the newly forked child zone. +message ForkZoneReply { + string zone_id = 1; +} + // Resolves zone "friendly name" to a singular zone UUID, if possible. Matching is exact. // See also `ResolveZoneIdsRequest` (plural). message ResolveZoneIdRequest {