Commit Graph

293 Commits

Author SHA1 Message Date
James E. Blair 1a472e85b4 Fix gerrit-delete-comment script
The "real_author" key in may have been an artifact of local testing;
it appears "author" is what we want to use.

Change-Id: I0618412f5afc598eaa783b726d275e52131dc1a4
2024-02-06 10:29:15 -08:00
James E. Blair d3570b6442 Remove obsolete delete-gerrit-spam.py script
This operates on the non-existent database.

Change-Id: I6de6c4d9479013cdac9fd9e7f9e38924e10b5e32
2024-02-06 10:01:14 -08:00
James E. Blair 9d62c9abf9 Add a tool to delete (redact) gerrit comments
This adds a CLI tool that allows a gerrit admin to list and delete
change messages and comments.

Change-Id: I3600a59520c1f13a24f99f04eaf9ceb17af67fff
2024-02-06 10:01:06 -08:00
Ian Wienand d1548e5049
tools/upstream-wheel-audit.py
This is a tool to tell us which of our on-disk wheels are duplicated
upstream by PyPI.  These are things we don't need to cache locally.

At one time, we were downloading all dependencies of our requirements
and caching them; we shouldn't be doing that any more, but anything
reported by this tool can be removed from our local mirrors.

Now that the number of platforms * number of branches is becoming a
maintence issue, this will help us foucs on keeping a useful working
set in the cache.

Change-Id: I3ded6b9869598a0907d7cda9f03bf414e46885df
2023-04-03 14:25:25 +10:00
Clark Boylan 12d4355385 Fork the maxking/docker-mailman images
These images have a number of issues we've identified and worked
around. The current iteration of this change is essentially
identical to upstream but with a minor tweak to allow the latest
mailman version, and adjusts the paths for hyperkitty and postorius
URLs to match those in the upstream mailman-web codebase, but
doesn't try to address the other items. However, we should consider
moving our fixes from ansible into the docker images where possible
and upstream those updates.

Unfortunately upstream hasn't been super responsive so far hence this
fork. For tracking purposes here are the issues/PRs we've already filed
upstream:

  https://github.com/maxking/docker-mailman/pull/552
  https://github.com/maxking/docker-mailman/issues/548
  https://github.com/maxking/docker-mailman/issues/549
  https://github.com/maxking/docker-mailman/issues/550

Change-Id: I3314037d46c2ef2086a06dea0321d9f8cdd35c73
2022-11-21 16:51:02 +00:00
Clark Boylan c1c91886b4 Add a mailman3 list server
This should now be a largely functional deployment of mailman 3. There
are still some bits that need testing but we'll use followup changes to
force failure and hold nodes.

This deployment of mailman3 uses upstream docker container images. We
currently hack up uids and gids to accomodate that. We also hack up the
settings file and bind mount it over the upstream file in order to use
host networking. We override the hyperkitty index type to xapian. All
list domains are hosted in a single installation and we use native
vhosting to handle that.

We'll deploy this to a new server and migrate one mailing list domain at
a time. This will allow us to start with lists.opendev.org and test
things like dmarc settings before expanding to the remaining lists.

A migration script is also included, which has seen extensive
testing on held nodes for importing copies of the production data
sets.

Change-Id: Ic9bf5cfaf0b87c100a6ce003a6645010a7b50358
2022-11-11 23:20:19 +00:00
Jeremy Stanley 220a3ced6d Ignore bashate E010
The check for 'The "do" should be on same line as for' is not a good
rule when the loop condition is too long to fit on a single line, so
excludes more readable ways of constructing the script. Ignore it.

Also, ironically, wrap some long lines in the tools/run-bashate.sh
script since we're editing it anyway.

Change-Id: I1f2cf44896a0137fcb954f67005268faa7291d5e
2022-09-26 20:00:21 +00:00
Clark Boylan 67c4e0202d Finish removing git.openstack.org references
The remaining references are actually about the service itself.

Change-Id: Id40dd72370add572fec615e0b5cd8c8bd3a200f8
2022-03-18 09:22:37 -07:00
James E. Blair b58b204a8e Add matrix-eavesdrop container image
This builds a container image with a simple eavesdrop bot for Matrix.

