Commit graph

140 commits

Author SHA1 Message Date
Stephen Smoogen
5405fa546c Added: geoip copy to mirrorlist_proxy. Changed: geoip to not copy over broken sync script. Fixed: bad geolocation from 2018 2022-05-19 18:15:47 +00:00
Adrian Reber
ff550a4317 Try to restart a mirrorlist-server process if not running
Sometimes we see that mirrorlist-server processes are not running and it
just needs to be restarted. Let the script try it twice before erroring
out.

The most common reason for non running mirrorlist-server processes seems
to be incomplete or truncated input files which is usually fixed the
next time the data is synced.

Signed-off-by: Adrian Reber <adrian@lisas.de>
2022-01-24 18:52:32 +00:00
Adrian Reber
cb4bb12298 mirrorlist: clean up unused definitions
Remove everything which is related to running the mirrorlist server
process as a container. This has not been used for the last few months.

Also remove the 3 mirrorlist process setup for IAD2 as it is no longer
necessary and removing it also simplifies the configuration.

Signed-off-by: Adrian Reber <adrian@lisas.de>
2020-11-17 07:32:01 +00:00
Nick Bebout
44cedc6405 This should be iad2 not {{ datacenter }} 2020-06-19 11:50:27 -05:00
Stephen Smoogen
8d5fc4ced0 Various mirrormanager items were hardcoded to phx2 and needed to be
updated to iad2 so that propogation and other rules were put in
place.
2020-06-13 15:37:46 -04:00
Kevin Fenzi
2f81e76657 iad2: adjust a bunch of things that were delegating directly to phx2 hosts
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-06-03 12:54:59 -07:00
Adrian Reber
9e96f524c5 mirrorlist: do not use containers for mirrorlist-server
The new mirrorlist-server is a single binary and can easily be run as a
service without a container. There have been problems running the
mirrorlist container rootless, especially the combination of running it
as a systemd server and rootless often failed during container
stop/removal.

With this change, starting with Fedora 31, the mirrorlist-server package
is installed and started via systemd to answer haproxy requests. Without
any container.

Signed-off-by: Adrian Reber <adrian@lisas.de>
2020-04-24 21:34:20 +02:00
Adrian Reber
61a907cb03 Revert "mirrorlist: second try to rework unit file"
This reverts commit 98a36251d86f0336e4affca521aa4e70aa894b92.
2020-04-24 21:34:19 +02:00
Adrian Reber
bb95189281 Revert "mirrolist: correctly handle SELinux labels of mounted directories"
This reverts commit 0ad533cf7c9d82a1564734de6839cca3c588308c.
2020-04-24 21:34:19 +02:00
Adrian Reber
8e13bac145 mirrolist: correctly handle SELinux labels of mounted directories
Signed-off-by: Adrian Reber <adrian@lisas.de>
2020-04-24 21:34:19 +02:00
Adrian Reber
ace91e0f9f mirrorlist: second try to rework unit file
Still based on https://www.redhat.com/sysadmin/podman-shareable-systemd-services

Signed-off-by: Adrian Reber <adrian@lisas.de>
2020-04-24 21:34:19 +02:00
Adrian Reber
4b588f620c Revert "mirrorlist: adapt service file based on official recommendation"
This reverts commit 96904b2c5bf5a2cee1cacd877911740954f4b245.
2020-04-24 21:34:19 +02:00
Adrian Reber
ad8c451629 Revert "mirrorlist: use correct path for cid and pid file"
This reverts commit 43d3cc1523a53a094ca765aee8c754d406673ffc.
2020-04-24 21:34:19 +02:00
Adrian Reber
11c8cae9e7 Revert "mirrorlist: typo: it has to be user not run"
This reverts commit a08982cf8cd952e2b857c356515773200a972d95.
2020-04-24 21:34:19 +02:00
Adrian Reber
2c4434a520 Revert "mirrorlist: with forking use 'podman run -d'"
This reverts commit a18931da2d1c6b43831137951512bc130b0e77ed.
2020-04-24 21:34:19 +02:00
Adrian Reber
2202fe726d mirrorlist: with forking use 'podman run -d'
Signed-off-by: Adrian Reber <adrian@lisas.de>
2020-04-24 21:34:19 +02:00
Adrian Reber
c8b551c319 mirrorlist: typo: it has to be user not run
Signed-off-by: Adrian Reber <adrian@lisas.de>
2020-04-24 21:34:19 +02:00
Adrian Reber
3d55811795 mirrorlist: use correct path for cid and pid file
Signed-off-by: Adrian Reber <adrian@lisas.de>
2020-04-24 21:34:19 +02:00
Adrian Reber
639bcfd0f5 mirrorlist: adapt service file based on official recommendation
This changes the mirrorlist service file to conform to the
recommendations given in:

