189 Commits

Author SHA1 Message Date
Billy Olsen
a9d893e733
Add charmcraft 3 support
Update the charmcraft.yaml file to use base and platforms, only
allowing noble support.

- Update config to default to caracal.
- Update osci.yaml to use the charmcraft 3.x/beta
- Add noble/oracular to charmhelpers
- Drop non-noble tests

Change-Id: I1b386e6b36c85621da7e89618b407fb551197a08
2024-06-21 15:49:10 -07:00
Marcin Wilk
b57593f86d Add support for the 'cpu_models' option in nova.conf
Since OpenStack Train release the 'cpu_models' config option
has superseded the 'cpu_model' config option in the nova.conf.
This patch adds support for the new 'cpu_models' allowing a user
to provide a comma separated list of supported, named CPU models.

This patch also includes a unit test for the cpu_mode='custom'.

Closes-bug: #2025914
Change-Id: I30328abc07d3304f1bfb67c81360fb5229214c97
2024-04-23 08:33:37 +02:00
Corey Bryant
b270391d80 Add 2023.2 Bobcat support
* sync charm-helpers to classic charms
* change openstack-origin/source default to bobcat
* add mantic to metadata series
* align testing with bobcat
* add new bobcat bundles
* add bobcat bundles to tests.yaml
* add bobcat tests to osci.yaml
* update build-on and run-on bases
* drop kinetic
* update charmcraft_channel to 2.x/stable

Change-Id: Iae47ffbcec08d40f430e6c942e332d56211a300a
2023-08-02 14:18:23 -04:00
Corey Bryant
dc7ecbc6ec Add Antelope support
* sync charm-helpers to classic charms
* change openstack-origin/source default to antelope
* align testing with antelope
* add new antelope bundles
* add antelope bundles to tests.yaml
* add antelope tests to osci.yaml and .zuul.yaml
* update build-on and run-on bases

Change-Id: I6795ce22f1330309771f4d8d43cee255e27c2a10
2023-03-07 20:28:58 +00:00
Edward Hope-Morley
98191ea5bf Make virt_mkfs configurable with ext4 default
Closes-Bug: #1960231
Change-Id: Ia2ac7318f1164a9015bdf9e7ce7d20a129e22af4
2023-01-18 15:51:16 +00:00
Corey Bryant
d031a489a7 Add Kinetic and Zed support
* sync charm-helpers to classic charms
* change openstack-origin/source default to zed
* align testing with zed
* add new zed bundles
* add zed bundles to tests.yaml
* add zed tests to osci.yaml and .zuul.yaml
* update build-on and run-on bases
* add bindep.txt for py310
* sync tox.ini and requirements.txt for ruamel
* use charmcraft_channel 2.0/stable
* drop reactive plugin overrides
* move interface/layer env vars to charmcraft.yaml

Change-Id: I506c53b4956024066bc769665525cb022438a0ae
2022-08-31 20:27:43 +01:00
Alex Kavanagh
afe8ba719f Updates to enable jammy and finalise charmcraft builds
- Add 22.04 to charmcraft.yaml
- Update metadata to include jammy
- Remove impish from metadata
- Update osci.yaml to include py3.10 default job
- Modify tox.ini to remove py35,py36,py37 tox target and add py310
  target.
- ensure that the openstack-origin is yoga

Change-Id: I62d95763a6283d8dc7f54b65b0474d48b20608f0
2022-04-06 10:57:03 +01:00
Billy Olsen
a8c4cd7b29 Enable vTPM support in nova-compute
Enable vTPM support in nova-compute charm. This adds new packages to be
installed swtpm and swtpm-tools as well as updates the nova-compute.conf
file and the qemu.conf file to set appropriate user/groups for swtpm.

func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/696

Change-Id: Idf0d19d75b9231f029fa6a7dc557d2a9ee04915b
2022-04-04 11:34:11 -07:00
Billy Olsen
330086cb71 Add extra-repositories config option
Add an extra-repositories config option to nova-compute in order to
allow configuring additional apt repositories. This is useful when some
packages are not available in the distro or cloud archive.

Change-Id: Ie3b76ff3bc07b83e416c80fab1da2560d48df498
2022-04-03 19:12:11 -07:00
Nobuto Murata
2283f12edd Expose block-device-allocate-retries and interval
The upstream has 3 min as the timeout (60 retries at 3-seconds
interval). It should work if an image is in a raw format to leverage
Ceph's copy-on-write or an image is small enough to be copied quickly.
However, there are some cases exeeding the 3 min deadline such as a big
enough image with Qcow2 or other formats like Windows images, or storage
backend doesn't have copy-on-write from Glance.

