3058 Commits

Author SHA1 Message Date
Takashi Kajinami
febcc4c74e Prepare final stable/2023.1 release
Change-Id: I8b15d73a7bb1f976de5b0d096c0800b2032f30c7
22.2.0 2023.1-eom
2024-12-05 21:39:52 +09:00
Takashi Kajinami
79ba10f61b Assume structured fact in unit tests
The legacy fact has been deprecated and is no longer available in
Puppet 8. Use the structured one to access fact values in tests so that
we use the consistent method for fact value access.

This change also fixes ignored unit tests of nova::migration::libvirt
with modular libvirt daemons.

Conflicts:
	spec/classes/nova_migration_libvirt_spec.rb

Change-Id: I852facc2ee0ad2a948821f4232a1e8fc20ce4957
(cherry picked from commit df8171df9352f32fa768d8c8cb7197dbe50fb1e9)
(cherry picked from commit 7c996fb434e252d90be87daf4516852730ad8656)
(cherry picked from commit 9ce2f50886fa95aab83a3f0f70478d93444a0996)
2024-06-01 14:03:51 +09:00
Tobias Urdin
a827cfa78e Add nova::compute::libvirt::secret_ceph resource
This adds the nova::compute::libvirt::secret_ceph
resource definition that can be used to define
libvirt secrets of ceph type.

Before this patch one could only handle one libvirt
secret by configuring the parameters in the
nova::compute::rbd class and with this one can
configure multiple.

This adds a new manage_libvirt_secret parameter
defaulting to true in the nova::compute::rbd class
so that one can disable the creation of the libvirt
secret from that class.

Change-Id: Ief031f5dd4b0648d5629789cb7d6d2f6f946fbf8
(cherry picked from commit a7498d6dbc76349d76a800f7b2e01f1ae29d6115)
(cherry picked from commit 74a42d6b33b4d9a5fd2d5cb065826ec2a1a5df34)
(cherry picked from commit f090015bb6ab371d595fc67e2f232ebf5fb2dd74)
2024-04-25 20:04:13 +02:00
Tobias Urdin
36951d35cd Set show_diff to false for Nova SSH private key
The private key is currently being leaked into
the diff output.

Conflicts:
	spec/classes/nova_init_spec.rb

Change-Id: I94170f76257c77d1eabeeb3d373c05c50413c53d
(cherry picked from commit 75fbe61987e4e36b12aa97c18d9f99062739a677)
(cherry picked from commit 90af39c4806cd8f10f16f68fe22235652d6e0e7f)
2024-04-16 17:22:06 +09:00
Takashi Kajinami
e7a09d24df nova_flavor: Fix broken idempotency with properties
Make sure that nova_flavor resource is idempotent when the "properties"
property is set. Also fix the typo causing undefined method error.

Closes-Bug: #2059949
Change-Id: I17a9d92c44b8dfe329b22b309d7a0408df707d1a
(cherry picked from commit 820695b463d4dead2f00834458e770c9a3c0dec4)
(cherry picked from commit 3d7de53fc44b1c4caa611056956629e30985f49d)
2024-04-04 00:19:42 +00:00
Takashi Kajinami
fb4e7883f8 Avoid restarting dbus service
Restarting the dbus service is not necessary and is now triggering
a bug[1] in systemd-logind in CentOS Stream 9.

[1] https://issues.redhat.com/browse/RHEL-21004

Change-Id: Iae47044d7a58ba6316ff5f4b5ffdc01b03eddeba
(cherry picked from commit 8d88b7bf4f6b31bfb665217d5f5c9c13f1a6e177)
(cherry picked from commit 63030d68373ed2ca9b37fb0831126cdd27921f3c)
2024-01-09 01:11:01 +00:00
Takashi Kajinami
c56daf42a4 Debian/Ubuntu: Fix missing nova-compute-ironic
This package should be installed to use ironic virt driver.

Closes-Bug: #2042383
Change-Id: I3b7ac19b347f3a5deb68d724de32246bb8dc1075
(cherry picked from commit 1a768d4d017d1a44de3a3e5400b2ec6405544f09)
(cherry picked from commit 3d9d9d10be7859f9e2e6e2f3740d9965a02a2fba)
2023-11-09 03:48:48 +00:00
Takashi Kajinami
4be2d82e8b Add .pdkignore to exclude some files from tar ball
We've seen release job failures caused by too large tarball, which
contains irrelevant files like git history.

