Commit Graph

132 Commits

Author SHA1 Message Date
ricolin 6ac304d752 Support uWSGI for API server
Currently Nova API server still using eventlet-based HTTP servers,
it is generally considered more performant and flexible to run them
using a generic HTTP server that supports WSGI.

Change-Id: I489557181bb8becbaf5cf7d9812a671d5cb3cc4a
2024-03-05 16:19:36 +08:00
hailu 846ea09f24 feat: create 'vms' pool when 'conf.ceph.enabled = true'
Change-Id: I95a19d5a52ac88585d0f53a5349977e7c28ca361
2024-01-11 10:00:48 +08:00
hailu 91bea58ee0 feat: getting LISTEN IP for CIDR
`CIDR` is easier to manage than `interface` on clusters with different hardware.

Change-Id: I1266eb37c1355b95f23efd33856a79f259020017
2023-12-29 15:16:25 +08:00
Ritchie, Frank (fr801x) 488481c332 Ability to add extra commands for service cleaner
This PS makes to possible to add extra commands to the nova service
cleaner job if needed.

Change-Id: Ic1dee3e15a5b56712128142e054e0ca2813944bf
2023-11-08 15:53:20 -05:00
Ritchie, Frank (fr801x) e44c4749b4 Ability to define extra commands for cell setup
This PS makes to possible to add extra commands to the nova cell setup
job if needed.

Change-Id: I3b1f4e2ee58e60d3d830772cbb57c115dd712824
2023-11-06 16:16:39 -05:00
Thales Elero Cervi 7189e6c916 Nova: Add IP addresses search control flag
Add options to nova to enable/disable the use of:
1. The vnc or spice server proxyclient address found by the console
   compute init container
2. The my_ip hypervisor address found by compute init container
3. The libvirt live_migration_inbound_addr used by nova compute to
   live-migrate instances

These options can be used to prevent cases where the found addresses
overwrite what has already been defined in nova.conf by per host nova
compute DaemonSet overrides.
It is important to allow the flexibility of using or not the default
ConfigMap - DaemonSet cluster level configuration, allowing the
possibility of having custom per host overrides definitions that will
not be overwrite by nova-compute-init.sh

One use case (live-migration) for this flexibility is the following:
Originally the nova-compute-init.sh script received the capability of
selection a target interface (by name, in a ConfigMap level) through
which the live-migration traffic should be handled [1], allowing the
possibility of selecting a separate network to handle live-migration
traffic. This was not assuming any interface/network IP if users did not
set .Values.conf.libvirt.live_migration_interface.
Later [2], same script was updated to fall-back to default gateway IP
resolution in case the live_migration_interface is not defined.
So, currently it is mandatory to define a "cluster level config" for the
interface name (i.e., through ConfigMap) or to rely on default gateway
IP resolution for live-migration addresses.
This can be problematic for use cases were:
* There are many networks defined for the cluster and a host default
  gateway might not resolve to the desired network IP;
* There is the need of having a per host definition of nova.conf, since
  nova-compute-init.sh will create a new .conf that will overwrite it.

[1] commit 31be86079d
[2] commit 8f0a154138

Change-Id: Iaf86e0a215802001f58d607a1a3a18acf83f5e81
Signed-off-by: Thales Elero Cervi <thaleselero.cervi@windriver.com>
Signed-off-by: Robert Church <robert.church@windriver.com>
2023-09-25 15:49:46 -03:00
Sadegh Hayeri 5aa17f74d8 Fix VNC configs
Change-Id: Ib169ca0dff1a32a055c62a1bd9e9c1636a7f6634
2023-09-01 01:03:40 +03:00
okozachenko bd955f077f Update health probe script in nova
If we define ovsdb_connection in os_vif_ovs config group, health
probe fails for nova-compute because of the wrong condition to
detect db connection string from configuration file.
This patch detects db connection string using string.startswith()
in a more strict way.

Change-Id: I12a3ea4061d5c13879b878b85eb206726b5db27c
2023-09-01 01:29:38 +10:00
Ali Safari 818b067071 Fix nova ssh keys permission
Change-Id: Ic7a2c8b5fb3ea530eba965a75122044da59713f8
2023-08-29 21:41:37 +03:00
az7961 5ef1d54607 Ensure that the script handles cases where the PID file exists but is empty or does not contain the expected data structure.
Change-Id: I4301a6cbea0688369c735d4751c741106b3fe7ab
2023-07-06 14:20:57 -05:00
moontaek-rho 969e3f7871 title: Update oslo_messaging_RPCClient
oslo_messaging.RPCClient is currently deprecated.
Configure health probe to use get_rpc_client if get_rpc_client is
available

story: 2010766
task: 48076
Change-Id: I0795e6e099b935ead8d6d3d22722999b852749d0
2023-05-25 19:40:04 +09:00
moontaek-rho b6cbbf38a9 title: Update get_notification_transport
If the transport_url of nova's oslo messaging notification and the default transport_url value are different, timeout occurs when oslo_messaging.RPCClient.call is executed because of the part written in oslo_messaging.get_notification_transport.
This change moves the health probe to use get_rpc_transport instead.

story: 2010766
task: 48074
Change-Id: Ia6a2b9ce500e8806f76882b28f4d9cca440b6e1a
2023-05-24 03:26:09 +00:00
liyingjun f90fa9ea9e fix(nova): missing privilege separation directory for nova ssh
nova-compute-ssh failed to start with error "Missing privilege
separation directory: /run/sshd" when nova ssh is enabled.

Change-Id: I4fa25a56f191aae6b4fa9efce508723d7c256c8c
2023-04-24 02:05:53 +00:00
Mohammed Naser 8f0a154138 fix(nova): add default live_migration_inbound_addr
At the moment, if live_migration_inbound_addr is not defined it
will default to the hostname of the hypervisor which requires
DNS in order to work properly.

DNS can be complicated and it is possible that an environment
might not have it, so it makes sense to default to grabbing the
default route interface to do live migrations over in order
to allow live migrations when DNS is not setup.

Change-Id: I10eb63fc64d7cd34ef89df529637b1e81951e38c
2023-03-30 13:31:41 -04:00
Mohammed Naser d77e5389f0 fix: vnc access
The VNC port option was changed long ago..

Let's catch up.

Change-Id: I9f45c7102422af20f03f95fa30271d51df6d72ee
2023-03-24 14:37:11 -04:00
zhen 5598b7d6c4 Add missing configration [vnv]/novncproxy_host
[vnv]/novncproxy_host is necessary for novncproxy to binding to
specfied ip address.

Change-Id: Ib2a79e0901e9e31da37b162661f3491362378e87
2022-07-08 18:00:12 +08:00
Gage Hugo d1b72aa35e Remove nova-placement from nova chart
nova-placement has been removed as of train, since we
do not support openstack releases before train, it
is no longer needed. This change removes nova-placement
from the nova chart and all the overrides, as well as
changes the compute-kit scripts to always deploy
the placement chart.

Change-Id: Ic8649371fe9e954806cbe4bf11c589fb58c7a88d
2022-04-07 14:50:29 -05:00
Gage Hugo f3de6d808a Remove consoleauth in nova
Nova consoleauth was removes several releases ago and most of our
overrides were specifically needing to disable it in order to
deploy. Since it is no longer in nova, this change removes the
nova consoleauth support from the nova chart.

Change-Id: I0a27265330156a11f6049e9beaaa14a38d8a4a93
2022-03-26 18:49:30 -05:00
Gage Hugo b09f5c0bf0 Update oslo messaging get_transport
oslo_messaging.get_transport is currently deprecated. This change
moves the health prove to use get_notification_transport instead.

Change-Id: Iea7c914b41dec70b36ebe93fa8ce91e00894f50e
2022-02-28 02:04:15 +00:00
Anderson, Craig (ca846m) d514395d81 Improve health probe logging for nova and neutron
1. Log specific compute services failing rabbitMQ socket tests in nova
   health probe
2. Log specific compute services failing Database socket tests in nova
   health probe
3. Make log level configurable for nova and neutron health probes

Change-Id: I5e5d909d598af734596eb1732ae42808c1f6cd12
2022-02-22 10:05:15 +00:00
Thiago Brito c63b1920d5 Fix nova-compute-ssh init to execute as runAsUser
On _ssh-init.sh.tpl, despite one change the runAsUser for the
nova-compute container on the securityContext, the ssh keys are always
being copied into the 'nova' user's folder. This change fixes it by
getting the correct user defined on the securityContext and copying the
keys to its correct folder.

Signed-off-by: Thiago Brito <thiago.brito@windriver.com>
Change-Id: Ia7883dc4626a295892eb4637ef717b0b1725ac89
2022-01-12 17:32:12 -03:00
Huy Tran 1d7f880c42 Add check for number of computes in cell-setup-init script
This PS further enhances [1] to handle case where present
computes are up, but the number of present computes is not
equal to total number of expected computes.

[1] https://review.opendev.org/c/openstack/openstack-helm/+/815086

Change-Id: Idb2a7aeb202fe29fc528ba0dde987e7e0ee65a95
2021-11-03 11:09:02 -05:00
Huy Tran 6b785b16dc Add option to extend the wait for cell-setup-init
In some deployement environments, nova compute processes took a bit
longer to register on all hosts, and vm/server is instantiated almost
immediately before the process is registered on remaining hosts.
This PS enhances the cell-setup-init script to enable option to
extend the wait before performing discover hosts.

Change-Id: Ie9867e64c554d4f39fdc7432823a1869f0b4a520
2021-10-26 19:03:48 +00:00
Gupta, Sangeet (sg774j) a772a30f07 nova: Update script to true of grep does get anything.
Change-Id: I54addea00b4ab91d8fe4925f88cacd582888a7f3
2021-10-06 14:02:45 +00:00
Gupta, Sangeet (sg774j) b75545d0c6 nova: Define service cleaner sleep time
This makes the service cleaner sleep time if any service is down
provisionable.

Change-Id: If55a22c4f22ff0a48767dae3d57aca6c3c8cccac
2021-10-05 14:34:13 +00:00
Gupta, Sangeet (sg774j) 0c80a415bf nova: Give service time to restore
nova-service-cleaner job deletes the service which are down. If the
database is down, the service will go down as well. When database comes
back up, all the services starts to come back to up status. If the
nova-service-cleaner is run in this interim time, the service that
were down gets deleted. These would have come up if the job had not
run. Adding sleep to this job to give service time to come back up
if recovering. The sleep is set to 2 times the report_interval.

Change-Id: Ia292d19508e9449ccb40d1100b1d56b1283e5d53
2021-10-05 05:10:39 +00:00
xuxant02@gmail.com e4fffb30e5 Fix for before option in archive_deleted_rows
Script fails with too many arguments when provided command like "$(date -d 'now - 2 days')" as the value for --before option. Addition of quotes fix the issue.

Change-Id: I0639d8aea368988976d5990c42e960de44844f61
2021-09-21 11:42:24 +05:45
DeJaeger, Darren (dd118r) 9a8a476d9f Nova bootstrap job efficiency
This PS attempts to make the Nova bootstrap job a little speedier.
It's been noticed that flavor check/creation on initial deployment
are rather slow, so this backgrounds the creation of each flavor,
so that the defined flavors can be checked/create in parallel,
rather than one at a time. Waits for the jobs to finish at the end.

Change-Id: Ib9ab345e5aee697a41414e927910335dd286072f
2021-08-02 21:19:30 -04:00
Andrii Ostapenko 3ac3caa013 Add support for Victoria and Wallaby
Defines compute kit and cinder jobs for new releases with
corresponding values overrides.

Disables compute agent list test for Wallaby since related API
is removed [0].

Since Wallaby with switch of osc to sdk '--id auto' is no longer
treated specially in 'openstack flavor create'. The same behavior
can be achieved w/o specifying --id flag for flavor creation [1].

Starting Wallaby 'nova-manage api_db version' returns init version
for empty database greater than 0 [2]. _db-sync.sh.tpl logic prior to
this commit does not work due to this. We need to either remove
(done in current commit) or justify and alter previous logic.

[0] https://review.opendev.org/749309
[1] https://review.opendev.org/750151
[2] https://opendev.org/openstack/nova/src/branch/stable/wallaby/nova/db/sqlalchemy/migration.py#L32

Change-Id: I361431d9aa8c1a06c5d59f479fb161ecd87e2ee2
Signed-off-by: Andrii Ostapenko <andrii.ostapenko@att.com>
2021-08-02 15:46:07 +00:00
xuxant02@gmail.com c050456bdb Fix for the values in archive_delete_rows script
There was a mistake in the script for the archive_delete_rows cron for
rendering the values from the values files. Fix for taking the values
from the values file for --max-rows and --before options when enabled
using the values.yaml file.

Change-Id: Ib63920c497bbf9ac74e41bdfd0b2e580b95bebb0
2021-07-02 19:12:04 +05:45
xuxant02@gmail.com f3d361d2f7 Added cronjob for nova which will be cleaning the databases.
Script has been created with archve_deleted_rows which will run as
cronjob to move the deleted rows from production table to shadow table.

Change-Id: I1cd3e523301b1aaeb3366288d128e23aae5e0780
2021-06-24 15:49:35 +05:45
zhen 5bb9b20112 Replace deprecated configuration
``[vnc]/vncserver_proxyclient_address`` was deprecated, so we replace it with ``server_proxyclient_address``

Change-Id: I142710ffab2aa407a09318e4b8517938ed28f3c8
2021-05-27 10:05:34 +08:00
Tin f5a70102b2 fix(perm): fixes template permission
Some nova gotpl files have +x permission. This changes it so they are
consistent with the other gotpl files.

Change-Id: Ifcd4c1032b41363ea8b1d43407315d68d7e9eec8
Signed-off-by: Tin <tin@irrational.io>
2021-05-17 11:26:01 -05:00
Karl Kloppenborg d2e2d58a5f Add ISCSI Multipath support when enable_iscsi true
When using iscsi in both cinder and nova multipath tooling access is not
currently available. This commit provides the host system access to
configure and control multipath.
This commit has been tested in our own production systems however this
is my first commit into Openstack-Helm so please review carefully and
provide me guidance on what I might be able to do better.

Change-Id: I4f017f67a5d80b9c931e2ee1653062aa503a7fd9
2021-04-12 08:28:56 +00:00
Mohammed Naser fdd6b4507d Use first IP address for interface
It is possible than an interface has multiple IP addresses, for
simplicity of this change, use the first one so that the service
can start.

We can look later into improving it to accept some sort of index
for the IP address.

Change-Id: Ie856f54331d689a51bfd6de45db5820b765797ef
2021-03-10 15:47:24 -05:00
okozachenko 74b119db35 Add nova-compute-ssh
Change-Id: Ia555bb69182441d5f17040504efc7d1d524e59ec
2020-09-25 17:39:05 +03:00
Gupta, Sangeet (sg774j) 94642833dd [nova] fix cell0 database connection
This patchset sets/updates the Database Connection for cell0 to
correct value in the database.

Change-Id: I4d445023691b748a7de0d256433bd17c7958cc04
2020-08-13 20:55:40 +00:00
Tin Lam 918a307427 feat(tls): add tls support to openstack services
This patch set enables TLS for the following OpenStack services: keystone,
horizon, glance, cinder, heat, nova, placement and neutron for s- (stein)
and t- (train) release. This serves as a consolidation and clean up patch
for the following patches:

[0] https://review.opendev.org/#/c/733291
[1] https://review.opendev.org/#/c/735202
[2] https://review.opendev.org/#/c/733962
[3] https://review.opendev.org/#/c/733404
[4] https://review.opendev.org/#/c/734896

This also addresses comments mentioned in previous patches.

Co-authored-by: Gage Hugo <gagehugo@gmail.com>
Co-authored-by: sgupta <sg774j@att.com>

Depends-on: https://review.opendev.org/#/c/737194/

Change-Id: Id34ace54298660b4b151522916e929a29f5731be
Signed-off-by: Tin Lam <tin@irrational.io>
2020-07-10 09:36:31 -05:00
Zuul 1fb8310770 Merge "Fix wrong parameter reference" 2020-06-09 19:36:21 +00:00
Zuul 8c073c5767 Merge "[nova] Unhardcode readiness/liveness probe timings" 2020-06-03 07:36:07 +00:00
zhen ceac208357 Fix wrong parameter reference
There is a reference error in the parameter "client_interface" in the "_
nova-console-compute-init.sh.tpl" file, now fix it.

Change-Id: I0b1bdd348e1f424afda9aa2183c0e876afd12968
2020-05-30 16:58:00 +08:00
Gage Hugo db79e79788 Remove OSH Authors copyright
The current copyright refers to a non-existent group
"openstack helm authors" with often out-of-date references that
are confusing when adding a new file to the repo.

This change removes all references to this copyright by the
non-existent group and any blank lines underneath.

Change-Id: Ia035037e000f1bf95202fc07b8cd1ad0fc019094
2020-04-03 20:53:32 +00:00
Oleksii Grudev af4e2aaadd [nova] Unhardcode readiness/liveness probe timings
This patch adds ability to unhardcode readiness/
liveness probes timings. Moreover it introduces
RPC_PROBE_TIMEOUT and RPC_PROBE_RETRIES variables
which are passed to health probe script and
allow to unhardcode RPCtest  timeout and number of
retries

Change-Id: I2498a14e97557feafbd45c8df3c683f8500026e6
2020-04-01 14:54:57 +03:00
Sangeet Gupta 214feefd13 Nova: Update compute start script for console
[0] added route command to identify multiple default routes.
In some deployments, route command is not available which set the
client_interface value incorrectly. In this case VNC clinet tries
to connect to default host 127.0.0.1 and fails.

[0] https://review.opendev.org/#/c/696187

Change-Id: I4a936af053114988e0b70048e276a71833c5638e
2020-03-26 11:44:14 -05:00
Huang, Sophie (sh879n) 8a7b7ba086 Enable Cinder backends to use iSCSI for data traffic
In this patchset, the iSCSI protocol support is added
to enable Cinder to use iSCSI based storage backends.

Bootable volumes are not supported, only VM attached
volumes are supported for this initial patchset.

Change-Id: I1b35290b62d2cebae4bd8be62126a53f230ac6c0
2020-03-16 14:23:23 +00:00
Tin Lam 2aa32665b4 Add train release support
This patch set adds in job to test the OpenStack train releases.

Depends-On: https://review.opendev.org/#/c/706456/
Change-Id: I89fef1264f68dab7e921a9e5503c29d6a051f342
Signed-off-by: Tin Lam <tin@irrational.io>
2020-02-28 20:19:58 +00:00
Sangeet Gupta 414b10fab0 Fix health-probe concurrency and timings
Changed Nova and Neutron health-probe script to exit if previous
probe process is still running.
The health-probe has RPC call timeout of 60 seconds and has 2
retries. In worst case scenario the probe process can run a little
over 180 seconds. Changing the periodSeconds so that probe starts
after previous one is complete. Also changing timeoutSeconds value
a little to give little more extra time for the probe to finish.
Increasing the liveness probe periods as they are not do critical
which will reduce the resource usage for the probes.

Co-authored-by: Randeep Jalli <rj2083@att.com>

Change-Id: Ife1c381d663c1e271a5099bdc6d0dfefb00d8d73
2020-02-18 17:24:23 +00:00
Oleksii Grudev d467d685a3 Fix health probe for several conductor workers
It was observed that when increasing amount of
conductor workers from default "1" to higher value
the readiness probe fails to check rabbitmq connections
for conductor processes - it happens since the script is trying
to obtain rabbitmq connections for parent conductor process
which in case of workers>1 doesn`t open rabbit connections
but spawns child processes which handle rabbitmq
connections instead.
This patch removes the "check-all-pids" option, keeps the logic
but simplifies and fastens he code - instead of checking all
processes when "check-all-pids" option was set (however
regardless of "sock_count value" if only one process opens connection
the check returns positive result) processes will be checked one-by-one
until the first one with open rabbitmq connection(s) is
found.

Change-Id: I72be0bbdefcba77a55b6ceed6e192c9621c069eb
2020-01-31 10:43:06 +00:00
Tin Lam bf434ffd67 Add capability for using FQDN in nova compute
This patch set adds in a capability for the user to defaultly use a
FQDN for the nova compute hostname and the hypervisor hostname when
the host is not explicitly specified in the .Values.conf override.

Change-Id: I3243068dfe91ebb97b3885002296a0f454822ec5
Co-authored-by: Drew Walters <andrew.walters@att.com>
Signed-off-by: Tin Lam <tin@irrational.io>
2020-01-01 20:01:25 +00:00
sungil 620286117b Improve accuracy for version detection on nova
Because it's almost time for expiring on some python version, OpenStack client
running on that version generates some messages for warning. Two scripts on
nova Fixed by this PS get version information using the OpenStack client
without any protection for this kinds of messages. This PS gives a little
more sophisticated way of it.

Change-Id: I2896c76e012b9acbf1e725276ba9c0b74789fa54
2020-01-01 01:11:05 +00:00