Let's bump the deadline to 15 min (300 retries at 3-seconds interval) to
cover most of the cases out of the box, and let operators tune it
further by exposing those options.

Co-authored-by: Mark Maglana <mark.maglana@canonical.com>
Closes-Bug: 1758607
Change-Id: I6f6da8e90c6bbcd031ee183ae86d88eccd392230
2022-02-08 18:03:20 +09:00
Zuul
839cd20778 Merge "Fixes Nova live-migration post-copy" 2021-12-10 14:00:13 +00:00
Erlon R. Cruz
4c4bc999e9 Fixes Nova live-migration post-copy
Live migration post-copy was not working because to be effective,
'live_migration_timeout_action' must be set to 'force_complete'.

Closes-bug: #1950894
Change-Id: I66984a12b89cb0ac2aeebeb393a6f6c026d865da
2021-12-02 10:03:30 -03:00
Nobuto Murata
a5dc16393a Expose reserved_host_disk_mb for nova.conf
The config is necessary to calculate available disk space for VMs with
disk-allocation-ratio which is already exposed as a charm option.

Closes-Bug: #1952184
Change-Id: I0ef55987517bded50f855e0dbc5e420cfbff4c1b
2021-11-25 15:44:48 +09:00
Nobuto Murata
22523e5b54 Allow overriding libvirt/num_pcie_ports
Especially with arm64/aarch64, the default value limits the number of
volume attachments to two usually. And when more than two volumes are to
be attached, it will fail with "No more available PCI slots". There is
no one-size-fits-all value here so let operators override the default
value.

Closes-Bug: #1944214
Change-Id: I9b9565873cbaeb575704b94a25d0a8556ab96292
2021-09-28 12:31:20 +00:00
James Troup
7d850b2754 Spelling, grammar and consistency fixes to config.yaml.
Change-Id: Iecb447eb94a47c72c9f0a1a749fa5628d02a8ef7
2021-09-24 01:04:07 +01:00
James Troup
0720a0a402 Clarify CPU pinning config options.
Change-Id: I646834db820b9bfe09784a4c659b2a4a69bb1c72
2021-09-21 18:37:02 +01:00
Stephan Pampel
6ab0d0d5f6 Added neutron_physnet and neutron_tunnel config
Adding neutron_physnet and neutron_tunnel as config options
for numa affinity to the charm.

Implementation of [0] config options.
Only affects OpenStack releases >= rocky

[0]https://docs.openstack.org/nova/rocky/configuration/config.html#neutron.physnets

Closes-Bug: #1921067
Change-Id: Ib050c23f5e4d2da8262c37f136dbc66129141017
2021-08-31 10:24:39 +02:00
Zuul
cdb292ff39 Merge "Improve config help for aa-profile-mode and fix spelling mistakes." 2021-07-16 12:32:52 +00:00
Zuul
aff2a0b182 Merge "Added allocation-ratio config opts" 2021-07-15 23:36:30 +00:00
James Troup
cfa5bbd0da Improve config help for aa-profile-mode and fix spelling mistakes.
Change-Id: Ia99192226649585fd683eff3db3c525b0daa78e1
2021-07-09 20:13:01 +01:00
Zuul
35185a612b Merge "Improve definition of virt-type option" 2021-06-23 11:57:51 +00:00
Rodrigo Barbieri
d51e010fca Port ncc pci-alias list fix to nova-compute
Port of https://review.opendev.org/535350

Fix for this bug already exists for
nova-cloud-controller charm, therefore
port it over to nova-compute.

Closes-bug: #1921147
Change-Id: I0c37d2bce3b195f5dc18111bb70a30de03b2bbc6
func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/587
2021-06-14 14:39:56 -03:00
Peter Matulis
63273a4e1d Improve definition of virt-type option
The lxd hypervisor is no longer supported

I'm not sure whether the other types should be
there, even for testing.

Improve general wording

Related-Bug: #1931579
Change-Id: I8510382c256dbe731b810f09f25408f7fa1d7b15
2021-06-10 12:02:07 -04:00
Brett Milford
43acdd4f80 Added allocation-ratio config opts
Nova supports setting allocation ratios at the nova-compute level from
Liberty onwards. Prior to this allocation ratios were set at the
nova-scheduler level.

Newton introduced the Placement API, and Ocata introduced the ability to
have compute resources (Core/RAM/Disk) precomputed before passing
candidates to the FilterScheduler [0]. Pike removed CoreFilter,
RAMFilter and DiskFilter scheduler filters.

