633 Commits

Author SHA1 Message Date
Tristan Cacqueray
b91ecb27db ara-report: add missing ara_report_run check
This change uses the ara_report_run variable to toggle the database copy.
Otherwise, when ara_report_run is set to 'failure', then the report is
still created if the job succeed

Change-Id: I722a2bff82af2a37fbdec49b2bfd1ad95059ecbe
2018-06-24 23:54:41 +00:00
Mohammed Naser
fbb58ddfde Add PATH to ip command execution
It seems that there has been a recent change where the PATH used
has changed somehow.  This adds it and make sure that it covers
all 3 major distros location where `ip` is stored.

Change-Id: Ic3c255bd24d1202fec436d4fcc484ce420110518
2018-06-18 17:37:10 -04:00
Monty Taylor
4997f9bee0
Just use chmod instead of file for log permissions
The file module with recurse goes to the bad place when the content has
a symlink to '.'. Rather than fighting it - just use chmod -R, which
does what we want.

Change-Id: Id3e23e67727d8ac7f29c87d6865b54dc729ccaf4
2018-06-18 12:20:34 -05:00
Zuul
8ec65033aa Merge "Add buildset-artifacts-location" 2018-06-14 18:06:14 +00:00
Tristan Cacqueray
c03fc87905
Add buildset-artifacts-location
Change-Id: I7db7633a8149c63a1e1232173fdc1d446fc70fbc
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-06-14 11:14:25 -04:00
Michael Johnson
b162a69c8b Collect the coverage report for npm test jobs
The npm test run can optionally create an html coverage report.
This change causes the post job to check if the directory exists,
and if so also collect the coverage report with the npm logs.

Change-Id: I7cc50c352c3feeed283888cbe7f02c6b1264b7b0
2018-06-12 21:27:03 +00:00
Doug Hellmann
be339b7746 allow build-python-release consumers to override python version
Define a release_python variable that users of the
build-python-release role can override to set which version of python
they are using for building sdists and wheels.

Change-Id: I1502c572304000fab45a43e1a6d674f5aa7e9a9e
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-06-11 15:17:40 -04:00
Zuul
b37b49e2bc Merge "Include hostnames in /etc/hosts" 2018-06-06 19:51:04 +00:00
Zuul
647d98f44b Merge "Fix deprecation warning of ansible-2.5" 2018-06-06 06:47:02 +00:00
Monty Taylor
ce9a90ff8f
Add a job variable to control javascript link copying
The zuul multi-tenant dashboard job wants to make a few symlinks to
simulate what would happen on a real deployment with rewrite rules. The
current hard-coded behavior of copying the links causes ... havoc.

Add a job variable defaulting to the current behavior which such jobs
can flip if they need to.

Change-Id: I751524baa80353606d74b87dbaacfe7cd8b71a5e
2018-06-05 15:10:08 -05:00
Andrea Frittoli
13b96b4bc6 Include hostnames in /etc/hosts
Include the resolution of the hostname to the private IPv4 for all
hosts in multinode setups.
Currently we only setup the inventory name, which is not enough
since qemu relies on the hostname for live migration.

Change-Id: I717f5f8b5b803abe874bea498fd07f5508cc7214
2018-06-05 11:13:03 +01:00
Tristan Cacqueray
e2058a6b75 Fix deprecation warning of ansible-2.5
This change fixes this upcoming deprecation warning:

[DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of using
`result|skipped` instead use `result is skipped`. This feature will be removed
in version 2.9.

Change-Id: Ic0c93f2ea896ead76922694e6150882d8a280daf
2018-06-04 00:17:18 +00:00
Zuul
b457191d14 Merge "Handle -/_ ambiguity in package names" 2018-06-01 18:11:12 +00:00
Brian Rosmaita
4d7d23d7c5 Handle -/_ ambiguity in package names
Some openstack packages show up in the requirements list under a
hyphenated name while their package metadata name contains only
underscores.  (For example, the glance_store library is listed in
requirements as 'glance-store'.)  This is causing problems for the
tox_install_sibling_packages task run by zuul.  Pip is able to handle
this situation [0]; add code so the ansible task can handle it too.

[0] http://paste.openstack.org/show/722298/

Change-Id: I89ad9926647a011174815761e79372f2d7d43609
Needed-by: https://review.openstack.org/#/c/569225/
Closes-bug: #1774030
2018-05-30 21:42:56 -04:00
Zuul
9050a21a1f Merge "Default warning-is-error to True for non-legacy Sphinx projects" 2018-05-30 15:02:16 +00:00
Zuul
91b2bc340f Merge "Don't capture stderr in siblings logic" 2018-05-29 16:42:53 +00:00
Monty Taylor
be93a25573
Don't capture stderr in siblings logic
When python setup.py --name is run in ansible/ansible currently, a
warning is printed:

  UserWarning: Normalizing '2.7.0dev0' to '2.7.0.dev0' normalized_version

With stderr=stdout, this goes into the package name causing sibling
detection to not work.

The stderr is not interesting to us from this command, so ignore it.

Change-Id: I38ea21960932dbddcac1b828e95a0cf963c3b94c
2018-05-29 11:10:24 -05:00
Stephen Finucane
a258aa9a3b Default warning-is-error to True for non-legacy Sphinx projects
We're trying to move away from the legacy pbr 'build_sphinx' command.
However, without the relevant section in the 'setup.cfg' file, we have
no way to determine if the user wishes to use the '-W'
(warning-is-error) flag when building docs. The current behavior for
this is to default to False, meaning documentation for projects that
previously used the pbr functionality to enable warning-is-error is
liable to slowly break as time passes.

To resolve this, default to True for packages with no [build_sphinx]
section in setup.cfg. This ensures that projects migrating to the new
PTI (which, when fully implemented, involves removing the [build_sphinx]
section from setup.cfg) will be forced to fix any warnings prior to the
migration. However, packages that have not been converted will not be
broken. Only pacakges that have already fully switched over to the new
PTI but which did not have warning-is-error enabled are at risk of
unexpected breakage, but even for those the short-term pain should
ultimately be outweighed by the long-term gain.

Change-Id: I677afef96370ead5a45cba854ba483f18a8d1247
2018-05-10 09:23:57 +01:00
Zuul
0a673aa13b Merge "Add simple run-test-command job" 2018-05-09 17:54:06 +00:00
Zuul
702501baa5 Merge "Run authorized_keys as root" 2018-05-07 20:05:52 +00:00
Zuul
6c22fc9431 Merge "Split logging of inventory to its own role" 2018-05-07 19:37:06 +00:00
James E. Blair
a87a1db041 Add logo to docs
Change-Id: Ic39e19e4adca85ecf8d67b35de51d604ec2510be
2018-05-04 14:50:13 -07:00
Paul Belanger
65f310e8a9
Add tox-py36 job
Ubuntu bionic (18.04) provides python3.6, lets write a tox job to also
support it.

Change-Id: I7104a2bdc1e568bf83c618bc2127f8622e6ceba9
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-05-02 15:32:53 -04:00
Paul Belanger
49711c6540
Update repo file for fedora-28
With the release of fedora-28, the default locations for
fedora-update.repo have changed. We still need to support fedora-27
until fedora-29 is released.

Change-Id: I8eacd659cf18a8dc571aea6531483610fcd91d1a
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-05-02 12:28:36 -04:00
Zuul
19868f7d2b Merge "Add installation/deprecation documentation" 2018-04-26 17:42:59 +00:00
Zuul
655b466211 Merge "Remove support for extensions as lists" 2018-04-26 13:20:48 +00:00
Andrea Frittoli (andreaf)
e79be26f70 Run authorized_keys as root
Using become_user only works if either the ansible_user is root
or pipeling is enabled. Use become instead to avoid the dependency
on pipelining being enabled.

Change-Id: I2ca65ab38b51d4949295674abfe594ce26fe35a1
2018-04-24 11:57:43 +01:00
Clark Boylan
f27644c187 Split logging of inventory to its own role
The ability to read and write the inventory is privileged and requires
you are running in a trusted context. This makes testing the
validate-host role difficult as it reads the inventory file and writes
it to the job log dir.

Make a new role called log-inventory that will allow us to eventually
remove this task from validate-host enabling better testing of validate
host. Also this will allow us to log the inventory in the post-run
logging activity.

Change-Id: I4098fd140484bc54dc95b5f4c51afb1c56c7b19c
2018-04-23 15:53:15 -07:00
Andrea Frittoli
4ea02ec487 Deploy ssh key as root for non-root users
The role to distribute the build ssh key to a user uses the "copy"
module in combination with become_user. When the target user is not
root, this does not work because the ansible user is not root
either and "copy" is not compatible with pipelining:
http://docs.ansible.com/ansible/latest/user_guide/become.html#becoming-an-unprivileged-user

To solve the issue run the copy as root and set the owner of the
target file. Use the "user" module to resolve "~" to the target user
home directory.

Change-Id: Ic66eb2b14bc55a412dfa73aa0722cd59887a4e83
2018-04-23 13:07:14 +01:00
Paul Belanger
df364a46e0
Switch to http://security.debian.org/ for debian
Today the mirror system in openstack-infra isn't properly setup to
mirror debian-security. Until we can fix this, switch to the upstream
URL.

Change-Id: Icfa7dc874d14de245927d461595f90b9dacc7825
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-04-18 13:38:23 -04:00
Clark Boylan
139f12a371 Don't use pip internals
As of pip10 pip is no longer promising external stable apis (they never
really did anyways just failed to annotate the source as such). As a
result our use of direct pip internals breaks under pip10.

We replace this with a fork and exec of pip instead as the command line
is a stable api. We were already doing this anyways so shouldn't cause
anything to run slower and should be more reliable as an api.

Note that we also remove the import of pip as this does an unexpected
thing and uses pip outside of the virtualenv rather than pip inside the
virtualenv. Since we are only forking pip inside the virtualenv now we
don't need to check for external pip.

Change-Id: Ib2628003995530881d297782f044dfc8a1c72d08
2018-04-16 10:33:46 -07:00
Zuul
39c90078d3 Merge "Fix typo in build-sphinx-docs docstring" 2018-04-13 00:39:24 +00:00
Doug Hellmann
6cb1982b0f document that the build-reno-releasenotes job accepts sphinx_python
The variable is defined by the ensure-sphinx role so it can be used with
the job.

Change-Id: Ieb6a96f84e64f8a377483437f754e809012762f5
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-04-12 16:49:41 -04:00
James E. Blair
bb86be2026 Fix typo in build-sphinx-docs docstring
This causes erroneous rendering.

Change-Id: Idca63d8983227c419d51e2bb39a0866b5fcdb0bf
2018-04-12 13:41:08 -07:00
Zuul
15038126d3 Merge "role: Inject public keys in case of failure" 2018-04-12 19:57:24 +00:00
James E. Blair
af0d8eb25b Add installation/deprecation documentation
Change-Id: I4db13e723c90628ef2e3a48ba5758a04d75b8d5c
2018-04-11 08:03:57 -07:00
Zuul
c5fc057417 Merge "Add README to ensure-tox role" 2018-04-05 18:36:29 +00:00
James E. Blair
69b7492af9 Add README to ensure-tox role
Change-Id: I1efdcb8eff522cd58e94d9465d093bbc851aa496
2018-04-05 11:07:42 -07:00
Andrea Frittoli
b3615c0d97 Remove support for extensions as lists
With tempest devstack and networking-odl switched to using dict,
we can now remove support for using lists for the list of extensions.

Depends-on: https://review.openstack.org/539686/
Depends-on: https://review.openstack.org/539708/
Depends-on: https://review.openstack.org/539854/
Change-Id: I62aaa737300c3b24e416f18e4bc469e7bd46ea29
2018-04-03 16:13:52 +01:00
David Moreau Simard
40ef3c084e
Deprecate the emit-ara-html role
This adds a deprecation notice to the README and a debug task that
prints a deprecation notice.
The role is still expected to work but will eventually be removed in
favor of the ara-report role.

This deprecation will be announced on openstack-dev and zuul-announce.

Depends-On: https://review.openstack.org/#/c/557818/
Change-Id: If25e7c7b93cfd1588233fec299a31ad3ce3a873f
2018-03-29 16:29:20 -04:00
Zuul
819cc19d3f Merge "Fix ansible-lint job" 2018-03-29 13:52:58 +00:00
Colleen Murphy
d1956bd9f7 Fix ansible-lint job
The 'linters' tox environment was not running on roles, it was only
running on playbooks. This change adds a command to the linters
environment to ensure all roles are linted.

Since these weren't being linted, there were some problems with them.
The first was a warning about usage of the shell module. Both of these
usages seemed appropriate, so this patch adds a skip_ansible_lint tag to
each task that was failing. The second is a warning "no action detected
in task" for zuul modules. This is due to the fact that the linter
cannot find the custom module. One option is to set the ANSIBLE_LIBRARY
path to point to the zuul ansible library directory[1], but the linter
virtualenv does not actually have zuul installed. Instead, we just
disable the linter for the failing tasks.

This also cleans up a comment in the tox file that was referring to a
nonexistent zuul job.

[1] https://github.com/willthames/ansible-review/issues/16

Change-Id: Ie49da9a09733b623bb25c5a4c8aa07eacacf4b33
2018-03-28 23:10:22 +02:00
Zuul
3f533918da Merge "Handle blank public_ipv4" 2018-03-27 19:46:05 +00:00
James E. Blair
b1a039970a Add a flag to disable no_log on upload-logs
So that it is possible to debug this role, add a flag which disables
setting no_log on the synchronize task.

Change-Id: Ie433ada5ff6cb15b68f19e8678244af9ce9faa13
Depends-On: https://review.openstack.org/556881
2018-03-27 09:17:18 -07:00
Ian Wienand
3230139d65 Handle blank public_ipv4
Some clouds such as limestone have no public_ipv4; handle this in the
firewall setup

Change-Id: Id4a8032a6a14a040d62d1c70bf5e6e789fd8ff55
2018-03-27 12:27:21 +00:00
Zuul
ad683253ed Merge "Uninstall and reinstall siblings one at a time" 2018-03-21 15:02:59 +00:00
Monty Taylor
a99a73dca6 Uninstall and reinstall siblings one at a time
The current logic uninstalls all detected siblings first, then it
executes a single install with all of the detected sibling git repos.

If one sibling (A) depends on another sibling (B), then the commands:

  pip uninstall A
  pip uninstall B
  pip install ../A ../B

Will result in pip finding B in the requirements list for ../A and
re-installing the released version, then considering the requirement
satisfied when it gets to ../B and not installing it.

To solve that, do the uninstall and reinstall in a single-project loop
for each sibling. This results in:

  pip uninstall A
  pip install ../A

pip will find B in ../A's requirements, but B will already be installed
because it hasn't been uninstalled yet, so nothing will happen. Then:

  pip uninstall B
  pip install ../B

Which will result in both ../A and ../B being installed.

As if that wasn't enough, if A and B happen to appear in the opposite
order, doing:

  pip uninstall B
  pip install ../B
  pip uninstall A
  pip install ../A

Will wind up with pip uninstalling ../B and installing B if the version
requested for B is greater than the version reported by ../B (which is
the case for openstack projects operating from master after a release
but before the first release of the next cycle)

In order to combat that, do a second installation pass with --no-deps.
This way the first pass will be sure to get any transitive dependency
changes, but the second pass will ensure all the siblings are installed
instead of their non-git versions.

  pip uninstall B
  pip install ../B
  pip uninstall A
  pip install ../A
  pip install --no-deps ../B
  pip install --no-deps ../A

Change-Id: I060e188313391de7847adf851566468c4b032342
2018-03-20 16:01:09 +00:00
David Moreau-Simard
d75f5d2bf2 Refactor "emit-ara-html" into a new role: "ara-report"
We are going to provide support the ARA sqlite middleware which
provides the ability for an ARA web application to dynamically load
databases, eliminating the need for HTML generation.

HTML generation does not scale very well: it's orders of magnitude
larger than the database file containing the data and it also takes
a significant amount of time to generate the report.

It would be awkward to add dynamic database things into a role called
"emit-ara-html" and so I took the opportunity to refactor things a
little bit and make the role less prone to failures.

Note that this role was developed with the nested Ansible use case in
mind -- a job running it's own copy of Ansible with ARA should be able
to use this role to generate the report or save the database.

This role will be tested with 'base-test' first and it is expected to
make the 'emit-ara-html' role obsolete if everything works well.

Change-Id: Idedc0bfa1f0f89356b795fb9e2a16f9421a2dc18
Depends-On: I3b10c93b4902a9b45e23c227863e472697f662ef
2018-03-19 15:45:34 +00:00
Zuul
d28c326b36 Merge "Parameterize the test-setup role" 2018-03-08 19:08:24 +00:00
Zuul
eeae72ef66 Merge "Add known hosts for all users" 2018-03-08 10:05:17 +00:00