Change-Id: I5304b4ec974b84886ac969b59cfcec8dec2febf9
2021-07-23 14:28:22 -07:00
Zuul f80ab86043 Merge "Move meetbot config to eavesdrop01.opendev.org" 2021-06-11 00:10:56 +00:00
Ian Wienand ccda6d08a1 Move meetbot config to eavesdrop01.opendev.org
This enables the new eavesdrop01.opendev.org server in all current
channels.  Puppet has been disabled on the old server and we will
manually stop supybot/meetbot and mirgrate logs before this applies.

Change-Id: I4a422bb9589c8a8761191313a656f8377e93422f
2021-06-10 09:02:23 +10:00
Clark Boylan 6e04e500fd Remove system-config-legacy-logstash-filters job
We're trying to phase out the ELK systems. While we have agreed to not
immediately turn anything off we probably don't need to keep running the
system-config-legacy-logstash-filters job as ELK should remain fairly
fixed unless someone rewrites config management for it and modernizes
it. And if that happens they will want new modern testing too.

Depends-On: https://review.opendev.org/c/openstack/project-config/+/792710
Change-Id: I9ac6f12ec3245e3c1be0471d5ed17caec976334f
2021-05-21 17:03:32 -07:00
Clark Boylan dd8dca09f8 Add note about python -u to external id cleanup script
This makes it easier to track progress.

Change-Id: Iaa1a9f2006bead7d400e8c21931d8768bb4ec3a0
2021-04-12 08:44:57 -07:00
Clark Boylan 7ee556ca44 Have audit-users.py write out serialized data
This allows us to "query" the datastructure for different perspectives
without needing to rerun the costly queries each time we update
audit-uses.py. The script is predominantly collecting data now, then we
can use the python repl or other scripts to give us better insights.

We also do a small refactoring to simplify the collection of data.

Change-Id: Ie777ae706050b38ce294a1acf9b1b843fcf5ab41
2021-03-15 13:11:18 -07:00
Clark Boylan 112cbc6cfe Add tools being used to make sense of gerrit account inconsistencies
The first tool has been used to "retire" accounts that have preferred
email addresses without a matching external id. The second is being used
to make sense of whether or not we can do a bulk retirement of accounts
with email conflicts in their external ids. The third is a script that
can be used to remove external ids from accounts in bulk based on their
email addresses.

Change-Id: Idf22cfc9f2bac7d3921e006c40faef4585c2d977
2021-03-05 11:06:12 -08:00
Zuul faf041540c Merge "Revert "Install older setuptools in puppet apply jobs"" 2021-02-11 01:33:50 +00:00
Clark Boylan 8d932bc706 Use sudo to move applytest results
We're wanting to more properly set permissions on the ansible puppet
role manifest dir. This ends up setting mode 0755 with ownership of
root:root on the dir. As a result sudo is necessary to move these
contents later.

Change-Id: I6b6aa79e8e8b63f4665679ab183a8551f0dd521e
2020-11-10 09:47:21 -08:00
Clark Boylan b32d0b880c Revert "Install older setuptools in puppet apply jobs"
This reverts commit be802b319a.

A 50.1.0 release of setuptools has been made which reverts the breaking
behavior.

Change-Id: Ic32afc1466556eed9aaf3869974d85d5f779375f
2020-09-03 08:57:45 -07:00
Clark Boylan be802b319a Install older setuptools in puppet apply jobs
We create a virtualenv to install ansible in which then runs puppet for
us in our puppet apply jobs. This is pulling in setuptools 50 which then
fails due to the problems setuptools 50 has with older pythons. Address
this by pinning back to setuptools <50.

Change-Id: I02ea466319f7cd90f73972bf5a99876d14823ac1
2020-09-01 13:59:21 -07:00
Sorin Sbarnea b6311b5498 Switch prep-apply.sh to use python3
As part of py2 deprecation, we need to obliterate its use before
being able to drop it.

Change-Id: I35101a53265705513feaf7278e48c02a92a0c3e5
2020-06-15 14:43:25 -05:00
Monty Taylor 83ced7f6e6 Split inventory into multiple dirs and move hostvars
Make inventory/service for service-specific things, including the
groups.yaml group definitions, and inventory/base for hostvars
related to the base system, including the list of hosts.

