Commit Graph

78 Commits

Author SHA1 Message Date
Jonathan Rosser 96b1a0e98c Gather /etc/pki directory
Change-Id: Ibc033f79a2ef434e1e57bd44de857c862edfd622
2022-01-04 13:06:11 +00:00
Jonathan Rosser 4eac7fd2c1 Clean up code from unsupported operating systems
Remove SUSE, Gentoo, and references to yum package manager.

Change-Id: If591661b4145219f7837960f93bc9647b60d2a70
2021-03-11 23:08:21 +00:00
Jonathan Rosser 2378e56655 Default to modern ARA for functional tests
Change-Id: Id1f8b951581f715a9cf36c7ebac1065a88f8d8cd
2020-09-30 20:35:03 +01:00
Marc Gariepy 0b59539f55 Deploy modern ara for CentOS 8 deployments
As CentOS 8 is not compatible with old ara, we installing new one isnted
Also providing py3 as default python for CentOS 8

Change-Id: I264e6f8bfa507668dada7b629af52a8a13001a45
2020-05-22 00:25:15 +03:00
Jonathan Rosser 24c59fc70b Collect log from mariadb journal
Change-Id: I98e0c9fe7897ef6d1c428b45cdafe77ecfd72444
2020-05-04 07:38:25 +01:00
Jonathan Rosser df7fed2c56 Do not compress log files before uploading
Log file compression is now not supported in the zuul log viewer.

Change-Id: I8738b28eb4f0fef314c751f67c7f361641128544
2020-03-03 21:26:21 +00:00
Dmitriy Rabotyagov 18a3067a4f Use buster jobs instead of stretch
As for U we don't support debian stretch, there is no need
in having stretch CI jobs. Buster ones should be used instead.

This also fixes ara report

Needed-by: https://review.opendev.org/706285
Change-Id: I554e512968718492ce6056b29b0612e450f0856b
2020-02-24 20:08:35 +02:00
Dmitriy Rabotyagov 11c26d2d4f Check for existance of ethtool and iproute2
It's good to check for tools before launching them. The common practise
is used in openstack-ansible/scripts/log-collect.sh

Change-Id: I2b2866bb0ba36eb658da71fe0670d39b911d90c1
2019-09-20 17:22:15 +00:00
Logan V f5d6ffd466 Use copy-links when collecting logs
--safe-links was used, which breaks openstack service collection on
the metal /etc paths, because they are symlinked into the venv like:
/etc/neutron -> ../openstack/venvs/neutron-19.1.0.dev12/etc/neutron

Instead we can use --copy-links which will resolve the symlink and
copy the data.

Note: This is a fix copied from I40905d79efa1bef9ae6a7678515fd07fde1bdd00
in the integrated repo. Since the scripts used are virtually identical
the fix must be applied here too.

Change-Id: I2cb193322cacd135214f5c3c5d0736842c458531
2019-05-16 13:12:23 -05:00
Marc Gariepy c00e3ec21d Add Manila logs to the test results
Add manila so it's easier to see what is happening on manila gate check.

Change-Id: Id15947401a7e6080f5303ca78067f91ecb2100bf
2019-03-04 10:32:47 -05:00
Matthew Thode 63dbdfe819
add Gentoo jobs as non-voting
Depends-On: https://review.openstack.org/608325
Depends-On: https://review.openstack.org/608393
Depends-On: https://review.openstack.org/633092
Depends-On: https://review.openstack.org/633093
Depends-On: https://review.openstack.org/633152
Depends-On: https://review.openstack.org/633289
Depends-On: https://review.openstack.org/633394
Depends-On: https://review.openstack.org/633385
Depends-On: https://review.openstack.org/633423
Depends-On: https://review.openstack.org/633424
Change-Id: I8ca881dc47ae26de0caee75385e302396c99bf42
2019-02-22 13:49:51 -06:00
Chandan Kumar 6223a72d18 Gather different port status on different hosts
Knowing what ports are open, it helps to debug network issues.

Change-Id: Idc777231e85d60fb794ba3905cb2fe5077b87951
2019-01-25 18:27:20 +05:30
Markos Chandras 57949bdd13 test-log-collect.sh: Verify journal consinstency before gathering logs
Change-Id: I7633d4cf4c3b8aa7e8a76710b26f2a97efad5b85
2018-11-08 17:00:26 +00:00
Markos Chandras 592cb54d3c test-log-collect: Improve rsync performance for log collection
When collecting logs we do not care about file deltas so we can use
the --whole-file option to not perform any kind of diff between the
source and the destination. The --inplace option can also improve
performance by copying files directly on the destination instead of
creating intermediate ones first.