From Pike onwards valid methods for settings these allocation ratios are via:
- A call to the Placement API [1].
- Config values to supplied to nova-compute (xxx_allocation_ratio).

Stein introduced initial_xxx_allocation_ratio in response to the runtime
behaviour of the ResourceTracker [2].

Currently, the precedence of resource ratio values are:
xxx_allocation_ratio > Placement API call > initial_xxx_allocation_ratio

That is a (compute) resource provider's allocation ratios will default
to initial_xxx_allocation_ratio which may be overridden at run time by a
call to the Placement API. If xxx_allocation_ratio is set it will
override all configurations for that provider.

When not otherwise configured, we set initial_xxx_allocation_ratio to
the values provided by ncc to maintain backwards compatibility. Where
initial_xxx_allocation_ratio is not available we set
xxx_allocation_ratio.

[0] https://specs.openstack.org/openstack/nova-specs/specs/ocata/implemented/resource-providers-scheduler-db-filters.html
[1] https://docs.openstack.org/api-ref/placement/#update-resource-provider-inventories
[2] https://specs.openstack.org/openstack/nova-specs/specs/stein/implemented/initial-allocation-ratios.html

Change-Id: Ifa314e9e23e0ae5d16113cd91a7507e61f9de704
Closes-Bug: #1677223
2021-05-24 15:39:47 +10:00
Nobuto Murata
5db8e14d4d Cap the number of workers always when multiplier is not set
Previously the cap is only applied to the units in containers. However,
services in a bare metal also requires a sensible cap. Otherwise,
nova-compute, for example, will have 256 workers for nova-api-metadata
out of the box which is an overkill with the following system.

32 cores * 2 threads/core * 2 sockets * 2 (default multiplier) = 256

Let's cap the number of workers as 4 always, then let operators override
it with an explicit config to worker-multiplier.

Synced charm-helpers for
https://github.com/juju/charm-helpers/pull/553

Closes-Bug: #1843011
Change-Id: If98f12d7cf1a77fb267f1b55c44896a48a40909a
2021-03-05 13:28:50 +09:00
Linda Guo
d58faab1e9 Added config option 'inject-password'
This config option is to enable admin
 password injection at instance boot time
 * Added unit test to verify the config
   is correctly set and nova.config is
   updated.
 * Updated all of the templates that have
   inject-password set
 * Moved inject_* options out of
   {if libvirt_images_type and rbd_pool}
   block as they are irrelevant.

Closes-Bug: #1755696
Change-Id: Ie766a14bfa6b16337aa957bf7adf2d869462f9d7
2020-12-17 08:43:05 +11:00
Frode Nordahl
772291003b
Add Ceph BlueStore Compression support
Sync c-h.

Func-Test-Pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/429
Change-Id: I3bbf41350c18ac5cc045392ace6e14118b04e1e8
2020-09-25 11:22:30 +02:00
James Page
5f4f95ef13 Add support for Erasure Coded pools
Enable support for use of Erasure Coded (EC) pools for
nova disks when RBD is used to back ephemeral storage volumes.

Add the standard set of EC based configuration options to the
charm.

Update Ceph broker request to create a replicated pool, an erasure
coding profile and an erasure coded pool (using the profile) when
pool-type == erasure-coded is specified.

Resync charm-helpers to pick changes to the standard ceph.conf
template and associated contexts for rbd default data pool mangle
due to lack for explicit support in OpenStack Services.

Update context to use metadata pool name in nova configuration
when erasure-coding is enabled.

Change-Id: Ida0b9c889ddf9fcc0847a9cee01b3206239d9318
Depends-On: Iec4de19f7b39f0b08158d96c5cc1561b40aefa10
2020-08-07 10:44:38 +01:00
Alex Kavanagh
810ee1b37d Add focal-ussuri and bionic-ussuri bundle
This patch adds a focal-ussuri and bionic-ussuri bundles to the tests
for the charm.  The linked bug is concerned with installing
nova-network, which is not available on Ussuri.

Closes-Bug: #1872770

Change-Id: Iea5a682aaebeb6f6941cf9d8f5780473f457e455
2020-04-21 13:33:17 +01:00
Stamatis Katsaounis
7be640e29d Fix oslo notification format configuration option
This patch removes the hardcoded notification_format value in nova.conf
in order to fill it with the configuration option provided by the user.
At the moment, if user fills with an option different than the default
empty, the produced nova.conf contains two [notifications] sections,
thus, ocurring in an erroneous configuration.