Move the exisitng host_vars into inventory/service, since most of
them are likely service-specific. Move group_vars/all.yaml into
base/group_vars as almost all of it is related to base things,
with the execption of the gerrit public key.

A followup patch will move host-specific values into equivilent
files in inventory/base.

This should let us override hostvars in gate jobs. It should also
allow us to do better file matchers - and to be able to organize
our playbooks move if we want to.

Depends-On: https://review.opendev.org/731583
Change-Id: Iddf57b5be47c2e9de16b83a1bc83bee25db995cf
2020-06-04 07:44:36 -05:00
Monty Taylor 3e4d99b6fd Remove global variables from manifest/site.pp
We have one global variable that is used in two places.
By removing it, we can more easily split site.pp into
per-service manifest files, and ultimately we should be
deriving this from groups['elasticsearch'] anyway.

Change-Id: I1d794b269847da85778f71e816359953af9b31e0
2020-04-19 10:59:25 -05:00
Monty Taylor 00f30529e3 Make applytest files outside of system-config
We are copying system-config in parallel to a bunch of targets
and we're also creating and deleting applytest files. Instead,
do the apply test files outside of the dir that's going to
get synced in the puppet role.

While we're at it, copy don't link the openstack_project
module into /etc/puppet/modules, just to be sure.

Change-Id: I4bcd8ebd6da8395e77d673ac76f4c41568d810ec
2020-04-19 10:57:22 -05:00
Zuul e3ad9e79eb Merge "Get rid of all-clouds.yaml" 2020-04-16 15:41:55 +00:00
Monty Taylor ebae022d07 Use project-config from zuul instead of direct clones
We use project-config for gerrit, gitea and nodepool config. That's
cool, because can clone that from zuul too and make sure that each
prod run we're doing runs with the contents of the patch in question.

Introduce a flag file that can be touched in /home/zuulcd that will
block zuul from running prod playbooks. By default, if the file is
there, zuul will wait for an hour before giving up.

Rename zuulcd to zuul

To better align prod and test, name the zuul user zuul.

Change-Id: I83c38c9c430218059579f3763e02d6b9f40c7b89
2020-04-15 12:29:33 -05:00
Monty Taylor 8af7b47812 Get rid of all-clouds.yaml
We had the clouds split from back when we used the openstack
dynamic inventory plugin. We don't use that anymore, so we don't
need these to be split. Any other usage we have directly references
a cloud.

Change-Id: I5d95bf910fb8e2cbca64f92c6ad4acd3aaeed1a3
2020-04-09 16:44:20 -05:00
James E. Blair 9df9b7a5cb Use SafeLoader in irc_checks
This clears a python warning.

Change-Id: I79e088efb2a825a71723f97d563c96658f7f15ba
2020-04-09 06:52:32 -07:00
Zuul 927072831b Merge "Fix URLs after OpenDev rename" 2020-03-19 01:19:16 +00:00
Zuul e3f7c8cee8 Merge "Update references to IRC channels" 2020-03-18 18:55:57 +00:00
Andreas Jaeger 173118e471 Fix URLs after OpenDev rename
As part of OpenDev rename, a lot of links were changed.
A couple of URLs point to old locations, update them.

This list was done while grepping for "openstack-infra" and fixing
locations that are wrong.

Change-Id: I313d76284bb549f1b2c636ce17fa662c233c0af9
2020-03-18 18:23:17 +01:00
Dr. Jens Harbott c86525ccd3 Update references to IRC channels
With the move from OpenStack governance to our own OpenDev team, we
should also move to use the #opendev IRC channel in preference to
the #openstack-infra channel which will remain in use for OpenStack
specific discussions.

Update the references in our docs accordingly.

Change-Id: I448704f5d2664fd233a69a2ad12578ca24d9878a
2020-03-18 17:33:08 +01:00
Clark Boylan 9e394d24d0 Return goaccess html as zuul artifact
This will give us a nice link to the goaccess reports on the zuul
dashboard build pages.

Move ansible-lint config into config file

As of 4.2.0 we can configure ansible-lint with a config file. It's
also apparently now smart enough to only find ansible yaml. Let's
see how that goes.

Add a fake zuul_return module

This should let us fake out ansible-lint without having to install
all of zuul.

