1
0
mirror of https://github.com/openshift/installer.git synced 2026-02-05 06:46:36 +01:00

Merge pull request #10175 from hamzy/PowerVC-PostProvision

OCPBUGS-69840: PowerVC: fix PostProvision
This commit is contained in:
openshift-merge-bot[bot]
2025-12-18 20:08:41 +00:00
committed by GitHub
2 changed files with 7 additions and 3 deletions

View File

@@ -100,6 +100,7 @@ func (m *Metadata) Generate(_ context.Context, parents asset.Parents) (err error
case vspheretypes.Name:
metadata.ClusterPlatformMetadata.VSphere = vsphere.Metadata(installConfig.Config)
case powervctypes.Name:
metadata.ClusterPlatformMetadata.OpenStack = openstack.Metadata(clusterID.InfraID, installConfig.Config)
metadata.ClusterPlatformMetadata.PowerVC = powervc.Metadata(clusterID.InfraID, installConfig.Config)
case powervstypes.Name:
metadata.ClusterPlatformMetadata.PowerVS, err = powervs.Metadata(installConfig.Config, installConfig.PowerVS)

View File

@@ -202,9 +202,12 @@ func (p Provider) PostDestroy(ctx context.Context, in clusterapi.PostDestroyerIn
errs = append(errs, err)
}
// Delete security groups tagged with the cluster ID and bootstrap role
if err := postdestroy.SecurityGroups(ctx, cloud, infraID); err != nil {
errs = append(errs, err)
// If we are not a PowerVC driver, then deal with security groups
if in.Metadata.PowerVC == nil {
// Delete security groups tagged with the cluster ID and bootstrap role
if err := postdestroy.SecurityGroups(ctx, cloud, infraID); err != nil {
errs = append(errs, err)
}
}
return errors.Join(errs...)