nova/nova
Artom Lifshitz 0a6b57a9a2 libvirt: remove default cputune shares value
Previously, the libvirt driver defaulted to 1024 * (# of CPUs) for the
value of domain/cputune/shares in the libvirt XML. This value is then
passed directly by libvirt to the cgroups API. Cgroups v2 imposes a
maximum value of 10000 that can be passed in. This makes Nova
unable to launch instances with more than 9 CPUs on hosts that run
cgroups v2, like Ubuntu Jammy or RHEL 9.

Fix this by just removing the default entirely. Because there is no
longer a guarantee that domain/cputune will contain at least a shares
element, we can stop always generating the former, and only generate
it if it will actually contain something.

We can also make operators's lives easier by leveraging the fact that
we update the XML during live migration, so this patch also adds a
method to remove the shares value from the live migration XML if one
was not set as the quota:cpu_shares flavor extra spec.

For operators that *have* set this extra spec to something greater
than 10000, their flavors will have to get updates, and their
instances resized.

Partial-bug: 1978489
Change-Id: I49d757f5f261b3562ada27e6cf57284f615ca395
(cherry picked from commit f77a9fee5b)
2023-11-21 13:47:40 +00:00
..
accelerator smartnic support - reject server move and suspend 2021-08-05 15:58:41 +08:00
api Merge "Remove deleted projects from flavor access list" into stable/yoga 2023-05-11 22:40:33 +00:00
cmd Use force=True for os-brick disconnect during delete 2023-05-10 15:00:30 +00:00
compute Fix failed count for anti-affinity check 2023-06-06 10:30:59 +02:00
conductor Merge "Avoid n-cond startup abort for keystone failures" into stable/yoga 2023-04-18 18:17:12 +00:00
conf Merge "Remove mentions of removed scheduler filters" into stable/yoga 2023-05-03 18:38:41 +00:00
console Merge "console: Improve logging" 2021-09-07 14:29:08 +00:00
db db: Resolve additional SAWarning warnings 2023-02-16 08:50:31 +00:00
hacking Add wrapper for oslo.concurrency lockutils.ReaderWriterLock() 2022-01-12 04:15:26 +00:00
image Merge "Close Glance image if downloading failed." 2022-01-17 10:31:21 +00:00
keymgr
limit Unify placement client singleton implementations 2022-09-22 22:54:46 +00:00
locale Imported Translations from Zanata 2020-04-26 07:51:21 +00:00
network Fix get_segments_id with subnets without segment_id 2023-05-30 17:53:20 +00:00
notifications object/notification for Adds Pick guest CPU architecture based on host 2022-02-24 12:06:55 -05:00
objects Add debug logging when Instance raises OrphanedObjectError 2023-07-11 22:55:32 +00:00
pci Allow claiming PCI PF if child VF is unavailable 2022-05-06 10:36:28 +02:00
policies Complete phase-1 of RBAC community-wide goal 2022-02-24 16:33:34 +00:00
privsep Retry lvm volume and volume group query 2021-06-15 12:39:26 +02:00
releasenotes/notes api: enable oslo.reports when using uWSGI 2021-10-14 09:23:08 +03:00
scheduler Unify placement client singleton implementations 2022-09-22 22:54:46 +00:00
servicegroup Remove six.binary_type/integer_types/string_types 2020-12-13 11:25:14 +00:00
storage Add autopep8 to tox and pre-commit 2021-11-08 12:37:27 +00:00
tests libvirt: remove default cputune shares value 2023-11-21 13:47:40 +00:00
virt libvirt: remove default cputune shares value 2023-11-21 13:47:40 +00:00
volume Enable use of service user token with admin context 2023-05-10 15:00:39 +00:00
__init__.py
availability_zones.py Remove six.PY2 and six.PY3 2020-08-15 07:45:23 +00:00
baserpc.py
block_device.py fup: Remove unused legacy block_device_info format 2021-08-20 13:26:46 +01:00
cache_utils.py
config.py conf: Allow cinderclient and os_brick to independently log at DEBUG 2021-12-03 18:21:16 +00:00
context.py db: Unify 'nova.db.api', 'nova.db.sqlalchemy.api' 2021-08-09 15:34:40 +01:00
crypto.py Replace md5 for fips 2021-02-25 16:01:43 -05:00
debugger.py trivial: Remove remaining '_LW' instances 2020-05-18 17:00:41 +01:00
exception.py Fix failed count for anti-affinity check 2023-06-06 10:30:59 +02:00
exception_wrapper.py rpc: Rework 'get_notifier', 'wrap_exception' 2021-03-01 11:06:48 +00:00
filters.py Add autopep8 to tox and pre-commit 2021-11-08 12:37:27 +00:00
i18n.py trivial: Remove remaining '_LI' instances 2020-05-18 17:00:57 +01:00
loadables.py
manager.py db: Unify 'nova.db.api', 'nova.db.sqlalchemy.api' 2021-08-09 15:34:40 +01:00
middleware.py Allow X-OpenStack-Nova-API-Version header in CORS 2021-06-15 07:35:36 -04:00
monkey_patch.py reenable greendns in nova. 2022-03-08 16:16:11 +00:00
policy.py Reuse code from oslo lib for JSON policy migration 2021-01-14 22:41:33 +00:00
profiler.py
quota.py Unify placement client singleton implementations 2022-09-22 22:54:46 +00:00
rpc.py rpc: Rework 'get_notifier', 'wrap_exception' 2021-03-01 11:06:48 +00:00
safe_utils.py
service.py Add service version check workaround for FFU 2022-01-24 08:45:58 -08:00
service_auth.py Enable use of service user token with admin context 2023-05-10 15:00:39 +00:00
test.py Merge "Unify placement client singleton implementations" into stable/yoga 2023-04-18 17:55:52 +00:00
utils.py Fix eventlet.tpool import 2022-04-07 10:19:02 +00:00
version.py Change API unexpected exception message 2021-02-17 21:30:07 +00:00
weights.py Add debug log for scheduler weight calculation 2021-11-11 19:10:32 +01:00
wsgi.py trivial: Remove remaining '_LI' instances 2020-05-18 17:00:57 +01:00