From dcb2953302997106e47e3b7a2cff43c67fca83e8 Mon Sep 17 00:00:00 2001 From: eshulman2 Date: Mon, 8 Dec 2025 09:18:29 +0200 Subject: [PATCH 1/4] adding support for dal14 region with s1022 sysType default - Added dal14 region support for PowerVS - Added logic to pin default sysType version for dal14 to s1022 Signed-off-by: Natalia Jordan --- .../ppc64le-cloud/powervs-utils/region.go | 1 + .../api/v1beta2/ibmpowervsmachine_types.go | 2 +- docs/user/openstack/install_upi.md | 4 +- pkg/asset/machines/worker.go | 57 +++++++++++++++---- pkg/types/powervs/powervs_regions.go | 3 + 5 files changed, 55 insertions(+), 12 deletions(-) diff --git a/cluster-api/providers/ibmcloud/vendor/github.com/ppc64le-cloud/powervs-utils/region.go b/cluster-api/providers/ibmcloud/vendor/github.com/ppc64le-cloud/powervs-utils/region.go index d22689241da..2e815ca2d34 100644 --- a/cluster-api/providers/ibmcloud/vendor/github.com/ppc64le-cloud/powervs-utils/region.go +++ b/cluster-api/providers/ibmcloud/vendor/github.com/ppc64le-cloud/powervs-utils/region.go @@ -61,6 +61,7 @@ var Regions = map[string]Region{ Zones: []string{ "dal10", "dal12", + "dal14", }, SysTypes: []string{"s922", "e980"}, VPCZones: []string{"us-south-1", "us-south-2", "us-south-3"}, diff --git a/cluster-api/providers/ibmcloud/vendor/sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta2/ibmpowervsmachine_types.go b/cluster-api/providers/ibmcloud/vendor/sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta2/ibmpowervsmachine_types.go index 9c2f92b6535..968a5358397 100644 --- a/cluster-api/providers/ibmcloud/vendor/sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta2/ibmpowervsmachine_types.go +++ b/cluster-api/providers/ibmcloud/vendor/sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta2/ibmpowervsmachine_types.go @@ -83,7 +83,7 @@ type IBMPowerVSMachineSpec struct { // When omitted, this means that the user has no opinion and the platform is left to choose a // reasonable default, which is subject to change over time. The current default is s922 which is generally available. // + This is not an enum because we expect other values to be added later which should be supported implicitly. - // +kubebuilder:validation:Enum:="s922";"e880";"e980";"s1022";"" + // +kubebuilder:validation:Enum:="s922";"e880";"e980";"s1022";"s1122";"" // +optional SystemType string `json:"systemType,omitempty"` diff --git a/docs/user/openstack/install_upi.md b/docs/user/openstack/install_upi.md index 152bc7d0c59..e5f5398a940 100644 --- a/docs/user/openstack/install_upi.md +++ b/docs/user/openstack/install_upi.md @@ -675,6 +675,7 @@ As mentioned before due to Nova user data size limit, we will need to create a n Create a file called `$INFRA_ID-bootstrap-ignition.json` (fill in your `infraID`) with the following contents: ```${INFRA_ID}-bootstrap-ignition.json +cat << EOF > $INFRA_ID-bootstrap-ignition.json { "ignition": { "config": { @@ -693,6 +694,7 @@ Create a file called `$INFRA_ID-bootstrap-ignition.json` (fill in your `infraID` "version": "3.1.0" } } +EOF ``` @@ -835,7 +837,7 @@ If you are in this situation, you can add resolvers to your Neutron subnet (`ope For example, if you want to add the following nameservers: `198.51.100.86` and `198.51.100.87`, you can run this command: ```sh -$ openstack subnet set --dns-nameserver <198.51.100.86> --dns-nameserver <198.51.100.87> "$INFRA_ID-nodes" +$ openstack subnet set --dns-nameserver <198.51.100.86> --dns-nameserver <198.51.100.87> "$OS_NET_ID-nodes" ``` ## Bootstrap diff --git a/pkg/asset/machines/worker.go b/pkg/asset/machines/worker.go index d45fa469855..73c183e61b7 100644 --- a/pkg/asset/machines/worker.go +++ b/pkg/asset/machines/worker.go @@ -216,16 +216,38 @@ func defaultPowerVSMachinePoolPlatform(ic *types.InstallConfig) powervstypes.Mac fallback = true logrus.Warnf("For given zone %v, GetDatacenterSupportedSystems returns %v", ic.PowerVS.Zone, err) } else { - // Is the hardcoded default of s922 in the list? - found := false - for _, st := range sysTypes { - if st == sysType { - found = true - break + if ic.PowerVS.Zone == "dal14" { + for _, st := range sysTypes { + if st == "s1022" { + sysType = "s1022" + break + } + } + // If s1022 not found, fall back to checking for s922 + if sysType != "s1022" { + for _, st := range sysTypes { + if st == "s922" { + sysType = "s922" + break + } + } + // If neither s1022 nor s922 found, use first in list + if sysType == "s922" { + sysType = sysTypes[0] + } + } + } else { + // For other zones, check if the hardcoded default of s922 is in the list, this is the prior case code + found := false + for _, st := range sysTypes { + if st == sysType { + found = true + break + } + } + if !found { + sysType = sysTypes[0] } - } - if !found { - sysType = sysTypes[0] } } } @@ -234,7 +256,22 @@ func defaultPowerVSMachinePoolPlatform(ic *types.InstallConfig) powervstypes.Mac // Fallback to hardcoded list sysTypes, err = powervstypes.AvailableSysTypes(ic.PowerVS.Region, ic.PowerVS.Zone) if err == nil { - sysType = sysTypes[0] + // For dal14, prefer s1022 if available (Power9 is no longer supported in us-south) + if ic.PowerVS.Zone == "dal14" { + for _, st := range sysTypes { + if st == "s1022" { + sysType = "s1022" + break + } + } + // If s1022 not found, use first in list + if sysType != "s1022" { + sysType = sysTypes[0] + } + } else { + // this is prior case behavior + sysType = sysTypes[0] + } } else { logrus.Warnf("For given zone %v, AvailableSysTypes returns %v", ic.PowerVS.Zone, err) } diff --git a/pkg/types/powervs/powervs_regions.go b/pkg/types/powervs/powervs_regions.go index 7f84d171970..b2da3170751 100644 --- a/pkg/types/powervs/powervs_regions.go +++ b/pkg/types/powervs/powervs_regions.go @@ -37,6 +37,9 @@ var Regions = map[string]Region{ "dal12": { SysTypes: []string{"s922", "e980"}, }, + "dal14": { + SysTypes: []string{"s1022", "e1080"}, + }, }, VPCZones: []string{"us-south-1", "us-south-2", "us-south-3"}, }, From a9494c4cd7a61d594e2cbbfb67162db706483207 Mon Sep 17 00:00:00 2001 From: Natalia Jordan Date: Thu, 15 Jan 2026 16:33:17 -0600 Subject: [PATCH 2/4] updating API call to retrieve current relflection of supported systems- dal14 now returns the corrcect supported systems, identifies power 9 no longer supported Signed-off-by: Natalia Jordan --- pkg/asset/installconfig/powervs/client.go | 38 ++++++++++++++++++++--- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/pkg/asset/installconfig/powervs/client.go b/pkg/asset/installconfig/powervs/client.go index 49641b8dbf9..7d1ed09ebed 100644 --- a/pkg/asset/installconfig/powervs/client.go +++ b/pkg/asset/installconfig/powervs/client.go @@ -1113,7 +1113,6 @@ func (c *Client) GetDatacenterCapabilities(ctx context.Context, region string) ( return getOk.Payload.Capabilities, nil } -// GetDatacenterSupportedSystems retrieves the capabilities of the specified datacenter. func (c *Client) GetDatacenterSupportedSystems(ctx context.Context, region string) ([]string, error) { var err error if c.BXCli.PISession == nil { @@ -1122,14 +1121,45 @@ func (c *Client) GetDatacenterSupportedSystems(ctx context.Context, region strin return nil, fmt.Errorf("failed to initialize PISession in GetDatacenterSupportedSystems: %w", err) } } - params := datacenters.NewV1DatacentersGetParamsWithContext(ctx).WithDatacenterRegion(region) - getOk, err := c.BXCli.PISession.Power.Datacenters.V1DatacentersGet(params) + + fmt.Printf("DEBUG: Querying region: %s\n", region) + + // Use the global datacenter endpoint for accurate, non-cached data (other code uses a bulk endpoint) + datacenterClient := instance.NewIBMPIDatacenterClient(ctx, c.BXCli.PISession, "") + datacenter, err := datacenterClient.Get(region) if err != nil { return nil, fmt.Errorf("failed to get datacenter supported systems: %w", err) } - return getOk.Payload.CapabilitiesDetails.SupportedSystems.General, nil + + // Debug: Print the full response + fmt.Printf("DEBUG: Full capabilities: %+v\n", datacenter.CapabilitiesDetails) + fmt.Printf("DEBUG: Supported systems (general): %v\n", datacenter.CapabilitiesDetails.SupportedSystems.General) + fmt.Printf("DEBUG: Supported systems (dedicated): %v\n", datacenter.CapabilitiesDetails.SupportedSystems.Dedicated) + + return datacenter.CapabilitiesDetails.SupportedSystems.General, nil } +/* +ORIGINAL CODE THAT PULLED STALE SYSTEM TYPES, left for comparison +*/ + +// // GetDatacenterSupportedSystems retrieves the capabilities of the specified datacenter. +// func (c *Client) GetDatacenterSupportedSystems(ctx context.Context, region string) ([]string, error) { +// var err error +// if c.BXCli.PISession == nil { +// err = c.BXCli.NewPISession() +// if err != nil { +// return nil, fmt.Errorf("failed to initialize PISession in GetDatacenterSupportedSystems: %w", err) +// } +// } +// params := datacenters.NewV1DatacentersGetParamsWithContext(ctx).WithDatacenterRegion(region) +// getOk, err := c.BXCli.PISession.Power.Datacenters.V1DatacentersGet(params) +// if err != nil { +// return nil, fmt.Errorf("failed to get datacenter supported systems: %w", err) +// } +// return getOk.Payload.CapabilitiesDetails.SupportedSystems.General, nil +// } + // TransitGatewayNameToID checks to see if the name is an existing transit gateway name. func (c *Client) TransitGatewayNameToID(ctx context.Context, name string) (string, error) { var ( From 03aeb147e559040523401a5fb159ca338744e6f4 Mon Sep 17 00:00:00 2001 From: Natalia Jordan Date: Wed, 28 Jan 2026 11:26:05 -0600 Subject: [PATCH 3/4] updating and cleaning comments for PR Signed-off-by: Natalia Jordan --- pkg/asset/installconfig/powervs/client.go | 28 ----------------------- pkg/asset/machines/worker.go | 3 ++- 2 files changed, 2 insertions(+), 29 deletions(-) diff --git a/pkg/asset/installconfig/powervs/client.go b/pkg/asset/installconfig/powervs/client.go index 7d1ed09ebed..e669f148283 100644 --- a/pkg/asset/installconfig/powervs/client.go +++ b/pkg/asset/installconfig/powervs/client.go @@ -1122,8 +1122,6 @@ func (c *Client) GetDatacenterSupportedSystems(ctx context.Context, region strin } } - fmt.Printf("DEBUG: Querying region: %s\n", region) - // Use the global datacenter endpoint for accurate, non-cached data (other code uses a bulk endpoint) datacenterClient := instance.NewIBMPIDatacenterClient(ctx, c.BXCli.PISession, "") datacenter, err := datacenterClient.Get(region) @@ -1131,35 +1129,9 @@ func (c *Client) GetDatacenterSupportedSystems(ctx context.Context, region strin return nil, fmt.Errorf("failed to get datacenter supported systems: %w", err) } - // Debug: Print the full response - fmt.Printf("DEBUG: Full capabilities: %+v\n", datacenter.CapabilitiesDetails) - fmt.Printf("DEBUG: Supported systems (general): %v\n", datacenter.CapabilitiesDetails.SupportedSystems.General) - fmt.Printf("DEBUG: Supported systems (dedicated): %v\n", datacenter.CapabilitiesDetails.SupportedSystems.Dedicated) - return datacenter.CapabilitiesDetails.SupportedSystems.General, nil } -/* -ORIGINAL CODE THAT PULLED STALE SYSTEM TYPES, left for comparison -*/ - -// // GetDatacenterSupportedSystems retrieves the capabilities of the specified datacenter. -// func (c *Client) GetDatacenterSupportedSystems(ctx context.Context, region string) ([]string, error) { -// var err error -// if c.BXCli.PISession == nil { -// err = c.BXCli.NewPISession() -// if err != nil { -// return nil, fmt.Errorf("failed to initialize PISession in GetDatacenterSupportedSystems: %w", err) -// } -// } -// params := datacenters.NewV1DatacentersGetParamsWithContext(ctx).WithDatacenterRegion(region) -// getOk, err := c.BXCli.PISession.Power.Datacenters.V1DatacentersGet(params) -// if err != nil { -// return nil, fmt.Errorf("failed to get datacenter supported systems: %w", err) -// } -// return getOk.Payload.CapabilitiesDetails.SupportedSystems.General, nil -// } - // TransitGatewayNameToID checks to see if the name is an existing transit gateway name. func (c *Client) TransitGatewayNameToID(ctx context.Context, name string) (string, error) { var ( diff --git a/pkg/asset/machines/worker.go b/pkg/asset/machines/worker.go index 73c183e61b7..ab9c4ebef5a 100644 --- a/pkg/asset/machines/worker.go +++ b/pkg/asset/machines/worker.go @@ -217,6 +217,7 @@ func defaultPowerVSMachinePoolPlatform(ic *types.InstallConfig) powervstypes.Mac logrus.Warnf("For given zone %v, GetDatacenterSupportedSystems returns %v", ic.PowerVS.Zone, err) } else { if ic.PowerVS.Zone == "dal14" { + // prefer s1022 over s1222 for better support for _, st := range sysTypes { if st == "s1022" { sysType = "s1022" @@ -231,7 +232,7 @@ func defaultPowerVSMachinePoolPlatform(ic *types.InstallConfig) powervstypes.Mac break } } - // If neither s1022 nor s922 found, use first in list + // If neither s1022 nor s922 found, use first in list (in case of Dallas this is s1122) if sysType == "s922" { sysType = sysTypes[0] } From 14ddfaa8efaf056eaf9668e522aadbb501cc48fb Mon Sep 17 00:00:00 2001 From: Natalia Jordan Date: Wed, 28 Jan 2026 11:52:01 -0600 Subject: [PATCH 4/4] cleaning up redundant code and adding clearer comments --- pkg/asset/machines/worker.go | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/pkg/asset/machines/worker.go b/pkg/asset/machines/worker.go index ab9c4ebef5a..5ac6e28ac60 100644 --- a/pkg/asset/machines/worker.go +++ b/pkg/asset/machines/worker.go @@ -217,25 +217,16 @@ func defaultPowerVSMachinePoolPlatform(ic *types.InstallConfig) powervstypes.Mac logrus.Warnf("For given zone %v, GetDatacenterSupportedSystems returns %v", ic.PowerVS.Zone, err) } else { if ic.PowerVS.Zone == "dal14" { - // prefer s1022 over s1222 for better support + // Prefer s1022 over s1222 for better support in dal14 region (s922 not supported anymore) for _, st := range sysTypes { if st == "s1022" { sysType = "s1022" break } } - // If s1022 not found, fall back to checking for s922 + // If s1022 not found, fall back to using the first available system type (in case of dal14 this is s1222) if sysType != "s1022" { - for _, st := range sysTypes { - if st == "s922" { - sysType = "s922" - break - } - } - // If neither s1022 nor s922 found, use first in list (in case of Dallas this is s1122) - if sysType == "s922" { - sysType = sysTypes[0] - } + sysType = sysTypes[0] } } else { // For other zones, check if the hardcoded default of s922 is in the list, this is the prior case code @@ -257,7 +248,7 @@ func defaultPowerVSMachinePoolPlatform(ic *types.InstallConfig) powervstypes.Mac // Fallback to hardcoded list sysTypes, err = powervstypes.AvailableSysTypes(ic.PowerVS.Region, ic.PowerVS.Zone) if err == nil { - // For dal14, prefer s1022 if available (Power9 is no longer supported in us-south) + // For dal14, prefer s1022 if available if ic.PowerVS.Zone == "dal14" { for _, st := range sysTypes { if st == "s1022" {