Let's exclude these files to reduce size of the archive.

The file is copied from the puppetlabs repositories with some files
specific to OpenStack projects added.

Change-Id: I1cd2203f4979775346038b663457b2da10f9af48
(cherry picked from commit bea96fb541203a63ca74ed17528bae28807c4c3b)
2023-08-09 06:58:11 +00:00
Tobias Urdin
4a04ba262d Add per module policy service refresh
Updating the policies for this project should only
refresh the services that reads it.

Change-Id: Id3ca3c57026549c17bb3c8a3bedee08672168c5d
(cherry picked from commit 8850d96e1063e8a0e1ffd724ac9135eb2de65c4d)
2023-07-06 19:17:41 +00:00
Tobias Urdin
c6e354fcf2 Dont log output when setting virsh secret
If the command failes we will leak the secret
into log files and output.

Change-Id: I91271f3cb8de7a9b5c20fdb7b249931d88c5c1b1
(cherry picked from commit 1a3eebcf121353464dfcca7f679d63da1ec90dc4)
22.1.0
2023-06-08 19:16:57 +00:00
Takashi Kajinami
56aeeb0365 Fix restart of modular libvirt daemons after config change
This fixes the regression caused by [1]. A socket can't be restarted
if the associated service is already started, so we should restart
the service instead of the socket.

[1] ef8a070e853f88b8a7fde4eba0f9cd8db109d893

Change-Id: I41783e8697e3d9d43f2ca5c5d91cb91a74917aea
(cherry picked from commit 4161c48f2ce9e4c6c4b8556710cb26855dce1b48)
2023-06-05 10:00:46 +00:00
Takashi Kajinami
510698dc0a Drop modular libvirt daemon names for Debian/Ubuntu
These distributions do not support modular libvirt daemons and now
the module prohibit usage of that architecture. So these definitions
are no longer used.

Change-Id: I7627a5a6233b3d157d930e5b62e612ce9defe1f2
(cherry picked from commit fe2b1c8255f4dc8777c3578f5361a0880f0986e1)
2023-06-05 10:00:32 +00:00
Zuul
6630e54889 Merge "Prohibit modular libvirt in non RedHat distributions" into stable/2023.1 2023-06-05 09:51:40 +00:00
Takashi Kajinami
861bef82b5 Prohibit modular libvirt in non RedHat distributions
Currently modular libvirt daemons are supported only by CentOS and
RHEL. This makes sure the deployment fails in case the architecture is
requested in distros which do not support it.

Conflicts:
	spec/classes/nova_migration_libvirt_spec.rb

Change-Id: I8eefc65e206bdb0532b6c5d08eee0d35d764a2b9
(cherry picked from commit 0fe7de9b7710859c08428687ee6e35e1ef5fb822)
2023-06-01 22:54:01 +09:00
Takashi Kajinami
08dcf09459 Prepare new stable/2023.1 release
We recently merged the fix required to deploy nova in recent CentOS
Stream 9. Let's create a release so that users can consume the released
versions containing the fix.

Change-Id: I77d05f2f7b57120347afc621d2e50a4f83dcdbcb
2023-05-31 18:49:08 +09:00
Takashi Kajinami
3fa17436bc Add release note about libvirt-daemon package installation
This adds a release note about the installation of libvirt-daemon
package, which was added by [1].

[1] I612856bfd23f980b1e94815d3b5e15e0ea39f72e

Change-Id: I92fcdf2d7938c39e13a63b1ac9a91c70b9fd656b
(cherry picked from commit 00a3b773102ff5b4fb32eaec4464aa97e31fe7c0)
2023-05-31 01:24:12 +00:00
Takashi Kajinami
d1bb160e40 CentOS: Install libvirt-daemon package for monolithic daemon
CentOS 9 Stream recently bumped libvirt version (from 9.0.0 to 9.3.0)
and the latest libvirt package no longer requires the daemon package
which provides the monolithic libvirt daemon[1]

[1] 5358618b1c

Change-Id: I612856bfd23f980b1e94815d3b5e15e0ea39f72e
(cherry picked from commit 5fe2ca84b0071980087534837dd571803e086486)
2023-05-26 08:38:54 +02:00
Takashi Kajinami
29f27cb228 Fix incorrect usage of manage_libvirt_services
This parameter determines whether the nova::compute::libvirt class
should manage libvirt services. Even if the parameter is set to false,
a user can include nova::compute::libvirt::services explicitly to
manage libvirt services. However the nova::migration::libvirt class
does not care whether the service class is additionally included and
always ignores the service resources even though libvirt services are
actually managed.