Change-Id: I044cd2d56b9b907e5948be1d3bd11ce4a876b1a2
2018-10-26 14:01:02 +01:00
Markos Chandras 0ecb859b96 test-log-collect: Disable repositories when collecting installed pkgs on SUSE
zypper performs some network operations when collecting the list of
installed packages which slow down the overall process. We already have
the per host list of repositories so we can do some maths to figure out
where each package is coming from.

As we see below, disabling the repositories saves us ~9s.
~$ time zypper --quiet pa -i
real    0m10.607s
user    0m9.024s
sys     0m0.193s

~$ time zypper --disable-repositories pa -i
real    0m1.043s
user    0m0.833s
sys     0m0.136s

On a deployment with multiple containers, the 9s difference causes a lot
of overhead and jobs are timing out from time to time. As such, lets
just disable the repositories when collecting the list of the installed
packages.

Change-Id: I3e48dad0e213f6e24a2ceb4033b1a53873b6e298
2018-10-23 11:52:19 +01:00
Arx Cruz 83d63ccc9d Add stackviz directory to the list of find_files
This patch will add stackviz directory to be skipped to be gzipped
when collect logs

Change-Id: I08dabcf69ef70705ce5d4732195e14c5246c911a
2018-09-28 15:39:45 +02:00
Jesse Pretorius 12e3e92be1 Resolve E004 File did not end with a newline
I have no idea why this is only showing up after a merge,
but it is doing so on stable/rocky patches in the linters
(bashate) test. This patch should resolve it.

Change-Id: Ib5e34b16c4bacc459883d2be8d503d9f1b22ea0d
2018-09-08 18:55:50 +01:00
Mohammed Naser f5ffaf8ef3 Add iptables logs
Change-Id: I5304e982729bddf7003aa80496f03aed2e369d7b
2018-08-17 12:35:27 -04:00
Kevin Carter 566a764915
When archiving logs do not compress the journals
Compressing the journals breaks them making it impossible to review the
data later. This change adds anything with the suffix ".journal" to the
list of files the "find_files" function will return.

Change-Id: If521f1186797a74816b7a2d1eb8b0e501d6719e1
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-08-15 11:50:25 -05:00
Jonathan Rosser d6817fd105 Collect netplan config
Ubuntu Bionic hosts use netplan which may have configuration affecting
the host network setup.

Change-Id: If1b91df9e73f43f9c49f3637f19a5f225afccb19
2018-08-01 09:16:31 +01:00
Kevin Carter 3939092fec
Add missing services and collect journal logs
This change adds several services to the collection list which are part
of our deliverables yet we've no logging for. This change also
implements journal log collection when a given service is found which
should help folks better debug issues with various services, especially
as we transition to all journal logging.

Change-Id: Ie6f06eb5b0488005263aed397fab7dedc5a287a0
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-07-31 00:18:44 -05:00
Andy Smith e2c12f116b Add etc directory for qdrouterd role
Change-Id: Iade584d55bf88083ff0fdfb8c82b51c4976a8fb5
2018-06-21 18:17:40 +00:00
Marc Gariepy dc965c1e7f Add yum.repos.d to log collection
Change-Id: I8520aad349e49be64de162cd457a11e4eac2861a
2018-06-13 14:56:32 +00:00
Markos Chandras a6ed5f3dc6 test-log-collect.sh: Fix log collection for host
The lxc_cmd variable is being set when we collect log information for
containers but it is not unset when we do the same thing on the host. As
a result of which, the host repo and pkg logs were wrong since they were
collected from the last container instead of the host.

Change-Id: If2d0a84b46538e44f383967108ca9f67e91f5054
2018-05-08 13:45:29 +01:00
Jesse Pretorius 5181210145 Do not generate the html ARA report any more
With [1] we no longer need to generate the html report,
so in this patch we change the log collection process
in order to use the new mechanism.

[1] http://lists.openstack.org/pipermail/openstack-dev/2018-March/128902.html

