1343 Commits

Author SHA1 Message Date
Zuul
b6f5d4f314 Merge "Allow setting Gitea repo branch on project creation" 2020-07-17 20:50:59 +00:00
Zuul
ae440c4fcc Merge "Fix junit error, add HTML report" 2020-07-16 23:45:53 +00:00
Zuul
33a87d7989 Merge "Revert "Revert "Add Zookeeper TLS support""" 2020-07-16 19:43:48 +00:00
James E. Blair
7a32463f9d Revert "Revert "Add Zookeeper TLS support""
This reverts commit 05021f11a29a0213c5aecddf8e7b907b7834214a.

This switches Zuul and Nodepool to use Zookeeper TLS.  The ZK
cluster is already listening on both ports.

Change-Id: I03d28fb75610fbf5221eeee28699e4bd6f1157ea
2020-07-15 15:45:48 -07:00
danpawlik
7f9476f74e Added development/rawhide image
Fedora 33 is not released yet and the TripleO team would
like to perform some tests on that image.

Change-Id: I39f6bedadc12277739292cf31cc601bc3b6e30ec
2020-07-15 19:35:14 +02:00
Clark Boylan
1e2a34704a Allow setting Gitea repo branch on project creation
Note this shouldn't be used until we can configure Gerrit to do similar
with jeepyb. Otherwise we'll end up with mismatched branches between our
canonical source (Gerrit) and our mirrors (Gitea).

Change-Id: I8d353cbc90c2d354e7cdebfc4e247f3f73d97d86
2020-07-15 10:23:59 -07:00
Zuul
ec22b7dac2 Merge "Stop cloning k8s-on-openstack" 2020-07-15 12:39:32 +00:00
Ian Wienand
ba45f251d1 Fix junit error, add HTML report
Specifying the family stops a deprecation warning being output.

Add a HTML report and report it as an artifact as well; this is easier
to read.

Change-Id: I2bd6505c19cee2d51e9af27e9344cfe2e1110572
2020-07-15 07:03:22 +10:00
Monty Taylor
fca18e4776 Stop cloning k8s-on-openstack
We're not actually using this repo at the moment.

Change-Id: I765140c65e4d7b45e2258d8fc267090f982de058
2020-07-14 08:22:49 -05:00
Ian Wienand
c697f22413 run-base : don't strip root ssh private key
Builds running on the new container-based executors started failing to
connect to remote hosts with

 Load key "/root/.ssh/id_rsa": invalid format

It turns out the new executor is writing keys in OpenSSH format,
rather than the older PEM format.  And it seems that the OpenSSH
format is more picky about having a trailing space after the

 -----END OPENSSH PRIVATE KEY-----

bit of the id_rsa file.  By default, the file lookup runs an rstrip on
the incoming file to remove the trailing space.  Turn that off so we
generate a valid key.

Change-Id: I49bb255f359bd595e1b88eda890d04cb18205b6e
2020-07-14 13:13:13 +10:00
Zuul
5c7804d4a5 Merge "Paginate all the gitea get requests" 2020-07-13 20:53:27 +00:00
Ian Wienand
5f2e6c43a8 gitea: open port 3081
I476674036748d284b9f51e30cc2ffc9650a50541 did not open port 3081 so
the proxy isn't visible.  Also this group variable is a better place
to update the setting.

Change-Id: Iad0696221bb9a19852e4ce7cbe06b06ab360cf11
2020-07-08 13:54:44 +10:00
Zuul
e15c702df6 Merge "gitea: install proxy" 2020-07-08 01:08:21 +00:00
Zuul
c72451c466 Merge "Don't install the track-upstream cron on review-test" 2020-07-08 00:26:25 +00:00
Ian Wienand
032a88412e gitea: install proxy
We have decided to go with the layer 7 reject rules; enable the
reverse proxy for production hosts.

