Commit Graph

84 Commits

Author SHA1 Message Date
Marios Andreou 963ac72a0a Remove stale bash scripts from tripleo-ci repo
As discussed in the parent patch [1] we should remove these stale file as
they are no longer used. The oooq_common_functions, toci_gate_test,
toci_quickstart have all been replaced by the templated versions in [2].

The heat-deploy-times.py is replaced by the script at [3] in the
ansible-role-collect-logs repo. The generate-kill-heat.sh has not been
touched in over 2 years and as far as I can see isn't being used
somewhere (code search).

Some of these especially the common_functions/toci_ files are updated
out of confusion and causing unnecessary maintenance burden.

[1] https://review.opendev.org/c/openstack/tripleo-ci/+/782549/5#message-f29d32c0c652d0929f680030e1a4c970fb111c2d
[2] https://opendev.org/openstack/tripleo-ci/src/branch/master/roles/run-test/templates
[3] https://opendev.org/openstack/ansible-role-collect-logs/src/branch/master/roles/collect_logs/files/heat-deploy-times.py

Change-Id: If248d145cdcaa448de601b24a80a11d567fb235f
2021-04-08 12:36:53 +03:00
Sorin Sbarnea f54d582f28 Removed several gzip operations
As log storage takes care of compression is better to avoid performing
any gzip activity on *text* files that we want to access with the
browser.

Change-Id: I7dcd1cf569fea5e536926f7188af953c3301af0f
2020-01-16 17:41:37 +00:00
Alex Schultz e32e613899 Use local tripleo-operator-ansible if available
We want to use the local CI provided verison if available so this change
adds tripleo-operator-ansible to the list of repos we pull from zuul in
the gate.

Also fix the ansible collections paths var.

https://docs.ansible.com/ansible/latest/reference_appendices/config.html#envvar-ANSIBLE_COLLECTIONS_PATHS

Change-Id: I653343122882d5b7d7c4435ad6492a78d03f7b37
2020-01-07 17:05:55 -07:00
Alex Schultz 524b9d41a2 Add collections path
Since we'll be installing collections into quickstart, we need to set
the ansible collections path correctly in the toci quickstart script.

Change-Id: I39c33da8af98ef01ddf020e4cdf96403bc0edc20
Related-Blueprint: tripleo-operator-ansible
2020-01-03 14:42:27 -07:00
Sagi Shnaidman 53f21c56f3 New vexxhost CI settings
Configure new settings for running OVB jobs on vexxhost cloud.
Change-Id: I1d38e369dea02bf85f55104f7b5b4b35e3d45ca1
2019-08-19 21:37:48 +03:00
Sorin Sbarnea ed27a979d5 Adopt use of pre-commit linting
Follows the same configuration that was used on
tripleo-quickstart-extras and documented use on tripleo-docs.

Change-Id: Iba8a2db92137f9f6ad28f498627eb1b87039d99f
Story: https://tree.taiga.io/project/tripleo-ci-board/task/381
2018-12-14 15:50:06 +00:00
Sofer Athlan-Guyot e7c0dced93 New workflow for standalone upgrade.
Implement the standalone upgrade in CI.

This deploy a N-1 standalone deployment, upgrade the repository, the
packages, and run tripleo upgrade.

The upgrade coverage is limited to:
 - upgrade_tasks.
 - non-HA services.

This means that no upgrade orchestration is tested and that HA is not
covered.

Change-Id: Id4877152ca6c233e193593995dd13890e17a535b
Depends-On: I2a4ffd8ae26e0965028422c649243a65fef79e65
2018-11-15 17:43:18 +00:00
yatin 09bc3f1c7c Also support rdo-cloud provider
https://review.openstack.org/#/c/596432 added vexxhost
provider, since then jobs running under "rdo-cloud"
provider are broken. This patch adds regex match with
"rdo-cloud"* to handle both rdo-cloud and rdo-cloud-tripleo.