Change-Id: Ib233eb577a8ca2aabfe3a49b2cd823dd4a00bd82
2020-03-11 14:28:28 -05:00
Monty Taylor 2aebe4e09f Add quick script for cleaning boot from volume leaks
Sometimes we leak boot from volume volumes. This will clean them
up.

Change-Id: I45182c1dcad0cdcbc327aaef3a63d37947f8a66d
2020-01-10 16:55:07 -06:00
Zuul cd402000a4 Merge "Several updates because the world is a dark place" 2019-10-19 00:58:47 +00:00
Monty Taylor 9ab25e89a9 Several updates because the world is a dark place
A few things have changed and we need to fix them in one go.

Use mirror for installing docker for buildset-registry

While, we need to make this more systemic, that's hanging off of the
mirror rework. For now, since we know all of these jobs are debian
based, just set the mirror location.

Replace use of zuul cloner with git clones

You can never be a prophet in your own hometown. This is now broken
because of the git cache rework, so just replace it.

Update libjemalloc library

python:slim is based on buster now, which has libjemalloc2 not
libjemalloc1.

Remove gerrit repo remote for submodules

A recent change to the base jobs to use prepare-workspace-git
broke the gerrit image builds by actually having the origin
remote by /dev/null as intended. This breaks submodules because
for a few of them where we don't have matching stable branches
the submodule relative path behavior is actually exactly what
we want.

Since we don't care about the remote otherwise, remove the
origin remote before doing the submodule update --init so that
the submodule will clone the refs from the zuul prepared repo.

Change-Id: Ieb5b6bc8711fe971ed3445c7c267306ac4616464
2019-10-19 07:51:29 +09:00
James E. Blair d284333363 Remove newlines in afs server params variable
This causes newlines to appear in the config file which causes the
server to fail to start which is the opposite of what this is
supposed to do.

Change-Id: I2ff7e8835878652b3a7cdc2f633d263b37aaa7e9
2019-09-06 11:20:15 -07:00
Zuul 1b14855a45 Merge "AFS server restart and audit logging : helper script" 2019-08-29 21:03:09 +00:00
Ian Wienand 35f1321e14 AFS server restart and audit logging : helper script
This script helps restart the AFS servers, which is useful when
updating parameters.  It can also enable audit logging.

It can also stop and start the servers, although it's unlikely we'd
want all the servers offline at the same time so stopping has a
warning included.

Documentation is updated to refer to the helper script

Change-Id: Idcb3e43a3f6e614cdb787d4334e692a98bffdd15
2019-08-02 16:37:00 +10:00
Zuul 3e03b7481d Merge "Add tool to analyze check and gate success rates" 2019-07-31 00:28:06 +00:00
Clark Boylan ffcd1791bf Cleanup nodepool builder clouds.yaml
We ended up running into a problem with nodepool built control plane
images (has to do with boot from volume not allowing us to delete images
that are in use by a nova instance). We have decided to clean this up
and go back to not doing this until we can do it more properly.

Note this isn't a revert because having a group for access to control
plane clouds does seem like a good idea in general and I believe there
have been changes we'd have to resolve in the clouds.yaml files anyway.

Depends-On: https://review.opendev.org/#/c/665012/
Change-Id: I5e72928ec2dec37afa9c8567eff30eb6e9c04f1d
2019-07-22 13:55:29 -07:00
Clark Boylan 00348a4d0d Add tool to analyze check and gate success rates
This tool scans gerrit changes for comments from zuul over the last 30
days to build out success rates for check and gate pipelines. This only
looks at changes that have merged to avoid those that never can merge
because they only fail or are expected to fail.

This tool emits information like:

  Changes: 4475
  Check Failures: 5317.0
  Check Successes: 9173.0
  Check Rate of failure: 0.3669427191166322
  Gate Failures: 687.0
  Gate Successes: 4450.0
  Gate Rate of failure: 0.13373564337161767
  Total Failures: 6004.0
  Total Successes: 13623.0
  Total Rate of failure: 0.3059051306873185

