Commit Graph

42 Commits

Author SHA1 Message Date
Chandan Kumar 920762abf4 Remove existing TQE collect-logs to test new role
It removes the existing the TQE collect-logs role in order to
test with the new opendev/ansible-role-collect-logs role.

https://tree.taiga.io/project/tripleo-ci-board/task/1001

Change-Id: Ib7892fca145a8c1947f54bfa8f7a35675e625e4d
Signed-off-by: Chandan Kumar <chkumar@redhat.com>
2019-05-02 15:08:26 +00:00
Arx Cruz 12d708db90 Add testrepository.subunit file to root dir
os_tempest role copy these files to a different directory than the
default one for tempest, since they don't use it to submit the results
to openstack health.

https://tree.taiga.io/project/tripleo-ci-board/task/832?kanban-status=1447275

Change-Id: I3e70d31ea3c6e1ea966b812703cdcdbb293dc722
2019-03-12 13:55:55 +01:00
Zuul 0d841863be Merge "Reproducer script: run only on job started by zuul" 2019-03-02 06:20:58 +00:00
Gabriele Cerami e38421592b Reproducer script: run only on job started by zuul
The reproducer script is assuming a job was started by zuul. In some instances
we are still running jobs from platform different than zuul like ci.centos. In
those instances the log collection fails because the reproducer script creation
misses a lot of files
This patch includes that role only under the condition that zuul variable is
defined.

Change-Id: I01ec134f85943a8332832bdc6caf138d978c1c37
2019-03-01 14:51:12 +00:00
Sagi Shnaidman 0ad99eb267 Use infra generation of ARA reports
ARA reports are generated automatically in infra when
they are in ara-report directory. Don't generate htmls in upstream
jobs to save a space.

Change-Id: I7aa81ae3b06878baeab471e340477ca8a20f8594
2019-02-28 13:54:20 +00:00
Ronelle Landy 891a714889 Design new role for zuul-based reproducer
This role creates a minimal bash script
to launch the reproducer via zuul/nodepool
and friends with the same variables as used
in the CI job.

Depends-On: https://review.rdoproject.org/r/#/c/18664/
Depends-On: https://review.openstack.org/#/c/635550
Story: https://tree.taiga.io/project/tripleo-ci-board/task/607
Change-Id: I9cdfa3e9d710257cdcd15979dcf0c65222ff3ac6
2019-02-08 11:39:09 -05:00
Chandan Kumar df2401d766 Use os_tempest for running tempest on standalone
It depends on ansible-config_template and python_venv_build
role.[1.]

Make tempest_cidr cacheable so that it will be consumed in
os_tempest role as it does not depends on extra-commons so
added an extra tasks to mkake the variable useable.

[1.] https://tree.taiga.io/project/tripleo-ci-board/us/234

https://tree.taiga.io/project/tripleo-ci-board/us/554

Change-Id: I5eb7fb64411220bc198ebae15f866693eadc3a4d
2019-01-23 16:30:57 +05:30
Ronelle Landy c399e3a842 Remove reproducer lines added to get zuul related info
zuul_variables and zuul_console were added when there
was an investigation into simulating zuul behavior
for the reproducer. We are no longer following that
workflow for the reproducer and therefore these
failing lines can be removed.

Change-Id: I5f057ce78273ddf8cd6381c9a420b317713379b6
2018-12-19 16:54:19 -05:00
Sorin Sbarnea cc82349363 Adapt code to newer code style (linters)
Makes those files conformant with current linting rules and avoids
linting errors when we need to toch them again.

Previous doing "pre-commit run -a" uncovered these errors, now is no
longer reporting any other errors.

Change-Id: Ie4cf229c8f11c2b55b323eac23c89483b26d3781
2018-11-16 12:42:51 +00:00
Marios Andreou 2f2d7ab4e2 Introduce zuul.projects and executed pre-run playbooks for reproducer
This uses the zuul-variables file for zuul.projects and the json console
log written by the depends on, for the playbooks. This is tracked by the
ci team with [1]. These are made available to but not yet used in the
reproducer (that will come later, see the story linked in [1]).

[1] https://tree.taiga.io/project/tripleo-ci-board/task/270
Depends-On: https://review.openstack.org/615191
Co-Authored-By: Ronelle Landy <rlandy@redhat.com>
Change-Id: I64923cfd75e697b98507be1ff398c14654108ddf
2018-11-09 15:27:22 +00:00
Sagi Shnaidman 04525c6558 Track ansible overcloud deployment with ARA
Use overriding ansible config to configure ARA for overcloud
ansible run.

Change-Id: I1f9a72c8afac54505cd56905332ae2ad23b2f394
2018-09-14 12:01:50 -06:00
Sagi Shnaidman 49636d10a3 Show cfg,j2,py files in browser
Change-Id: Ib709c6a1f2d6b82bf8443e0649fe3c742ed2cfa8
2018-08-28 13:24:53 +03:00
Wes Hayutin fa0c65604a Enable ARA for the undercloud install
In the latest versions of the undercloud install, ansible is used.
Use ARA to profile the undercloud install steps as driven by TripleO
and save the ARA report to logs/ara_oooq_root/

