Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ permissions:
jobs:
analyze:
name: CodeQL
runs-on: large_runner_16core_64gb
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v7
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/cortex-agent-review.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ jobs:
"consider" suggestions, documentation, test coverage, or anything that is a matter
of opinion. Absolutely no nits. If there are no critical issues, post nothing at all.

ALSO DO NOT comment on: syntax errors or suspected non-compilable code. This
will be checked by build and test workflows programmatically. Note that you may
have an outdated knowledge about programming language features.

Note: The PR branch is already checked out in the current working directory.

Check existing comments first — use `gh pr view <PR> --json comments` and `gh api`
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
packages: write
attestations: write
id-token: write
runs-on: large_runner_16core_64gb
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Set up QEMU
Expand Down
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
# Changelog

## Release 2026-10-15 — PR [#1367](https://github.com/cobaltcore-dev/cortex/pull/1367)

### Bumped Versions

| Package | Version |
|---|---|
| cortex | 0.6.7 → 0.6.8 |
| cortex-postgres | 0.6.26 → 0.6.27 |
| cortex-shim | 0.1.31 → 0.1.32 |
| bundles | 0.0.105 → 0.0.106 |
| cortex-placement-shim | 0.1.31 → 0.1.32 |

### Security Fixes

- **github.com/google/cel-go** upgraded from v0.29.2 to v0.30.0 — fixes [GHSA-gcjh-h69q-9w9g](https://github.com/advisories/GHSA-gcjh-h69q-9w9g) (JSON private fields exposed via NativeTypes / ParseStructTag).
- **github.com/moby/sys/user** upgraded from v0.4.0 to v0.4.1 — fixes [CVE-2026-61801](https://nvd.nist.gov/vuln/detail/CVE-2026-61801), a medium-severity (CVSS 5.5) DoS via unbounded parsing of user/group database files.

### Features

- **CR VM live-migration slot weigher** ([#981](https://github.com/cobaltcore-dev/cortex/pull/981)) — New `kvm_cr_migration_slot` weigher that steers Capacity Reservation VM live migrations toward hosts that can accommodate the reservation slot (either an existing compatible slot or enough free capacity for the reconciler to move it). Includes a new `cortex_nova_weigh_cr_migration_slot_requests_total` metric and is wired into all 4 KVM pipelines. *(Julius Clausnitzer & Marcel)*
- **VM resource handler in nova pipeline** ([#1362](https://github.com/cobaltcore-dev/cortex/pull/1362)) — Adds a `VirtualMachineHandler` to the nova pipeline controller that creates or merge-updates a virtual machine resource after each scheduling request. *(Philipp Matthes)*
- **VCenter field on VMwareHostDetails** ([#1356](https://github.com/cobaltcore-dev/cortex/pull/1356)) — Adds a `VCenter` field to `VMwareHostDetails` and updates VMware infrastructure metrics accordingly. *(Markus Wieland)*

### Chores & Fixes

- **Migrate from Plutono to Perses** ([#1363](https://github.com/cobaltcore-dev/cortex/pull/1363)) — Replaces the Plutono dashboarding stack with Perses, removing all Plutono assets and adding new Perses JSON dashboards. *(Markus Wieland)*
- **Remove large runner from workflows** ([#1360](https://github.com/cobaltcore-dev/cortex/pull/1360)) — Fixes CI workflows by removing references to a large runner. *(Markus Wieland)*
- **Avoid review comments on outdated language features** ([#1361](https://github.com/cobaltcore-dev/cortex/pull/1361)) — Updates the AI review agent prompt to stop flagging valid modern Go syntax (e.g. `new()`) as uncompilable. *(Philipp Matthes)*

### Dependency Updates

- **github.com/sapcc/go-bits** — digest update c011033 → 416f3ad ([#1358](https://github.com/cobaltcore-dev/cortex/pull/1358))
- **kube-prometheus-stack** — 92.3.0 → 92.7.0 ([#1359](https://github.com/cobaltcore-dev/cortex/pull/1359), [#1364](https://github.com/cobaltcore-dev/cortex/pull/1364), [#1365](https://github.com/cobaltcore-dev/cortex/pull/1365))

## Release PR [#1350](https://github.com/cobaltcore-dev/cortex/pull/1350)

### Bumped Versions
Expand Down
8 changes: 0 additions & 8 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -313,14 +313,6 @@ k8s_resource(
labels=['Monitoring'],
)

docker_build('cortex-plutono', './tools/plutono')
k8s_yaml('./tools/plutono/app.yaml')
k8s_resource('cortex-plutono', port_forwards=[
port_forward(5000, 3000, name='plutono'),
], links=[
link('http://localhost:5000/d/cortex/cortex?orgId=1', 'cortex dashboard'),
], labels=['Monitoring'])

helm_resource(
'cortex-perses',
'perses/perses',
Expand Down
19 changes: 19 additions & 0 deletions api/external/nova/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,16 @@ func (req ExternalSchedulerRequest) GetHypervisorType() (HypervisorType, error)
return "", errors.New("hypervisor type not specified in flavor extra specs")
}

// IsKVMRequest determines whether the request is intended for a KVM-based hypervisor.
// If no hypervisor type is specified or an error occurs, it returns false.
func (req ExternalSchedulerRequest) IsKVMRequest() bool {
hvType, err := req.GetHypervisorType()
if err != nil {
return false
}
return hvType == HypervisorTypeQEMU || hvType == HypervisorTypeCH
}

const (
// LiveMigrationIntent indicates that the request is intended for live migration.
LiveMigrationIntent v1alpha1.SchedulingIntent = "live_migration"
Expand Down Expand Up @@ -239,6 +249,15 @@ const (
HintKeyResourceGroup = "_cortex_resource_group"
)

// NovaIntents lists all scheduling intents relevant to Nova.
var NovaIntents = []v1alpha1.SchedulingIntent{
LiveMigrationIntent,
RebuildIntent,
ResizeIntent,
EvacuateIntent,
CreateIntent,
}

// GetIntent analyzes the request spec and determines the intent of the scheduling request.
func (req ExternalSchedulerRequest) GetIntent() (v1alpha1.SchedulingIntent, error) {
str, err := req.Spec.Data.GetSchedulerHintStr("_nova_check_type")
Expand Down
22 changes: 10 additions & 12 deletions cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ import (
"github.com/cobaltcore-dev/cortex/pkg/sso"
"github.com/cobaltcore-dev/cortex/pkg/task"
hv1 "github.com/cobaltcore-dev/openstack-hypervisor-operator/api/v1"
vmopv1alpha1 "github.com/cobaltcore-dev/vm-operator/api/v1alpha1"
vmopmcl "github.com/cobaltcore-dev/vm-operator/pkg/multicluster"
"github.com/sapcc/go-bits/httpext"
"github.com/sapcc/go-bits/must"
corev1 "k8s.io/api/core/v1"
Expand All @@ -90,6 +92,7 @@ func init() {
utilruntime.Must(ironcorev1alpha1.AddToScheme(scheme))
utilruntime.Must(corev1.AddToScheme(scheme))
utilruntime.Must(hv1.AddToScheme(scheme))
utilruntime.Must(vmopv1alpha1.AddToScheme(scheme))
// +kubebuilder:scaffold:scheme
}

Expand Down Expand Up @@ -370,25 +373,20 @@ func main() {
setupLog.Error(err, "unable to add home cluster")
os.Exit(1)
}
hvGVK := schema.GroupVersionKind{Group: "kvm.cloud.sap", Version: "v1", Kind: "Hypervisor"}
reservationGVK := schema.GroupVersionKind{Group: "cortex.cloud", Version: "v1alpha1", Kind: "Reservation"}
historyGVK := schema.GroupVersionKind{Group: "cortex.cloud", Version: "v1alpha1", Kind: "History"}
committedResourceGVK := schema.GroupVersionKind{Group: "cortex.cloud", Version: "v1alpha1", Kind: "CommittedResource"}
flavorGroupCapacityGVK := schema.GroupVersionKind{Group: "cortex.cloud", Version: "v1alpha1", Kind: "FlavorGroupCapacity"}
projectQuotaGVK := schema.GroupVersionKind{Group: "cortex.cloud", Version: "v1alpha1", Kind: "ProjectQuota"}
multiclusterMonitor := multicluster.NewMonitor("cortex_")
multiclusterClient := &multicluster.Client{
HomeCluster: homeCluster,
HomeRestConfig: restConfig,
HomeScheme: scheme,
Monitor: multiclusterMonitor,
ResourceRouters: map[schema.GroupVersionKind]multicluster.ResourceRouter{
hvGVK: multicluster.HypervisorResourceRouter{},
reservationGVK: multicluster.ReservationsResourceRouter{},
historyGVK: multicluster.HistoryResourceRouter{},
committedResourceGVK: multicluster.CommittedResourceRouter{},
flavorGroupCapacityGVK: multicluster.FlavorGroupCapacityResourceRouter{},
projectQuotaGVK: multicluster.ProjectQuotaResourceRouter{},
{Group: "kvm.cloud.sap", Version: "v1", Kind: "Hypervisor"}: multicluster.HypervisorResourceRouter{},
{Group: "cobaltcore.cloud", Version: "v1alpha1", Kind: "VirtualMachine"}: vmopmcl.VirtualMachineRouter{},
{Group: "cortex.cloud", Version: "v1alpha1", Kind: "Reservation"}: multicluster.ReservationsResourceRouter{},
{Group: "cortex.cloud", Version: "v1alpha1", Kind: "History"}: multicluster.HistoryResourceRouter{},
{Group: "cortex.cloud", Version: "v1alpha1", Kind: "CommittedResource"}: multicluster.CommittedResourceRouter{},
{Group: "cortex.cloud", Version: "v1alpha1", Kind: "FlavorGroupCapacity"}: multicluster.FlavorGroupCapacityResourceRouter{},
{Group: "cortex.cloud", Version: "v1alpha1", Kind: "ProjectQuota"}: multicluster.ProjectQuotaResourceRouter{},
},
}
multiclusterClientConfig := conf.GetConfigOrDie[multicluster.ClientConfig]()
Expand Down
6 changes: 3 additions & 3 deletions docs/01-getting-started/07-tooling.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,10 @@ Output of pipeline : host-a, host-b
Final output : host-a, host-b
```

## `tools/perses` and `tools/plutono` — dashboard definitions
## `tools/perses` — dashboard definitions

These two are **not** runnable Go programs. `tools/perses` holds Perses dashboard definitions (JSON) and
`tools/plutono` is a Grafana-fork container image used to render them. They are covered in
This is **not** a runnable Go program. `tools/perses` holds Perses dashboard definitions (JSON) rendered by a
Perses instance. They are covered in
[The infrastructure dashboard](../04-knowledge-database/05-infrastructure-dashboard.md).

These utilities sit beside Cortex rather than inside it: none is shipped in the Helm charts, and each
Expand Down
11 changes: 5 additions & 6 deletions docs/04-knowledge-database/05-infrastructure-dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,15 @@ they need no special plumbing to reach a dashboard.
The dashboard definitions are development/operations tooling, deliberately kept out of the deployable charts:

- **Perses** — `tools/perses/dashboards/`, including `cortex-compute-kvm-overview.json` (the compute KVM
overview) and `project.json`.
- **Plutono** — `tools/plutono/provisioning/dashboards/`, including `cortex-placement-shim-status.json`
(the [shim](../03-reservations-and-inventory/05-placement-api-shim.md) status board), `cortex-status.json`,
`cortex.json`, and a `compute/` subtree (`kvm-overview.json`, `kvm-details.json`, `vmware-overview.json`,
`vmware-details.json`, `flavors.json`, `global.json`).
overview), `cortex-placement-shim-status.json` (the
[shim](../03-reservations-and-inventory/05-placement-api-shim.md) status board), `cortex-status.json`,
the compute VMware boards (`cortex-compute-vmware-overview.json`, `cortex-compute-vmware-details.json`),
and `project.json`.

> [!NOTE]
> There are no dashboard JSON files under `helm/`. The only `dashboard:` strings in the charts are
> alert-rule annotations pointing at dashboards by name — the definitions themselves ship in `tools/`. To
> use one, import it into your own Perses or Plutono instance; Cortex does not deploy a dashboard server for
> use one, import it into your own Perses instance; Cortex does not deploy a dashboard server for
> you.

This page is the visual read-out of the whole [knowledge flow](01-knowledge-flow-overview.md): datasources
Expand Down
1 change: 0 additions & 1 deletion docs/04-knowledge-database/06-monitoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ Expected — the `PrometheusRule` containing the `cortex-nova-alerts` group.
Dashboards are not part of the Helm charts. Import them from the repository:

- Perses: `tools/perses/dashboards/`
- Plutono/Grafana: `tools/plutono/provisioning/dashboards/`

These include a compute KVM overview and a placement-shim status dashboard, and are covered in
[The infrastructure dashboard](05-infrastructure-dashboard.md).
Expand Down
13 changes: 7 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ go 1.27

require (
github.com/cobaltcore-dev/openstack-hypervisor-operator v1.2.3
github.com/cobaltcore-dev/vm-operator v0.1.2-0.20261014085525-20c781d5a4eb
github.com/go-gorp/gorp v2.2.0+incompatible
github.com/go-logr/logr v1.4.4
github.com/google/uuid v1.6.0
Expand All @@ -15,7 +16,7 @@ require (
github.com/prometheus/client_golang v1.25.0
github.com/prometheus/client_model v0.6.3
github.com/sapcc/go-api-declarations v1.25.1
github.com/sapcc/go-bits v0.0.0-20261009090210-c011033c8559
github.com/sapcc/go-bits v0.0.0-20261013222358-416f3ade2c19
go.uber.org/zap v1.28.0
go.xyrillian.de/gg v1.19.0
golang.org/x/sync v0.24.0
Expand Down Expand Up @@ -65,7 +66,7 @@ require (
github.com/go-openapi/swag/typeutils v0.28.0 // indirect
github.com/go-openapi/swag/yamlutils v0.28.0 // indirect
github.com/go-sql-driver/mysql v1.10.0 // indirect
github.com/google/cel-go v0.29.2 // indirect
github.com/google/cel-go v0.30.0 // indirect
github.com/google/gnostic-models v0.7.1 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/gorilla/mux v1.8.1 // indirect
Expand All @@ -75,7 +76,7 @@ require (
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/moby/sys/user v0.4.0 // indirect
github.com/moby/sys/user v0.4.1 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
Expand All @@ -85,7 +86,7 @@ require (
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/poy/onpar v0.3.5 // indirect
github.com/prometheus/common v0.72.0 // indirect
github.com/prometheus/common v0.72.1 // indirect
github.com/prometheus/procfs v0.22.0 // indirect
github.com/sirupsen/logrus v1.9.4 // indirect
github.com/spf13/cobra v1.10.2 // indirect
Expand All @@ -106,10 +107,10 @@ require (
go.yaml.in/yaml/v3 v3.0.5 // indirect
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba // indirect
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f // indirect
golang.org/x/net v0.60.0 // indirect
golang.org/x/net v0.61.0 // indirect
golang.org/x/oauth2 v0.37.0 // indirect
golang.org/x/sys v0.49.0 // indirect
golang.org/x/text v0.42.0 // indirect
golang.org/x/text v0.43.0 // indirect
golang.org/x/time v0.16.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260819154853-08b0e4226688 // indirect
Expand Down
Loading
Loading