diff --git a/.github/workflows/helm-lint.yaml b/.github/workflows/helm-lint.yaml index 307090635..5490e8c08 100644 --- a/.github/workflows/helm-lint.yaml +++ b/.github/workflows/helm-lint.yaml @@ -24,7 +24,7 @@ jobs: - uses: actions/setup-python@v6.2.0 with: - python-version: "3.12" + python-version: "3.14" check-latest: true - name: Set up chart linting diff --git a/.github/workflows/push-images.yaml b/.github/workflows/push-images.yaml index a1e25dd3e..7addc3e7a 100644 --- a/.github/workflows/push-images.yaml +++ b/.github/workflows/push-images.yaml @@ -66,7 +66,7 @@ jobs: GIT_COMMIT=${{ github.sha }} - name: Generate Artifact Attestation for Cortex Postgres if: steps.changed_postgres_files.outputs.all_changed_files != '' - uses: actions/attest-build-provenance@v3 + uses: actions/attest-build-provenance@v4 with: subject-name: ${{ env.REGISTRY }}/${{ github.repository }}-postgres subject-digest: ${{ steps.push_cortex_postgres.outputs.digest }} @@ -99,7 +99,7 @@ jobs: GIT_TAG=${{ github.ref_name }} GIT_COMMIT=${{ github.sha }} - name: Generate Artifact Attestation for Cortex - uses: actions/attest-build-provenance@v3 + uses: actions/attest-build-provenance@v4 with: subject-name: ${{ env.REGISTRY }}/${{ github.repository }} subject-digest: ${{ steps.push_cortex.outputs.digest }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index fb60f6644..69bfac01d 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -52,7 +52,7 @@ jobs: go tool cover -func profile.cov > func_coverage.txt - name: Upload coverage files - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: name: pr-func-coverage path: | @@ -80,7 +80,7 @@ jobs: } - name: Download coverage files (PR only) if: ${{ github.event_name == 'pull_request' }} - uses: actions/download-artifact@v7 + uses: actions/download-artifact@v8 with: name: pr-func-coverage path: . diff --git a/go.mod b/go.mod index ff1519261..245513cb3 100644 --- a/go.mod +++ b/go.mod @@ -3,13 +3,13 @@ module github.com/cobaltcore-dev/cortex go 1.26 require ( - github.com/cobaltcore-dev/openstack-hypervisor-operator v0.0.0-20260219132051-8f1e68817a12 + github.com/cobaltcore-dev/openstack-hypervisor-operator v0.0.0-20260305105543-733c59b0b17c github.com/go-gorp/gorp v2.2.0+incompatible github.com/gophercloud/gophercloud/v2 v2.10.0 github.com/ironcore-dev/ironcore v0.2.4 github.com/prometheus/client_golang v1.23.2 github.com/prometheus/client_model v0.6.2 - github.com/sapcc/go-bits v0.0.0-20260219121224-1c2b75dbf776 + github.com/sapcc/go-bits v0.0.0-20260226170120-c20f89b66c3c k8s.io/api v0.35.1 k8s.io/apimachinery v0.35.1 k8s.io/client-go v0.35.1 @@ -71,21 +71,21 @@ require ( github.com/poy/onpar v0.3.5 // indirect github.com/prometheus/common v0.67.5 // indirect github.com/prometheus/procfs v0.17.0 // indirect - github.com/sapcc/go-api-declarations v1.19.0 // indirect + github.com/sapcc/go-api-declarations v1.20.2 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/spf13/cobra v1.10.1 // indirect github.com/spf13/pflag v1.0.10 // indirect github.com/stoewer/go-strcase v1.3.1 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/ziutek/mymysql v1.5.4 // indirect - go.opentelemetry.io/auto/sdk v1.1.0 // indirect + go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect - go.opentelemetry.io/otel v1.37.0 // indirect + go.opentelemetry.io/otel v1.40.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.37.0 // indirect - go.opentelemetry.io/otel/metric v1.37.0 // indirect - go.opentelemetry.io/otel/sdk v1.37.0 // indirect - go.opentelemetry.io/otel/trace v1.37.0 // indirect + go.opentelemetry.io/otel/metric v1.40.0 // indirect + go.opentelemetry.io/otel/sdk v1.40.0 // indirect + go.opentelemetry.io/otel/trace v1.40.0 // indirect go.opentelemetry.io/proto/otlp v1.7.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.1 // indirect diff --git a/go.sum b/go.sum index 4485160b5..03dfd27f0 100644 --- a/go.sum +++ b/go.sum @@ -20,8 +20,8 @@ github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1x github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cobaltcore-dev/openstack-hypervisor-operator v0.0.0-20260219132051-8f1e68817a12 h1:W/CX9aGGy/Qtf7uuPoO465u1rJ57az09UP2h6fXrPJo= -github.com/cobaltcore-dev/openstack-hypervisor-operator v0.0.0-20260219132051-8f1e68817a12/go.mod h1:tp9h2MM6OkufwEiIek9tIndpBar0SiPf8q31KM6MRUg= +github.com/cobaltcore-dev/openstack-hypervisor-operator v0.0.0-20260305105543-733c59b0b17c h1:XBqsQQwdSep27eJN7sACjahkhmR2zRlJwv9PrYcEou8= +github.com/cobaltcore-dev/openstack-hypervisor-operator v0.0.0-20260305105543-733c59b0b17c/go.mod h1:b0KmJdxvRI8UXlGe8cRm5BD8Tm2WhF7zSKMSIRGyVL4= github.com/containerd/continuity v0.4.5 h1:ZRoN1sXq9u7V6QoHMcVWGhOwDFqZ4B9i5H6un1Wh0x4= github.com/containerd/continuity v0.4.5/go.mod h1:/lNJvtJKUQStBzpVQ1+rasXO1LAWtUQssk28EZvJ3nE= github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI= @@ -174,10 +174,10 @@ github.com/prometheus/procfs v0.17.0/go.mod h1:oPQLaDAMRbA+u8H5Pbfq+dl3VDAvHxMUO github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sapcc/go-api-declarations v1.19.0 h1:AdCHBhoDGC1REMJF6Rc/XLIcf4qMqjUXs5WLq83HImM= -github.com/sapcc/go-api-declarations v1.19.0/go.mod h1:eiRrXXUeQS5C/1kKn8/KMjk0Y0goUzgDQswj30rH0Zc= -github.com/sapcc/go-bits v0.0.0-20260219121224-1c2b75dbf776 h1:WFpq3qAk60WUoqCMYOkTRiFkpKyjQ/Wq6xUslz/3y7g= -github.com/sapcc/go-bits v0.0.0-20260219121224-1c2b75dbf776/go.mod h1:AYC4f8FYO9DllSt4TyMwm1e5iPn32/DGIrlgXtuEsJ0= +github.com/sapcc/go-api-declarations v1.20.2 h1:GWqv8VgsF4k9id6N051AVTaEpcjT02APsOuz2yCvTPQ= +github.com/sapcc/go-api-declarations v1.20.2/go.mod h1:eiRrXXUeQS5C/1kKn8/KMjk0Y0goUzgDQswj30rH0Zc= +github.com/sapcc/go-bits v0.0.0-20260226170120-c20f89b66c3c h1:GX6ADtKR6Bs2bBRBqeJf376MsxLNppC1SOHLIBuQwIA= +github.com/sapcc/go-bits v0.0.0-20260226170120-c20f89b66c3c/go.mod h1:AYC4f8FYO9DllSt4TyMwm1e5iPn32/DGIrlgXtuEsJ0= github.com/sergi/go-diff v1.4.0 h1:n/SP9D5ad1fORl+llWyN+D6qoUETXNZARKjyY2/KVCw= github.com/sergi/go-diff v1.4.0/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= @@ -205,24 +205,24 @@ github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/ziutek/mymysql v1.5.4 h1:GB0qdRGsTwQSBVYuVShFBKaXSnSnYYC2d9knnE1LHFs= github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 h1:F7Jx+6hwnZ41NSFTO5q4LYDtJRXBf2PD0rNBkeB/lus= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0/go.mod h1:UHB22Z8QsdRDrnAtX4PntOl36ajSxcdUMt1sF7Y6E7Q= -go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ= -go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I= +go.opentelemetry.io/otel v1.40.0 h1:oA5YeOcpRTXq6NN7frwmwFR0Cn3RhTVZvXsP4duvCms= +go.opentelemetry.io/otel v1.40.0/go.mod h1:IMb+uXZUKkMXdPddhwAHm6UfOwJyh4ct1ybIlV14J0g= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0 h1:Ahq7pZmv87yiyn3jeFz/LekZmPLLdKejuO3NcK9MssM= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0/go.mod h1:MJTqhM0im3mRLw1i8uGHnCvUEeS7VwRyxlLC78PA18M= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.37.0 h1:EtFWSnwW9hGObjkIdmlnWSydO+Qs8OwzfzXLUPg4xOc= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.37.0/go.mod h1:QjUEoiGCPkvFZ/MjK6ZZfNOS6mfVEVKYE99dFhuN2LI= -go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE= -go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E= -go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI= -go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg= -go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc= -go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps= -go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4= -go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0= +go.opentelemetry.io/otel/metric v1.40.0 h1:rcZe317KPftE2rstWIBitCdVp89A2HqjkxR3c11+p9g= +go.opentelemetry.io/otel/metric v1.40.0/go.mod h1:ib/crwQH7N3r5kfiBZQbwrTge743UDc7DTFVZrrXnqc= +go.opentelemetry.io/otel/sdk v1.40.0 h1:KHW/jUzgo6wsPh9At46+h4upjtccTmuZCFAc9OJ71f8= +go.opentelemetry.io/otel/sdk v1.40.0/go.mod h1:Ph7EFdYvxq72Y8Li9q8KebuYUr2KoeyHx0DRMKrYBUE= +go.opentelemetry.io/otel/sdk/metric v1.40.0 h1:mtmdVqgQkeRxHgRv4qhyJduP3fYJRMX4AtAlbuWdCYw= +go.opentelemetry.io/otel/sdk/metric v1.40.0/go.mod h1:4Z2bGMf0KSK3uRjlczMOeMhKU2rhUqdWNoKcYrtcBPg= +go.opentelemetry.io/otel/trace v1.40.0 h1:WA4etStDttCSYuhwvEa8OP8I5EWu24lkOzp+ZYblVjw= +go.opentelemetry.io/otel/trace v1.40.0/go.mod h1:zeAhriXecNGP/s2SEG3+Y8X9ujcJOTqQ5RgdEJcawiA= go.opentelemetry.io/proto/otlp v1.7.0 h1:jX1VolD6nHuFzOYso2E73H85i92Mv8JQYk0K9vz09os= go.opentelemetry.io/proto/otlp v1.7.0/go.mod h1:fSKjH6YJ7HDlwzltzyMj036AJ3ejJLCgCSHGj4efDDo= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= diff --git a/helm/bundles/cortex-cinder/Chart.yaml b/helm/bundles/cortex-cinder/Chart.yaml index 4dca36682..b81e033df 100644 --- a/helm/bundles/cortex-cinder/Chart.yaml +++ b/helm/bundles/cortex-cinder/Chart.yaml @@ -5,7 +5,7 @@ apiVersion: v2 name: cortex-cinder description: A Helm chart deploying Cortex for Cinder. type: application -version: 0.0.37 +version: 0.0.38 appVersion: 0.1.0 dependencies: # from: file://../../library/cortex-postgres @@ -16,12 +16,12 @@ dependencies: # from: file://../../library/cortex - name: cortex repository: oci://ghcr.io/cobaltcore-dev/cortex/charts - version: 0.0.24 + version: 0.0.25 alias: cortex-knowledge-controllers # from: file://../../library/cortex - name: cortex repository: oci://ghcr.io/cobaltcore-dev/cortex/charts - version: 0.0.24 + version: 0.0.25 alias: cortex-scheduling-controllers # Owner info adds a configmap to the kubernetes cluster with information on diff --git a/helm/bundles/cortex-crds/Chart.yaml b/helm/bundles/cortex-crds/Chart.yaml index 45cc25c76..5427ac308 100644 --- a/helm/bundles/cortex-crds/Chart.yaml +++ b/helm/bundles/cortex-crds/Chart.yaml @@ -5,13 +5,13 @@ apiVersion: v2 name: cortex-crds description: A Helm chart deploying Cortex CRDs. type: application -version: 0.0.37 +version: 0.0.38 appVersion: 0.1.0 dependencies: # from: file://../../library/cortex - name: cortex repository: oci://ghcr.io/cobaltcore-dev/cortex/charts - version: 0.0.24 + version: 0.0.25 # Owner info adds a configmap to the kubernetes cluster with information on # the service owner. This makes it easier to find out who to contact in case diff --git a/helm/bundles/cortex-ironcore/Chart.yaml b/helm/bundles/cortex-ironcore/Chart.yaml index 6b5d59ee7..a555ba200 100644 --- a/helm/bundles/cortex-ironcore/Chart.yaml +++ b/helm/bundles/cortex-ironcore/Chart.yaml @@ -5,13 +5,13 @@ apiVersion: v2 name: cortex-ironcore description: A Helm chart deploying Cortex for IronCore. type: application -version: 0.0.37 +version: 0.0.38 appVersion: 0.1.0 dependencies: # from: file://../../library/cortex - name: cortex repository: oci://ghcr.io/cobaltcore-dev/cortex/charts - version: 0.0.24 + version: 0.0.25 # Owner info adds a configmap to the kubernetes cluster with information on # the service owner. This makes it easier to find out who to contact in case diff --git a/helm/bundles/cortex-manila/Chart.yaml b/helm/bundles/cortex-manila/Chart.yaml index ce88b4514..98e7f587c 100644 --- a/helm/bundles/cortex-manila/Chart.yaml +++ b/helm/bundles/cortex-manila/Chart.yaml @@ -5,7 +5,7 @@ apiVersion: v2 name: cortex-manila description: A Helm chart deploying Cortex for Manila. type: application -version: 0.0.37 +version: 0.0.38 appVersion: 0.1.0 dependencies: # from: file://../../library/cortex-postgres @@ -16,12 +16,12 @@ dependencies: # from: file://../../library/cortex - name: cortex repository: oci://ghcr.io/cobaltcore-dev/cortex/charts - version: 0.0.24 + version: 0.0.25 alias: cortex-knowledge-controllers # from: file://../../library/cortex - name: cortex repository: oci://ghcr.io/cobaltcore-dev/cortex/charts - version: 0.0.24 + version: 0.0.25 alias: cortex-scheduling-controllers # Owner info adds a configmap to the kubernetes cluster with information on diff --git a/helm/bundles/cortex-nova/Chart.yaml b/helm/bundles/cortex-nova/Chart.yaml index 1d66f8e2d..ec1c16b2f 100644 --- a/helm/bundles/cortex-nova/Chart.yaml +++ b/helm/bundles/cortex-nova/Chart.yaml @@ -5,7 +5,7 @@ apiVersion: v2 name: cortex-nova description: A Helm chart deploying Cortex for Nova. type: application -version: 0.0.37 +version: 0.0.38 appVersion: 0.1.0 dependencies: # from: file://../../library/cortex-postgres @@ -16,12 +16,12 @@ dependencies: # from: file://../../library/cortex - name: cortex repository: oci://ghcr.io/cobaltcore-dev/cortex/charts - version: 0.0.24 + version: 0.0.25 alias: cortex-knowledge-controllers # from: file://../../library/cortex - name: cortex repository: oci://ghcr.io/cobaltcore-dev/cortex/charts - version: 0.0.24 + version: 0.0.25 alias: cortex-scheduling-controllers # Owner info adds a configmap to the kubernetes cluster with information on diff --git a/helm/bundles/cortex-pods/Chart.yaml b/helm/bundles/cortex-pods/Chart.yaml index 223914ee1..949a2493a 100644 --- a/helm/bundles/cortex-pods/Chart.yaml +++ b/helm/bundles/cortex-pods/Chart.yaml @@ -5,13 +5,13 @@ apiVersion: v2 name: cortex-pods description: A Helm chart deploying Cortex for Pods. type: application -version: 0.0.37 +version: 0.0.38 appVersion: 0.1.0 dependencies: # from: file://../../library/cortex - name: cortex repository: oci://ghcr.io/cobaltcore-dev/cortex/charts - version: 0.0.24 + version: 0.0.25 # Owner info adds a configmap to the kubernetes cluster with information on # the service owner. This makes it easier to find out who to contact in case diff --git a/helm/dev/cortex-prometheus-operator/Chart.yaml b/helm/dev/cortex-prometheus-operator/Chart.yaml index 687e6a429..2c28dfe7c 100644 --- a/helm/dev/cortex-prometheus-operator/Chart.yaml +++ b/helm/dev/cortex-prometheus-operator/Chart.yaml @@ -10,4 +10,4 @@ dependencies: # CRDs of the prometheus operator, such as PrometheusRule, ServiceMonitor, etc. - name: kube-prometheus-stack repository: oci://ghcr.io/prometheus-community/charts - version: 82.1.1 + version: 82.4.1 diff --git a/helm/library/cortex/Chart.yaml b/helm/library/cortex/Chart.yaml index 5ee4696b0..684bbd759 100644 --- a/helm/library/cortex/Chart.yaml +++ b/helm/library/cortex/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: cortex description: A Helm chart to distribute cortex. type: application -version: 0.0.24 -appVersion: "sha-94f91e5c" +version: 0.0.25 +appVersion: "sha-349d742b" icon: "https://example.com/icon.png" dependencies: [] diff --git a/internal/scheduling/nova/integration_test.go b/internal/scheduling/nova/integration_test.go index 33b2fc5f5..137ac5a10 100644 --- a/internal/scheduling/nova/integration_test.go +++ b/internal/scheduling/nova/integration_test.go @@ -222,7 +222,7 @@ type PipelineConfig struct { // filter_has_enough_capacity and kvm_failover_evacuation func DefaultPipelineConfig() PipelineConfig { return PipelineConfig{ - Name: "nova-external-scheduler-kvm-all-filters-enabled", + Name: "kvm-general-purpose-load-balancing-all-filters-enabled", Filters: []v1alpha1.FilterSpec{ {Name: "filter_has_enough_capacity"}, }, @@ -371,7 +371,7 @@ func TestIntegration_SchedulingWithReservations(t *testing.T) { reservations: []*v1alpha1.Reservation{ newFailoverReservation("failover-vm-existing", "host3", "m1.large", "4", "8Gi", map[string]string{"vm-existing": "host1"}), }, - request: newNovaRequest("new-vm-uuid", "project-B", "m1.medium", "gp-1", 2, "4Gi", false, []string{"host1", "host2", "host3"}, "nova-external-scheduler-kvm-all-filters-enabled"), + request: newNovaRequest("new-vm-uuid", "project-B", "m1.medium", "gp-1", 2, "4Gi", false, []string{"host1", "host2", "host3"}, "kvm-general-purpose-load-balancing-all-filters-enabled"), filteredHosts: []string{"host3"}, minExpectedHostsCount: 2, }, @@ -384,7 +384,7 @@ func TestIntegration_SchedulingWithReservations(t *testing.T) { reservations: []*v1alpha1.Reservation{ newFailoverReservation("failover-vm-123", "host3", "m1.large", "4", "8Gi", map[string]string{"vm-123": "host1"}), }, - request: newNovaRequest("vm-123", "project-A", "m1.large", "gp-1", 4, "8Gi", true, []string{"host2", "host3"}, "nova-external-scheduler-kvm-all-filters-enabled"), + request: newNovaRequest("vm-123", "project-A", "m1.large", "gp-1", 4, "8Gi", true, []string{"host2", "host3"}, "kvm-general-purpose-load-balancing-all-filters-enabled"), expectedHosts: []string{"host3", "host2"}, // Failover host should be first expectedHostsOrdered: true, minExpectedHostsCount: 2, @@ -400,7 +400,7 @@ func TestIntegration_SchedulingWithReservations(t *testing.T) { newFailoverReservation("failover-vm-456-on-host1", "host1", "m1.large", "4", "8Gi", map[string]string{"vm-456": "host-original"}), newFailoverReservation("failover-vm-456-on-host3", "host3", "m1.large", "4", "8Gi", map[string]string{"vm-456": "host-original"}), }, - request: newNovaRequest("vm-456", "project-A", "m1.large", "gp-1", 4, "8Gi", true, []string{"host1", "host2", "host3"}, "nova-external-scheduler-kvm-all-filters-enabled"), + request: newNovaRequest("vm-456", "project-A", "m1.large", "gp-1", 4, "8Gi", true, []string{"host1", "host2", "host3"}, "kvm-general-purpose-load-balancing-all-filters-enabled"), expectedHosts: []string{"host1", "host2", "host3"}, minExpectedHostsCount: 3, // Both host1 and host3 have failover reservations, so they should be preferred over host2 @@ -416,7 +416,7 @@ func TestIntegration_SchedulingWithReservations(t *testing.T) { newFailoverReservation("failover-vm-456-on-host1", "host1", "m1.large", "4", "8Gi", map[string]string{"some-other-vm": "host-original"}), newFailoverReservation("failover-vm-456-on-host3", "host3", "m1.large", "4", "8Gi", map[string]string{"vm-456": "host-original"}), }, - request: newNovaRequest("vm-456", "project-A", "m1.large", "gp-1", 4, "8Gi", true, []string{"host1", "host2", "host3"}, "nova-external-scheduler-kvm-all-filters-enabled"), + request: newNovaRequest("vm-456", "project-A", "m1.large", "gp-1", 4, "8Gi", true, []string{"host1", "host2", "host3"}, "kvm-general-purpose-load-balancing-all-filters-enabled"), expectedHosts: []string{"host3", "host2"}, expectedHostsOrdered: true, minExpectedHostsCount: 2, @@ -431,7 +431,7 @@ func TestIntegration_SchedulingWithReservations(t *testing.T) { reservations: []*v1alpha1.Reservation{ newCommittedReservation("committed-res-host1", "host1", "host1", "project-A", "m1.large", "gp-1", "4", "8Gi"), }, - request: newNovaRequest("new-vm should work", "project-A", "m1.large", "gp-1", 4, "8Gi", false, []string{"host1", "host2"}, "nova-external-scheduler-kvm-all-filters-enabled"), + request: newNovaRequest("new-vm should work", "project-A", "m1.large", "gp-1", 4, "8Gi", false, []string{"host1", "host2"}, "kvm-general-purpose-load-balancing-all-filters-enabled"), expectedHosts: []string{"host1", "host2"}, // host1 unlocked because project/flavor match minExpectedHostsCount: 2, }, @@ -444,7 +444,7 @@ func TestIntegration_SchedulingWithReservations(t *testing.T) { reservations: []*v1alpha1.Reservation{ newCommittedReservation("committed-res-host1", "host1", "host1", "project-A", "m1.large", "gp-1", "4", "8Gi"), }, - request: newNovaRequest("new-vm", "project-B", "m1.large", "gp-1", 4, "8Gi", false, []string{"host1", "host2"}, "nova-external-scheduler-kvm-all-filters-enabled"), + request: newNovaRequest("new-vm", "project-B", "m1.large", "gp-1", 4, "8Gi", false, []string{"host1", "host2"}, "kvm-general-purpose-load-balancing-all-filters-enabled"), expectedHosts: []string{"host2"}, filteredHosts: []string{"host1"}, // host1 blocked because project doesn't match minExpectedHostsCount: 1, @@ -457,7 +457,7 @@ func TestIntegration_SchedulingWithReservations(t *testing.T) { newHypervisor("host3", "16", "4", "32Gi", "8Gi"), }, reservations: []*v1alpha1.Reservation{}, - request: newNovaRequest("new-vm", "project-A", "m1.large", "gp-1", 4, "8Gi", false, []string{"host1", "host2", "host3"}, "nova-external-scheduler-kvm-all-filters-enabled"), + request: newNovaRequest("new-vm", "project-A", "m1.large", "gp-1", 4, "8Gi", false, []string{"host1", "host2", "host3"}, "kvm-general-purpose-load-balancing-all-filters-enabled"), filters: []v1alpha1.FilterSpec{{Name: "filter_has_enough_capacity"}}, weighers: []v1alpha1.WeigherSpec{}, // No weighers filteredHosts: []string{"host2"}, diff --git a/internal/scheduling/nova/plugins/filters/filter_requested_destination.go b/internal/scheduling/nova/plugins/filters/filter_requested_destination.go index 1e3449b77..fd49aa5c6 100644 --- a/internal/scheduling/nova/plugins/filters/filter_requested_destination.go +++ b/internal/scheduling/nova/plugins/filters/filter_requested_destination.go @@ -85,12 +85,15 @@ func (s *FilterRequestedDestinationStep) Run(traceLog *slog.Logger, request api. traceLog.Info("filtered out host not in requested_destination aggregates (unknown host)", "host", host) continue } - hvAggregates := hv.Spec.Aggregates - hvAggregates = append(hvAggregates, hv.Status.Aggregates...) + // The requested destination from Nova will contain aggregate uuids. + hvAggregateUUIDs := make([]string, 0, len(hv.Status.Aggregates)) + for _, agg := range hv.Status.Aggregates { + hvAggregateUUIDs = append(hvAggregateUUIDs, agg.UUID) + } // Check if any of the host's aggregates match the requested aggregates. found := false for _, reqAgg := range aggregatesToConsider { - if slices.Contains(hvAggregates, reqAgg) { + if slices.Contains(hvAggregateUUIDs, reqAgg) { found = true break } @@ -99,7 +102,7 @@ func (s *FilterRequestedDestinationStep) Run(traceLog *slog.Logger, request api. delete(result.Activations, host) traceLog.Info( "filtered out host not in requested_destination aggregates", - "host", host, "hostAggregates", hvAggregates, + "host", host, "hostAggregates", hvAggregateUUIDs, "requestedAggregates", rd.Data.Aggregates, "ignoredAggregates", s.Options.IgnoredAggregates, "aggregatesConsidered", aggregatesToConsider, diff --git a/internal/scheduling/nova/plugins/filters/filter_requested_destination_test.go b/internal/scheduling/nova/plugins/filters/filter_requested_destination_test.go index 02afad2ce..101d10b28 100644 --- a/internal/scheduling/nova/plugins/filters/filter_requested_destination_test.go +++ b/internal/scheduling/nova/plugins/filters/filter_requested_destination_test.go @@ -44,15 +44,15 @@ func TestFilterRequestedDestinationStep_Run(t *testing.T) { hypervisors: []hv1.Hypervisor{ { ObjectMeta: metav1.ObjectMeta{Name: "host1"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"aggregate1"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate1"}}}, }, { ObjectMeta: metav1.ObjectMeta{Name: "host2"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"aggregate2"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate2"}}}, }, { ObjectMeta: metav1.ObjectMeta{Name: "host3"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"aggregate3"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate3"}}}, }, }, expectedHosts: []string{"host1", "host2", "host3"}, @@ -80,11 +80,11 @@ func TestFilterRequestedDestinationStep_Run(t *testing.T) { hypervisors: []hv1.Hypervisor{ { ObjectMeta: metav1.ObjectMeta{Name: "host1"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"aggregate1"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate1"}}}, }, { ObjectMeta: metav1.ObjectMeta{Name: "host2"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"aggregate2"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate2"}}}, }, }, expectedHosts: []string{"host1", "host2"}, @@ -112,15 +112,15 @@ func TestFilterRequestedDestinationStep_Run(t *testing.T) { hypervisors: []hv1.Hypervisor{ { ObjectMeta: metav1.ObjectMeta{Name: "host1"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"aggregate1"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate1"}}}, }, { ObjectMeta: metav1.ObjectMeta{Name: "host2"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"aggregate1"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate1"}}}, }, { ObjectMeta: metav1.ObjectMeta{Name: "host3"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"aggregate1"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate1"}}}, }, }, expectedHosts: []string{"host2"}, @@ -148,15 +148,15 @@ func TestFilterRequestedDestinationStep_Run(t *testing.T) { hypervisors: []hv1.Hypervisor{ { ObjectMeta: metav1.ObjectMeta{Name: "host1"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"aggregate1"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate1"}}}, }, { ObjectMeta: metav1.ObjectMeta{Name: "host2"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"aggregate2"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate2"}}}, }, { ObjectMeta: metav1.ObjectMeta{Name: "host3"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"aggregate1", "aggregate2"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate1"}, {UUID: "aggregate2"}}}, }, }, expectedHosts: []string{"host1", "host3"}, @@ -184,15 +184,15 @@ func TestFilterRequestedDestinationStep_Run(t *testing.T) { hypervisors: []hv1.Hypervisor{ { ObjectMeta: metav1.ObjectMeta{Name: "host1"}, - Status: hv1.HypervisorStatus{Aggregates: []string{"aggregate1"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate1"}}}, }, { ObjectMeta: metav1.ObjectMeta{Name: "host2"}, - Status: hv1.HypervisorStatus{Aggregates: []string{"aggregate2"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate2"}}}, }, { ObjectMeta: metav1.ObjectMeta{Name: "host3"}, - Status: hv1.HypervisorStatus{Aggregates: []string{"aggregate1", "aggregate3"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate1"}, {UUID: "aggregate3"}}}, }, }, expectedHosts: []string{"host1", "host3"}, @@ -221,19 +221,19 @@ func TestFilterRequestedDestinationStep_Run(t *testing.T) { hypervisors: []hv1.Hypervisor{ { ObjectMeta: metav1.ObjectMeta{Name: "host1"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"aggregate1"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate1"}}}, }, { ObjectMeta: metav1.ObjectMeta{Name: "host2"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"aggregate2"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate2"}}}, }, { ObjectMeta: metav1.ObjectMeta{Name: "host3"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"aggregate3"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate3"}}}, }, { ObjectMeta: metav1.ObjectMeta{Name: "host4"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"aggregate4"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate4"}}}, }, }, expectedHosts: []string{"host1", "host3"}, @@ -261,18 +261,15 @@ func TestFilterRequestedDestinationStep_Run(t *testing.T) { hypervisors: []hv1.Hypervisor{ { ObjectMeta: metav1.ObjectMeta{Name: "host1"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"aggregate1"}}, - Status: hv1.HypervisorStatus{Aggregates: []string{"aggregate3"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate1"}, {UUID: "aggregate3"}}}, }, { ObjectMeta: metav1.ObjectMeta{Name: "host2"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"aggregate3"}}, - Status: hv1.HypervisorStatus{Aggregates: []string{"aggregate2"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate2"}, {UUID: "aggregate3"}}}, }, { ObjectMeta: metav1.ObjectMeta{Name: "host3"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"aggregate4"}}, - Status: hv1.HypervisorStatus{Aggregates: []string{"aggregate5"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate4"}, {UUID: "aggregate5"}}}, }, }, expectedHosts: []string{"host1", "host2"}, @@ -301,15 +298,15 @@ func TestFilterRequestedDestinationStep_Run(t *testing.T) { hypervisors: []hv1.Hypervisor{ { ObjectMeta: metav1.ObjectMeta{Name: "host1"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"aggregate1"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate1"}}}, }, { ObjectMeta: metav1.ObjectMeta{Name: "host2"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"aggregate1"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate1"}}}, }, { ObjectMeta: metav1.ObjectMeta{Name: "host3"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"aggregate2"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate2"}}}, }, }, expectedHosts: []string{"host2"}, @@ -337,11 +334,11 @@ func TestFilterRequestedDestinationStep_Run(t *testing.T) { hypervisors: []hv1.Hypervisor{ { ObjectMeta: metav1.ObjectMeta{Name: "host1"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"aggregate1"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate1"}}}, }, { ObjectMeta: metav1.ObjectMeta{Name: "host2"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"aggregate1"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate1"}}}, }, }, expectedHosts: []string{"host1", "host2"}, @@ -369,16 +366,15 @@ func TestFilterRequestedDestinationStep_Run(t *testing.T) { hypervisors: []hv1.Hypervisor{ { ObjectMeta: metav1.ObjectMeta{Name: "host1"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"aggregate1"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate1"}}}, }, { ObjectMeta: metav1.ObjectMeta{Name: "host2"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{}}, - Status: hv1.HypervisorStatus{Aggregates: []string{}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{}}, }, { ObjectMeta: metav1.ObjectMeta{Name: "host3"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"aggregate1"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate1"}}}, }, }, expectedHosts: []string{"host1", "host3"}, @@ -405,11 +401,11 @@ func TestFilterRequestedDestinationStep_Run(t *testing.T) { hypervisors: []hv1.Hypervisor{ { ObjectMeta: metav1.ObjectMeta{Name: "host1"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"aggregate1"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate1"}}}, }, { ObjectMeta: metav1.ObjectMeta{Name: "host2"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"aggregate2"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate2"}}}, }, }, expectedHosts: []string{}, @@ -436,15 +432,15 @@ func TestFilterRequestedDestinationStep_Run(t *testing.T) { hypervisors: []hv1.Hypervisor{ { ObjectMeta: metav1.ObjectMeta{Name: "host1"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"aggregate1"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate1"}}}, }, { ObjectMeta: metav1.ObjectMeta{Name: "host2"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"aggregate2"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate2"}}}, }, { ObjectMeta: metav1.ObjectMeta{Name: "host-not-in-list"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"aggregate3"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate3"}}}, }, }, expectedHosts: []string{}, @@ -468,7 +464,7 @@ func TestFilterRequestedDestinationStep_Run(t *testing.T) { hypervisors: []hv1.Hypervisor{ { ObjectMeta: metav1.ObjectMeta{Name: "host1"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"aggregate1"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "aggregate1"}}}, }, }, expectedHosts: []string{}, @@ -608,15 +604,15 @@ func TestFilterRequestedDestinationStepOpts_Combined(t *testing.T) { hypervisors: []hv1.Hypervisor{ { ObjectMeta: metav1.ObjectMeta{Name: "host1"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"az-west"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "az-west"}}}, }, { ObjectMeta: metav1.ObjectMeta{Name: "host2"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"az-east"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "az-east"}}}, }, { ObjectMeta: metav1.ObjectMeta{Name: "host3"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"az-west"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "az-west"}}}, }, }, ignoredAggregates: []string{"az-west"}, @@ -646,15 +642,15 @@ func TestFilterRequestedDestinationStepOpts_Combined(t *testing.T) { hypervisors: []hv1.Hypervisor{ { ObjectMeta: metav1.ObjectMeta{Name: "host1"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"production"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "production"}}}, }, { ObjectMeta: metav1.ObjectMeta{Name: "host2"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"production"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "production"}}}, }, { ObjectMeta: metav1.ObjectMeta{Name: "host3"}, - Spec: hv1.HypervisorSpec{Aggregates: []string{"staging"}}, + Status: hv1.HypervisorStatus{Aggregates: []hv1.Aggregate{{UUID: "staging"}}}, }, }, // az-west is ignored, so only production is considered diff --git a/internal/scheduling/nova/plugins/filters/filter_status_conditions.go b/internal/scheduling/nova/plugins/filters/filter_status_conditions.go index 19f1036e1..3d7f2aae6 100644 --- a/internal/scheduling/nova/plugins/filters/filter_status_conditions.go +++ b/internal/scheduling/nova/plugins/filters/filter_status_conditions.go @@ -33,10 +33,12 @@ func (s *FilterStatusConditionsStep) Run(traceLog *slog.Logger, request api.Exte hv1.ConditionTypeReady: metav1.ConditionTrue, hv1.ConditionTypeHypervisorDisabled: metav1.ConditionFalse, hv1.ConditionTypeTerminating: metav1.ConditionFalse, - hv1.ConditionTypeTainted: metav1.ConditionFalse, - hv1.ConditionTypeOnboarding: "", // Don't care - hv1.ConditionTypeTraitsUpdated: "", // Don't care - hv1.ConditionTypeAggregatesUpdated: "", // Don't care + // The hypervisor tainted condition is set when users touch the resource + // via kubectl, and shouldn't impact if we can schedule on this hypervisor. + hv1.ConditionTypeTainted: "", + hv1.ConditionTypeOnboarding: "", // Don't care + hv1.ConditionTypeTraitsUpdated: "", // Don't care + hv1.ConditionTypeAggregatesUpdated: "", // Don't care } var hostsReady = make(map[string]struct{}) diff --git a/internal/scheduling/nova/plugins/filters/filter_status_conditions_test.go b/internal/scheduling/nova/plugins/filters/filter_status_conditions_test.go index beec07855..adbfc8c65 100644 --- a/internal/scheduling/nova/plugins/filters/filter_status_conditions_test.go +++ b/internal/scheduling/nova/plugins/filters/filter_status_conditions_test.go @@ -226,8 +226,8 @@ func TestFilterStatusConditionsStep_Run(t *testing.T) { {ComputeHost: "host4"}, }, }, - expectedHosts: []string{"host1"}, - filteredHosts: []string{"host2", "host3", "host4"}, + expectedHosts: []string{"host1", "host4"}, + filteredHosts: []string{"host2", "host3"}, }, { name: "Host not ready should be filtered", @@ -250,14 +250,14 @@ func TestFilterStatusConditionsStep_Run(t *testing.T) { filteredHosts: []string{"host3"}, }, { - name: "Tainted host should be filtered", + name: "Tainted host should not be filtered", request: api.ExternalSchedulerRequest{ Hosts: []api.ExternalSchedulerHost{ {ComputeHost: "host4"}, }, }, - expectedHosts: []string{}, - filteredHosts: []string{"host4"}, + expectedHosts: []string{"host4"}, + filteredHosts: []string{}, }, { name: "Disabled hypervisor should be filtered", @@ -329,8 +329,8 @@ func TestFilterStatusConditionsStep_Run(t *testing.T) { {ComputeHost: "host5"}, }, }, - expectedHosts: []string{"host1", "host5"}, - filteredHosts: []string{"host2", "host3", "host4"}, + expectedHosts: []string{"host1", "host5", "host4"}, + filteredHosts: []string{"host2", "host3"}, }, } diff --git a/tools/plutono/provisioning/dashboards/cortex-status.json b/tools/plutono/provisioning/dashboards/cortex-status.json index 95dc73723..043d07983 100644 --- a/tools/plutono/provisioning/dashboards/cortex-status.json +++ b/tools/plutono/provisioning/dashboards/cortex-status.json @@ -499,7 +499,7 @@ ], "timeFrom": null, "timeShift": null, - "title": "Pipeline: nova-external-scheduler-*", + "title": "Pipeline: kvm-* (Nova)", "type": "text" }, { @@ -571,7 +571,7 @@ "targets": [ { "exemplar": false, - "expr": "sum(delta(cortex_filter_weigher_pipeline_step_shift_origin_bucket{outidx=\"0\",pipeline=~\"nova-external-scheduler-.*\"}[2m]) / 2) by (le)", + "expr": "sum(delta(cortex_filter_weigher_pipeline_step_shift_origin_bucket{outidx=\"0\",pipeline=~\"kvm-.*\"}[2m]) / 2) by (le)", "format": "heatmap", "instant": false, "interval": "",