Skip to content

Commit

Permalink
Update vsphere timeout error message (#1062)
Browse files Browse the repository at this point in the history
* Error message

* task information

* bad commit

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
bathina2 and mergify[bot] authored Jul 30, 2021
1 parent 0463dba commit 0b25a49
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/blockstorage/vmware/vmware.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ func (p *FcdProvider) VolumeCreateFromSnapshot(ctx context.Context, snapshot blo
return nil, errors.Wrap(err, "Failed to split snapshot full ID")
}
log.Debug().Print("CreateDiskFromSnapshot foo", field.M{"VolumeID": volID, "SnapshotID": snapshotID})
task, err := p.Gom.CreateDiskFromSnapshot(ctx, vimID(volID), vimID(snapshotID), uuid.NewV1().String(), nil, nil, "")
uid := uuid.NewV1().String()
task, err := p.Gom.CreateDiskFromSnapshot(ctx, vimID(volID), vimID(snapshotID), uid, nil, nil, "")
if err != nil {
return nil, errors.Wrap(err, "Failed to create disk from snapshot")
}
Expand All @@ -121,6 +122,10 @@ func (p *FcdProvider) VolumeCreateFromSnapshot(ctx context.Context, snapshot blo
if err != nil {
return nil, errors.Wrap(err, "Failed to wait on task")
}
if res == nil {
return nil, errors.Errorf("vSphere task did not complete. TaskRefType: %s, TaskRefValue: %s, VolID: %s, SnapshotID: %s, NewVolID: %s",
task.ManagedObjectReference.Type, task.ManagedObjectReference.Value, volID, snapshotID, uid)
}
log.Debug().Print("CreateDiskFromSnapshot task complete", field.M{"VolumeID": volID, "SnapshotID": snapshotID})
obj, ok := res.(types.VStorageObject)
if !ok {
Expand Down

0 comments on commit 0b25a49

Please sign in to comment.