Skip to content

Commit ead88bf

Browse files
christoph-zededarouming
authored andcommitted
diskmetrics: increase timeout of qemu img convert
this partially reverts 193147f during testing it has been found out that the timeout is too short, therefore it is now set again to 5 days Signed-off-by: Christoph Ostarek <[email protected]>
1 parent ca20849 commit ead88bf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/pillar/diskmetrics/diskmetrics.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ const qemuExecTimeout = 2 * time.Minute
2222
// qemuExecLongTimeout is a long timeout for command executions in separate worker thread that don't interfere with the watchdog
2323
const qemuExecLongTimeout = 1000 * time.Second
2424

25+
// qemuExecUltraLongTimeout is a long timeout for command executions in separate worker thread that take especially long
26+
const qemuExecUltraLongTimeout = 120 * time.Hour
27+
2528
func GetImgInfo(log *base.LogObject, diskfile string) (*types.ImgInfo, error) {
2629
var imgInfo types.ImgInfo
2730

@@ -99,7 +102,7 @@ func RolloutImgToBlock(ctx context.Context, log *base.LogObject, diskfile, outpu
99102
// writeback cache instead of default unsafe, out of order enabled, skip file creation
100103
// Timeout 2 hours
101104
args := []string{"convert", "--target-is-zero", "-t", "writeback", "-W", "-n", "-O", outputFormat, diskfile, outputFile}
102-
output, err := base.Exec(log, "/usr/bin/qemu-img", args...).WithContext(ctx).WithUnlimitedTimeout(qemuExecLongTimeout).CombinedOutput()
105+
output, err := base.Exec(log, "/usr/bin/qemu-img", args...).WithContext(ctx).WithUnlimitedTimeout(qemuExecUltraLongTimeout).CombinedOutput()
103106
if err != nil {
104107
errStr := fmt.Sprintf("qemu-img failed: %s, %s\n",
105108
err, output)

0 commit comments

Comments
 (0)