This fixes that problem and introduces a proper knob to manage/unmanage
services.

Change-Id: Ibd904309ee5327ec2010925459c1aee4a109b1b0
(cherry picked from commit 30bff6814091fcff6613bb9d20fb5fc402da5357)
2023-05-24 07:17:52 +00:00
Takashi Kajinami
42c668545b Remove logic to look up removed parameters
These lines should have been removed when we removed the deprecated
image cache parameters from the nova::compute::libvirt class[1].

[1] 369f0509795e29a99a3e13bbd8257e8643bc2014

Change-Id: I41bc31e92119810ca7cd5c3a57179d932923072f
(cherry picked from commit 04a8a01806447f67f1a46f8ffc77c5616f67b844)
2023-05-19 11:09:28 +09:00
89512c901c Update TOX_CONSTRAINTS_FILE for stable/2023.1
Update the URL to the upper-constraints file to point to the redirect
rule on releases.openstack.org so that anyone working on this branch
will switch to the correct upper-constraints list automatically when
the requirements repository branches.

Until the requirements repository has as stable/2023.1 branch, tests will
continue to use the upper-constraints list on master.

Change-Id: Ib410337299d1ad6ae1bf7b02124002ab3b2c6e90
2023-04-05 15:33:56 +00:00
ef06f39b42 Update .gitreview for stable/2023.1
Change-Id: Ie10c05b9cfbb6e4559a9ce07fce3101fd231b3f6
2023-04-05 15:33:54 +00:00
Zuul
bf108ee3f2 Merge "Use file resource to create the socket file" 22.0.0 2023-04-03 01:09:08 +00:00
Takashi Kajinami
eb25744a11 Use file resource to create the socket file
... instead of exec, as the built in functionality is enough to
avoid overriding the file and generally file resource is preferred
approach to manage a file.

Change-Id: I202490a8d06b3843b496c0a317254dc4419c3acb
2023-03-31 18:44:33 +09:00
Takashi Kajinami
4d4804913d Prepare 2023.1 release
Change-Id: I158197fb11133c51dd67a655c1121c6fe733eeb5
2023-03-29 06:16:25 +00:00
Zuul
413d34acbb Merge "Remove redundant hard-coded default of ssl_only" 2023-03-28 15:28:09 +00:00
Zuul
3daa730299 Merge "libvirt: Drop unused listen options" 2023-03-28 15:28:08 +00:00
Takashi Kajinami
e9b881647a Make sure socket listens on specific interface
This change makes sure that systemd sockets for libvirt/virtproxy
listen on a specific interface instead of all interfaces, when user
gives the listen_address parameter.

Closes-Bug: #2012747
Change-Id: I8e7775ce73eeb44a60dc94de1c1707aec92f6ae3
2023-03-27 18:04:57 +09:00
Takashi Kajinami
05593c3aff libvirt: Drop unused listen options
The following options are no longer used since we replaced --listen
argument by systemd unit files.
 - listen_tcp
 - listen_tls
 - listen_addr

See [1] to find more details.

[1] https://libvirt.org/daemons.html#monolithic-systemd-integration

Related-Bug: #2012747
Change-Id: If63ae17ad2df79f8a91bc2db5c21939c36f12e02
2023-03-27 07:11:05 +00:00
Zuul
c72f25dbc4 Merge "Enable only sockets for modular libvirt daemons" 2023-03-24 09:32:13 +00:00
Zuul
f5defe265a Merge "Enable virtproxyd socket for migration" 2023-03-24 05:53:19 +00:00
Zuul
86d93c31eb Merge "vmware: Fix the wrong package installed" 2023-03-24 05:19:56 +00:00
Zuul
c4e07e8e07 Merge "Add options for CPU power management features" 2023-03-23 17:40:56 +00:00
Zuul
56c9315573 Merge "Remove deprecated libvirt service parameters" 2023-03-23 17:40:55 +00:00
Takashi Kajinami
ef8a070e85 Enable only sockets for modular libvirt daemons
It seems some of the modular libvirt daemons are automatically stopped
if these are unused, and that causes broken idempotency. According to
the libvirt doc[1], we have to enable only sockets and services are
started automatically when these are required.

[1] https://libvirt.org/daemons.html#switching-to-modular-daemons

