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
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Changelog

## Changelog — cortex 0.9.3

**Release PR:** [#1545](https://github.com/cobaltcore-dev/cortex/pull/1545)
**Date:** 2026-11-17
**App Version:** `sha-67c88600`

### Bumped Versions

| Package | Previous | New |
|---|---|---|
| cortex | 0.9.2 | 0.9.3 |
| cortex-postgres | 0.6.34 | 0.6.35 |
| cortex-shim | 0.1.40 | 0.1.41 |
| bundles | 0.0.116 | 0.0.117 |
| cortex-placement-shim | 0.1.40 | 0.1.41 |

### Bug Fixes

- **Fixed false host oversubscription alerts after capacity refactoring** ([#1543](https://github.com/cobaltcore-dev/cortex/pull/1543)) — After the unified capacity calculation refactoring (#1504), the `computeViolations` function in `HostOversubscriptionController` incorrectly counted `FailoverHost` reservations at full `Spec.Resources` (i.e., entire host capacity). This caused every host with committed-resource reservations **and** running VMs to be falsely reported as oversubscribed. The fix rewrites the violation computation to explicitly select only reservation types that represent real demand on a host's capacity (`CommittedResource`, `Failover`, `InFlight`), excluding `FailoverHost` reservations which block full host capacity for evacuation and are already policed by a dedicated filter. Violations are now computed as `Used + Reserved − Total` per resource, only flagging positive excess. A regression test was added to verify that a failover host reservation with running VMs does not trigger false oversubscription.

## cortex 0.9.2

### Fixes
Expand Down
8 changes: 4 additions & 4 deletions helm/bundles/cortex-cinder/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ apiVersion: v2
name: cortex-cinder
description: A Helm chart deploying Cortex for Cinder.
type: application
version: 0.0.116
version: 0.0.117
appVersion: 0.1.0
dependencies:
# from: file://../../library/cortex-postgres
- name: cortex-postgres
repository: oci://ghcr.io/cobaltcore-dev/cortex/charts
version: 0.6.34
version: 0.6.35

# from: file://../../library/cortex
- name: cortex
repository: oci://ghcr.io/cobaltcore-dev/cortex/charts
version: 0.9.2
version: 0.9.3
alias: cortex-knowledge-controllers
# from: file://../../library/cortex
- name: cortex
repository: oci://ghcr.io/cobaltcore-dev/cortex/charts
version: 0.9.2
version: 0.9.3
alias: cortex-scheduling-controllers

# Owner info adds a configmap to the kubernetes cluster with information on
Expand Down
4 changes: 2 additions & 2 deletions helm/bundles/cortex-crds/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ apiVersion: v2
name: cortex-crds
description: A Helm chart deploying Cortex CRDs.
type: application
version: 0.0.116
version: 0.0.117
appVersion: 0.1.0
dependencies:
# from: file://../../library/cortex
- name: cortex
repository: oci://ghcr.io/cobaltcore-dev/cortex/charts
version: 0.9.2
version: 0.9.3

# 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
Expand Down
4 changes: 2 additions & 2 deletions helm/bundles/cortex-ironcore/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ apiVersion: v2
name: cortex-ironcore
description: A Helm chart deploying Cortex for IronCore.
type: application
version: 0.0.116
version: 0.0.117
appVersion: 0.1.0
dependencies:
# from: file://../../library/cortex
- name: cortex
repository: oci://ghcr.io/cobaltcore-dev/cortex/charts
version: 0.9.2
version: 0.9.3

# 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
Expand Down
8 changes: 4 additions & 4 deletions helm/bundles/cortex-manila/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ apiVersion: v2
name: cortex-manila
description: A Helm chart deploying Cortex for Manila.
type: application
version: 0.0.116
version: 0.0.117
appVersion: 0.1.0
dependencies:
# from: file://../../library/cortex-postgres
- name: cortex-postgres
repository: oci://ghcr.io/cobaltcore-dev/cortex/charts
version: 0.6.34
version: 0.6.35

# from: file://../../library/cortex
- name: cortex
repository: oci://ghcr.io/cobaltcore-dev/cortex/charts
version: 0.9.2
version: 0.9.3
alias: cortex-knowledge-controllers
# from: file://../../library/cortex
- name: cortex
repository: oci://ghcr.io/cobaltcore-dev/cortex/charts
version: 0.9.2
version: 0.9.3
alias: cortex-scheduling-controllers

# Owner info adds a configmap to the kubernetes cluster with information on
Expand Down
8 changes: 4 additions & 4 deletions helm/bundles/cortex-nova/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ apiVersion: v2
name: cortex-nova
description: A Helm chart deploying Cortex for Nova.
type: application
version: 0.0.116
version: 0.0.117
appVersion: 0.1.0
dependencies:
# from: file://../../library/cortex-postgres
- name: cortex-postgres
repository: oci://ghcr.io/cobaltcore-dev/cortex/charts
version: 0.6.34
version: 0.6.35

# from: file://../../library/cortex
- name: cortex
repository: oci://ghcr.io/cobaltcore-dev/cortex/charts
version: 0.9.2
version: 0.9.3
alias: cortex-knowledge-controllers
# from: file://../../library/cortex
- name: cortex
repository: oci://ghcr.io/cobaltcore-dev/cortex/charts
version: 0.9.2
version: 0.9.3
alias: cortex-scheduling-controllers

# Owner info adds a configmap to the kubernetes cluster with information on
Expand Down
4 changes: 2 additions & 2 deletions helm/bundles/cortex-placement-shim/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ apiVersion: v2
name: cortex-placement-shim
description: A Helm chart deploying the Cortex placement shim.
type: application
version: 0.1.40
version: 0.1.41
appVersion: 0.1.0
dependencies:
# from: file://../../library/cortex-shim
- name: cortex-shim
repository: oci://ghcr.io/cobaltcore-dev/cortex/charts
version: 0.1.40
version: 0.1.41
# 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
# of issues. See: https://github.com/sapcc/helm-charts/pkgs/container/helm-charts%2Fowner-info
Expand Down
4 changes: 2 additions & 2 deletions helm/bundles/cortex-pods/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ apiVersion: v2
name: cortex-pods
description: A Helm chart deploying Cortex for Pods.
type: application
version: 0.0.116
version: 0.0.117
appVersion: 0.1.0
dependencies:
# from: file://../../library/cortex
- name: cortex
repository: oci://ghcr.io/cobaltcore-dev/cortex/charts
version: 0.9.2
version: 0.9.3

# 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
Expand Down
2 changes: 1 addition & 1 deletion helm/library/cortex-postgres/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ apiVersion: v2
name: cortex-postgres
description: Postgres setup for Cortex.
type: application
version: 0.6.34
version: 0.6.35
appVersion: "sha-f69b58ee"
2 changes: 1 addition & 1 deletion helm/library/cortex-shim/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: cortex-shim
description: A Helm chart to distribute cortex shims.
type: application
version: 0.1.40
version: 0.1.41
appVersion: "sha-01a68db0"
icon: "https://example.com/icon.png"
dependencies: []
4 changes: 2 additions & 2 deletions helm/library/cortex/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: cortex
description: A Helm chart to distribute cortex.
type: application
version: 0.9.2
appVersion: "sha-cdb4dfaa"
version: 0.9.3
appVersion: "sha-67c88600"
icon: "https://example.com/icon.png"
dependencies: []
Original file line number Diff line number Diff line change
Expand Up @@ -269,13 +269,25 @@ func (r *HostOversubscriptionController) SetupWithManager(mgr ctrl.Manager, mcl
// the host is over-subscribed. Returns nil if capacity data is unavailable, empty map if no violation.
func computeViolations(allReservations []v1alpha1.Reservation, hv hv1.Hypervisor) map[hv1.ResourceName]resource.Quantity {
rep := capacity.NewHostUsageReport(hv, allReservations)
if rep.Oversubscribed == nil {
if rep.Total == nil {
return nil // no capacity data
}
// Only count types that represent real demand on this host's capacity.
// ReservationTypeFailoverHost is excluded: it blocks Spec.Resources = full host capacity
// for evacuation and is policed by a dedicated filter — counting it here would make every
// host with running VMs appear oversubscribed.
reserved := rep.ReservedTotal(
v1alpha1.ReservationTypeCommittedResource,
v1alpha1.ReservationTypeFailover,
v1alpha1.ReservationTypeInFlight,
)
violations := make(map[hv1.ResourceName]resource.Quantity)
for rn, excess := range rep.Oversubscribed {
if excess.Sign() > 0 {
violations[rn] = excess
for rn, total := range rep.Total {
demand := rep.Used[rn].DeepCopy()
demand.Add(reserved[rn])
if demand.Cmp(total) > 0 {
demand.Sub(total)
violations[rn] = demand
}
}
return violations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,31 @@ func TestComputeViolations(t *testing.T) {
Status: v1alpha1.ReservationStatus{Host: "host-1"},
}},
},
{
// Regression: after the pkg/capacity refactor (31b2fe82), FailoverHost reservations
// were counted at full Spec.Resources (= entire host) instead of zero.
// With VMs running: Available = Total − Used − Total = −Used → false oversubscription.
name: "failover host reservation with running VMs does not cause false oversubscription",
hv: hv1.Hypervisor{
ObjectMeta: metav1.ObjectMeta{Name: "host-1"},
Status: hv1.HypervisorStatus{
EffectiveCapacity: map[hv1.ResourceName]resource.Quantity{
hv1.ResourceMemory: testGiB(512),
},
Allocation: map[hv1.ResourceName]resource.Quantity{
hv1.ResourceMemory: testGiB(256),
},
},
},
slots: []v1alpha1.Reservation{{
Spec: v1alpha1.ReservationSpec{
Type: v1alpha1.ReservationTypeFailoverHost,
TargetHost: "host-1",
Resources: map[hv1.ResourceName]resource.Quantity{hv1.ResourceMemory: testGiB(512)},
},
Status: v1alpha1.ReservationStatus{Host: "host-1"},
}},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down
Loading