From 73d3e0c5de6817b25764458ec8cc340d35fa1325 Mon Sep 17 00:00:00 2001 From: Markus Wieland Date: Thu, 2 Apr 2026 11:40:26 +0200 Subject: [PATCH 1/2] Fix external customer trait --- internal/knowledge/extractor/plugins/compute/host_details.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/knowledge/extractor/plugins/compute/host_details.sql b/internal/knowledge/extractor/plugins/compute/host_details.sql index 00c820974..6cdc24f9f 100644 --- a/internal/knowledge/extractor/plugins/compute/host_details.sql +++ b/internal/knowledge/extractor/plugins/compute/host_details.sql @@ -35,7 +35,7 @@ SELECT ELSE false END AS decommissioned, CASE - WHEN ht.traits LIKE '%CUSTOM_EXTERNAL_CUSTOMER_SUPPORTED%' THEN true + WHEN ht.traits LIKE '%CUSTOM_EXTERNAL_CUSTOMER_EXCLUSIVE%' THEN true ELSE false END AS external_customer, CASE From 696b5abbb39c180b75ab88a609750e6c7a4ae1a8 Mon Sep 17 00:00:00 2001 From: Markus Wieland Date: Thu, 2 Apr 2026 11:41:28 +0200 Subject: [PATCH 2/2] Replace CUSTOM_EXTERNAL_CUSTOMER_SUPPORTED trait with CUSTOM_EXTERNAL_CUSTOMER_EXCLUSIVE in relevant files --- helm/bundles/cortex-nova/templates/pipelines_kvm.yaml | 8 ++++---- .../extractor/plugins/compute/host_details_test.go | 2 +- .../kpis/plugins/compute/resource_capacity_kvm.go | 2 +- .../kpis/plugins/compute/resource_capacity_kvm_test.go | 2 +- .../nova/plugins/filters/filter_external_customer.go | 2 +- .../nova/plugins/filters/filter_external_customer_test.go | 6 +++--- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/helm/bundles/cortex-nova/templates/pipelines_kvm.yaml b/helm/bundles/cortex-nova/templates/pipelines_kvm.yaml index 8b2519207..561d9fc3c 100644 --- a/helm/bundles/cortex-nova/templates/pipelines_kvm.yaml +++ b/helm/bundles/cortex-nova/templates/pipelines_kvm.yaml @@ -51,7 +51,7 @@ spec: description: | This step prefix-matches the domain name for external customer domains and filters out hosts that are not intended for external customers. It considers - the `CUSTOM_EXTERNAL_CUSTOMER_SUPPORTED` trait on hosts as well as the + the `CUSTOM_EXTERNAL_CUSTOMER_EXCLUSIVE` trait on hosts as well as the `domain_name` scheduler hint from the nova request spec. params: - {key: domainNamePrefixes, stringListValue: ["iaas-"]} @@ -190,7 +190,7 @@ spec: description: | This step prefix-matches the domain name for external customer domains and filters out hosts that are not intended for external customers. It considers - the `CUSTOM_EXTERNAL_CUSTOMER_SUPPORTED` trait on hosts as well as the + the `CUSTOM_EXTERNAL_CUSTOMER_EXCLUSIVE` trait on hosts as well as the `domain_name` scheduler hint from the nova request spec. params: - {key: domainNamePrefixes, stringListValue: ["iaas-"]} @@ -463,7 +463,7 @@ spec: description: | This step prefix-matches the domain name for external customer domains and filters out hosts that are not intended for external customers. It considers - the `CUSTOM_EXTERNAL_CUSTOMER_SUPPORTED` trait on hosts as well as the + the `CUSTOM_EXTERNAL_CUSTOMER_EXCLUSIVE` trait on hosts as well as the `domain_name` scheduler hint from the nova request spec. params: - {key: domainNamePrefixes, stringListValue: ["iaas-"]} @@ -534,7 +534,7 @@ spec: description: | This step prefix-matches the domain name for external customer domains and filters out hosts that are not intended for external customers. It considers - the `CUSTOM_EXTERNAL_CUSTOMER_SUPPORTED` trait on hosts as well as the + the `CUSTOM_EXTERNAL_CUSTOMER_EXCLUSIVE` trait on hosts as well as the `domain_name` scheduler hint from the nova request spec. params: - {key: domainNamePrefixes, stringListValue: ["iaas-"]} diff --git a/internal/knowledge/extractor/plugins/compute/host_details_test.go b/internal/knowledge/extractor/plugins/compute/host_details_test.go index dfc7b3d8d..5c701e225 100644 --- a/internal/knowledge/extractor/plugins/compute/host_details_test.go +++ b/internal/knowledge/extractor/plugins/compute/host_details_test.go @@ -80,7 +80,7 @@ func TestHostDetailsExtractor_Extract(t *testing.T) { // VMware host traits &placement.Trait{ResourceProviderUUID: "uuid1", Name: "CUSTOM_HW_SAPPHIRE_RAPIDS"}, &placement.Trait{ResourceProviderUUID: "uuid1", Name: "CUSTOM_HANA_EXCLUSIVE_HOST"}, - &placement.Trait{ResourceProviderUUID: "uuid1", Name: "CUSTOM_EXTERNAL_CUSTOMER_SUPPORTED"}, + &placement.Trait{ResourceProviderUUID: "uuid1", Name: "CUSTOM_EXTERNAL_CUSTOMER_EXCLUSIVE"}, // KVM host traits &placement.Trait{ResourceProviderUUID: "uuid2", Name: "CUSTOM_NUMASIZE_C48_M729"}, // Ironic host traits diff --git a/internal/knowledge/kpis/plugins/compute/resource_capacity_kvm.go b/internal/knowledge/kpis/plugins/compute/resource_capacity_kvm.go index 8200ead36..1d10d5c30 100644 --- a/internal/knowledge/kpis/plugins/compute/resource_capacity_kvm.go +++ b/internal/knowledge/kpis/plugins/compute/resource_capacity_kvm.go @@ -277,7 +277,7 @@ func hostLabelsFromHypervisor(hypervisor hv1.Hypervisor) kvmHostLabels { workloadType = "hana" case "CUSTOM_DECOMMISSIONING": decommissioned = true - case "CUSTOM_EXTERNAL_CUSTOMER_SUPPORTED": + case "CUSTOM_EXTERNAL_CUSTOMER_EXCLUSIVE": externalCustomer = true } } diff --git a/internal/knowledge/kpis/plugins/compute/resource_capacity_kvm_test.go b/internal/knowledge/kpis/plugins/compute/resource_capacity_kvm_test.go index 3834c4d36..e692df04f 100644 --- a/internal/knowledge/kpis/plugins/compute/resource_capacity_kvm_test.go +++ b/internal/knowledge/kpis/plugins/compute/resource_capacity_kvm_test.go @@ -379,7 +379,7 @@ func TestKVMResourceCapacityKPI_Collect(t *testing.T) { }, Traits: []string{ "CUSTOM_DECOMMISSIONING", - "CUSTOM_EXTERNAL_CUSTOMER_SUPPORTED", + "CUSTOM_EXTERNAL_CUSTOMER_EXCLUSIVE", }, }, }, diff --git a/internal/scheduling/nova/plugins/filters/filter_external_customer.go b/internal/scheduling/nova/plugins/filters/filter_external_customer.go index 56f73c8ac..39f11f7af 100644 --- a/internal/scheduling/nova/plugins/filters/filter_external_customer.go +++ b/internal/scheduling/nova/plugins/filters/filter_external_customer.go @@ -65,7 +65,7 @@ func (s *FilterExternalCustomerStep) Run(traceLog *slog.Logger, request api.Exte for _, hv := range hvs.Items { traits := hv.Status.Traits traits = append(traits, hv.Spec.CustomTraits...) - if !slices.Contains(traits, "CUSTOM_EXTERNAL_CUSTOMER_SUPPORTED") { + if !slices.Contains(traits, "CUSTOM_EXTERNAL_CUSTOMER_EXCLUSIVE") { continue } hvsWithTrait[hv.Name] = struct{}{} diff --git a/internal/scheduling/nova/plugins/filters/filter_external_customer_test.go b/internal/scheduling/nova/plugins/filters/filter_external_customer_test.go index 7ca313dc3..05bdbc6f6 100644 --- a/internal/scheduling/nova/plugins/filters/filter_external_customer_test.go +++ b/internal/scheduling/nova/plugins/filters/filter_external_customer_test.go @@ -26,7 +26,7 @@ func TestFilterExternalCustomerStep_Run(t *testing.T) { Name: "host1", }, Status: hv1.HypervisorStatus{ - Traits: []string{"CUSTOM_EXTERNAL_CUSTOMER_SUPPORTED"}, + Traits: []string{"CUSTOM_EXTERNAL_CUSTOMER_EXCLUSIVE"}, }, }, &hv1.Hypervisor{ @@ -34,7 +34,7 @@ func TestFilterExternalCustomerStep_Run(t *testing.T) { Name: "host2", }, Status: hv1.HypervisorStatus{ - Traits: []string{"CUSTOM_EXTERNAL_CUSTOMER_SUPPORTED", "SOME_OTHER_TRAIT"}, + Traits: []string{"CUSTOM_EXTERNAL_CUSTOMER_EXCLUSIVE", "SOME_OTHER_TRAIT"}, }, }, &hv1.Hypervisor{ @@ -58,7 +58,7 @@ func TestFilterExternalCustomerStep_Run(t *testing.T) { Name: "host5", }, Status: hv1.HypervisorStatus{ - Traits: []string{"CUSTOM_EXTERNAL_CUSTOMER_SUPPORTED"}, + Traits: []string{"CUSTOM_EXTERNAL_CUSTOMER_EXCLUSIVE"}, }, }, }