File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1702,8 +1702,12 @@ func (r *testRunner) maybeSaveClusterDueToInvariantProblems(
1702
1702
for _ , det := range dets {
1703
1703
if det .Stdout != "" {
1704
1704
_ = c .Extend (ctx , 7 * 24 * time .Hour , t .L ())
1705
- snapName := "invariant-problem-" + c .Name () + "-" + strconv .Itoa (rand .Int ())
1706
- _ , _ = c .CreateSnapshot (ctx , snapName )
1705
+ timestamp := timeutil .Now ().Format ("20060102_150405" )
1706
+ snapName := fmt .Sprintf ("invariant-problem-%s-%s" , c .Name (), timestamp )
1707
+ if _ , err := c .CreateSnapshot (ctx , snapName ); err != nil {
1708
+ t .L ().Printf ("failed to create snapshot %q: %s" , snapName , err )
1709
+ snapName = "<failed>"
1710
+ }
1707
1711
c .Save (ctx , "invariant problem - snap name " + snapName , t .L ())
1708
1712
t .Error ("invariant problem - snap name " + snapName + ":\n " + det .Stdout )
1709
1713
return
You can’t perform that action at this time.
0 commit comments