Closes-Bug: #1803133
Change-Id: I9a7ddef4e4f57dc599b9030a0afbe116b1075b68
2018-11-13 19:10:33 +05:30
Sorin Sbarnea c25a428409 Corrected release config location for log collection
Fixes problem where log collection was using config files from
old location after we already switched deployment to use new location.

This was not observed because the file content was the same but
once we attempted to remove the old files we discovered the issue.

Prepares for removal of config files from their old location.

Change-Id: I70aeb3724d6d162aa6d8b00024f3ce1a74dbf79f
Story: https://tree.taiga.io/project/tripleo-ci-board/task/7
2018-10-19 15:19:13 +00:00
Nicolas Hicher 52364c8632 provider: Add vexxhost
Add vexxhost provider data for tripleo-ci jobs

Depends-On: I53851edbb8bb562dc4194fb99d6ade259227d2f9
Change-Id: I39efbfc94fe3650704b636e94445ad859f3ac801
2018-10-12 01:12:50 +00:00
Wes Hayutin 58bb094700 Add support for distro and major release delineation
We'll need unique release files for
CentOS-7, CentOS-8, Fedora-28 and RHEL

Change-Id: I5613d1acb2925a1066623665f0598a060c97acee
Partial-Bug: #1740928
Story: https://tree.taiga.io/project/tripleo-ci-board/us/1
2018-10-09 08:51:56 +01:00
Wes Hayutin 156c2b1f9a ensure tripleo-validations are turned off upstream
Let's be explicit about ensuring these tasks are off

Closes-Bug: #1794034
Change-Id: I8b6f59f848cd0462eae8e1db8d4ad93a698815dc
2018-09-24 21:21:28 -06:00
Gabriele Cerami f42363f623 Collect logs: split and move the script creation
Since we create the collect logs script only at the end of the playbooks
run, when a job times out, there is no collect_logs.sh script created,
and the post-run playbook doesn't actually run anything.
This change split the function in two parts, the first part creates the
script, and its call is moved to before the playbooks run. The second
part is moved to toci_quickstart directly and runs after the playbooks.
The second part should not be needed anymore with zuulv3 in rdo
provider.

Closes-Bug: #1784417
Change-Id: Iee897f780c93bdf847e188fc033e8be112e12a4f
2018-07-31 11:06:22 +01:00
Gabriele Cerami bc05b89289 Migrate undercloud jobs to the new base configurations
This changes make the undercloud jobs use the new base jobs, nodeset and
playbooks requireed to run the job with the configuration that are
closer to zuulv3.
It also adds logic to not run any vxlan networking on our own for all
the v3 runners.

Change-Id: Idf7b8a54499ef252bf7d34b3b5f16a9a34e6a83f
2018-06-29 12:50:32 +01:00
Sagi Shnaidman 67826ec816 Move get_extra_vars_from_release to functions
Move get_extra_vars_from_release bash functions to file where
all functions are located.

Change-Id: Ie2befd0903d2550ff4035ee9ecc745138592c9a6
2018-06-25 15:14:59 +03:00
Ronelle Landy 3dab6f0df0 Add dry run option to toci_quickstart - playbook order in tact
With dry run, playbooks are not executed.
The env variables, releases script output and playbooks
commands are written out to files for debug.

The review also moves the collect logs lines to a
function for easier organization

Documentation for the dry run option and variable
files is added.

Change-Id: I0bad5ee3150d94115bed018de9488590305a2b80
2018-06-15 14:27:38 +00:00
Enrique Llorente 573f9c6cbf Clean up undercloud upgrade old release file selection
Now the release file is calculated and configured at
RELEASE_ARGS

Change-Id: Ice26e3040e5c05453fe287928c88c24cb2bb25c3
2018-06-04 15:05:40 +02:00
Ronelle Landy 0876f88029 Revert "Add dry run option to toci_quickstart"
This reverts commit 418f5a639f.