Change-Id: Iff44806bdd0f6078879c9872ba0531485f0ca4c7
Signed-off-by: Stamatis Katsaounis <skatsaounis@admin.grnet.gr>
2020-03-03 14:15:14 +02:00
matuskosut
6351653c86 Add support and tests for live_migration_ parameters in charm config, templates and hook.
Change-Id: I9e426d7718f044f0e73231448b0a3dad17c81524
Closes-Bug: 1861986
2020-02-19 16:46:21 +01:00
Sahid Orentino Ferdjaoui
7874696473 config: Expose the introduced in Train cpu-dedicated-set's option
The per-host config cpu-dedicated-set will provide new flexibility by
adding ability to pack guests vCPUs which need dedicated host CPUs vs
guests vCPUs which can float over a set of host CPUs (see:
cpu-shared-set).

Change-Id: Ia2181ad2bd1894d5c2f91be5df8396bc77555658
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
2019-11-18 10:38:30 +01:00
Jorge Niedbalski
0905a447ad Allows to configure a dedicated migration network.
This commits adds a new extra binding (migration) and
its corresponding fallback configuration flag (libvirt-
migration-network) that allows to specify a space or an
existing CIDR formatted network (if the config flag is pre-
ferred) that will be seleced as the inbound address to be used
as a the live migration target.

For the case of any openstack release >= ocata,
the live_migration_inbound_addr variable will be set
as well as the libvirt_migration_scheme (set to SSH
by default).

For older releases, the behavior remains as before,
as the only remaining option is to setup libvirt
to bind in a insecure tcp connection, so we keep it
as the current live_migration_uri.

The reason of not using an extra-binding exclusively relies
on the back-compability of the change, this needs
to be applied on existing clouds where updating
the bindings on deployed application
isn't possible due to LP: #1796653.

For fresh/new deployments, the migration extra-binding
has been defined and used with precedence over the
libvirt-migration-network variable.

Change-Id: I2f8c0a1e822ad6a90e23cd8009e181b8f86d765a
Closes-Bug: #1680531
Signed-off-by: Jorge Niedbalski <jnr@metaklass.org>
2019-10-22 19:34:40 +00:00
Sahid Orentino Ferdjaoui
3a15dd8349 config: expose send-notifications-to-logs options
The last version of charmhelpers introduces ability to set additional
driver which enable notfications to be sent to system logs.

Depends-of: https://github.com/juju/charm-helpers/pull/323
Closes-bug: 1825016
Change-Id: Ibe84826060922671e7fc160734d5ae3974d663ed
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
2019-05-17 14:54:07 +00:00
Sahid Orentino Ferdjaoui
599245bbd1 config: add notification-format option
This require a change in charm-helper:
  https://github.com/juju/charm-helpers/pull/310/

Related-Bug: 1825016
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
Change-Id: I7887b5f06e194450ec69d8adc5d6fd7f84fee6fe
2019-05-03 13:37:32 +02:00
Edward Hope-Morley
53efb5d2f4 Fixup commit c9a19c4
Remove vm.swappiness setting as per [1] and
add net.netfilter.nf_conntrack_buckets as
per [2].

[1] https://git.openstack.org/cgit/openstack/charm-ceph-osd/commit/?id=3527bf4ae1723a10f49774fef646aaa5b9fc0c45
[2] https://bugs.launchpad.net/charm-nova-compute/+bug/1780348/comments/8

Change-Id: I44506c94927bb93002b040db09d7cc7c1c99d133
Related-Bug: #1780348
2019-03-15 16:18:20 +00:00
Pete Vander Giessen
c9a19c4077 Added gc_threshold overrides to sysctl.conf
When clouds have a large number of hosts, the default size of the ARP
cache is too small. The cache can overflow, which means that the
system has no way to reach some ip addresses.

Setting the threshold limits higher addresses the situation, in a
reasonably safe way (the maximum impact is 5MB or so of additional RAM
used). Docs on ARP at http://man7.org/linux/man-pages/man7/arp.7.html,
and more discussion of the issue in the bug.

Change-Id: Iaf8382ee0b42e1444cfea589bb05a687cd0c23fa
Closes-Bug: 1780348
2019-02-28 12:00:23 +01:00
Andre Ruiz
37ff6ded8b Implement new option: default_ephemeral_format
This change implements a new option in config.yaml that sets the
default format for new ephemeral volumes attached to instances.

