Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4f5a623
Renovate: Update debian:trixie-slim Docker digest to 62bd423 (#1398)
renovate[bot] Oct 21, 2026
263e147
Renovate: Update External dependencies (#1397)
renovate[bot] Oct 21, 2026
f4259a8
refactor: move perses dashboards in tld dashboards folder (#1399)
SoWieMarkus Oct 21, 2026
70edc2d
refactor: unify logging to use controller-runtime in binaries and pkg…
SoWieMarkus Oct 21, 2026
d332a2b
refactor: unify logging to controller-runtime in knowledge pipeline (…
SoWieMarkus Oct 21, 2026
2441329
refactor: unify logging to controller-runtime in scheduling pipeline …
SoWieMarkus Oct 21, 2026
48da5fc
refactor: finalize logging unification (helm, lint gate) (#1407)
SoWieMarkus Oct 21, 2026
6f0205f
fix: setting owner ref for cr reservations (#1403)
mblos Oct 21, 2026
5bf04d8
Scaffold failover host reservation crd subtype (#1408)
PhilippMatthes Oct 22, 2026
c36d622
Renovate: Update module github.com/cobaltcore-dev/openstack-hyperviso…
renovate[bot] Oct 22, 2026
fd8b178
Renovate: Update github.com/sapcc/go-bits digest to e86fd39 (#1418)
renovate[bot] Oct 23, 2026
fe6f3a0
fix: filter out overloaded hosts with negative free CPU/memory (#1416)
mblos Oct 23, 2026
eac4ca6
Renovate: Update github.com/sapcc/go-bits digest to 568ad9d (#1419)
renovate[bot] Oct 23, 2026
59c947d
Renovate: Update kube-prometheus-stack Docker tag to v92.13.1 (#1420)
renovate[bot] Oct 25, 2026
fafbf93
docs: fix stale dashboard path references after move to dashboards/ (…
cortex-ai-agents[bot] Oct 26, 2026
03551dc
refactor: reduce logging in commitments module (#1409)
SoWieMarkus Oct 26, 2026
720facc
refactor: downgrade logging for failover reservations (#1410)
SoWieMarkus Oct 26, 2026
6292ed2
refactor: downgrade logging level for knwoledge modules (#1412)
SoWieMarkus Oct 26, 2026
88ba623
refactor: reduce logging in scheduling module (#1413)
SoWieMarkus Oct 26, 2026
6aa47ed
fix: confirm CR reservation allocations immediately when VM is alread…
mblos Oct 26, 2026
ece8785
fix: adding vm crd to Tilt (#1426)
mblos Oct 26, 2026
0bde3a3
fix: use consistent error log level for overloaded hosts in capacity …
cortex-ai-agents[bot] Oct 26, 2026
2b6a414
bump app version [skip ci] (#1396)
github-actions[bot] Oct 26, 2026
5060970
Release cortex 0.7.2 (#1428)
cortex-ai-agents[bot] Oct 26, 2026
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/helm-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Set up Helm
uses: azure/setup-helm@v5.0.1

- uses: actions/setup-python@v7.0.0
- uses: actions/setup-python@v7.1.0
with:
python-version: "3.13"
check-latest: true
Expand Down
12 changes: 12 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ linters:
forbid:
# ioutil package has been deprecated: https://github.com/golang/go/issues/42026
- pattern: ^ioutil\..*$
# cortex uses the controller-runtime (logr) logger everywhere; log/slog
# is intentionally not used in the service so logging stays unified.
# Obtain a logger via sigs.k8s.io/controller-runtime/pkg/log (logf.Log /
# logf.FromContext / ctrl.LoggerFrom) instead.
- pattern: ^slog\..*$
msg: use the controller-runtime logr logger (sigs.k8s.io/controller-runtime/pkg/log), not log/slog
# Using http.DefaultServeMux is discouraged because it's a global variable that some packages silently and magically add handlers to (esp. net/http/pprof).
# Applications wishing to use http.ServeMux should obtain local instances through http.NewServeMux() instead of using the global default instance.
- pattern: ^http\.DefaultServeMux$
Expand Down Expand Up @@ -160,6 +166,12 @@ linters:
# Ref: https://go.dev/doc/effective_go#redeclaration
- path: (.+)\.go$
text: declaration of "err" shadows declaration at
# FailoverReservations are deprecated in favor of FailoverHostReservations,
# but remain in active use during the transition. Ignore the deprecation
# warning until the old type is fully removed.
- linters:
- staticcheck
text: "SA1019:.*FailoverReservations will be replaced with FailoverHostReservations"
- linters:
- goconst
path: (.+)_test\.go
Expand Down
66 changes: 66 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,71 @@
# Changelog

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

### Bumped Versions

| Package | Previous | New |
|---|---|---|
| cortex | 0.7.1 | 0.7.2 |
| cortex-postgres | 0.6.28 | 0.6.29 |
| cortex-shim | 0.1.33 | 0.1.34 |
| bundles | 0.0.108 | 0.0.109 |
| cortex-placement-shim | 0.1.33 | 0.1.34 |

### ⚠️ Deprecation

- **`FailoverReservation` CRD deprecated:** The existing `FailoverReservation` type is now deprecated in favor of the new `FailoverHostReservation` subtype. Migrate any tooling referencing `FailoverReservation` to `FailoverHostReservation`.

### Features

- **Failover Host Reservation CRD subtype** ([#1408](https://github.com/cobaltcore-dev/cortex/pull/1408)) — A new `FailoverHostReservation` reservation type supports reserving entire hosts for failover, enabling gang-scheduling of all VMs onto a designated host during evacuation events. Includes a full lifecycle model (Designated → Active → In Use → Used/Revoked/Failed), new spec (`FailoverHostReservationSpec`) with `sourceHosts` field, new status (`FailoverHostReservationStatus`) with `sourceHost` field, three new condition types (`FailoverHostDesignated`, `FailoverHostActive`, `FailoverHostInUse`), and CRD enum validation and kubebuilder print columns updated.

- **New KVM Overview Perses dashboard** — Added `cortex-compute-kvm-overview.json` with rich visualizations for KVM compute infrastructure.

### Bug Fixes

- **Filter out overloaded hosts** ([#1416](https://github.com/cobaltcore-dev/cortex/pull/1416)) — The capacity filter now correctly excludes hosts with negative free CPU or memory (allocation > effective capacity), which were previously silently passed through.

- **Owner ref for CR reservations** ([#1403](https://github.com/cobaltcore-dev/cortex/pull/1403)) — Fixed setting owner references on committed-resource reservations.

- **Confirm CR reservation allocations immediately** ([#1424](https://github.com/cobaltcore-dev/cortex/pull/1424)) — When a VM is already on the target hypervisor, reservation allocations are now confirmed immediately rather than waiting for a subsequent reconciliation cycle.

- **Consistent error log level for overloaded hosts** ([#1421](https://github.com/cobaltcore-dev/cortex/pull/1421)) — Aligned CPU overload log to `traceLog.Error` to match memory overload log (was inconsistently using `traceLog.Info`).

- **VM CRD added to Tilt** ([#1426](https://github.com/cobaltcore-dev/cortex/pull/1426)) — Added the `cobaltcore.cloud_virtualmachines` CRD to the Tiltfile for local development.

### Chores & Refactoring

- **Logging unification — slog → controller-runtime/logr** ([#1400](https://github.com/cobaltcore-dev/cortex/pull/1400), [#1401](https://github.com/cobaltcore-dev/cortex/pull/1401), [#1404](https://github.com/cobaltcore-dev/cortex/pull/1404), [#1407](https://github.com/cobaltcore-dev/cortex/pull/1407)) — Completely removed `log/slog` from the codebase, unifying all logging under controller-runtime's logr (zap-backed). Translation rules: `slog.Info/Warn` → `log.Info`, `slog.Debug` → `log.V(1).Info`, `slog.Error(msg, "error", err)` → `log.Error(err, msg)`. Key interface changes: `Run` now takes `logr.Logger` instead of `*slog.Logger`; `GetTraceLogArgs()` returns `[]any` instead of `[]slog.Attr`; `APIMonitor.Respond` takes `logr.Logger`. The dead `LOG_LEVEL` env var was removed from the Helm template and a **forbidigo lint rule** banning `slog.*` prevents re-introduction.

- **Logging level reduction** ([#1409](https://github.com/cobaltcore-dev/cortex/pull/1409), [#1410](https://github.com/cobaltcore-dev/cortex/pull/1410), [#1412](https://github.com/cobaltcore-dev/cortex/pull/1412), [#1413](https://github.com/cobaltcore-dev/cortex/pull/1413)) — Reduced verbosity across commitments, failover reservations, knowledge, and scheduling modules by downgrading non-essential log lines.

- **Dashboard reorganization** ([#1399](https://github.com/cobaltcore-dev/cortex/pull/1399)) — Perses dashboards moved to a top-level `dashboards/` directory. The KVM details dashboard was renamed and updated with new color overrides, instant queries, an OS version pie chart, and a "Ready" column in the host table.

### Documentation

- **Fix stale dashboard paths** ([#1422](https://github.com/cobaltcore-dev/cortex/pull/1422)) — Updated three docs files to reference `dashboards/` instead of the old `tools/perses/dashboards/` path; listed all 10 current dashboard filenames.

### Dependency Updates

| Dependency | Old | New | PR |
|---|---|---|---|
| `debian:trixie-slim` | `a29215f` | `62bd423` (digest) | [#1398](https://github.com/cobaltcore-dev/cortex/pull/1398) |
| `vm-operator` | v0.2.9 | v0.2.10 | [#1397](https://github.com/cobaltcore-dev/cortex/pull/1397) |
| `kube-prometheus-stack` | 92.10.1 | 92.13.1 | [#1397](https://github.com/cobaltcore-dev/cortex/pull/1397), [#1420](https://github.com/cobaltcore-dev/cortex/pull/1420) |
| `openstack-hypervisor-operator` | v1.2.3 | v1.3.0 | [#1414](https://github.com/cobaltcore-dev/cortex/pull/1414) |
| `actions/setup-python` | v7.0.0 | v7.1.0 | [#1414](https://github.com/cobaltcore-dev/cortex/pull/1414) |
| `sapcc/go-bits` | `416f3ad` | `568ad9d` (2 digest bumps) | [#1418](https://github.com/cobaltcore-dev/cortex/pull/1418), [#1419](https://github.com/cobaltcore-dev/cortex/pull/1419) |

### ⚠️ Notes

- **`openstack-hypervisor-operator` v1.3.0** brings parallel VM migrations during drains, safe eviction completion (incoming migrations must settle), hardened offboarding with `AgentPodsEvicted` gating, and node termination detection via `deletionTimestamp`. Review drain behavior in staging before rollout.
- **slog removal:** Any out-of-tree code importing cortex packages that used `*slog.Logger` in `Run` or `GetTraceLogArgs` signatures must update to `logr.Logger` / `[]any`.

**Contributors:** @PhilippMatthes, @SoWieMarkus, @mblos, @renovate[bot], @cortex-ai-agents[bot], Claude Opus 4.7

**PR:** [#1427](https://github.com/cobaltcore-dev/cortex/pull/1427) | **Commits:** 22 | **Files changed:** 95

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

### Versions
Expand Down
9 changes: 6 additions & 3 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ local('kubectl wait --namespace cert-manager --for=condition=available deploymen

########### Dependency CRDs
# Make sure the local cluster is running if you are running into startup issues here.
url = 'https://raw.githubusercontent.com/cobaltcore-dev/openstack-hypervisor-operator/c57c5be250635c639c858395c0501aa8c422f4ea/charts/openstack-hypervisor-operator/crds/kvm.cloud.sap_hypervisors.yaml'
# Pinned SHAs must match the versions in go.mod.
url = 'https://raw.githubusercontent.com/cobaltcore-dev/openstack-hypervisor-operator/df757ad112ea027f47c198266cb3a323d52ee2fe/charts/openstack-hypervisor-operator/crds/kvm.cloud.sap_hypervisors.yaml'
local('curl -L ' + url + ' | kubectl apply -f -')
url = 'https://raw.githubusercontent.com/cobaltcore-dev/vm-operator/66e5e459efeb01bfc599a1cda5921528ab47be19/dist/files/crds/cobaltcore.cloud_virtualmachines.yaml'
local('curl -L ' + url + ' | kubectl apply -f -')

########### Cortex Manager & CRDs
Expand Down Expand Up @@ -322,10 +325,10 @@ helm_resource(
labels=['Monitoring'],
resource_deps=['perses'],
)
watch_file('./tools/perses/dashboards')
watch_file('./dashboards')
k8s_yaml(local(' '.join([
'kubectl create configmap cortex-perses-dashboards',
'--from-file=./tools/perses/dashboards/',
'--from-file=./dashboards/',
'--dry-run=client -o yaml |',
'kubectl label --local -f - perses.dev/resource=true --dry-run=client -o yaml',
])))
14 changes: 6 additions & 8 deletions api/external/cinder/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
package api

import (
"log/slog"

"github.com/cobaltcore-dev/cortex/api/scheduling"
"github.com/cobaltcore-dev/cortex/internal/scheduling/lib"
)
Expand Down Expand Up @@ -46,12 +44,12 @@ func (r ExternalSchedulerRequest) GetHosts() []string {
func (r ExternalSchedulerRequest) GetWeights() map[string]float64 {
return r.Weights
}
func (r ExternalSchedulerRequest) GetTraceLogArgs() []slog.Attr {
return []slog.Attr{
slog.String("greq", r.Context.GlobalRequestID),
slog.String("req", r.Context.RequestID),
slog.String("user", r.Context.UserID),
slog.String("project", r.Context.ProjectID),
func (r ExternalSchedulerRequest) GetTraceLogArgs() []any {
return []any{
"greq", r.Context.GlobalRequestID,
"req", r.Context.RequestID,
"user", r.Context.UserID,
"project", r.Context.ProjectID,
}
}
func (r ExternalSchedulerRequest) Filter(includedHosts map[string]float64) lib.FilterWeigherPipelineRequest {
Expand Down
6 changes: 2 additions & 4 deletions api/external/ironcore/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
package ironcore

import (
"log/slog"

ironcorev1alpha1 "github.com/cobaltcore-dev/cortex/api/external/ironcore/v1alpha1"
"github.com/cobaltcore-dev/cortex/api/scheduling"
"github.com/cobaltcore-dev/cortex/internal/scheduling/lib"
Expand Down Expand Up @@ -33,8 +31,8 @@ func (r MachinePipelineRequest) GetWeights() map[string]float64 {
}
return weights
}
func (r MachinePipelineRequest) GetTraceLogArgs() []slog.Attr {
return []slog.Attr{}
func (r MachinePipelineRequest) GetTraceLogArgs() []any {
return []any{}
}
func (r MachinePipelineRequest) Filter(includedHosts map[string]float64) lib.FilterWeigherPipelineRequest {
filteredPools := make([]ironcorev1alpha1.MachinePool, 0, len(includedHosts))
Expand Down
14 changes: 6 additions & 8 deletions api/external/manila/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
package api

import (
"log/slog"

"github.com/cobaltcore-dev/cortex/api/scheduling"
"github.com/cobaltcore-dev/cortex/internal/scheduling/lib"
)
Expand Down Expand Up @@ -46,12 +44,12 @@ func (r ExternalSchedulerRequest) GetHosts() []string {
func (r ExternalSchedulerRequest) GetWeights() map[string]float64 {
return r.Weights
}
func (r ExternalSchedulerRequest) GetTraceLogArgs() []slog.Attr {
return []slog.Attr{
slog.String("greq", r.Context.GlobalRequestID),
slog.String("req", r.Context.RequestID),
slog.String("user", r.Context.UserID),
slog.String("project", r.Context.ProjectID),
func (r ExternalSchedulerRequest) GetTraceLogArgs() []any {
return []any{
"greq", r.Context.GlobalRequestID,
"req", r.Context.RequestID,
"user", r.Context.UserID,
"project", r.Context.ProjectID,
}
}
func (r ExternalSchedulerRequest) Filter(includedHosts map[string]float64) lib.FilterWeigherPipelineRequest {
Expand Down
13 changes: 6 additions & 7 deletions api/external/nova/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ package api
import (
"errors"
"fmt"
"log/slog"
"strings"

"github.com/cobaltcore-dev/cortex/api/scheduling"
Expand Down Expand Up @@ -56,16 +55,16 @@ func (r ExternalSchedulerRequest) GetHosts() []string {
func (r ExternalSchedulerRequest) GetWeights() map[string]float64 {
return r.Weights
}
func (r ExternalSchedulerRequest) GetTraceLogArgs() []slog.Attr {
func (r ExternalSchedulerRequest) GetTraceLogArgs() []any {
greq := ""
if r.Context.GlobalRequestID != nil {
greq = *r.Context.GlobalRequestID
}
return []slog.Attr{
slog.String("greq", greq),
slog.String("req", r.Context.RequestID),
slog.String("user", r.Context.UserID),
slog.String("project", r.Context.ProjectID),
return []any{
"greq", greq,
"req", r.Context.RequestID,
"user", r.Context.UserID,
"project", r.Context.ProjectID,
}
}
func (r ExternalSchedulerRequest) Filter(includedHosts map[string]float64) lib.FilterWeigherPipelineRequest {
Expand Down
6 changes: 2 additions & 4 deletions api/external/pods/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
package pods

import (
"log/slog"

"github.com/cobaltcore-dev/cortex/api/scheduling"
"github.com/cobaltcore-dev/cortex/internal/scheduling/lib"
corev1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -35,8 +33,8 @@ func (r PodPipelineRequest) GetWeights() map[string]float64 {
}
return weights
}
func (r PodPipelineRequest) GetTraceLogArgs() []slog.Attr {
return []slog.Attr{}
func (r PodPipelineRequest) GetTraceLogArgs() []any {
return []any{}
}
func (r PodPipelineRequest) Filter(includedHosts map[string]float64) lib.FilterWeigherPipelineRequest {
filteredNodes := make([]corev1.Node, 0, len(includedHosts))
Expand Down
Loading
Loading