Closes-Bug: 1773381
Change-Id: If3086bfc96d792edcd5ea8139fd21702ad65d279
2018-05-25 14:56:25 +00:00
Ronelle Landy 418f5a639f Add dry run option to toci_quickstart
With dry run, playbooks are not executed.
The env variables, releases script output
and playbooks commands are written out to
files for debug.

The review also moves the collect logs lines
to a function for easier organization.

Documentation for the dry run option and
variable files is added.

Depends-On: I4c8f389978717848e755f12856dd454d605c9137
Change-Id: Ib6ae184a07ba291d719cabb48b51d890b0485a49
2018-05-24 23:16:34 +00:00
Enrique Llorente b30a1195fc Pass dlrn_hash from the releases file
Now that the dlrn hash is differenciate per upgrade step, we can
pass it directly to the playbook.

Apart from dlrn_hash we need to pash get_build_command to ensure that
the hash traverse all the logic [1]
[1] https://github.com/openstack/tripleo-quickstart-extras/blob/master/roles/overcloud-prep-containers/templates/overcloud-prep-containers.sh.j2#L30-L45

Change-Id: I658f09b531e9659c192eeede6cdebf392c4d8281
2018-05-22 18:22:00 +00:00
John Trowbridge 48e2b054e7 Add ability to use a different release per playbook
We are changing the way we are passing releases to the playbooks.
This change adds the ability to use the new release handling script. It
enables it only for 4 jobs. Two should be moved to the new way of
handling releases, two are there to test the backwards compatibility
offered by the script.
If the script is uses and produces an output, the new method will be
activated, by filling a dictionary with playbook as key and release as
value.
If there is no output from the script, the dictionary will be empty and
the default QUICKSTART_RELEASE file will be used instead.

Co-Authored-By: Gabriele Cerami <gcerami@redhat.com>
Co-Authored-By: Ronelle Landy <rlandy@redhat.com>
Change-Id: I6514ba15ff4300ac4bd4fe543d3a4954aeb6f175
2018-05-22 12:37:15 +00:00
Sagi Shnaidman a7a4a446c1 Don't override quickstart_install log
When running multiple playbooks, quickstart_install log contains
only the last log. Add "-a" to "tee" to save logs from all
playbooks.

Change-Id: Ib02190f0bfaad03383c1c3b09579711e5a5f8c27
2018-05-01 00:23:33 +03:00
Jose Luis Franco Arza 995271ccc8 Use tripleo-upgrade role in undercloud upgrades job.
Featureset047 includes all needed parameters
to run an undercloud upgrade using the
tripleo-upgrade role.

Change toci_gate_test.sh logic to include the
mixed_upgrade environment file *-undercloud-*-overcloud.yml
only when overcloud-deploy is being performed. Otherwise,
it will try to load it for undercloud upgrade too.

Closes-Bug: #1735792
Depends-On: Ib204c89ad88ae4581e556710976325c2b2723039
Change-Id: Iaed38c620f39b66b0b560ae561580dce21ea199b
2018-04-16 16:20:22 +02:00
Sagi Shnaidman ba4f97e8c8 Run playbooks with custom args
Add support to run each playbook with its custom args to override
default ones. Required in upgrades jobs to override release vars
when running upgrade playbook.

Change-Id: I060283f19a9738e55c2665b94eb1f746a790de1e
2018-04-11 11:28:24 +02:00
Sagi Shnaidman 4d9a412a6f Revert "Run logs collection after job finished in RDO CI"
This reverts commit 765389d178.

Collect logs for all multinode jobs after job is finished, and
for ovb jobs during the job run. OVB nodes are wiped off after
job finishes.

Change-Id: I39ce8ef935c887ad650fcf5155639ed50efeae96
2018-03-15 20:56:11 +00:00
Zuul dc4a553f3a Merge "Run logs collection after job finished in RDO CI" 2018-03-06 15:36:18 +00:00
Sagi Shnaidman 765389d178 Run logs collection after job finished in RDO CI
we run logs collection in post playbook in upstream infra CI,
do the same in third-party CI whith OVB and multinode jobs.
Collect logs fter job is finished.

