27 Commits

Author SHA1 Message Date
Julia Kreger
f58cbf1514 Fix ironic-status db index check
When I merged the db status check in for database indexes, I missed
the most improtant line, which is where the object is populated with
the method name to be executed by the upgrade checks framework.

In the rush to try and clean-up after the impact of the Secure RBAC
work, I just didn't manually test the final file I uploaded into
review. I assumed it just worked because the job passed, but didn't
think about the resulting return codes which we *should* experience
on an upgrade from a prior version. Later on, I noticed that because
of the way the status checks are invoked, I also added the code to
do the index check in the wrong order, so I had to restructure things
so the method definition was known by the object on the class which
holds the method names list.

I guess I copied/pasted this over from another file I was testing
in just didn't run the final file. :( Funny enough, the index check
works like a charm now.

Also updates the status check invocation check in the upgrade script
for grenade, *as* warnings *are* permissible and not fatal.

Change-Id: Ifa9da65dc8df5bf9a369d6faeab310386dfd944a
2021-06-10 07:04:15 -07:00
Iury Gregory Melo Ferreira
1f0174bb41 Native zuulv3 grenade multinode multitenant
Based on the native 'grenade-multinode' job

Change-Id: I4d0a23c371bc42c5bf18e79ea7920bd77b066154
2020-09-16 23:33:42 +02:00
Julia Kreger
b44eb6f34b Fix bash comparisons for grenade multinode switch
It seems, however variables are getting set with grenade
in native zuulv3 jobs, the environment variables are no
longer comparing as they once did in standard bash jobs.

What worked previously, was [ "$VAR" == 'value' ], however
when comparing the newer grenade node jobs we see things like
[[ subnode != \s\u\b\n\o\d\e ]] returning true when single
quotes are used.

Comparison in the logs to where double quotes were used for
functionally the same comparision, revealed proper processing
and execution as expected.

As such, changing our single quotes to double quotes where
applicable.

For the record, I also quickly checked codesearch and it looks
like we were the only project to use single quotes for this
comparison.

Change-Id: I2db2e870e2c5f32aa061af025ee7ce12c4f7c049
2020-02-04 14:09:44 -08:00
Ruby Loo
33383c9c73 Add check for object versions
Adds a check for compatibility of the object versions (in the DB)
with the release of ironic. This check is used by the
'ironic-status upgrade check' command.

The ironic-status command is added to devstack and grenade (when
upgrading).

Change-Id: I2043dc01856106d50356637db327a2817db90366
Story: 2004990
Task: 29459
2019-02-20 17:24:42 +00:00
Derek Higgins
eabc48a901 Switch grenade nic driver to e1000
As of 988243c93fb87190e1867ef913136ecf139e7cb8 in ipxe
"[virtio] Add virtio-net 1.0 support", VMs don't attempt
to boot over the network when using the virtio-net rom.
The ipxe-qemu package used in the grenade jobs contains
this problem. Switch to e1000 to avoid baremetal VMs
working on some hosts and not others.

Change-Id: I4ec297281380896ffe9004c4de7117586ded7149
Story: #2003808
Task: #26603
2018-09-24 15:50:19 +01:00
Derek Higgins
1ba142a05f Restore the nova-api redirect
This was disabled when grenade switched to using rocky
as its base install as it didn't work with wsgi. Restore it
using a version that compatable with WSGI.

Task: #26604
Story: 2003808
Change-Id: I968339b48191df46a44f45c1794478aa0d1039f6
2018-09-24 10:08:29 +01:00
Derek Higgins
9b9f31cc69 Fix grenade tests
Downgrade ipxe-qemu during grenade job
Temporary workaround while we find the problem with the
newer ipxe-qemu package.
Task: #26553

Switch grenade job to wsgi
Now that grenade is using Rocky as its base we
can switch to WSGI for ir-api. Also now required
for CI as IRONIC_USE_WSGI was getting flipflopped
from False -> True -> False during the grenade job.
Task: #26594

Disable the ironic-api redirect as it doesn't work with wsgi
Task: #26595

Increase the keystone token timeout, for grenade jobs only
Task: #26596

