Skip to content

Commit 1227e22

Browse files
authored
fix: disk timeout too low (#703)
# Description Drastically raise disk timeout. Especially with wiping and encryption, adding disks can become time consuming, and combined with bulk add options like osd-match this will trigger timeouts. ## Type of change Delete options that are not relevant. - Bug fix (non-breaking change which fixes an issue) ## How has this been tested? Existing tests ## Contributor checklist Please check that you have: - [x] self-reviewed the code in this PR Signed-off-by: Peter Sabaini <peter.sabaini@canonical.com>
1 parent 1835312 commit 1227e22

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

microceph/client/disks.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ import (
1414
"github.com/canonical/microceph/microceph/api/types"
1515
)
1616

17+
const diskAddTimeout = 900 * time.Second
18+
1719
// AddDisk requests Ceph sets up a new OSD.
1820
func AddDisk(ctx context.Context, c *microCli.Client, data *types.DisksPost) (types.DiskAddResponse, error) {
19-
queryCtx, cancel := context.WithTimeout(ctx, time.Second*120)
21+
queryCtx, cancel := context.WithTimeout(ctx, diskAddTimeout)
2022
defer cancel()
2123

2224
errors := types.DiskAddResponse{}

0 commit comments

Comments
 (0)