Closes-Bug: #2012423
Change-Id: Ifac9cb6f0c47e18bc152ee6744b3572c8d33373a
2023-03-23 16:27:35 +00:00
Takashi Kajinami
d6b472a8b6 Enable virtproxyd socket for migration
In case modular libvirt daemons are used, virtproxyd-tcp/tls.socket
should be enabled instead of libvirtd-tcp/tls.socket.

Closes-Bug: #2012443
Change-Id: I54b1ef25eb321ee5ba8914b625982b68da6c5dd1
2023-03-24 01:26:40 +09:00
Takashi Kajinami
7aacf38c1d Add options for CPU power management features
Nova recently introduced the feature to manage pCPU cores performance.
This adds support for these options.

Change-Id: Id1577cf258f29874a5cd1a693025092607bbe9b8
2023-03-23 13:25:45 +09:00
Zuul
54aad4e30b Merge "Drop too strict validation of instance_usage_audit_period" 2023-03-22 05:45:17 +00:00
Takashi Kajinami
2e0ea37ad5 Remove deprecated libvirt service parameters
This removes some parameters which were deprecated during the previous
cycle by [1].

[1] 18c4b34d6be148859b68917c7777257b305bd8be

Change-Id: I133bddf60e8ac948412e0506edec9ffbd15ce126
2023-03-22 10:53:01 +09:00
Zuul
d12c547f5b Merge "Add strict validation about boolean parameters" 2023-03-21 20:56:50 +00:00
Zuul
41c1df95a3 Merge "Remove libvirt version detection for CentOS 8" 2023-03-21 13:27:26 +00:00
Takashi Kajinami
2ad5700dd2 Fix outdated libvirt version in Ubuntu
The libvirt version available in Jammy is not 6.0 but 8.0 [1].

[1] https://packages.ubuntu.com/jammy/libvirt-daemon

Change-Id: I17ddb8a7f4b00d70d7ba4e6fb154fda094ffdc36
2023-03-20 18:10:22 +09:00
Takashi Kajinami
8cba8cd046 Remove libvirt version detection for CentOS 8
... because this module no longer supports CentOS 8.

Change-Id: I1e13e1694ce0f5d8cf5f40e13c0cacbf2892adbd
2023-03-20 18:06:12 +09:00
Takashi Kajinami
fcaac38dcd Remove redundant hard-coded default of ssl_only
This option defaults to false in nova, thus we don't have to define
the static default in our module.

Change-Id: Ia70a11adc6bd42503ede0dcb316bb5a0757dbfd7
2023-03-18 16:23:58 +09:00
Takashi Kajinami
b7dc7fbbfe Drop too strict validation of instance_usage_audit_period
The instance_usage_audit_period option supports the values with offset
like month@15. This removes the format check which is too strict and
ignore values with offset.

Closes-Bug: #2012117
Change-Id: I01e55a4aaaefd5174d35d551d3dd32f6c37b6b6b
2023-03-18 16:19:55 +09:00
Takashi Kajinami
7688084aed Add strict validation about boolean parameters
This ensures the parameters used by if-else logic accept only boolean
values because non-boolean can result in unexpected behavior.

Change-Id: I3a27d94e453f9cfbea701337308a7086693c89bb
2023-03-18 16:14:03 +09:00
Thomas Goirand
43365fcc4e Fix libvirt version detection to understand Debian (bullseye + bookworm).
Change-Id: I654f6ff5be672150ee57d39c30e81314359aafb7
2023-03-17 13:33:58 +01:00
Takashi Kajinami
160ae675a4 vmware: Fix the wrong package installed
All common implementation for vmware has been split out to
the oslo.vmware library, which is currently an optional dependency.
We have to make sure this library is installed so that vmware driver
is functional.

Also, python(3)-suds is required by python(3)-oslo-vmware so we don't
have to explicitly installs this library.

Additionally this fixes the wrong indent in the spec file.

Closes-Bug: #2011828
Change-Id: Ica93dd5127e6330e0d5a65738ca68c43e8be3058
2023-03-17 13:18:38 +09:00
Zuul
d9240327d4 Merge "Expose executor_thread_pool_size" 2023-03-13 21:10:52 +00:00
Zuul
ebdb481364 Merge "Allow unwinding nova DB manage cron jobs" 2023-03-13 10:05:39 +00:00
Zuul
d4e7d3797d Merge "Remove TripleO job" 2023-03-13 08:26:05 +00:00