Story: #2003808
Change-Id: Icc380e6e5128f15f90b3a86cb773e7bb8d60d076
Depends-On: Ib7d68d1360e3cdbfdc2ff185a9760461e75ac8c4
2018-09-21 13:41:49 +00:00
Vasyl Saienko
e5b7aa2033 Test ironic-dbsync online_data_migrations
Run ironic-dbsync online_data_migrations on single node grenade
right after usual dbsync.
Do not set pin_relase_version for single node grenade as we
do cold upgrade and it is not required.

Related-Bug: 1526283
Related-Bug: 1502887
Change-Id: I2e331252aeb66376c2d6cc3c16b6de0aefca5434
2017-08-28 15:46:56 +00:00
Vasyl Saienko
6128bce5d7 Do not restart n-cpu during upgrade
As we do not upgrade nova on multinode grenade, there is no need to
restart it. This way we avoid breaking n-cpu service, as new
dependencies are installed and they may not work with old code.

Change-Id: Id0c13704654d43a663458b9c099a1a0477c746a6
2017-08-18 14:43:08 +00:00
Vladyslav Drok
72395ad46f Remove ensure_logs_exist check during upgrade
We now run services under systemd, and this check is not necessary in
this case. Follow-up to commit ee538d1e7c1a92cb8412713e03cdfbcdacad7fab
to grenade.

Change-Id: I84ca621f0200838c04e267101848dc7ca16a5cfe
2017-08-16 10:51:27 +00:00
Vladyslav Drok
c4d9159463 Remove setting custom http_timeout in grenade
The fix to the bug this was trying to work around has merged to
neutron.

Change-Id: Ib89a9a61f84923db6463e97d5fd8f9580173b3df
2017-08-11 19:52:00 +03:00
Vladyslav Drok
8302a364b1 Don't use multicell setup for ironic & increase timeout
The reschedule, that happens in multinode jobs quite often, does not
work with multicell setup. Don't use multicell setup for our Ironic
jobs.

Increase the http timeout for clients in order to work around neutron
issue.

Change-Id: I2bbdac5cd431e72517cb1c72bb925660ec8e868b
2017-07-28 09:55:09 -07:00
Hironori Shiina
b0608771e5 Set nomulticell flag for starting nova-compute in grenade
This patch set nomulitcell flag when starting nova-compute because
multi-cell rabbit setup is not necessary in Grenade. This nomulticell
flag will be introduced with I08d7da843d18b426dda8a8a231039d950a4c0ce5.

Closes-Bug: 1700548
Change-Id: Ib55f6359751052d41b46e31ec8e15f46e33c1193
2017-07-06 14:38:22 +00:00
Vasyl Saienko
fdf6f89a23 [Grenade]: Do not run ir-api on primary node after upgrade
Ironic upgrade process has pre-requirement that ironic-conductors
should be upgraded before ironic-api. Grenade is launched on primary
node, where we have ir-api and ir-cond runnning. Do not start ir-api
on primary node after upgrade to avoid situation when we have new ir-api
(primary) and old ir-cond (subnode) as it is not allowed by upgrade
procedure. Instead redirect all requests destinied to ir-api on primary
node to subnode.

Depends-On: I026121121059768aa74389add7eee6e63fdb214d

Change-Id: I9e496353a1d3d6547e4881f96fb187e488cff83f
2017-04-28 13:59:07 +03:00
Vasyl Saienko
7a2f99bacc Run db_sync after upgrade
It may confuse that we running dbsync before upgrade project.
Fix dbsync position.

Change-Id: Icaee1fd1f0d4ccbdef2f391b581894c92d80b58e
2017-04-25 14:14:40 +00:00
Vasyl Saienko
716e22b712 Set env variables when all needed files are source
This patch moves 'source ..openrc admin admin' after we sourced keystone
variables.

Closes-Bug: #1684797

Change-Id: Ic3477c768373c993087d5c6a90dbd7131b4f9f50
2017-04-20 17:19:01 +00:00
anascko
5d22cfe1a8 Add wsgi handling to ironic-api in devstack
Adds handling of running ironic API under Apache as WSGI app to
devstack plugin.

New variable IRONIC_USE_MOD_WSGI (False by default) is added.
Another new variable IRONIC_WSGI_DIR (default is distro specific) is
also added, which specifies location for WSGI scripts.

