Skip to content

Commit 98d66ad

Browse files
Merge pull request openshift#8649 from r4f4/gcp-discard-ssd
OCPBUGS-34638: destroy/gcp: set value for DiscardLocalSsd
2 parents 36bbe11 + b0eb686 commit 98d66ad

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkg/destroy/gcp/instance.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,12 @@ func (o *ClusterUninstaller) stopInstance(ctx context.Context, item cloudResourc
130130
o.Logger.Debugf("Stopping compute instance %s in zone %s", item.name, item.zone)
131131
ctx, cancel := context.WithTimeout(ctx, defaultTimeout)
132132
defer cancel()
133-
op, err := o.computeSvc.Instances.Stop(o.ProjectID, item.zone, item.name).RequestId(o.requestID("stopinstance", item.zone, item.name)).Context(ctx).Do()
133+
op, err := o.computeSvc.Instances.
134+
Stop(o.ProjectID, item.zone, item.name).
135+
RequestId(o.requestID("stopinstance", item.zone, item.name)).
136+
DiscardLocalSsd(true).
137+
Context(ctx).
138+
Do()
134139
if err != nil && !isNoOp(err) {
135140
o.resetRequestID("stopinstance", item.zone, item.name)
136141
return errors.Wrapf(err, "failed to stop instance %s in zone %s", item.name, item.zone)

0 commit comments

Comments
 (0)