Skip to content

chore(vm): set cpu cores max limit to 248#2265

Merged
diafour merged 1 commit intomainfrom
chore/vm/maximum-cpu-cores-248
Apr 27, 2026
Merged

chore(vm): set cpu cores max limit to 248#2265
diafour merged 1 commit intomainfrom
chore/vm/maximum-cpu-cores-248

Conversation

@diafour
Copy link
Copy Markdown
Member

@diafour diafour commented Apr 23, 2026

Description

  • Return max cores per sockets from CalculateCoresAndSockets.
  • Set max cores per socket to 31 for the topology with 8 sockets.
  • Add extra message explaining why restart is needed to apply pending changes when CPU topology is changed.

Why do we need it, and what problem does it solve?

Hotplug enabling should not reduce previously allowed max cpu count of 248.

What is the expected result?

  1. User can hotplug CPU cores up to 248 for topology with 8 sockets: from 72 until to 248.
alpine-bios-e2e:~$ sudo dmidecode| grep 'Socket\ Desig\|Core\ Count'
	Socket Designation: CPU 0
	Core Count: 31
	Socket Designation: CPU 1
	Core Count: 31
	Socket Designation: CPU 2
	Core Count: 31
	Socket Designation: CPU 3
	Core Count: 31
	Socket Designation: CPU 4
	Core Count: 31
	Socket Designation: CPU 5
	Core Count: 31
	Socket Designation: CPU 6
	Core Count: 31
	Socket Designation: CPU 7
	Core Count: 31
alpine-bios-e2e:~$ nproc
248
  1. User can't specify cores more than 248 cores.
# k -n vm edit vm alpine-bios-e2e
error: virtualmachines.virtualization.deckhouse.io "alpine-bios-e2e" could not be patched: admission webhook "vm.virtualization-controller.validate.d8-virtualization" denied the request: number of cores should not exceed 248
You can run `d8 replace -f /tmp/d8-edit-41461885.yaml` to try this update again.
  1. User get message about topology changes if VM in Manual disruption mode:
"status": {
  "conditions": [
    ...
    {
      "lastTransitionTime": "2026-04-27T17:20:38Z",
      "message": "Waiting for the user to restart in order to apply the configuration changes. Changing the number of CPU cores requires changing the CPU topology (number of sockets).",
      "observedGeneration": 12,
      "reason": "ChangesPendingRestart",
      "status": "True",
      "type": "AwaitingRestartToApplyConfiguration"
    }
    ...
  ],
  ...
  "restartAwaitingChanges": [
    {
      "currentValue": 18,
      "desiredValue": 44,
      "operation": "replace",
      "path": "cpu.cores"
    }
  ],
  ...
}

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Changelog entries

@diafour diafour changed the title chore(vm): cpu cores high limit 248 chore(vm): set cpu cores max limit to 248 Apr 23, 2026
@diafour diafour force-pushed the chore/vm/maximum-cpu-cores-248 branch from 9e67714 to 6151d10 Compare April 23, 2026 14:47
@diafour diafour added this to the v1.9.0 milestone Apr 23, 2026
- Calculate max cores per sockets.
- Set cores per sockets to 31 for the topology with 8 sockets.
- Add extra message explaining why restart is needed to apply pending changes.

Signed-off-by: Ivan Mikheykin <ivan.mikheykin@flant.com>
@diafour diafour force-pushed the chore/vm/maximum-cpu-cores-248 branch from aca56ab to 9467c8f Compare April 27, 2026 12:22
@diafour diafour requested a review from danilrwx April 27, 2026 12:38
@diafour diafour added the e2e/run Run e2e test on cluster of PR author label Apr 27, 2026
@deckhouse-BOaTswain
Copy link
Copy Markdown
Contributor

deckhouse-BOaTswain commented Apr 27, 2026

Workflow has started.
Follow the progress here: Workflow Run

The target step completed with status: cancelled.

@deckhouse-BOaTswain deckhouse-BOaTswain removed the e2e/run Run e2e test on cluster of PR author label Apr 27, 2026
@diafour diafour marked this pull request as ready for review April 27, 2026 13:19
@diafour diafour merged commit 1a8c81b into main Apr 27, 2026
80 of 87 checks passed
@diafour diafour deleted the chore/vm/maximum-cpu-cores-248 branch April 27, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants