Commit Graph

164 Commits

Author SHA1 Message Date
Dan Smith 36c8d242f8 Increase cinder verify sync timeout
This is occasionally failing with a timeout. It has been for months,
but it seems like the frequency has increased lately.

Change-Id: Ib1270e4f5bada8680a5d19133a888a8ade8f73c3
Closes-Bug: #2039707
2023-10-19 11:41:31 -07:00
Julia Kreger d8294440e7 [ironic] Add an instance wait setting for nova resources
In troubleshooting grenade failures in ironic,
we've observed a sporatic failure causing the
ironic-grenade job to fail upwards of 20-40%
of the time where it seems cirros, due to the
boot sequencing and interfaces, is not
online for networking until after sixty seconds
have passed. In one case 83 seconds before the
networking was fully online.

In consulting with neutron contributors, a random
job check seems to reveal that even with pure VM
workloads, it takes on average 35 seconds into the
ping check. As such, it seems reasonable to make
the setting configurable so ironic-grenade can
execute with an increased timeout more appropriate
to the job settings and test environment.

Adds a INSTANCE_WAIT variable, which defaults to
the prior setting which was static, 60 seconds.

Change-Id: Ie5acf1ad7f8dca39db07f7e61035a8916439004d
2023-04-05 10:56:41 -07:00
Dan Smith 8fdda79453 Generate SSH key locally for cinder resources
Nova has deprecated the server-side keypair generation process, which
is used by cinder's resource create phase in grenade. Even though it
still works for old microversions, it generates RSA keys which will
not be accepted (by default) in newer distros. This makes us generate
the keypair locally and upgrade the public key instead of generating
it server-side.

Change-Id: I0275a44f2ec4977b085b8129fd06e80a0ed6e68d
2023-03-01 11:17:00 -08:00
yatinkarel 3f9fe2e8fc Bump ping timeout to 60 seconds
The jobs fails intermittently on ping check
with current timeout of 30 seconds.

The testvm can take time to boot and have network
ready on slow systems and using qemu hypervisor
and lead to ping timeout.

With [1] included noticed it taking more than 40 seconds
to boot testvm, so bumping timeout to 60 seconds will
help in such cases.

[1] https://review.opendev.org/c/openstack/grenade/+/874417

Related-Bug: #1463631
Related-Bug: #2007357
Change-Id: Ibdd030e126d508e6ff24cde180c611ada7f24cb3
2023-02-23 12:39:48 +05:30
Zuul c7a6dff51d Merge "Remove lib/neutron-legacy leftovers" 2023-01-04 17:29:49 +00:00
Rodolfo Alonso Hernandez 7c3144ce84 Update the rootwrap config when upgrading Neutron
As reported in the related bug, the rootwrap filters are not updated
between versions. This patch calls the devstack method that setups
the Neutron rootwrap configuration and filters.

Closes-Bug: #1999235
Change-Id: Iaebf1b33ccf3bfd64191f9a898408bcfe11dd557
2022-12-21 17:10:42 +00:00
Sławek Kapłoński 94814b7425 Remove lib/neutron-legacy leftovers
In [1] we finally got rid of the unfinished lib/neutron module and kept
only lib/neutron-legacy. It's renamed to lib/neutron now and it's the
only neutron related module in Devstack.
So this patch removes leftovers related to the old lib/neutron-legacy.

[1] https://review.opendev.org/c/openstack/devstack/+/865014

Change-Id: I2a856b15eda992f0e78ee8eff65f39646e24c936
2022-12-20 11:15:47 +01:00
yatinkarel b4c6851ceb Skip stop of ovn services
Grenade jobs stop services, check fip connectivity
for a nova server and then upgrade to next release.

But since ovn data plane and db services are stopped along
with other services, fip connectivity fails as a result.

We shouldn't stop these services along with other
neutron services. This patch sets "SKIP_STOP_OVN" to True
to skip stop of ovn services.

This fixes ovn grenade jobs.

Depends-On: https://review.opendev.org/c/openstack/devstack/+/839362
Change-Id: I2bd3f7e5f0af9a6532db7a1cdb4bc45a963042ca
2022-06-02 10:08:06 +05:30
Ghanshyam Mann e10ac41b71 Remove sourcing of userrc_early
Devstack has stopped creating the userrc_early in yoga
and also fixed the start_swift function to stopm relying
on userrc_early.

- https://review.opendev.org/c/openstack/devstack/+/780417

It start failing when grenade started upgrade testing from
stable/yoga to master.

- https://review.opendev.org/c/openstack/grenade/+/835232

Change-Id: I6caaac9d84e4f3925378f496acd06fc38bb0d2d8
2022-03-28 22:46:11 -05:00
Dan Smith bf235cd904 Enable nova workaround for upgrade bug
Nova recently introduced an issue that breaks FFU due to requiring
new compute service records to be recorded before control services are
allowed to start. However the former depends on the latter, which
creates an unsatisfiable circular dependency. Since this has been
both released and backported, Nova introduced a workaround config flag
specifically to get out of that loop, which we set here if needed.

Related-Bug: #1958883
Change-Id: If4820dd4ec7e05ade6eb4a82a328797102704570
Depends-On: https://review.opendev.org/c/openstack/nova/+/826097
2022-02-21 14:14:46 -08:00
Rajat Dhasmana d61a95325b Unblock Gate: create encryption type with right params
Recently we added a check in cinder for cipher algorithm[1]
Currently grenade is not passing cipher when creating an
encrypted type, hence grenade job is failing in glance and cinder gate.
This patch addresses the same by passing the cipher and other
properties.

[1] https://review.opendev.org/c/openstack/cinder/+/800268

Closes-Bug: #1938763

Change-Id: I1eb352deca11916f4db1010a50d15a83e33a61bb
2021-08-03 08:01:08 +00:00
Brian Rosmaita e3cf221066 Use Block Storage API v3
The openstackclient has defaulted to using the v3 API since 4.0.0 [0],
so there is no reason for grenade to insist on using v2, especially since
v2 is being removed in Xena [1].

[0] a96089ff6d
[1] https://review.opendev.org/c/openstack/cinder/+/792299

Change-Id: Ie558d45374f92f79942b80a9c27fd393ad4f4761
2021-05-20 09:50:55 -04:00
Zuul 703926636d Merge "Remove the old release upgrade extra scripts" 2021-05-05 22:31:08 +00:00
Ghanshyam Mann f94c0ae3e2 Remove the old release upgrade extra scripts
Grenade does not support the fast forward upgrade so old release
wise script are not in use in current grenade support.

from-* script in current grenade will only be run via from-$BASE_DEVSTACK_BRANCH
- 1a1f58a69e/inc/upgrade (L92)

and BASE_DEVSTACK_BRANCH will be wallaby for current master grenade or
immediate previous release which means we do not need to keep the older
releases upgrade extra scripts.

Ditto for within-* script.

Change-Id: I66b021f03faa38f976243b7f194454360def215f
2021-05-04 11:46:46 -05:00
Martin Kopec af1b4bf7d6 Remove neutron workaround for mitaka and newton
Remove condition for checking if BASE_DEVSTACK_DIR/lib/neutron
exists which was introduced ~5 years ago.
Based on the comment it looks like it can be deleted.

Change-Id: Ice9a709ad75bb5794aebed379fb35f78f0b3422f
2021-04-27 15:07:20 +00:00
Anand Bhat 41364698b2 References to review.openstack.org are replaced with review.opendev.org
Closes-Bug: #1832367
Change-Id: If38096aedac5c528a4feb5f70992afa4e13d6f67
2021-04-26 19:58:41 +00:00
Luigi Toscano 9c729d15fc Switch the grenade job to focal
Victoria only supports focal, so the upgrade from victoria
(starting from victoria+1) should use focal.

This patch should not be backported to victoria, because the
upgrades from ussuri still need to use bionic.

In order to make it work on focal:
- do not fail if ebtables does not contain the broute table
  (which happens when it is based on nft);
- when the swift loopback image is remounted on upgrade,
  do not use the nobarrier option, which was removed
  with the 4.19 kernel. See also the corresponding change
  in devstack: I6871a7765e3e04122d8d546f43d36bb8415383fc

Change-Id: If57c54828baf4e250ad08fdd95351490010e1b41
2021-03-12 15:13:48 +01:00
Lee Yarwood 0e92ea75ee cinder: Wait for encrypted volume to be deleted before removing type
Cinder volume deletion is async and can take time to complete in the
c-vol backend *after* c-api has already returned to the caller.

As such we need to wait until encrypted volumes are deleted fully before
attempting to delete the associated encrypted volume type as this
request will fail when the volume is still being deleted by c-vol.

This change adds a simple waiter to ensure the volume is removed before
removing the type.

Change-Id: I466763ae9fc5a7ad13b498d43b0c16802c1b800b
Closes-Bug: #1907157
2020-12-21 10:56:39 +00:00
Luigi Toscano 290ebb4220 Fix horizon upgrade: remove screen_stop call
The screen_stop function was removed some time ago together
with the screen support (I8c27182f60b0f5310b3a8bf5feb02beb7ffbb26a)

This does probably mean no proper horizon/grenade testing has been
done in the past 3 years...

Change-Id: I389e2a4f8135e0e22a70098b95c17457cbedf1cf
2020-08-23 16:49:53 +00:00
Zuul 80f64b92d3 Merge "Run placement db online_data_migrations before starting placement-api" 2020-04-27 02:23:05 +00:00
Zuul c0ca9bfafc Merge "Remove an obsolete upgrade rule for Neutron" 2020-04-27 01:51:02 +00:00
Matt Riedemann cc012730f7 Run placement db online_data_migrations before starting placement-api
This runs the online data migrations for placement after upgrading
to new code and synchronizing the DB schema.

Change-Id: I91e7a7e451b5756722eef20ed4ee61f2d35c2fd6
2020-04-18 13:00:45 +00:00
Lee Yarwood 1a08c4416d cinder: Add encrypted volumes resources
This change adds some basic coverage for attaching and detaching an
encrypted LUKS volume during an upgrade. To keep things readable a new
_wait_for_volume_update utility function is introduced and called
throughout the cinder tests when waiting for a volume to switch state or
to become bootable.

Change-Id: I894ef91a1e38775b1b56feb84612c7661046b4ba
2020-01-25 14:38:27 +00:00
Zuul 43462cabdb Merge "Always source lib/apache when lib/tls is used" 2019-12-17 23:08:33 +00:00
Jens Harbott fad62595bf Stop hardcoding to use Cinder API v1
Starting with train, Cinder API v1 is no longer deployed, so we should
no longer hardcode it's use.

Change-Id: I31513b5d18ac1fdbf58d932d1ef132675a019e28
2019-10-08 08:35:57 +00:00
Chris Dent bb14e02a46 Upgrade placement independent of nova
Until now we haven't needed this because placement was being upgraded
as part of nova and placement was not requiring a db sync to upgrade.

Now it does, so an upgrade.sh is added to 15_placement, based on
keystone's (which is simpler than nova's), and the repeated parts
in nova's upgrade.sh are removed. a settings file is also added

Change-Id: I5354a6b32b73c613018bbe17f0691c69f7839b5f
Needed-By: https://review.opendev.org/669170
2019-09-02 20:20:19 +01:00
Clark Boylan 1fa49abbc8 Capture console logs from failed server create
In the cinder resource creation we have been timing out ssh connection
tests to the test server. Unfortunately all of the existing logs I can
find indicate that this server is fine. Lets dump the console log to see
if that gives us any more info when ssh connectivity times out.

Change-Id: Ife397941deab80658fff375846a690a46a0c8b02
2019-07-31 15:04:48 -07:00
Luigi Toscano 7a20a63b67 Remove an obsolete upgrade rule for Neutron
No need anymore to forcibly install the python-qpid package,
at least since ~Icehouse.

Change-Id: I91fb3e42c7bee0f9eff470d64bdef52d3dbcf6e0
2019-03-04 21:41:14 +01:00
Luigi Toscano db110f17a2 Always source lib/apache when lib/tls is used
When tls-proxy is enabled, few functions in lib/tls relies on lib/apache
functions (restart_apache_server, stop_apache_server, enable_apache_site,
enable_apache_mod).
It is thus necessary to source lib/apache whenever lib/tls is used.

Change-Id: Ia9ffdc490d0cba04a084d572312e177b19791585
2019-02-18 12:10:25 +01:00
Zuul 9fe075e0bb Merge "Create config file before database migrate" 2018-12-18 03:26:31 +00:00
Tetsuro Nakamura f78a588f68 Create config file before database migrate
In the from-rocky placement extraction script, this patch reverses
the order to migrate the database and to create the placement.conf.

This is because ``[placement_database]/connection`` should be set
before the database migration shell script is executed if we want
to stamp the database version within the shell script.

Needed-By: https://review.openstack.org/621733
Change-Id: I8fe401814f887c8b29f1c6262d8b9e5263a07bcc
2018-12-17 14:24:06 +00:00
Zuul 00ad9a8968 Merge "Update the URL in upgrade.sh" 2018-12-14 06:10:49 +00:00
Matt Riedemann 2f03ec23fd Wait for volume to be available before attaching it
On slower test nodes we're seeing failures where the
2nd cinder volume created is not yet available by the
time we try to attach it to a server which fails with
a 400 InvalidVolume error. This fixes the bug by waiting
for the volume to be available before trying to attach it.

Change-Id: I833d79ecc97ddc844bf156ab64477c7c77424f20
Closes-Bug: #1807520
2018-12-08 13:26:56 -05:00
Chris Dent 674861b787 Re-install python-openstackclient after swift
When running grenade under python3, swift runs under python2.  Swift
includes openstack client in its requirements so when it installs under
Python 2 it clobbers the existing openstack client at /usr/local/bin and
any previously installed plugins are wiped out because their entry
points aren't seen. This was discovered because the osc-placement
commands were not available to nova inventory verification commands
during the nova upgrade, which comes after swift.

To address this, we do a reinstall at the end of swift's upgrade.
Because python-openstack client is in ENABLED_PYTHON3_PACKAGES,
it will install as Python3 when installed standalone.

Note that the issue being fixed here is python3 specific, not
OpenStack release specific.

Closes-Bug: 1805156
Change-Id: If23619885a4766e243b39eae6041efe4a4d0a3af
2018-11-26 15:04:30 +00:00
Matt Riedemann 8afd7beb07 Use openstack resource provider inventory show to get inventory
Under python3, the output of the openstack resource provider
inventory list command is random which breaks how the
_get_inventory_value function is used to store and verify
inventory before and after the upgrade.

This change uses the "openstack resource provider inventory show"
command to target the specific resource class and column value (total)
so we don't have to worry about sort order.

While in here, a comment is left about why we can't do the
same for getting the resource class allocation value.

Change-Id: I1e8dadae631bee87628c5b5390609deb8a1a71e5
Closes-Bug: #1803312
2018-11-14 04:20:12 -05:00
Matt Riedemann 1b44f2eeab Add upgrade script for separate placement from nova
This adds the main upgrade steps for placement extraction
from nova in stein. A from-rocky script is added which will
run after openstack/placement is cloned/installed by devstack
but before services are started on the stein side of the
grenade run.

If the CI infrastructure (devstack-gate/zuul) does not clone the
openstack/placement repo then we need to do it ourselves.

Note that until devstack is actually new enough to configure
the extracted placement repo from change
https://review.openstack.org/#/c/600162/ this upgrade
script will noop and we'll continue to deploy and use placement
from nova. This is needed since we have a catch-22 dependency
with that devstack change which can't land without this grenade
change.

The script will copy the placement-related tables from the
nova_api database and put them into the placement database,
which is also created by the upgrade script.

Then, it will write out the placement config file along
with the placement database connection so the placement
service can start on the stein (new) side.

Finally, it will write out the uwsgi config for placement,
and disable nova-placement-api apache site in favor of
placement-api.

Co-Authored-By: Chris Dent <cdent@anticdent.org>

Change-Id: Ia0f19debb442be2b3d04eae238a3d7287393b5eb
2018-11-07 10:32:55 -05:00
Dmitry Tantsur 20c38c929a nova: do not verify standard resource classes when using ironic
Starting with the Stein series, the ironic virt driver no longer exposes
the standard VCPU/MEMORY/DISK resource classes. If for any reason the
inventory for them is created on the Rocky side of grenade, the verification
phase fails after upgrading to Stein. This breaks ironic-inspector CI.

This patch updates the logic to check for a custom resource class.

Change-Id: I265046d1615a34f55836264ea8f6ce72d32391cf
2018-10-08 18:04:22 +02:00
melissaml 4cfe69208d Update the URL in upgrade.sh
Change-Id: I9545a8cffc6713850efe777b19018420505e1bc2
2018-09-23 22:39:47 +08:00
Matt Riedemann f695fa32e0 Fix member role usage for postgresql
Change I3da3530aa73a8a1500116bcefdcba7b947d5e05e in devstack
renamed the "Member" role to "member" which is OK for MySQL
which is case insensitive by default, but not postgresql which
is case sensitive by default. This change fixes the role name
usage in grenade and also removes the reference to the invalid
bug against keystone.

Change-Id: I3e24581c5c77e07edc7c867296e066f40acbbc29
Closes-Bug: #1792983
2018-09-17 12:44:40 -04:00
Matt Riedemann 67aa2195f2 Drop NOVA_CONFIGURE_CELLSV2 variable
Cells v2 has been required for nova since Ocata
so we can drop the conditional logic on the
NOVA_CONFIGURE_CELLSV2 variable, set by the (now branch-specific)
neutron-grenade job. The only remaining check for
the variable is in the from-mitaka script (which might
be irrelevant at this point given mitaka and newton
are both end of life).

Change-Id: Ic3101ef5f82b3341772a591669ff96bf9ab72ab6
2018-09-12 14:09:17 -04:00
Dan Smith 0b1a8e3c8d Save and verify allocation and inventory values for nova/placement
This makes the nova resources module save information about the host
inventory (first node only), as well as the allocation information
about the test instance before the upgrade. Afterwards in the
verify phase, we compare those values to the current ones to make
sure we have not lost or changed anything during the upgrade.

Change-Id: Ifef2acf7dce17d0fa21baac9da6f8403e69136a4
2018-08-29 14:38:52 -07:00
Surya Seetharaman dc7f4a4ba5 Do the api_db sync before db sync
This patch swaps the order of doing api_db sync with db_sync.
The API database migration should be run before the migrations for
the main/cell databases. This is because the former contains
information about how to find and connect to the latter.

This was discovered in Rocky since we added a data model change
(a new column to the cell_mappings table) that depends on db sync
being run after having added this new column to the api_db (i.e running
api_db sync before db sync). The data model change was the first time
where the actual sync order became meaningful.

This has been correctly done in devstack and the fact that grenade was
doing the db sync before api_db sync was hidden by the fact that
devstack had run at least once before reaching this part of grenade,
which meant that the database was already initialized.

Change-Id: Ic790ef7c3531c2b672621310524797548246b2ef
Closes-Bug: #1761775
2018-04-06 16:05:03 +00:00
Matt Riedemann fce6befbb5 Stop using openstack server remove floating ip
The openstack server remove floating ip CLI no longer works
with python-novaclient 10.0.0 directly because novaclient
removed it's deprecated API bindings for updating a floating
IP to unset it's associated port.

We need to fix python-openstackclient, deprecate that CLI and
eventually remove it, but at the same time, we can get ahead of
that deprecation and change to the 'floating ip unset --port' CLI.

Change-Id: I63d69bc2b96df04777f00f32930e92564e33e8c2
Closes-Bug: #1745795
2018-01-27 21:18:16 -05:00
Chris Dent b7dbc632b6 Shutdown placement at the end of the base run
Placement API was not being shutdown at the end of the OLD target,
thus when it was being started at the beginning of the NEW target it
was not actually getting new code. A call to stop_placement is added.

In addition, make sure placement is installed in upgrade.sh so that
any new stuff is in place.

The depends-on is to a devstack change which makes sure that
lib/placement does not call remove_uwsgi_config when stop_placement is
called. Without this, there's no config file for the
devstack@placement-api systemd unit to run, and there is an immediate
exit.

Change-Id: I7f2158aeaef82a47e11c6e29675e542023fff4be
Depends-On: Iee763adf7895145d97b184924896db3f1f48a015
Closes-Bug: #1736385
2017-12-05 23:50:00 +00:00
Matthew Treinish 03de9e0fc7
Ensure we use uwsgi for everything
In the pike release we migrated everything to use uwsgi. There is no
need to force everything back to eventlet. This was necessary when pike
was master because in ocata we used eventlet. We don't want to switch
deployment mechanisms in an upgrade. But now that pike is base we don't
need to have any of these since everything is consistent on both sides
of the upgrade.

Depends-On: I066f5f87ff22d7da2e3814f8c2de75f2af625d2b
Change-Id: Ib504ab21dfc5e32eb3f73f57d636981963e20520
2017-09-05 17:58:25 -04:00
Jenkins d225945275 Merge "Get grenade working for ocata->pike and pike->master" 2017-08-16 21:35:57 +00:00
Jenkins e6367a7977 Merge "Do not fail when saving databases" 2017-08-16 21:35:45 +00:00
Davanum Srinivas eeed61bcff Get grenade working for ocata->pike and pike->master
* Stop nova-conductor explicitly if it is still running
  (also filed a devstack specific change in
  I9ffd6d09df6f390a842b8a374097f144564d2db4)
* Run keystone, cinder, nova etc under mod_wsgi as we run
  into problems with uwsgi (need to fix those but not
  right now during the release process)
* Make sure we use singleconductor as grenade we don't yet
  support multiple rabbitmq(s) in the multinode scenario
* Hack to pass through some of the variables from above
  to the additional node before it runs stack.sh as
  the defaults won't work (superconductor etc)

Depends-On: I075eb5a88113acfa36519e2c6e2aab87836be065
Depends-On: I9ffd6d09df6f390a842b8a374097f144564d2db4
Change-Id: If4c82ca12fe7b8b1ca7cfd8181d24dbd8dad3baa
2017-08-16 11:38:11 -04:00
Matthew Treinish ee538d1e7c
Remove ensure logs check in upgrade scripts
This commit removes the ensure_logs_exist call in all the upgrade
scripts. This function currently only works in a non-systemd world. Now
that all the logs go in the journal we can't check for separate log
files anymore. In the future we'll modifiy the function to handle
systemd and the journal properly, but for right now this is to unblock
things.

Change-Id: Iedf824a1772115e0dff287a898636f8e58471269
2017-08-14 17:09:37 -04:00
Davanum Srinivas 377780e774 Do not fail when saving databases
Nova now has multiple databases, let's add them to the list
nova-api nova_cell0 nova_cell1

Since it's hard to detect which set of databases are present,
we should disable bailing out when trying to save these.

Change-Id: I075eb5a88113acfa36519e2c6e2aab87836be065
2017-08-12 17:36:01 -04:00