Commit Graph

13 Commits

Author SHA1 Message Date
James E. Blair 622baa65bf Add no_log to all log upload tasks
Some log upload tasks were missing no_log instructions and might
write out credentials to the job-output.json file.  Update these
tasks to include no_log.

Change-Id: I1f18cec117d9205945644ce19d5584f5d676e8d8
2022-11-16 09:11:12 -08:00
Ian Wienand 8c6512107c
Standarise block/when ordering
Newer ansbile-lint finds "when" or "become" statements that are at the
end of blocks.  Ordering these before the block seems like a very
logical thing to do, as we read from top-to-bottom so it's good to see
if the block will execute or not.

This is a no-op, and just moves the places the newer linter found.

Change-Id: If4d1dc4343ea2575c64510e1829c3fe02d6c273f
2022-11-07 10:37:53 +11:00
Ian Wienand 6d23d20f2f linters: add names to blocks
This is preparation for a later version of ansbile-lint, which finds
missing names on blocks.  This seems a reasonable rule, and the
Ansible manual says [1]

  Names for blocks have been available since Ansible 2.3. We recommend
  using names in all tasks, within blocks or elsewhere, for better
  visibility into the tasks being executed when you run the playbook.

This simply adds a name tag for blocks that are missing it.  This
should have no operational change, but allows us to update the linter
in a follow-on change.

[1] https://docs.ansible.com/ansible/latest/user_guide/playbooks_blocks.html

Change-Id: I92ed4616775650aced352bc9088a07e919f1a25f
2022-07-27 17:13:39 +10:00
James E. Blair 4170cedf60 Revert "Update upload-logs roles to support endpoint override"
This reverts commit 862ae3f5d6.

We did not consider the effoct on the quick-download link that
is generated in opendev:

http://paste.openstack.org/show/802839/

Change-Id: I9702f8f1c0155ee3b13c74baaf2c09db72e690fd
2021-02-19 09:08:24 -08:00
okozachenko 862ae3f5d6 Update upload-logs roles to support endpoint override
Add zuul_log_storage_proxy_address variable attempting to replace
storage endpoint address with.
The usecase is when the storage proxy is positioned infront of storage
endpoint.

Change-Id: I353cd50b76683212b0319a1e28f34901267c08e4
2021-02-18 16:09:27 -08:00
Felix Edel a108e6440f
Return upload_results in upload-logs-swift role
We are facing some issues where the log upload to swift fails, but the
role is always succeeding. To get some more information about the
upload failures, we let the upload() method return those to the Ansible
module and provide them in the module's JSON result.

The equivalent change in the test-upload-logs-swift [1] role is
validated in [2].

[1] https://review.opendev.org/#/c/735503/1
[2] https://review.opendev.org/#/c/737441/

Change-Id: Ie0d4ea2f3365600eae0e572e4c0790b131d3b13e
2020-06-23 09:01:52 +02:00
James E. Blair 4f13f7c07f Revert "upload-logs-swift: Create a download script"
This reverts commit acde44818d and
the testing part of b3f417a6e6.

We'd like to obtain more consensus on the download script before
we commit to this.  In particular, the new zuul manifest file may
make it possible to do this without adding the feature to the
log upload roles.

Change-Id: I959c44b4dac6cad6d1b3d82ba6bc0949c9c759ff
2020-03-27 14:59:49 +01:00
Ian Wienand acde44818d upload-logs-swift: Create a download script
After we have determinted the root URL, create a download script from
a given jinja2 template.  This is added to the file list at the root
and uploaded with the other files.

Generated index files are given a new flag so they can be
differentiated.

This is an impelementation of
Iea8abd4cd71ece26b51335642f73bd2e544c42dd for the swift-upload role.

Change-Id: I98c80f657f38c5e1ed5f28e5d36988a3429ad1f8
2020-03-20 13:14:55 +11:00
Jeremy Stanley 2711d10186 Be consistent about spaces before and after vars
With the arrival of ansible-lint 4, Jinja2 variable expansions must
include spaces before and after the variable name inside the
brackets.

Adjust the new violations accordingly and remove the rule
206 exclusion.

Change-Id: Ib3ff7b0233a5d5cf99772f9c2adc81861cf34ffa
2019-08-07 20:17:41 +01:00
Jan Kundrát c31cd37164 upload-logs-swift: option for disabling the indexer
Our company-internal Swift setup apparently has troubles with
user-provided index files. Given that Swift can be configured to create
indexes on its own, we can skip creating these files altogether and save
some negligible storage space in the process.

One can enable Swift's native indexes by something like:

 openstack container set $container --property web-listings=true

This feature does not play well with containers auto-created by Zuul
because Zuul doesn't know (and cannot know) how to configure them. But
given that the code already supports this feature and that it's just a
matter of propagating an Ansible option, and because it fixes a real
issue in my Zuul deployment, I think that it makes sense to support
this.

Change-Id: I952cb2d4a263b07396bc5af60a9753394af3e42b
2019-06-05 17:08:59 +02:00
Monty Taylor 5cd8fbeb58
Update ANSIBLE_LIBRARY to use envsitepackagesdir
We install zuul via test-requirements, so the zuul files should be in a
directory under the site-packges of the virtualenv that tox installed it
in to. Update the path to point correctly to that location.

Remove the ansible-lint skip tags which should now work because the
library path should be pointing to a location that actually holds the
content.

Change-Id: If2d4b39267c4b9a3102a951143b568f8447af8d9
2018-10-18 09:23:25 -05:00
Paul Belanger d507ffca57 upload-logs-swift: Add trailing slash to zuul_return
This is so jobs like tox-docs are properly able to append information
with success-url.

Change-Id: Iabd967d8956d18727890823526064fb80f1b12ab
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-09-21 12:08:55 -04:00
James E. Blair 34ae90aad9 Un-wip upload-logs-swift
I think we've reached our minimal API, we should be able to
iterate forward from here as needed.

Change-Id: Ia7a0d6051c42c6e97a88e22f4b7e9275cf6234b2
2018-08-03 15:47:56 -07:00