Change-Id: I476674036748d284b9f51e30cc2ffc9650a50541
2020-07-08 09:12:36 +10:00
Zuul
49a4dc6a23 Merge "graphite: statsd timer settings" 2020-07-07 21:10:56 +00:00
Zuul
623c93d632 Merge "gitea: crawler UA reject rules" 2020-07-07 21:10:54 +00:00
Zuul
466e14b5f7 Merge "gitea: Add reverse proxy option" 2020-07-07 21:07:57 +00:00
Monty Taylor
4d26d9cb40 Don't install the track-upstream cron on review-test
This is just spawning containers that never die.

Change-Id: I1f5215c6e60ac59d1eb224bef9032785938dfc70
2020-07-07 14:40:24 -05:00
Ian Wienand
f8e35e676a graphite: statsd timer settings
This brings in the settings added with
I87c85f82f6d38506977bc9bf26d34f6e66746b01 to the container deployment.
As noted there, this stops statsd writing null values for sparesly
updated timers and counters.

Change-Id: I14b5ee40fc8efddfb7bad4fad8a8ae66746131d9
2020-07-07 17:03:46 +10:00
Zuul
c2b2efdf5b Merge "Graphite container deployment" 2020-07-07 00:41:10 +00:00
Zuul
1d610297f3 Merge "Grafana container deployment" 2020-07-06 05:56:02 +00:00
Ian Wienand
185797a0e5 Graphite container deployment
This deploys graphite from the upstream container.