Change-Id: I2b034b83ba7779d15a5d69263e67d3aea3f631a8
2018-06-28 20:59:30 +00:00
Sagi Shnaidman 69ad943add Add ansible linter rule for set pipefail
When using pipes in ansible shell module we can miss the error
because shell is executing without pipefail by default.
This rule will check every shell module if it has "set -e pipefail"
and will fail in case if not.
It excludes tasks which have 'ignore_errors: true' or register
variables.

Change-Id: I394c72040d62dff76180aeb9d703bb8a212bcc98
2018-04-26 21:32:24 +03:00
John Trowbridge 5900c64c7b remove duplicate README file (part deux)
We moved this file to tripleo-ci[1], so we can't try to template it
here.

[1] 78bd33392e

Change-Id: Iafc80d06eca571f1727ff6f375d4dceb1ba93ea0
2018-02-14 08:51:37 -05:00
Sagi Shnaidman acf3412b6f Collect and send statistics to InfluxDB
Add library file which collects and sends statistics of CI job
to InfluxDB

Change-Id: I50da9da53a702982f53d148b9851657612f237e5
2018-01-18 11:27:20 +00:00
Wes Hayutin 8b39e49059 fix reproducer script when statement
Using var/log/extra/dump_variables_hostvars.json.txt.gz
We can see the existance of this variable in the logs.

closes-Bug: #1742557
Change-Id: Ifd02ab371731dd4be863c193878567d170b02ee7
2018-01-10 17:19:42 -05:00
Sagi Shnaidman 0fc5842862 Generate ARA statistics
Generate ARA statistics and create html folder with them.

Change-Id: I91f7a3e20af64974ebe9ec23d4817d4be9d13296
2018-01-07 21:52:38 +00:00
Sagi Shnaidman c4d263c3f2 Force decompression of stackviz data
When decompressing data force overwriting existing files.

Change-Id: I7b7582469b01116bbe754af07c81cc698355d8c4
2018-01-07 07:08:59 +00:00
Sagi Shnaidman bda605766b Ignore errors in graphite task
If graphite server has a problem or collecting data fails it's
still need to continue publishin logs, so ignore errors in
ara graphite task.

Change-Id: I7a330b673a7b06ebc0ef1a7617ba07069fecb1b1
2017-12-20 13:28:38 +02:00
Zuul fd4cf7837c Merge "Add reproducer script for OVB and multinode jobs" 2017-12-19 20:52:28 +00:00
Zuul 012d211c52 Merge "Add ui_validate_simple to the logs collected" 2017-12-18 17:12:58 +00:00
Ronelle Landy ed220f5b98 Add reproducer script for OVB and multinode jobs
This review adds functionality to create a reproducer
script in the logs. The reproducer script will allow
users to recreate failing OVB and multinode jobs
in personal cloud tenants.

User documentation for the reproducer-quickstart script
is added.

Change-Id: I9fe8550a75c3ffb6d1271b01b1144bfbdc82c95d
2017-12-16 22:21:33 +00:00
Zuul 78b4acba4c Merge "Send ARA statistics to Graphite server" 2017-12-07 14:35:31 +00:00
Ronelle Landy 87b72781bd Add ui_validate_simple to the logs collected
The ui_validate_simple test has been failing of late and
it is hard to debug since logs are not collected
from localhost.
This review copies all the .sh and .log files
from the local working dir to the log directory so that
they are included in log collection.

Related-Bug: 1734928
Change-Id: I3bc646f5d1d9584cef4e624e5904f7e88c59442e
2017-12-04 13:25:45 -05:00
Sagi Shnaidman 09b66924fd Save console files with timestamps
Save jenkins console logs from BUILD_URL with timestamps.

Change-Id: Ieadf5023244d2c5074d7d975354bb2ab9489d8b8
2017-11-20 08:51:10 +00:00
Sagi Shnaidman 20e7f3fa36 Send ARA statistics to Graphite server
Send ARA statistics of particular tasks to Graphite server

Depends-On: Ie5324b3328c1516d5a0e6af263da61b1d8692b4b
Change-Id: I7167b62dada67403faf1f5171d6cddef419e8da2
2017-11-09 12:44:46 +02:00
Attila Darazs b7d02e35c2 collect-logs: add README for log files
This change will create a README file with a simple job debug guide and
links to the frequently used but somewhat hidden files within the
collected logs.

Change-Id: I818067952017c88e855bfeee76fa438638cdd942
2017-06-01 13:55:31 +00:00
Sagi Shnaidman 1ce8a19193 Make repo file visible in browser
Make repository file *.repo to be visible in browser.

Change-Id: I858e273c7b9d2ade361e674a0da1fa68dd83bbbf
2017-03-13 22:36:05 +02:00
Gabriele Cerami d7fc320426 collect-logs: Fixes for upstream log collection
in upstream tripleo-ci,
- The collect_dir is a link, not a dir, if file module is invoked with
  state: directory, it will change the link to a dir, creating a new
  empty dir, denying the rest of the task to work properly
  Stop using file module, use a shell command to create the dir instead