Depends on https://review.rdoproject.org/r/#/c/12442/
Change-Id: I4c2ec1847a47bda6a30e5045b04b750e91b1ebda
2018-02-28 15:29:34 +00:00
Jose Luis Franco Arza 82eb596827 Remove duplicated call to ansible-playbook.
After merging [0], it seems that an extra
command to run the CI job via ansible-playbook
was left. An error was displayed as the left
command didn't include the playbook to run.

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

Change-Id: Ibb9eb78c8e4ef72da820ac64f755176356f9ab3c
Closes-Bug: #1750518
2018-02-20 10:39:21 +01:00
John Trowbridge 3c93795b9c Allow for multiple playbooks to be run
This will allow us to run multiple playbooks instead of just a
single playbook. This depends on the two changes that split
the ovb and multinode playbooks.

Depends-On: I6cc171641c8390e458eb474be3479e732eb2c985

Change-Id: I461a83a3d1b162457a2f607736ca4feb7fdd3e14
2018-02-19 14:15:37 +02:00
Sagi Shnaidman 85ce09a1b0 Remove all playbooks from CI repo
All playbooks were moved to oooq extras repository, so remove them
from CI repo.
Depends-on: Ie778d8893d0a92798dfada33260a656234d57350
Change-Id: I92880074e995768f566c193505216dbee3cce9bb
2018-01-29 11:51:59 +02:00
Zuul 600c0f380e Merge "Use ara generation from collect-logs role" 2018-01-17 18:39:53 +00:00
Zuul 675ab6b362 Merge "Export env variables required for statistics" 2018-01-17 01:04:51 +00:00
Sagi Shnaidman f9380ada4c Export env variables required for statistics
When calculation job statistics we need a few environemnt vars
be available in post playbook. Write them to file and export
when running logs collection role in post playbook.

Change-Id: I2719999a7f3abda43ab322a23bbe4750c7233a76
2018-01-16 11:55:16 +02:00
Sagi Shnaidman 2c713c0c14 Fix condition syntax for RHCLOUD check
Condition fails because of no space before tripleo-test-cloud-rh1
Rewrite it with correct syntax. It was failing OVB jobs logs
collection

Change-Id: I99e4b7b7da3bde615dd0f0a6604773745d8d1b97
2018-01-15 18:27:35 +00:00
Sagi Shnaidman 68229c95c3 Use ara generation from collect-logs role
Generate ara-data in collect-logs role

Change-Id: I74effd0ed9e290fc102f63045f28ec88c66e54ac
Depends-On: I91f7a3e20af64974ebe9ec23d4817d4be9d13296
2018-01-15 12:23:38 +00:00
Sagi Shnaidman 2c7e07f84e Prevent exporting unbound variable
In some of jobs variables can be not available, so don't export
them if they are not defined. This happens in periodic jobs which
don't have ZUUL_CHANGES defined.

Change-Id: Ic406599e2838fdffb6bdb2ccf40d2169c4474771
2018-01-15 10:19:18 +02:00
Sagi Shnaidman 43e8552b28 Save env variables for logs collection and reproducing
We use some generated environment variables in logs collection role
but since it runs in multinode jobs in post playbook, we don't have
them avaiable. Preserver them in collect_log.sh file.

Closes-Bug: #1743140
Change-Id: I0614d2e4e576b818bffb093327f0f8857d122810
2018-01-14 10:16:09 +02:00
Sagi Shnaidman 726c2ecbfe Limit runtime of logs collection
When logs collection runs in post playbook we need to limit it in
time to prevent it being stuck and prolong job for hours.

