2928f95e1ad70ff914deefcf2c66b6b49125a89e
Commit Graph

323 Commits

Author SHA1 Message Date
Zuul
2928f95e1a Merge "Fix linters and metadata" 2023年08月14日 11:19:50 +00:00
Dmitriy Rabotyagov
9b9bc21121 Fix linters and metadata
With update of ansible-lint to version >=6.0.0 a lot of new
linters were added, that enabled by default. In order to comply
with linter rules we're applying changes to the role.
With that we also update metdata to reflect current state.
Depends-On: https://review.opendev.org/c/openstack/ansible-role-systemd_service/+/888223
Change-Id: I730ae569f199fc8542a5a61beb149f459465d7e2
2023年07月17日 16:17:30 +02:00
Damian Dabrowski
7000bc3f3f Deprecate nova_ram_weight_multiplier
Long time ago a variable `nova_ram_weight_multiplier` was implemented
and its default value was set to 5.0.
There are 2 issues with this:
1. Default value in nova is 1.0 [1] so our value is much bigger than
nova's default without having a strong reason for that.
2. OSA does not provide similar variables for other multipliers like
`cpu_weight_multiplier`.
Because there are a couple of different multipliers and more of them
can be implemented in the future(for ex.
`hypervisor_version_weight_multiplier` was implemented in 2023.2) it
would be hard for the OSA project to maintain variables for all of them.
It is better to deprecate `nova_ram_weight_multiplier` and let users
define multipliers with `nova_nova_conf_overrides` if necessary.
[1] https://docs.openstack.org/nova/2023.1/configuration/config.html#filter_scheduler.ram_weight_multiplier
Change-Id: I4f82840e94312d38696e3ddd05ef494821233f4d
2023年07月11日 21:35:41 +02:00
Dmitriy Rabotyagov
efe64725e1 Add way to periodically trim Nova DB
We're adding 2 services that are responsible for executing db purge and
archive_deleted_rows. Services will be deployed by default, but left
stopped/disabled. This way we allow deployers to enable/disable
feature by changing value of nova_archive/purge_deleted.
Otherwise, when variables set to true once, setting them to false won't
lead to stopoing of DB trimming and that would need to be done manualy.
Change-Id: I9f110f663fae71f5f3c01c6d09e6d1302d517466
2023年05月18日 08:11:02 +00:00
Zuul
dd00e710d7 Merge "Add TLS support to nova API backends" 2023年05月03日 14:57:07 +00:00
Damian Dabrowski
e02e56fc93 Add TLS support to nova API backends
By overriding the variable `nova_backend_ssl: True` HTTPS will
be enabled, disabling HTTP support on the nova backend api.
The ansible-role-pki is used to generate the required TLS
certificates if this functionality is enabled.
`nova_pki_console_certificates` are used to encrypt:
- traffic between console proxy and compute hosts
`nova_pki_certificates` are used to encrypt:
- traffic between haproxy and its backends(including console proxy)
It would be complex to use nova_pki_console_certificates to encrypt
traffic between haproxy and console proxy because they don't have valid
key_usage for that and changing key_usage would require to manually set
`pki_regen_cert` for existing environments.
Certs securing traffic between haproxy and console proxy are provided in
execstarts because otherwise they would have to be defined in nova.conf
that may be shared with nova-api(which stands behind uwsgi and should
not use TLS).
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/879085
Change-Id: Ibff3bf0b5eedc87c221bbb1b5976b12972fda608
2023年04月29日 18:49:39 +02:00
Dmitriy Rabotyagov
b6e904213e Remove nova_network_services mapping
At the moment we don't really utilize neutron_provider_networks
mapping except of 2 quite specific drivers, that are NSX and Nuage.
For these 2 usecases we suggest using overrides functionality instead.
Change-Id: I7d905a1dbda1ec722b161b96742247c806bed162
2023年04月04日 13:17:03 +00:00
Dmitriy Rabotyagov
0e59a29947 Remove use_forwarded_for definition for nova-api
use_forwarded_for option for api has been deprecated since 26.0.0
as this feature is the duplicate of the HTTPProxyToWSGI that
has being enabled by default now.
Change-Id: I45e70e42605455df944ced63f106a76f351052e8
2023年04月04日 13:32:05 +02:00
Dmitriy Rabotyagov
6dfcf9d4c8 Remove calico driver reference
Calico driver support has been removed from OpenStack-Ansible
starting in Antelope release [1]. We clean-up nove role to drop calico
support from it as well.
[1] https://review.opendev.org/c/openstack/openstack-ansible/+/866119
Change-Id: Ie9c118b8bab265e5bf06b6ec05731cd673ee4d95
2023年04月04日 13:27:03 +02:00
Jonathan Rosser
b0fcbce66f Support configuration of resource providers with config files
Resource providers can be configured using the API or CLI, or they
can also be configured on a per-compute node basis using config
files stored in /etc/nova/provider_config.
This patch adds support for a user defined list of provider config
files to be created on the compute nodes. This can be specified in
user_variables or perhaps more usefully in group_vars/host_vars.
A typical use case would be describing the resources made available
as a result of GPU or other hardware installed in a compute node.
Change-Id: I13d70a1030b1173b1bc051f00323e6fb0781872b
2023年01月16日 15:16:29 +00:00
Zuul
ab92656a36 Merge "Add nova_ironic_serialconsole_type default setting" 2022年12月06日 21:28:44 +00:00
Zuul
43f9881a0b Merge "Improve way of cache backend selection" 2022年10月31日 14:13:31 +00:00
Jonathan Rosser
91ef7e41d3 Add nova_ironic_serialconsole_type default setting
This variable determines if one of the nova console proxies is
deployed alongside the nova-compute service for ironic. Currently
the only supported values are "disabled" and "serialconsole"
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/860947
Change-Id: I8eae97f9c60956049072de8b04e557671a8cdcfa
2022年10月11日 14:29:31 +01:00
Jonathan Rosser
f8dd01ebdc Clarify nova serial proxy bind address
This should be nova_management_address which by default is
equivalent to ansible_host, but the use of ansible_host is confusing
when the whole of the rest of os_nova uses nova_managment_address
for the address to bind services to.
Change-Id: Ie34acf0115d8e89e2888952e1c2d3dc03a284aff
2022年10月06日 17:38:02 +01:00
Dmitriy Rabotyagov
242ebe2b54 Improve way of cache backend selection
At the moment we don't provide any option rather then use memcached
backend. With that we also hardocde list of packages that should be
installed inside virtualenv for selected backend.
Adding bmemcached requirement to oslo_cache.memcache_pool [1] gives us
opportunity to refactor this bit of deployment and allow to be more
flexible in backend selection and requirements installation for it.
[1] https://review.opendev.org/c/openstack/oslo.cache/+/854628
Change-Id: I48e193ef29e56aa8639511c5b5dcddc70f5e1198
2022年10月06日 16:01:22 +00:00
Dmitriy Rabotyagov
611722ffd7 Remove AvailabilityZoneFilter from scheduler
The 'AvailabilityZoneFilter' is deprecated since the 24.0.0 (Xena)
release. The feature is enabled by query_placement_for_availability_zone
config option and is now enabled by default.
Change-Id: I6be16f7621899a45271a70e7c39d76b837d8c5c9
2022年06月17日 08:03:30 +02:00
Dmitriy Rabotyagov
c36fdaa960 Support service tokens
Implement support for service_tokens. For that we convert
role_name to be a list along with renaming corresponding variable.
Additionally service_type is defined now for keystone_authtoken which
enables to validate tokens with restricted access rules
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/845690
Change-Id: I04b22722b32b6dc8b1dc95e18c3fe96ad17e51ac
2022年06月15日 11:08:48 +02:00
Jonathan Rosser
7a4a35fa7d Ensure that openstack_ssh_keyspairs_dir has a default value
This is otherwise undefined in functional tests
Change-Id: I5a387566d5bdb9ee4c34976c55f86f31fc65f87e
2022年05月04日 07:57:01 +01:00
Zuul
9b3081fccf Merge "Implement nova direct RBD image retrieve" 2022年04月26日 13:14:04 +00:00
Jonathan Rosser
e2fc7361cf Use ssh_keypairs role to generate cold migration ssh keys
This uses ssh signed certificates so there is no longer the need
to distribute the nova public key from each compute host to all
other compute hosts.
The legacy scripts and authorized key files are removed as a
migration step.
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/825292
Change-Id: I3456bdf7bed66a2675b8a410d4cf6b2174598a22
2022年04月11日 15:29:15 +00:00
Dmitriy Rabotyagov
3a68118d9b Implement nova direct RBD image retrieve
When nova don't use rbd images (ie local storage) it still might be good
idea to use direct connection to rbd to get images rather then
connect through HTTP.
Change-Id: I4f2d7cf54e07376c7a25d45093f5d83be5422234
2022年03月21日 17:29:41 +00:00
Andrew Bonney
b1e38084cc Add configuration option for heartbeat_in_pthread
This configuration option has been observed to result in file
descriptor leaks in certain circumstances. A variable is added
here so that it can be easily overridden.
Change-Id: I7de034307da9352e6f5d1f5f175a330fb8c86463
Related-Bug: #1961603 
2022年03月15日 10:53:42 +00:00
Zuul
559eb382b1 Merge "Drop nova_glance_api_servers variable" 2022年02月15日 18:37:04 +00:00
Dmitriy Rabotyagov
5846e4d0b1 Remove secure_proxy_ssl_header logic
According to nova doc, secure_proxy_ssl_header has been deprecated and
has no effect [1]. Since these variables are not used for other purpose
we drop them.
[1] https://docs.openstack.org/nova/latest/configuration/config.html#oslo_middleware.secure_proxy_ssl_header
Change-Id: Ibc3ac4f0f3fb038463748f8c1608fa475374cf67
2022年02月09日 09:41:55 +02:00
Dmitriy Rabotyagov
6775f57c75 Drop nova_glance_api_servers variable
Since api_servers from [glance] secton is deprecated and can be
silently ignored [1], we drop corresponsive OSA variable
[1] https://docs.openstack.org/nova/latest/configuration/config.html#glance.api_servers
Change-Id: I52de65a4629f23fd2c0c3735033a8e2d57a82024
2022年02月09日 08:55:17 +02:00
Zuul
b9dea9e4a0 Merge "Enable recursion in combine() filter" 2022年01月12日 11:55:12 +00:00
Damian Dabrowski
0a0776df36 Enable recursion in combine() filter
Ansible's combine() filter needs recursive=True parameter in order to recursively merge nested hashes.
https: //docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#combining-hashes-dictionaries
Change-Id: I2e84c0370c04336c124e5b6549b638483f107601
2022年01月11日 19:22:26 +01:00
Andrew Bonney
7a33271509 Revert "Disable shell for nova when tunneled migration not used"
This reverts commit ca352be75b.
Change-Id: I19e1cc491e2441ab8d1bd39d383dd2e09a5b7077
2022年01月07日 11:20:04 +00:00
Dmitriy Rabotyagov
ca352be75b Disable shell for nova when tunneled migration not used
Change-Id: If4d036794cf8edb14e6b0ed491cf0de78f425b2c
2021年12月23日 16:37:44 +02:00
Zuul
6015ee227c Merge "Database connection pooling improvements" 2021年12月02日 15:48:47 +00:00
Damian Dabrowski
fcd582731b Database connection pooling improvements
- Implemented new variable ``connection_recycle_time`` responsible for SQLAlchemy's connection recycling
- Set new default values for db pooling variables which are inherited from the global ones.
Change-Id: Ibc876f2744c271e9c4ad797597c15af8d73867c1
2021年12月01日 22:04:50 +01:00
Zuul
9200186888 Merge "Refactor definition of lock path" 2021年12月01日 19:51:06 +00:00
Dmitriy Rabotyagov
93ef742841 Refactor definition of lock path
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/819300
Depends-On: https://review.opendev.org/c/openstack/ansible-role-systemd_service/+/819298
Change-Id: If5622f736e17f0f187a0740d60ea435d03a131bb
2021年11月30日 12:18:27 +02:00
Dmitriy Rabotyagov
b0a26dbd7d Fix certificates group permissions
Change-Id: I6fded616989ccae02d9d34efb68543336f87f848
2021年11月30日 10:51:38 +02:00
Zuul
e9f3c79832 Merge "Allow to provide mdev addresses as list" 2021年11月16日 17:51:29 +00:00
Zuul
db6e446bc7 Merge "Enable TLS for VNC from novncproxy to compute hosts" 2021年11月15日 12:37:45 +00:00
Dmitriy Rabotyagov
ab3bbd50d5 Allow to provide mdev addresses as list
With new Ampere GPUs you need to explicitly define explicit lists of PCI
devices which length depends on picked type as placement can't pick them
automatically due to nvidia driver brokeness.
In order to have readable representation of the variable it's worth
to make it iterable but keep a simple string for
backwards compatability.
Change-Id: I2a1e85efc8ad4f6a2596e6d53b1d793b2f934758
2021年11月12日 13:02:06 +02:00
Zuul
d62950ac51 Merge "Enable TLS for live migrations" 2021年11月12日 00:49:13 +00:00
Zuul
14c229ad94 Merge "Rename nova_enabled_vgpu_types" 2021年11月11日 22:30:23 +00:00
James Gibson
2b8d5a0b88 Enable TLS for VNC from novncproxy to compute hosts
To secure communications from the proxy server to the compute
nodes using VeNCrypt authentication scheme.
In a previous patch a TLS server certificate was deployed to
compute nodes, this patch makes use of this same server cert for
securing VNC sessions on compute nodes. It is recommended that
this certificate be issued by a dedicated certificate authority
solely for the VNC service, as libvirt does not currently have a
mechanism to restrict what certificates can be presented by the
proxy server. This has not been implemented to reduce complexity.
In addition the noVNC proxy needs to present a client certificate
so only approved VNC proxy servers can connect to the Compute nodes.
The PKI role has been used to create a client certificate for the
nova console nodes.
Related Nova docs:
https://docs.openstack.org/nova/latest/admin/remote-console-access.html
To help with the transition from from unencrypted VNC to VeNCrypt,
initially compute nodes auth scheme allows for both encrypted and
unencrypted sessions using the variable `nova_vencrypt_auth_scheme`, this
will be removed in future releases.
Change-Id: Iafb788f80fd401c6ce6e4576bafd06c92431bd65
2021年11月11日 14:23:27 +00:00
James Gibson
ad8bda5f64 Enable TLS for live migrations
Instead of using SSH to live migrate VM's use TLS as this is more
secure and SSH migrations are deprecated.
https://docs.openstack.org/nova/xena/admin/secure-live-migration-with-qemu-native-tls.html
A pre-existing PKI (Public Key Infrastruture) setup is required.
TLS live migrations require that all compute hosts can communcate
with each other on port 16514 and port range 49152 to 49261.
To enable TLS live migrations, both libvirt and QEMU require server
and client certificates, the server certicicates is used to verify
servers and the client cert is used by servers to authenticate
clients. A single cert is created by the pki role, that can be
used by both libvirt and QEMU for both client and server auth.
The client, server and CA certifcates need to installed in a
number of locations on each compute host:
* For Libvirt https://libvirt.org/tlscerts.html
* For QEMU https://github.com/libvirt/libvirt/blob/master/src/qemu/qemu.conf
Depends-On: https://review.opendev.org/c/openstack/ansible-role-pki/+/815007
Depends-On: https://review.opendev.org/c/openstack/ansible-role-pki/+/815849
Depends-On: https://review.opendev.org/c/openstack/ansible-role-pki/+/816857
Change-Id: Iddbe8764bb6d3cd3eaee122b2d5ddc02fa3f7662
2021年11月09日 09:11:24 +00:00
Dmitriy Rabotyagov
af44f385d7 Rename nova_enabled_vgpu_types
In order to reflect upstream nova variable change [1] we rename
nova_enabled_vgpu_types to nova_enabled_mdev_types.
[1] https://docs.openstack.org/nova/latest/configuration/config.html#devices.enabled_mdev_types
Change-Id: I7fcc6f6fbfd8e6e358036e72a82348b9cefe74ef
2021年11月03日 13:49:25 +02:00
Dmitriy Rabotyagov
aa05a3fa93 Refactor galera_use_ssl behaviour
With PKI role in place in most cases you don't need to explicitly
provide path to the CA file because PKI role ensures that CA is trusted
by the system overall. In the meanwhile in PyMySQL [1] you must either
provide CA file or cert/key or enable verify.
Since current behaviour is to provide path to the custom CA we expect
certificate being trusted overall. Thus we enable cert verification when
galera_use_ssl is True.
[1] 78f0cf99e5/pymysql/connections.py (L267)
Change-Id: I99509b519c91d8fefc91745bb982866fe3fbc8e7
2021年09月20日 18:02:48 +03:00
Gaudenz Steinlin
9244767bcd Use version from repo_packages for SPICE HTML5
Use the version pinned in repo_packages/nova_consoles.yml in
openstack-ansible to install the SPICE HTML5 client. Without this change
the version pin in openstack-ansible has no effect and the role always
installs master.
This is the same change as already done for the noVNC console in commit
1de7b24e70.
Change-Id: Ie004f845138a23095f6e02138401511054975a01
2021年06月17日 16:50:50 +02:00
Jonathan Rosser
1a358f5dc2 Add galera port to nova config and database template
This always existed as a default value but was only used for service
setup, never in the runtime db connection url. Update the URL and
database connection template to include the port.
Change-Id: Ie404c117146c6bbd7eea79300f7c85515fa4e27d
2021年06月11日 10:29:43 +00:00
Dmitriy Rabotyagov
4e88bdb7da Don't rely on compute_hosts existance
There might be scenarios when compute_hosts group is not present, but
we still need to deploy nova scheduler.
So we have to set default for groups['compute_hosts'].
Change-Id: I18d42e902b0b3eb5494bcffb424731dfe85c74f9
2021年06月01日 14:59:47 +03:00
Damian Dabrowski
56fdbfe0d8 Dynamically compute nova_scheduler_host_subset_size value
Having this variable set to 10 might be a very bad option for small environments. From the other side, switching back to nova default value(1) also has another disadvantages. I think the best option is to add some logic here and compute a proper value based on number of compute nodes
Change-Id: I073875d380b14771cff434620553eada5068a430
2021年05月31日 21:14:30 +00:00
Jonathan Rosser
5a60846262 Add variables for rabbitmq ssl configuration
Change-Id: Ibe24bf754bd56d6e518b93f05f47d163454e169d
2021年05月13日 14:47:16 +00:00
Zuul
07715e344a Merge "Remove nova console variables" 2021年04月19日 10:51:07 +00:00
Zuul
c2688515a8 Merge "Re-add nova_dhcp_domain variable" 2021年04月19日 10:36:44 +00:00