Skip to content

Commit 35a1adb

Browse files
zhenggulbajolet-hashicorp
authored andcommitted
Remove cleanup step for error volume
1 parent 7bba1ad commit 35a1adb

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

builder/openstack/step_create_volume.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,6 @@ func (s *StepCreateVolume) Run(ctx context.Context, state multistep.StateBag) mu
8383
state.Put("error", err)
8484
ui.Error(err.Error())
8585

86-
// The volume ID has created, try to clean up
87-
s.doCleanup = true
88-
s.volumeID = volume.ID
89-
9086
return multistep.ActionHalt
9187
}
9288

@@ -124,7 +120,7 @@ func (s *StepCreateVolume) Cleanup(state multistep.StateBag) {
124120
return
125121
}
126122

127-
if status != "available" && status != "error" {
123+
if status != "available" {
128124
ui.Say(fmt.Sprintf(
129125
"Waiting for volume %s (volume id: %s) to become available...", s.VolumeName, s.volumeID))
130126
if err := WaitForVolume(blockStorageClient, s.volumeID); err != nil {

0 commit comments

Comments
 (0)