https://www.redhat.com/sysadmin/podman-shareable-systemd-services

Signed-off-by: Adrian Reber <adrian@lisas.de>
2020-04-24 21:34:19 +02:00
Adrian Reber
cd22a1b38c mirrorlist: use KillMode=none
If stopping of the mirrorlist container fails, systemd usually kills all
processes in the same control group which means that the usual Podman
cleanup steps will not be able to run. Setting KillMode=none gives
Podman a chance to correctly remove the container.

Signed-off-by: Adrian Reber <adrian@lisas.de>
2020-04-24 21:34:17 +02:00
Stephen Smoogen
8007723fe7 put a tag on cron job to get it run on subset. 2020-04-24 21:34:17 +02:00
Adrian Reber
5048be7775 mirrorlist: send cron emails also to adrian@lisas.de
Signed-off-by: Adrian Reber <adrian@lisas.de>
2020-04-24 21:34:17 +02:00
Adrian Reber
e8503d0d5a mirrorlist: try a explicit removal if starting fails
Starting the mirrorlist container after a stop sometimes fails with:

Error: error creating container storage: the container name "mirrorlist1.service" is already in use

One way to work around this is to run:

sudo -u mirrormanager /usr/bin/podman rm mirrorlist1.service --storage --force

The restart mirrorlist container script now tries to remove the
container with '--storage --force' if the start fails and retries the
start.

Signed-off-by: Adrian Reber <adrian@lisas.de>
2020-04-24 21:34:16 +02:00
Adrian Reber
3202e2841c mirrorlist: switch production to new mirrorlist release
Seeing that it works in staging, this now switches production also to
the new mirrorlist release.

Signed-off-by: Adrian Reber <adrian@lisas.de>
2020-04-24 21:34:15 +02:00
Adrian Reber
ec2df1850d mirrorlist: try new release in staging
Signed-off-by: Adrian Reber <adrian@lisas.de>
2020-04-24 21:34:15 +02:00
Adrian Reber
066965fa77 mirrorlist: remove unnecessary debug logging
Signed-off-by: Adrian Reber <adrian@lisas.de>
2020-04-24 21:34:15 +02:00
Adrian Reber
49d3ab1513 mirrorlist: make mirrorlist restart script look at .proto
In a previous commit I changed the non-templated version of
restart-mirrorlist-containers to look at the new protobuf based
mirrorlist cache file instead at the pkl file. It seems that nothing
uses the non-templated version of the script. This removes the unused
script and adapts the templated restart mirrorlist container script to
look at the protbuf based mirrorlist cache file.

Signed-off-by: Adrian Reber <adrian@lisas.de>
2020-04-24 21:34:15 +02:00
Adrian Reber
052093cee0 mirrorlist: correctly handle different containers for staging
Signed-off-by: Adrian Reber <adrian@lisas.de>
2020-04-24 21:34:15 +02:00
Adrian Reber
57352c2576 mirrorlist: make restart conditions proto based
The new mirrorlist containers are no longer using the pkl file. The
script still based all its restart and copy decisions on the pkl file.
This changes all occurrences of pkl with proto.