Closes-Bug: #1693943
Change-Id: Iff9254039fa6f1cef9d80c0d59de8e37b39e30f0
2019-02-19 11:05:29 -03:00
Billy Olsen
a445a33add Install multipath dependencies when use-multipath is True
This change ensures that the multipath dependencies are installed
on the compute node when the use-multipath config flag is enabled.

Change-Id: I39b017398b95f5901d9bc57ffa0c59ff59f3a359
Closes-Bug: #1806830
2019-02-04 19:55:49 -07:00
Zuul
1e1c42a151 Merge "Enable support for auto-converge and post-copy" 2019-01-09 12:01:26 +00:00
Niels van Adrichem
1fa2a8023c Enable support for auto-converge and post-copy
Implement missing configuration options and context to support
configuration of:

  live_migration_permit_auto_converge
  live_migration_permit_post_copy

in nova.conf. The configuration parameters are only added to the
nova.conf template when live-migration is actually enabled, since they
have no purpose without live-migration enabled. The options are added to
version Newton and upwards as that is the Nova version since they were
first supported.

Change-Id: I1bb3cee4ac532d0867b4297c742707668566a527
Closes-Bug: #1799916
2018-12-12 08:26:26 +00:00
Zuul
a39ca756ea Merge "adding compute/cpu_shared_set option" 2018-12-11 14:56:21 +00:00
Zuul
abf879d9e1 Merge "introduce "reserved_huge_pages" option" 2018-12-11 14:51:11 +00:00
Sahid Orentino Ferdjaoui
0cd3cee728 adding compute/cpu_shared_set option
For Rocky, Nova introduced compute/cpu_shared_set and libvirt driver
uses that option to specify set of pCPUs which will be used to put
emulator threads on. So guest vCPUs can be pinned on pCPUs which will
be entirely dedicated for them.

Change-Id: I88b2afda67a91266f21d2c870a76646262488db2
Closes-Bug: 1806434
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
2018-12-03 16:23:30 +01:00
Sahid Orentino Ferdjaoui
c7638a340a introduce "reserved_huge_pages" option
The DEFAULT/reserved_huge_pages option will be required by NFV
deployments in order to let Nova compute service knows that some huge
pages allocated in the host are used by third-party components like
DPDK PMDs.

Since juju does not support yet list of strings options that one will
be exposed using semicolons in charm.

Closes-Bug: 1804169
Change-Id: I7faa3406a6bd27b9d924925ae93d40075eb0aff2
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
2018-11-20 15:45:57 +01:00
Sahid Orentino Ferdjaoui
27e71b5e41 introduce "{tx|rx}_queue_size" options
The libvirt/{tx|rx}_queue_size options will be required by NFV
deploymens in order to increase network performances per vCPUs and
avoiding packet drops.

Note that the options are available start to Rocky. Since QEMU 2.7.0
and libvirt 2.3.0 to configure RX queue size. Since QEMU 2.10.0 and
libvirt 3.7.0 to configure TX queue size.

Closes-Bug: 1804170
Change-Id: Iceacb42aae248fb36e9eecdc992c4a982f4e32b4
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
2018-11-20 11:56:34 +01:00
Dmitrii Shcherbakov
4fb1243100 Allow Juju AZ context information to be used
The change adds an option to the charm to use JUJU_AVAILABILITY_ZONE
environment variable set by Juju for the hook environment based on the
underlying provider's availability zone information for a given machine.

This information is used to configure default_availability_zone for nova
and availability_zone for subordinate networking charms.

Change-Id: Idc7112e7fe7b76d15cf9c4896b702b8ffd8c0e8e
Closes-Bug: #1796068
2018-10-09 14:02:12 +00:00
Edward Hope-Morley
9f98ad0e2d Fixup config description for libvirt-image-backend
Change-Id: Ie04fd55ec618eaf423223d35943b2a842f5c0870
2018-09-06 11:33:53 +01:00
Chris MacNaughton
1700603b0d Add configuration for cpu model flags
Change-Id: Ia26d0f2d4f540dd5b35743d0348aa6e2b8ab1954
Closes-Bug: #1750829
2018-07-16 08:50:41 +02:00
David Ames
20e2f4c1dd Update PCI passthrough template for >= Pike
The [pci] header is necessary since pike [0]. This change updates the
pike template to add the [pci] header, rename pci_passthrough_whitelist
to passthrough_whitelist and add the config option pci-alias.

[0] https://docs.openstack.org/nova/pike/admin/pci-passthrough.html

Change-Id: I7a8c76f5989edb5b4a0b30036ce722ffb0ecb7ab
2018-05-16 10:16:55 -07:00