We override the statsd configuration to have it listen on ipv6.
Similarly we override the ngnix config to listen on ipv6, enable ssl,
forward port 80 to 443, block the /admin page (we don't use it).

For production we will just want to put some cinder storage in
/opt/graphite/storage on the production host and figure out how to
migrate the old stats.  The is also a bit of cleanup that will follow,
because we half-converted grafana01.opendev.org -- so everything can't
be in the same group till that is gone.

Testing has been added to push some stats and ensure they are seen.

Change-Id: Ie843b3d90a72564ef90805f820c8abc61a71017d
2020-07-03 07:17:28 +10:00
Ian Wienand
b146181174 Grafana container deployment
This uses the Grafana container created with
Iddfafe852166fe95b3e433420e2e2a4a6380fc64 to run the
grafana.opendev.org service.

We retain the old model of an Apache reverse-proxy; it's well tested
and understood, it's much easier than trying to map all the SSL
termination/renewal/etc. into the Grafana container and we don't have
to convince ourselves the container is safe to be directly web-facing.

Otherwise this is a fairly straight forward deployment of the
container.  As before, it uses the graph configuration kept in
project-config which is loaded in with grafyaml, which is included in
the container.

Once nice advantage is that it makes it quite easy to develop graphs
locally, using the container which can talk to the public graphite
instance.  The documentation has been updated with a reference on how
to do this.

Change-Id: I0cc76d29b6911aecfebc71e5fdfe7cf4fcd071a4
2020-07-03 07:17:22 +10:00
Zuul
90d1a15ea0 Merge "Upgrade Etherpad to 1.8.4" 2020-07-02 19:50:32 +00:00
Dmitriy Rabotyagov
2d3cd843fd Add copr-lxc3 to list of mirrors
LXC3 is usable with CentOS 8, while lxc2 is not available for it anymore
So it's worth adding it to reduce network related issues in CI

Change-Id: I562a7d8000ecda8790da88f08128c35b1ec4a2c9
2020-07-02 00:15:37 +03:00
Zuul
9b54e7205c Merge "Remove the tcplog option from haproxy configs" 2020-07-01 19:40:20 +00:00
Ian Wienand
8d0d6155ed gitea: crawler UA reject rules
As described inline, this crawler is causing us problems as it hits
the backends indiscriminately.  Block it via the known UA strings,
which luckily are old so should not cause real client issues.

Change-Id: I0d78a8b625b69f600e00e8b3ea64576e0fdb84d9
2020-07-01 16:15:59 +10:00
Ian Wienand
870f664648 gitea: Add reverse proxy option
This adds an option to have an Apache based reverse proxy on port 3081
forwarding to 3000.  The idea is that we can use some of the Apache
filtering rules to reject certain traffic if/when required.

It is off by default, but tested in the gate.

Change-Id: Ie34772878d9fb239a5f69f2d7b993cc1f2142930
2020-07-01 15:33:05 +10:00
Clark Boylan
04efabaacb Update gitea access log format
We use the Ctx.Req object's RemoteAddr value as it should include the
IP:port combo according to https://golang.org/pkg/net/http/#Request. The
default template uses Ctx.RemoteAddr which Macaron attempts to parse for
x-forwarded-for values but this has the problem of stripping out any
port info.

The port info is important for us because we are doing layer 4 load
balancing and not http l7 load balancing. That means the ip:port
mappings are necessary to map between haproxy and gitea logs.

Change-Id: Icea0d3d815c9d8dd2afe2b1bae627510c1d76f99
2020-06-30 16:22:25 -07:00
Jeremy Stanley
836cb746c8 Remove the tcplog option from haproxy configs
Adding the tcplog option to an haproxy backend definition overrides
the default log format. Remove it so the supplied default (which we
based on the tcplog built-in default with some additions) will be
used instead.

Change-Id: Id302dede950c1c2ab8e74a662cc3cb1186a6593d
2020-06-30 22:22:28 +00:00
Zuul
a62d99498a Merge "Add backend source port to haproxy logs" 2020-06-30 21:39:03 +00:00
Jeremy Stanley
497df9b4d1 Add backend source port to haproxy logs
When forwarding TCP sockets at OSI layer 4 with haproxy, it helps to
know the ephemeral port from which it sources each connection to the
backend. In this way, backend connections can be mapped to actual
client IP addresses by correlating backend service access logs with
haproxy logs.

Add "[%bi]:%bp" between the frontend name and backend name values
for the default log-format documented here:

    https://www.haproxy.com/blog/haproxy-log-customization/

Change-Id: Ic2623d483d98cd686a85d40bc4f2e8577fb9087f
2020-06-30 19:46:26 +00:00
James E. Blair
5b3d38d4d7 Enable access log in gitea
This will write an NCSA style access.log file to the logs volume.
This will let us see user agents, etc, to aid in troubleshooting.

Change-Id: I64457f631861768928038676545067b80ef7a122
2020-06-30 12:24:12 -07:00
Jeremy Stanley
794799d4ae Revert "Increase allowed number of haproxy connections"
The increase in connection volume is not sustainable for the available memory on the backend servers. We'll likely need to scale the cluster before reattempting this.

This reverts commit 79f363164ed0c81e4c7603885f8e9815164b2df2.

Change-Id: Ibe64f472633a62df659c6183aa96e095dda7fdbc
2020-06-30 17:36:13 +00:00
Clark Boylan
79f363164e Increase allowed number of haproxy connections
We've set maxconn to 4k concurrent connections on the front side of our
haproxy load balancer. Currently that seems to be creating a large
backlog of requests. Looking at cacti it appears that we have maybe up
to ~6-8 times this amount of overhead in resources on the gitea
backends. Be a little conservative and bump this value up by 4x and tune
from there.

Change-Id: I56d43b52c23f251cc632315c3b57e45541722970
2020-06-30 07:26:47 -07:00
Zuul
fdd4770f11 Merge "Stop running manage projects on review-test" 2020-06-27 22:28:30 +00:00
Clark Boylan
bad1e57ebd Paginate all the gitea get requests
According to gitea swagger definitions all of these GET requests for
lists of items are paginated with a max limit of 50 items per request.
Update our ansible machinery to properly page these items to avoid
problems in the future.

Note we should try and confirm that this is how it works for production
gitea.

Change-Id: I5df13288b497fb4fb716b4223b3dd61c698a7739
2020-06-26 11:59:12 -07:00
Monty Taylor
e161767beb Stop running manage projects on review-test
This was originally left here because it seemed like a good thing
to test, but it's currently causing thigns to hang. Exclude it
until we know why.

Change-Id: Ibc6f001e1235e9f0d856cc350ed8099e52c706e9
2020-06-26 11:07:10 -05:00
Clark Boylan
9b5e5d3c57 Deal with gitea pagination of repo lists
We list gitea repos to determine if we need to create a repo. If the
repo isn't listed by gitea we create it. New gitea paginates these
listings so we were only getting 30 repos listed when we had far more.
This resulted in us trying to create repos which already exist which is
a gitea http 409 error.

Fix this by paging through the listings until we've seen all the
repos. This should give us a complete listing.

To test this we run our manage-projects playbook twice in the
system-config-run-gitea job. The first pass creates all the new
projects. Then the second pass should noop cleanly.

Change-Id: I73b77b9ddaa0106d4dc0a49c4d4b7751a39a16f9
Co-Authored-By: Jeremy Stanley <fungi@yuggoth.org>
2020-06-25 13:51:27 -07:00
Zuul
d86cbf379f Merge "Run zuul-executor using docker" 2020-06-24 16:10:32 +00:00
Jeremy Stanley
ab50b54169 Limit connections for static site Apache workers
We've noticed that our static sites will semi-regularly have
problems due to stale SSL certs served by Apache workers which
predate the latest certificate replacement and haven't terminated
(graceful restart only ends the running workers once they have no
remaining connections). Limit the impact of this by recycling
workers automatically after a reasonable (large) number of
connections.

This implementation is shamelessly stolen from that used in
Ic377f48d1a5a3eecbcb183327c9255134c4364ab for our mirror sites.

Change-Id: I2e5c0bdf012184ebbfccb086b967008bf12582ab
Co-Authored-By: Clark Boylan <clark.boylan@gmail.com>
2020-06-23 20:41:31 +00:00
Zuul
b1c2a99ff2 Merge "Zookeeper: listen on plain and TLS ports" 2020-06-19 22:12:21 +00:00
Zuul
a3390e269f Merge "mirror-update: restore -t to rsync commands" 2020-06-19 03:34:36 +00:00
Ian Wienand
a58ad34a5c mirror-update: restore -t to rsync commands
We found that new data (since we removed -t) was no correctly being
skipped for re-download.  We have found that this doesn't happen with
-t on later rsyncs, which have included fixes for -t to not touch the
timestamps if things are not updated.  We have updated mirror-update
to Focal that has this rsync, so restore the flag.

Change-Id: I3fa16dbf6487a442549c540796807ef4916d4e6e
2020-06-19 12:27:46 +10:00
Zuul
320eeafb83 Merge "Add playbook for syncing state from review to review-test" 2020-06-19 00:19:38 +00:00
Zuul
e5b5a800ba Merge "Make a review-test that we run ansible on" 2020-06-19 00:19:33 +00:00
Clark Boylan
b0364059aa No log the make nodepool zk hosts task
Ansible has a tendency to log too much. Make it log less.

Change-Id: Ic32332430d90ff4cb00564943c9281765aa72fb1
2020-06-18 14:52:08 -07:00
Clark Boylan
f7e92ee669 Improve ansible yaml output for humans
We use ansible's to_nice_yaml output filter when writing ansible
datastructures to yaml. This has a default indent of 4, but we humans
usually write yaml with an indent of 2. Make the generated yaml more
similar to what us humans write and set the indent to 2.

Change-Id: I3dc41b54e1b6480d7085261bc37c419009ef5ba7
2020-06-18 10:02:11 -07:00
Zuul
bec4b57d81 Merge "Add stop and start playbooks for nodepool" 2020-06-17 20:55:15 +00:00