- the collect dir is a link, not a dir, so find {{ dir }} is not finding
  anythin
  Add a trailing slash to all find commands to be sure find is following the link

Change-Id: Ibe7b5083a8aaf60a7858d759d54ede0b630e7bbf
2017-03-10 09:33:31 +01:00
Gabriele Cerami f8e9bbaf4a publish: don't fail in case the logs dir is a link to a directory
currently the first task in publish checks if the logs dir is a
directory, and fails if it's a link to a directory.
Adding follow: yes so the location can be a directory pointed from a
link

Change-Id: I992a9c89d7b04fd2a890b8d85f86cc34e8767740
2017-02-17 20:15:40 +00:00
Jenkins 9190248138 Merge "collect-logs: broader txt.gz rename conditions" 2017-01-24 16:24:17 +00:00
Attila Darazs a33d943195 collect-logs: broader txt.gz rename conditions
In addition to known text file extensions, also rename files without
extension in the /var/log and /etc directories.

Change-Id: Ia9898816831392951cd927b7661d4d8fdcb4d007
2017-01-24 11:20:17 +01:00
Ronelle Landy 9fb6da6215 Add -k (insecure) option to curl console logs command
Collecting the console logs from internal jobs is failing due to
certificate issues. Adding the -k option to curl will ignore
any certificate requirements and collect the console log.

Change-Id: Ic90a045c5cc848996dd23be3210347fb95319a13
2017-01-23 15:06:54 -05:00
Attila Darazs a0a4e65eac collect-logs: rename text files to txt.gz
Add the artcl_txt_rename option. When enabled, the publishing step
renames known text file extension to end in txt.gz which is directly
displayed by upstream log servers.

Also simplify the way we handle the stackviz and tempest results.

Change-Id: I793088995ca5a945738c5b04c1cefdd974e5f2d1
2017-01-18 15:38:52 +01:00
Jenkins 301e4845cc Merge "Add ARA to the collected log directories" 2017-01-16 14:25:34 +00:00
David Moreau-Simard 2ecb17602b Add ARA to the collected log directories
ARA is being set up by quickstart.sh and the static report is
later generated by collect-logs.sh in the workspace.
The collect-logs role should seek that location and recover it if
it's available.

Change-Id: I611a071bb839f3c402a6c1bc2db35951f75461e0
2017-01-12 09:31:28 -05:00
Matt Young 7b3d0b6aca Use shell instead of command
We are having issues with collect-logs and potentially infra. Use
shell so we get better output.

This was motivated by a failure in collect-logs.

https://ci.centos.org/job/tripleo-quickstart-promote-master-delorean-minimal/858/console

failed  here:

https://github.com/openstack/tripleo-quickstart-extras/blame/master/roles/collect-logs/tasks/publish.yml#L23

The output from command module looks like this:

01:24:17.955 fatal: [localhost]: FAILED! => {"ansible_job_id":
"897063162915.10850", "changed": false, "cmd":
"/home/rdo-ci/.ansible/tmp/ansible-tmp-1484081443.92-162620171328073/command.py",
"failed": 1, "finished": 1, "msg": "[Errno 2] No such file or directory",
"outdata": "", "stderr": ""}

The actual command is buried in {longpath}/command.py, and for
the CI jobs only a handful of folks can get ssh access to the
nodes, which would allow for setting ANSIBLE_KEEP_REMOTE_FILES=1
to debug this (by looking at the actual command.py after failure).

Switching to shell block will output the expanded shell command
to the output by default.

Change-Id: Ie94492f023a2c7af8b6361f9538184c7de55cd7a
2017-01-11 09:29:32 -05:00
Attila Darazs 737b679a43 collect-logs: add timeout to log uploads
Uploading the logs can take too much time, resulting ssh connection
timeout during the ansible task execution. Log collection usually runs
in post build tasks, making it immune to jenkins job timeouts.

This change makes the upload tasks asyncronous and adds a timeout.

Change-Id: I65cf017717775ac85b953fe554f84c79e4f808b5
2016-12-07 18:30:33 +01:00
Attila Darazs 2bb8b177bc collect-logs: run in two stages
We should run and publish a minimal sets of files even without any host,
when we failed the run before inventory generation.

This change separates the collection step that runs on all hosts except
localhost, and the rest running on localhost. Running on localhost
always succeeds, even with an empty inventory.

Also add a log environment file for local collect-logs.sh runs that
does not upload logs.

Change-Id: I48d07d42be879026fb80afd73835484770006f85
2016-12-06 15:14:16 +01:00
Attila Darazs fc388656c4 collect-logs: add rdoproject env requirements
Zuul uses different variables and files to handle artifact uploading,
this change adds the required modifications to collect and publish logs
in the rdoproject.org Zuul environment.

Change-Id: I5d74392210e55be5f5ecd889a5017750a874d45a
2016-12-01 17:07:10 +01:00
Attila Darazs 002f8cd77c Cleanup and move files for collect-logs 2016-11-21 11:50:19 +01:00