Change-Id: I9c5ad56e1acd292ff0f9cc9b460125fc420abda5
Closes-Bug: #1513005
2017-03-09 16:55:34 +02:00
anascko
ef4bd99c2f Adds network check in upgrade phase in devstack
When running grenade with multitenancy, we are able to boot instances
in the network neutron has created in its upgrade phase, and we don't
have to change that setup.

Change-Id: I1038548ad4f93788fca3e2b7dd8ed93da0ce7702
2017-02-07 11:28:46 +02:00
Vasyl Saienko
3cbe7202b7 Cleanup adding Ironic to cluster on upgrade case
Grenade is designed to upgrade services. We shouldn't add them during
upgrade. This patch removes case when we trying to add Ironic to cluster
on upgrade.

Change-Id: Id7159aac8c8a343e3d20561cedc4722d87d3e776
2016-12-01 13:42:16 +02:00
Vasyl Saienko
c81b385843 Do not source old/localrc twise in grenade
By sourcing localrc second time we try to enable ironic plugin
one more time witch is not allowed by [0]

This patch checks if ironic was enabled or not in base environment
without sourcing localrc.

[0] https://review.openstack.org/#/c/396794/

Change-Id: I432c243c66c0d11adcf4c6568968fbeaaf9acdcd
2016-11-30 11:35:02 +02:00
Vasyl Saienko
c1e0fece35 Fix grenade jobs
This changes up devstack code to make sure OVS does the right thing
after upgrading. After the neutron upgrade, it uses a new OVS tag for
networking, so this changes things over to the new one.

Make sure that we remove all resources that were created during
resources phase.

Set tempest fixed_network_name explicitly as it is prerequirement for
ironic, see reference.

Reference:

https://github.com/openstack/tempest/blob/039b2fe/tempest/scenario/manager.py#L1161

Change-Id: I35789602fb542bb33533211a742c3e4d265a3b91
2016-09-30 11:42:41 +00:00
Clenimar Filemon
0376efac2c Remove hard-coded keystone version from setup
Commit Id229617ec5cf2820c1033fd2c34fc160a75c46d6 recently introduced a
hard-coded identity API version in the setup script. This patch switches
the /v2.0/ to /v$IDENTITY_API_VERSION/ so we can work when v2 is
disabled as well.

Change-Id: Ib6fd666930bf45170f69d5f64ccadf617899f7c7
2016-05-30 18:59:31 -03:00
Vasyl Saienko
19703205ae Restart n-cpu after Ironic install
Ironic install initiates apache restart, it may cause nova-compute
failed to start.
This patch restart nova-compute after Ironic install for new phase.
And ensures that keystone is responding before starting n-cpu.

Related-Bug: 1537076

Change-Id: Id229617ec5cf2820c1033fd2c34fc160a75c46d6
2016-05-23 13:19:27 -07:00
Vasyl Saienko
f1d189d16a Fix start order for Ironic during upgrade
Start Ironic after upgrade to apply new version of code.

Change-Id: Ibf7f81012d9ea2bc6d8025916d984c5c7a3e46bb
2016-05-19 12:48:34 +03:00
John L. Villalovos
ca611613a8 Fix shutdown.sh & upgrade.sh for grenade
The shutdown.sh & upgrade.sh scripts were attempting to load a file
which no longer exists. Have them load the correct file.

Change-Id: I864023880062fde0e84df81b7c7a6a17c0b09428
2016-05-17 10:37:26 -07:00
Jim Rollenhagen
f047ea0f7e Fix bashate errors in grenade plugin
Fixes one bashate error in devstack/upgrade/upgrade.sh.

Change-Id: I347e39cd8055811d2ac22ed744b1d9e9f3ca37fa
2015-12-17 17:44:38 +00:00
Jim Rollenhagen
c0a72cf749 Add grenade plugin
This is a straight copy of the ironic code in grenade's tree to here.
This is necessary to drop ironic code from devstack and complete the
devstack plugin work, as well as just the right thing to do, and will
help us move faster on grenade work.

Note that I'm not sure if this will or will not, and it may make our
grenade jobs explode during the transition. However, our grenade jobs
don't work right now anyway, so nothing of value was lost. :)

Change-Id: I8b065c60e9e06cd7fc10749c49bdf79d878fcc12
2015-12-10 17:52:24 -08:00