Change-Id: Ic05ac14ef8bc2f67c40f6d5356edbff32f5e6c5c
2018-04-03 14:43:29 +01:00
Zuul aacb7ecf03 Merge "Archive ARA report on successful jobs" 2018-03-17 05:12:49 +00:00
Major Hayden 603660ea3b
Archive ARA report on successful jobs
This patch ensures that the ARA reports are run on successful jobs
but the results are put into a tarball. This should allow quicker
access to ARA reports without consuming lots of inodes on OpenStack's
CI infrastructure.

Change-Id: Ibb24c74d989f1a24f5f9a610b3996e359ceaeb58
Signed-off-by: Major Hayden <major@mhtx.net>
2018-03-08 13:44:39 -06:00
Markos Chandras 5922aa0525 test-log-collect.sh: Collect networkd information
The LXC containers are now using networkd to configure the network
interfaces so we should collect the appropriate files. Moreover, we
also need to collect the resolv.conf file so we know how the DNS
resolution is configured.

Change-Id: I797fb2ca013c8cc9f2c7a9871187f2a67be9276f
2018-03-06 15:11:31 +00:00
Markos Chandras fd9615fd55 Vagrantfile: Use rsync to copy working directory to VM
Depending on the VM distro the working directory can either be rsync'd
to the VM or mounted. When the directory is mounted, various artifacts
are left behind from the test execution which is not desired especially
when the directory is shared between multiple VMs for parallel testing.
As such, it's best to simply copy the directory to the VM using 'rsync'
so each VM can get its own copy. This also restores the missing new line
at the end of the test-log-collect.sh script which got removed in
I4475e4dfe13acb4c88444f1f7aa88272bf87f6ee in order to make the linters
happy.

Change-Id: I1aab7d3f0d26f35dea84ae088fe78cfd2de79366
2018-01-19 11:26:41 +00:00
tonytan4ever 6c800b5170 Skip and echo out gzip log compression error
Sometimes gzip log collection will fail because certain linked
log file are missing. This change notice those error and let the
test pass

Change-Id: I0720460dba3ec959429b577017713e1d5a209337
2018-01-02 15:40:31 -05:00
Markos Chandras d51138c3ad test-log-collect.sh: Collect the pip.conf configuration file
It's helpful to know how the glocal pip.conf configuration file is
constructed so add it to the list of files we collect at the end of
each job.

Change-Id: I70e2b9b20c3a92c436f37c086476c41b97ab3a55
2017-12-14 15:09:55 +00:00
tonytan4ever f9e3d0c478 Force gzip compression when file has a lot of links
gzip during log collection sometimes fails because there are too
many levels of links in log directory. This change use gzip --force
flag to make it work in this scenario.

Change-Id: Ifa121fe56a6bdc7376b5a79800eae0f4d3f6b4f0
2017-12-13 21:04:16 -05:00
Zuul 20689140e0 Merge "test-log-collect.sh: Collect package and repo information from containers" 2017-12-11 18:44:49 +00:00
Zuul 0511133506 Merge "test-log-collect.sh: Collect all environment variables" 2017-12-11 16:20:48 +00:00
Markos Chandras 3af2bae44e test-log-collect.sh: Collect package and repo information from containers
We record installed packages and enabled repositories for the host but
we also need to collect such information for the containers since this
is where the infrastructure and OpenStack services are running.

Change-Id: I009cbfbc87a0b8b6cf3013b3fae41343876810fd
2017-12-08 17:22:12 +00:00
Kevin Carter f0f9f32975
Skip failures when collecting nic setups
The ethtool command can fail when run against some devices in some
configurations. This change simply makes the test collections pass
no matter the interface configuration.

Change-Id: I4475e4dfe13acb4c88444f1f7aa88272bf87f6ee
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2017-12-07 15:21:02 -06:00
Markos Chandras 255c8759b8 test-log-collect.sh: Use sudo to check container's root directory
Regular users can't check whether /proc/$CONTAINER_PID/root exist
since it's normally only accessible by root so run the test command
using 'sudo'

Change-Id: I95997b697f85a223d22b1d0a5ad2b6237193fb89
2017-12-06 16:30:21 +00:00
Markos Chandras db570376ec test-log-collect.sh: Collect all environment variables
We export many variables throughout the CI jobs so it's helpful to
collect them all as part of the job results.

Change-Id: Ic12bb7efa6e841108d56a9368917157c4e104c77
2017-12-05 15:22:57 +00:00
Jean-Philippe Evrard ee78d526ae Only use ethtool if present
Else this would issue an error in gates, during the log step.