Change-Id: I6b9418a2020df74b07fbb6c6b00ada0ce1706878
2018-01-09 07:24:55 +02:00
Sagi Shnaidman 2d96353c28 Collect logs in post playbook for multinode
Collect logs after main job is finished, so that we'll have logs
in any case of job result.
Do it for multinode jobs only, because ovb nodes are wiped right
after job finishes and collecting logs there requires a bit
different effort.
Depends-On: I7b7582469b01116bbe754af07c81cc698355d8c4

Change-Id: I600ade65052d28978c9d395323c8b86ed213fd38
2018-01-06 22:24:08 +02:00
Zuul 61b5e7b359 Merge "Save oooq generated files" 2018-01-06 04:12:15 +00:00
Zuul 7f473f83d2 Merge "Workaround for virtualenv issue with old variables" 2017-12-28 22:34:18 +00:00
Sagi Shnaidman 95b42be690 Workaround for virtualenv issue with old variables
When running this script in terminal, it fails with errror
_OLD_VIRTUAL_PATH, _OLD_VIRTUAL_PYTHONHOME is unbound. when
activating virtualenv. Seems like it's known issue in venv:
https://github.com/pypa/virtualenv/issues/1029
set +u before activation is a workaround for this issue and then
set -u to continue the rest of the script

Change-Id: I5095118609f8d2dc46112c3761952a109ba4b93e
2017-12-28 12:32:37 +02:00
Sagi Shnaidman 09f5854b34 Remove hardcoding of overcloud deploy timeout
Now overcloud deploy timeout is derived from DEVSTACK_GATE_TIMEOUT
which is always 170 and equal to 80. It's not appropriate for all
jobs. It will be calculated dynamically depending on how much time
remains in the job for deployment.
Pass end time of CI job to ansible playbook for calculating it.

Partial-Bug: #1738038
Change-Id: I89b743fc16ea4c100ba21ddbe29081fa3e5479e9
2017-12-28 05:29:45 +00:00
Sagi Shnaidman 870a453560 Save oooq generated files
Save for future investigations oooq generated files
like hosts, ssh.config*, etc

Change-Id: I975b6189329e67ce30c85cfde42a37dd52b88c8c
2017-12-17 14:56:22 +00:00
Zuul 8e94739c8e Merge "Use ansible-playbook in place of quickstart.sh" 2017-12-15 15:37:22 +00:00
Zuul 2445eb0e7a Merge "fix random broken pipe on du command" 2017-12-14 09:42:02 +00:00
John Trowbridge 46c5a0b62c Use ansible-playbook in place of quickstart.sh
This will change CI to only use quicktart.sh to bootstrap the
virtualenv. The ansible-playbook command will then be run
directly for the deploy and collect logs.

This is a first step in breaking the deploy into multiple
ansible-playbook calls so that we CI the ability to run them in
stages for development purposes.

Change-Id: Ie0a3729277fb608c653e7bc2ab85781d9b815880
2017-12-12 10:45:01 -05:00
Arx Cruz 606304b3b5 Creating a function that calls /usr/bin/timeout
Due the fact that in the future, we will have several ansible-playbooks
calls, we need to create a function that will calculate the remaining time
for each call. This function gets the START_JOB_TIME and
calculate how much time still has, and execute the command with
/usr/bin/timeout

Change-Id: Ib4766ea144baaaf1b47899c4923adf40a3be4582
2017-12-06 18:26:11 +01:00
Zuul 63c4e5ed33 Merge "Remove hack of ignoring 127.0.0.2 in logs collection" 2017-11-22 21:59:29 +00:00
Sagi Shnaidman 962205603d Set ubound to debug level and dump cache
Debug unbound DNS queries in job for investigation of
DNS failures.
Dump unbound DNS cache server cache..

Depends-On: Ia76ac9b20d6b8402060b71e11e00e515bc74077d
Related-Bug: #1730931

Change-Id: Ic8b9e33067141366655fad1b99dee1adb40dfba3
2017-11-20 14:11:16 +02:00