Skip to content

Commit

Permalink
fix(snapshot/timeout): add missing volume snapshot timeout
Browse files Browse the repository at this point in the history
Signed-off-by: Tiago Castro <[email protected]>
  • Loading branch information
tiagolobocastro committed Jul 20, 2023
1 parent 3ef42df commit caf1364
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions control-plane/grpc/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ pub fn timeout_grpc(op_id: MessageId, timeout_opts: TimeoutOptions) -> Duration
MessageIdVs::PublishVolume => min_timeouts.nexus(),
MessageIdVs::UnpublishVolume => min_timeouts.nexus(),
MessageIdVs::RepublishVolume => min_timeouts.nexus() * 2,
MessageIdVs::CreateVolumeSnapshot => min_timeouts.volume_snapshot(),
MessageIdVs::DestroyVolumeSnapshot => min_timeouts.volume_snapshot(),

MessageIdVs::CreateNexus => min_timeouts.nexus(),
MessageIdVs::CreateNexusSnapshot => min_timeouts.nexus_snapshot(),
Expand Down
5 changes: 5 additions & 0 deletions control-plane/stor-port/src/transport_api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,11 @@ impl RequestMinTimeout {
pub fn nexus_snapshot(&self) -> Duration {
self.nexus_snapshot
}
/// Minimum timeout for a volume snapshot operation.
pub fn volume_snapshot(&self) -> Duration {
// not quite sure how much slack to give here, maybe this is enough?
self.nexus_snapshot + self.replica_snapshot
}
/// Minimum timeout for a pool operation.
pub fn pool(&self) -> Duration {
self.pool
Expand Down

0 comments on commit caf1364

Please sign in to comment.