Change-Id: I55b310e6def8873ed5739f5f5176b867bc89443d
2017-12-03 00:47:55 +00:00
Kevin Carter b2a1f4e879
Gather more logs when running tests
This change updates our log collection script so that it is once again
grabbing logs from services and containers but this time far more
conservatively.

Depends-On: I3c1b755e4bed6a209c127258b79d3ef557caf19e
Change-Id: Ifae67fa3bb3dd790f806bc73de5068f0998cb4e6
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2017-11-30 12:55:50 -06:00
Zuul 6fcb784c58 Merge "Always generate ARA subunit results" 2017-11-27 17:14:53 +00:00
Markos Chandras 43abd60d16 test-log-collect.sh: Collect package and repository info on Ubuntu
The script supports collecting information for packages and
repositories for openSUSE and CentOS but not for Ubuntu so add the
appropriate commands for it. This also fixes some indentation issues.

Change-Id: I9a2eca110cdf6d1186c867b5bb632ba48580f070
2017-11-24 16:22:48 +00:00
Jesse Pretorius 2fb00b67ed Always generate ARA subunit results
We'd like to see our tests results show up in OpenStack Health
regardless of whether the test passed or failed. This patch
makes sure that it will always try to generate them.

It also implements a routine to try and find where ARA is
installed, because it's not always in a tox venv called
'functional' which was the previously hard-coded location.

Change-Id: I3d967567af9d9c9583f34c89789a38e60717781e
2017-11-24 16:03:23 +00:00
Jesse Pretorius 01df38d8c8 Resolve bashate E004 error
Change-Id: I43002840b61e0031a5e05a01f1603014bdf99110
2017-11-06 12:54:14 +00:00
Jesse Pretorius 05d3ff4f5a Consolidate run & post playbooks for all tests
When zuul executes jobs it adds all the post plays together
and executes them in the inherited sequence. This is causing
some confusion in our cross-repo testing where the logs are
trying to be collected twice as the cross-repo test is based
on the standard functional test.

Instead of defining two sets of plays we can consolidate them
into a single set, eliminating the confusion and repetition.

At the same time we also do not try to collect logs if the
script to prepare them was not able to execute, and we fix
the conditional for the ARA report generation so that it
works properly with the value being given it by zuul which
is a boolean word. To make sure it still works outside of
Zuul we leave the conditional which uses the standard success
return code of 0.

Change-Id: Id5027415f33a7a41650332a983cb87fab7ba2a4a
2017-10-31 18:19:30 +00:00
Jesse Pretorius (odyssey4me) a27ea8cfda
Revert "Revert "Move log collection to 'post' stage""
This reverts commit af3a08a5b1
but adds the tests repository as a required repo to make sure that
it works properly across other repositories. This will be tested
through another review using depends-on so that it does not
break the role tests again.

Change-Id: If9bded9d60e2fe839c0ec8c49cc5102b5a541474
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2017-10-30 16:59:06 -05:00
Jean-Philippe Evrard af3a08a5b1 Revert "Move log collection to 'post' stage"
This reverts commit fd4db8ea90.
The playbook used here needs to be in every repo calling that job
(which is all our branches and all our repos).

I suggest we revert it until alll the other zuul v3 changes are settled.
We can then take a more organized approach.

Change-Id: I8ba967af69311fc0684635462d27cdc03728ca81
2017-10-27 07:09:08 +00:00
Jesse Pretorius fd4db8ea90 Move log collection to 'post' stage
To ensure that logs are collected regardless of whether
a job succeeds, fails or times out, we move the log
collection to the 'post' stage of the job definition.

As the job playbook only gets run in nodepool, we remove
the detection of nodepool in the log collection script
and also remove the trap which executes it so that it
is only ever run when executed in zuul.

Change-Id: I5ab31cc141804cbcb6d8721032a79d0c724fc0a2
2017-10-25 18:05:00 +01:00
Jenkins dfcb6192c9 Merge "Only build ARA report when test fails" 2017-10-13 13:32:47 +00:00
Jesse Pretorius ceee7c1be5 Only build ARA report when test fails
In order to reduce the quantity of unnecessary log content
being kept in OpenStack-Infra we only generate the ARA report
when the test result is a failure. The ARA sqlite database is
still available for self generation if desired for successful
tests.

Change-Id: I3ab9752650911bba0b8be5e73b65019e97bfef42
2017-10-13 12:27:06 +01:00