Change-Id: I759ba670c6b81f4425ce618c412db9cbd0e51401
2019-07-19 09:58:40 -07:00
Zuul 1fe34e00d4 Merge "Add control plane clouds to nodepool builder clouds.yaml" 2019-06-04 20:15:24 +00:00
Zuul 216059e134 Merge "Add opendev migration repo rename scripts" 2019-05-30 21:07:37 +00:00
Jeremy Stanley 0c0b8e3087 Add opendev migration repo rename scripts
Git repo moves based on cgit aliases from project-config, the
OpenStack TC guidance recorded in
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html
and the ethercalc used to collect input from other users of the
system. Also the results of an extensive bikeshedding session at
http://eavesdrop.openstack.org/irclogs/%23openstack-infra/%23openstack-infra.2019-04-11.log.html#t2019-04-11T14:54:09
which concluded that anything left homeless goes in a namespace
called "x" since that's short, a basic alphabetic character and
provides no particular connotation.

The opendev-migrate script, when run, provides a shareable rendering
on stdout and also writes a repos.yaml file for input into the
rename_repos playbook.

The opendev-patching script, when run, uses the repos.yaml file and
iterates over a tree of Git repositories updating their Zuul
configuration, playbooks and roles as well as .gitreview files both
for the project renames and the opendev hostname changes. It also
creates a rename commit in project-config so that manage-projects
will be in sync with the results of the rename_repos playbook.

Change-Id: Ifa9fa6896110e8a33f32dcda6325bd58846935e2
Task: #30570
Co-Authored-By: James E. Blair <jeblair@redhat.com>
2019-05-23 22:01:07 +00:00
Clark Boylan 926ba11184 Cleanup bashate errors to make them easier to understand
We ignore E006 which is line lenght longer than 79 characters. We don't
actually care about that. Fix E042 in run_all.sh this represents a
potential real issue in bash as it will hide errors.

This makes the bashate output much cleaner which should make it easier
for people to understand why it fails when it fails in check.

Change-Id: I2249b76e33003b57a1d2ab5fcdb17eda4e5cd7ad
2019-05-23 14:00:37 -07:00
Monty Taylor ff1b8a94c6 Add control plane clouds to nodepool builder clouds.yaml
In order to have nodepool build images and upload them to control
plane clouds, add them to the clouds.yaml on the nodepool-builder
hosts. Keep them out of the launcher configs by splitting the config
templates. So that we can keep our copies of things to a minimum,
create a group called "control-plane-clouds" and put bridge and nb0*
in it.

There are clouds mentions in here that we no longer use, a followup
patch will clean those up.

NOTE: Requires shifting the clouds config dict from
host_vars/bridge.openstack.org.yaml to group_vars/control-plane-clouds.yaml
in the secrets on bridge.

Needed-By: https://review.opendev.org/640044
Change-Id: Id1161bca8f23129202599dba299c288a6aa29212
2019-05-23 14:34:10 -05:00
Zuul 01dfccbd99 Merge "Drop tools/owners.py" 2019-05-23 07:57:48 +00:00
Ian Wienand d5b321b074 Handle moved puppet repos
As per [1], it seems puppet has "cleaned up" most of the packages we
are using to install.

Install the puppet-agent packages directly as puppet's archive location
is not a valid repo. With puppet 4 at least these packages should bundle
everything we need including ruby.

[1] https://groups.google.com/forum/#!msg/puppet-users/cCsGWKunBe4/OdG0T7LeDAAJ

Depends-On: https://review.opendev.org/659384
Depends-On: https://review.opendev.org/659395
Change-Id: Ie9e2b79b42f397bddd960ccdc303b536155ce123
2019-05-15 16:03:07 -07:00
Jeremy Stanley 4cb523cdc9 Drop tools/owners.py
Now that the tools/owners.py script is a module in the
openstack_election package within the openstack/election repository,
we can stop providing a copy here.

Change-Id: I39efbad539790687646c1d76159894e9e997ff72
Depends-On: I180ef0e5ec880b46f0427c1c952b640a780b5732
2019-05-12 11:26:39 +00:00
Monty Taylor e69c7b7fb9 Rename review.openstack.org to review.opendev.org
There are many references to review.openstack.org, and while the
redirect should work, we can also go ahead and fix them.

Change-Id: I28f398796a6392a3dffea1d25cfe2ae3a36a3589
2019-05-09 14:38:51 +00:00