Signed-off-by: Adrian Reber <adrian@lisas.de>
2020-04-24 21:34:15 +02:00
Stephen Smoogen
454c3e43c8 phx2 is needed for mirrorlist3 2020-04-24 21:34:14 +02:00
Stephen Smoogen
1abafb5307 mirrormanager: user directory must have ~/rundir/libpod owned by user 2020-04-24 21:34:14 +02:00
Stephen Smoogen
b5f53833a9 try to make the playbook not bomb 2020-04-24 21:34:14 +02:00
Stephen Smoogen
e06d960e83 tag it 2020-04-24 21:34:14 +02:00
Stephen Smoogen
fd33a5ba22 try to get permissions and directories for rootless podman 2020-04-24 21:34:14 +02:00
Adrian Reber
defc3abf08 mirrorlist: switch all proxies to the new container
This switches all proxies to the rust based mirrorlist server which is
running as a rootless container.

Signed-off-by: Adrian Reber <adrian@lisas.de>
2020-04-24 21:34:14 +02:00
Adrian Reber
837032125a Enable new mirrorlist server on proxy14
After a successful test of the new mirrorlist server code in staging,
this is the next step. Try to make it work in production on one of the
proxies. As discussed on the mailing list we are trying the new setup
with proxy14.

All the conditionals have been updated to be 'staging or proxy14' and
the mirrorlist data generation has been enhanced to also write out the
new protobuf based format on the backend system.

At the same time this moves the pickle/protobuf generation from :55 to
:30 as this generation takes much longer than it used to be and the
mirrorlist server restarted at :15 was never using the new data during
the last few months.

Signed-off-by: Adrian Reber <adrian@lisas.de>
2020-04-24 21:34:13 +02:00
Adrian Reber
24d5180f47 127.0.01 is not really valid, let's use 127.0.0.1
Signed-off-by: Adrian Reber <adrian@lisas.de>
2020-04-24 21:34:12 +02:00
Adrian Reber
3f723683c4 New mirrorlist container should listen on 127.0.0.1
As default the mirrorlist container listens on 0.0.0.0. This switches
the listen address to 127.0.0.1.

Signed-off-by: Adrian Reber <adrian@lisas.de>
2020-04-24 21:34:12 +02:00
Adrian Reber
86c4eb91c1 Fixes for rootless mirrorlist containers (staging)
- chown /var/log/mirrormanager to mirrormanager.mirrormanager
- drop selinux relabeling for mounted directories

Signed-off-by: Adrian Reber <adrian@lisas.de>
2020-04-24 21:34:12 +02:00
Adrian Reber
2cb4f66f27 Switch staging to new rust based mirrorlist server
Signed-off-by: Adrian Reber <adrian@lisas.de>
2020-04-24 21:34:12 +02:00
Stephen Smoogen
2562803244 add in error checking 2019-07-18 19:34:41 +00:00
Stephen Smoogen
89f24a6413 [proxy/mirrorlist] put in changes to make mirrorlist cycling a little slower. 2019-07-18 19:34:41 +00:00
Stephen Smoogen
2183741852 [podman] the command does not implement --log-driver and errors out with 1.4.0 if used. Removed so updates wont break the world 2019-06-15 19:43:25 +00:00
Kevin Fenzi
15abe27d77 mirrorlist_proxy: failure: put tags on previous task instead of the one they were supposed to be on.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2019-04-16 18:11:15 +00:00
Kevin Fenzi
bf9bb94dd4 mirrorlist_proxy: The last commit missed adding tags.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2019-04-16 18:07:41 +00:00
Kevin Fenzi
15129b81fd mirrorlist_proxy: Add a seperate check for mirrorlist cache files
Since we delegate the command, we can't test the cache files, since the
creates is looking on mm-backend01, not the proxies. So instead we
stat the cache files and only run the command if they don't exist.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2019-04-16 18:04:15 +00:00
Kevin Fenzi
1e9710de6c mirrorlist_proxy: try and fix args so it correctly notes the creates arg
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2019-04-16 17:50:25 +00:00
Stephen Smoogen
abb9a9153d maybe make this work for m3? 2019-02-25 20:07:03 +00:00
Stephen Smoogen
58a9e4d4e5 ok let us try and make proxy01/10 have 3 engines 2019-02-25 19:35:27 +00:00
Stephen Smoogen
24e8ef4199 mirrormanager: update the container to the scratch to make 503 better 2019-02-14 22:16:20 +00:00