Add configurable timeout for pbm backup
General
Escalation
General
Escalation
Description
Environment
None
Activity
Show:
Details
Details
Assignee
Unassigned
UnassignedReporter

Needs QA
Yes
Priority
Smart Checklist
Open Smart Checklist
Smart Checklist

Open Smart Checklist
Created last week
Updated last week
Description
While creating new backups, I have randomly faced timeout issues. Specifically:
get backup metadata: get: context deadline exceeded
which can be tracked to https://github.com/percona/percona-backup-mongodb/blob/4aca65bc1e2655966337790270ea2e0edbcada2b/cmd/pbm/backup.go#L158.While the operation technically fails, the backup is created correctly. So I’m thinking: maybe the cli just needs to wait for a little longer sometimes?
In order to do so, I would like to be able to configure the timeout value used in
startCtx
https://github.com/percona/percona-backup-mongodb/blob/4aca65bc1e2655966337790270ea2e0edbcada2b/cmd/pbm/backup.go#L156 which gets propagated all the way serving as the timeout for the whole operation and is currently a fixed value: https://github.com/percona/percona-backup-mongodb/blob/4aca65bc1e2655966337790270ea2e0edbcada2b/pbm/defs/defs.go#L54Acceptance criteria
There’s a way to configure the timeout for the
pbm backup
command.