61 Commits

Author SHA1 Message Date
Jeremy Stanley
cefd919686 Update OpenSUSE mirror source
The rsync mirror we were relying on ended up incomplete on a recent
sync, causing all OpenSUSE 15 jobs to fail updating the package
lists. Switch to an alternative that seems to have all the same
things for which we used the previous one.

Change-Id: I661bdbfcbc766966793cd64d7f21201879d3dbaa
2021-08-25 20:10:59 +00:00
Ian Wienand
59b058f0d6 Remove Fedora 32 mirror
This is no longer required

Change-Id: Iff9578a41abbe9e9e3c73c50041ddd11376099e4
Depends-On: https://review.opendev.org/c/openstack/project-config/+/795643
2021-07-30 13:23:33 +10:00
Clark Boylan
fb85ae32ed Trim yum-puppetlabs content
This trims out old Fedora and SLES content from our yum-puppetlabs repo.
I think that Fedora might not be used at all but we can clean that up in
a followon as we get a better grasp of how this is used.

Change-Id: I53a9b6cb529f0d3e3822864aca7725a222c78113
2021-07-20 13:33:40 -07:00
Xinliang Liu
e54cc45bb8 Enable openEuler mirroring
Mirror latest LTS release openEuler-20.03-LTS-SP2.

Change-Id: I134b0c8b119d4662fc56f139a7ff4b0c7d6a4980
2021-07-15 07:12:22 +00:00
Ian Wienand
74fcf2a338 centos-mirror: exclude ppc64le
Nothing uses this architecture and it takes up considerable space on
the mirror volumes.

Change-Id: I8808419372f69c9968928d4c9b34a40d0349dc66
2021-06-22 10:08:12 +10:00
Ian Wienand
917544546f centos-mirror: add dry run mode
Add a dry-run flag and abstract the rsync command to make for easier
testing if modifying the copy flags.

Change-Id: Ie658b60257b94436b1eda0cddf6deb639a87d659
2021-06-22 10:08:05 +10:00
Mohammed Naser
2e4858e596 Add Fedora 34 mirrors
Change-Id: I157484236c3dd8783066d9b1b6d7906ed3649c3e
2021-06-09 13:30:33 -04:00
Ian Wienand
8541605595 Stop mirroring Fedora 31
Nodes were stopped with I0dde34ab005f48ac521d91e407ac437d3cec965f

Change-Id: Ib9cbc3f5388e668923ff7eadb3e81703875f64c0
2021-03-29 11:55:14 +11:00
Daniel Pawlik
428e7d5791 Added Fedora 33 mirror-update role
Some new jobs would base on Fedora 33 which is not
available on the mirror sever.

Change-Id: I144fc965ff3c1102fe56f174b2ce8b7ee93db989
2020-12-17 09:28:52 +01:00
Ian Wienand
fb52aca9cb centos mirror: exclude dot-files
The upstream mirror seems to have some dotfiles that give permissions
errors when trying to rsync.  Ignore all dotfiles.

Change-Id: Ic165b27ba190667f2b6b9e17cfa3ebe2ea6b9fb3
2020-12-11 11:30:27 +11:00
Sorin Sbarnea
afe99356bf Enable mirroring of centos 8-stream
Change-Id: Ie289a25adddd761ea3c62e00288c4542f4f4ff90
2020-12-10 16:21:28 +00:00
Javier Pena
70aff57869 Switch CentOS 7 mirror source to kernel.org mirror
The current source for our sync is outdated [1], and does not include
the latest CentOS 7.9 content. This is breaking some jobs relying on
CentOS, since they may have more recent packages in the image than
in the repositories [2].

[1] - https://mirror-status.centos.org/
[2] - https://bugs.launchpad.net/tripleo/+bug/1904214

Change-Id: Ie404396b0f108121241bdc26dd8d22c85106b0c4
2020-11-16 11:34:07 +01:00
Ian Wienand
6ee7a5a116 mirror-update/reprepro : use common functions
This converts the reprepro mirror script to use the common functions
for timestamps and vos release.  This function ssh's to the AFS server
and runs vos release directly there, avoiding many issues with
kerberos timeouts.  This has been working successfully for the rsync
mirrors.  This will also send stats back so we can keep an eye on the
timing.

Change-Id: I1be29f2d9ecaad03b22c87819e5ae8d16c4f177e
2020-10-28 16:55:02 +11:00
Ian Wienand
cb4935bd4d mirror-update: publish reprepro logs
This publishing job can now publish the reprepro logs too

Change-Id: I221bdc3273f53c7d7762b73d32b815c84848b875
2020-10-27 16:44:26 +11:00
Ian Wienand
3eceba5749 reprepro: convert to Ansible
This converts the reprepro configuration from our existing puppet to
Ansible.

This takes a more direct approach; the templating done by the puppet
version started simple but over the years grew several different
options to handle various use-cases.  This means you not only had to
understand the rather obscure reprepro configuration, but then *also*
figure out how to translate that from our puppet template layers.

Here the configuration files are kept directly (they were copied from
the existing mirror-update.openstack.org) and deployed with some light
wrapper tasks in reprepro/tasks/utils which avoids most duplication.

Note the initial cron jobs are left disabled so we can run some manual
testing before letting it go automatically.

Change-Id: I96a9ff1efbf51c4164621028b7a3a1e2e1077d5c
2020-10-19 14:06:57 +11:00
Zuul
eb263527ea Merge "Mirror the only Fedora Atomic image used by Magnum" 2020-10-07 20:21:04 +00:00
Clark Boylan
2fcf4ddff4 Exclude private dirs when mirroring fedora
The upstream mirror may have private contents in dirs like .~tmp~/ or
snapshot/. We exclude these to avoid syncing problems when we don't have
permissions to read them.

Change-Id: I8d366f0e95667bfbe65f259877b13bd0d93cd877
2020-09-29 13:36:25 -07:00
Clark Boylan
4641c1c00e Mirror the only Fedora Atomic image used by Magnum
There is a single Fedora Atomic image used by Magnum at this point that
we mirror. Lets mirror just that one image and then we can manually rm
the others.

Change-Id: I669247beb64bae41afddd0edce02c0b58e45aa6c
2020-09-28 16:12:13 -07:00
Zuul
9f95c450cb Merge "Stop mirroring fedora 30" 2020-09-28 23:01:35 +00:00
Clark Boylan
de9b4d9186 Stop mirroring opensuse leap 15.1
We've converted our opensuse leap 15 image to 15.2. If things look good
we should be clear to stop mirroring 15.1.

Change-Id: Id31a3b57f48a5be671c76a76d5c48b4ef5000c3e
2020-09-26 15:22:54 -07:00
Clark Boylan
7f6b2ff0d2 Stop mirroring fedora 30
We've removed the images from nodepool in the depends-on and now we can
stop mirroring the distro.

Depends-On: https://review.opendev.org/754471
Change-Id: Ifd4b1fbc92514a76ffa86b7cb42a81f97c245604
2020-09-25 12:07:52 -07:00
Zuul
1171255c05 Merge "Mirror OpenSUSE Leap 15.2" 2020-09-24 20:47:59 +00:00
Clark Boylan
bec7527ab0 Cleanup old suse 42.3 and 15.0 repos
This should free space so that we can add 15.2, switch our images to
15.2 then drop 15.1.

Change-Id: I8508c76eab018831bcbe7a9a33b21048d6f6b9fc
2020-09-24 09:46:57 -07:00
Jeremy Stanley
aa5623982f Switch Fedora mirror to mirrors.mit.edu
The pubmirror[12].math.uh.edu mirrors of Fedora 31 updates for
x86_64 have been sitting stale for several days with a corrupt
index, causing jobs which access our copy of this from our mirror
network to fail. Instead mirror Fedora releases/updates from
mirrors.mit.edu which seems to be updating just fine currently. We
can switch this back if/when the situation with the uh.edu mirrors
is resolved.

We're continuing to mirror EPEL and Fedora Atomic from
pubmirror[12].math.uh.edu for now, as we've had no reports of EPEL
problems on our mirrors (yet anyway), and it's hard to find any
other rsync mirrors of Atomic.

Change-Id: Iefd02602e2f2b39c4b72dc4d95ac62993ca65cdd
2020-08-17 18:47:35 +00:00
Clark Boylan
c4aabf06c4 Mirror OpenSUSE Leap 15.2
Leap 15.2 has released. We should mirror it, then bump our opensuse-15
image to 15.2. Once that is done we can clean up the 15.1 mirror
contents.

Change-Id: Ib8905602b6a65639d59d2da1fe0c1b9a0837013b
2020-08-06 17:08:21 -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
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
Ian Wienand
d5291e021d mirror-update: mirror Fedora 32
Change-Id: I4653e3bbf3388c5e6b5ab293c05b83b21ed6a7d7
2020-06-16 16:15:37 +10:00
Ian Wienand
4918594aa4 rsync-mirrors: drop rsync -t and make flags consistent
After investigating why every release seems to take hours, we noticed
that even in zero-delta updates where nothing has changed upstream,
we'd get a utimensat() call that updated the modified time nanoseconds
portion; e.g.

 lstat("Everything/x86_64/Packages/a/arch-install-scripts-23-1.fc31.noarch.rpm", {st_mode=S_IFREG|0644, st_size=28004, ...}) = 0
 utimensat(AT_FDCWD, "Everything/x86_64/Packages/a/arch-install-scripts-23-1.fc31.noarch.rpm",
  [UTIME_NOW, {tv_sec=1585676005, tv_nsec=6041000} /* 2020-03-31T17:33:25.006041000+0000 */], AT_SYMLINK_NOFOLLOW) = 0

This does not apply; in fact openafs uses the ns field as some sort of
generation counter [1].  This update is enough to convince openafs the
file has changed and it needs to be resynced, meaning that basically
every rsync run results in a full release.

This unnecessary update been fixed with [2] but is only in rsync
3.1.3+; our bionic host is currently 3.1.2.  Dropping "-t" from the
rsync commands avoids transferring modification times and should avoid
this problem.

While looking, "-D" turns on "--devices" and "--specials" to transfer
block devices and named sockets/fifos.  Turn this off.

Also remove "-p" if it was present.  We already did this for centos
with Ib5db052cdd23e39aecbeead15cf08d4bd7fcab38 and Fedora with
Id24196791f80cd99fe8a330fb2c7c6d893fc9995, where odd upstream
permissions such as setgid on directories can't be synced to afs.
Consistently remove it.

Also switch back the fedora updates to just "-v"; we had it at "-i"
for debugging.

[1] http://eavesdrop.openstack.org/irclogs/%23opendev/%23opendev.2020-06-15.log.html#t2020-06-15T02:58:08-2
[2] https://git.samba.org/?p=rsync.git;a=patch;h=0f8e9e2d8638e47d646a6baba694b303ac84e695

Change-Id: I78f3d4990b168c71185eb1c4900ceeaca4b6a16f
2020-06-16 11:50:48 +10:00
Ian Wienand
339cbf4c3d mirror-update: stats for vos release of mirrors
It's difficult to know if a release process is running too long when
we don't have a history of how long it should run for.

This is mostly the stats function from run_all.sh that has been
sending stats about runtimes there.  Wrap it in a vos_release function
with some minor refactoring, and update the scripts.

As noted inline, there's already release timer stats going to
afs.release.<volume> for the periodic release of docs/tarballs etc.

Change-Id: I3d79d1a0997af8977050b7f6e7cf3b7578cc8491
2020-04-09 14:34:35 +10:00
Michal Nasiadka
a1433563d3 Change CentOS 8 upstream mirror
Currently used mirror is not up to date and is not on the list of official
CentOS mirrors.
Changing to a mirror also located somewhere in US,TX - which should be
close-ish to DFW servers.

Change-Id: Id8267bc7e6c8a96ccdfd98c16390d36842f26de3
2020-04-01 16:19:12 +02:00
Andreas Jaeger
344c5d2fe9 Remove Fedora 29 mirroring
Remove Fedora 29 from mirroring and purge the content.

The jobs were removed in preparation for
https://review.opendev.org/#/c/712032/ which removed the nodes from
nodepool. So, no job can use Fedora 29 anymore.

Fedora 28 is removed, no need to purge it again.

Change-Id: I59015a880f39b43b57a889b4254353f8c3a557ea
2020-03-16 10:11:02 +01:00
danpawlik
ce73ffedaa Added updates dir for Fedora 31 release
Patch set [1] does not provide updates directory for
Fedora 31 which is required to run CI jobs.

[1] https://review.opendev.org/#/c/712680/

Change-Id: I01b9b50660f3c7a3b4eb05cc8a8c0847f47dc7ee
2020-03-16 09:08:41 +01:00
danpawlik
b5bb9790b4 Added new Fedora release to mirroring
Some jobs are using Fedora 29 release, which is deprecated.
Create new mirror with release 31 and wait for changing job
rules.

Change-Id: I418f4c815d337c2b1edd0df1aa065536d992cb62
2020-03-12 14:46:31 +01:00
Ian Wienand
97c4735129 Move afsmon to mirror-update.opendev.org
This migrates the afsmon script from puppet deploying on
mirror-update.openstack.org to ansible deploying on
mirror-update.opendev.org.

There is nothing particularly special and this just a straight install
with some minor dependencies.  Since we have log publishing running on
the opendev.org server, we publish the update logs alongside the
others.

Change-Id: Ifa3b4d59f8d0fc23a4492e50348bab30766d5779
2020-02-12 14:38:48 +11:00
Ian Wienand
fbb9790d49 Allow for periodic afs releases from mirror-update
This is a migration of the current periodic "vos release" script to
mirror-update.opendev.org.

The current script is deployed by puppet and run by a cron job on
afsdb01.dfw.openstack.org.

My initial motivation for this was wanting to better track our release
of these various volumes.  With tarballs and releases moving to AFS
publishing, we are going to want to track the release process more
carefully.

Initially, I wanted to send timing statistics to graphite so we could
build a dashboard and track the release times of all volumes.  Because
this requires an additional libraries and since we are deprecating
puppet, further development there is unappealing and it would better
live in ansible.

Since I6c96f89c6f113362e6085febca70d58176f678e7 we have the ability to
call "vos release" with "-localauth" permissions via ssh on
mirror-update; this avoids various timeout issues (see the changelog
comment there for more details).  So we do not need to run this script
directly on the afsdb server.

We are alreadying publishing mirror update logs from mirror-update,
and it would be good to also publish these release logs so anyone can
see if there are problems.

All this points to mirror-update.opendev.org being a good future home
for this script.

The script has been refactored some to

 - have a no-op mode
 - send timing stats for each volume release
 - call "vos release" via the ssh mecahnism we created
 - use an advisory lock to avoid running over itself

It runs from a virtualenv and it's logs are published via the same
mechanism as the mirror logs (slightly misnamed now).

Note this script is currently a no-op to test the deployment, running
and log publishing.  A follow-up will disable the old job and make
this active.

Change-Id: I62ae941e70c7d58e00bc663a50d52e79dfa5a684
2020-02-11 08:52:01 +11:00
Ian Wienand
f62a75fae9 centos mirror: drop -p from rsync
This appears to be the same thing we saw in Fedora with
Id24196791f80cd99fe8a330fb2c7c6d893fc9995, somehow upstream
directories have started acquiring a setgid bit, which breaks AFS
mirroring

 rsync: failed to set permissions on "/afs/.openstack.org/mirror/centos/8/AppStream/aarch64/os": Permission denied (13)

and when we look

 chmod("AppStream/aarch64/os/Packages", 02755) = -1 EACCES (Permission denied)

Drop the "-p" so we don't try and replicate these permissions.

Change-Id: Ib5db052cdd23e39aecbeead15cf08d4bd7fcab38
2020-01-30 18:26:10 +11:00
Ian Wienand
98ab53ee42 rsync mirrors: use localauth vos release
We switched Fedora to do vos release via ssh with localauth in
I56ecdb2511597197deeeadf51f50da7e02f56954 and it has been working.

Switch the rest of the update scripts.  There is an increasing amount
of common code, start a common functions.sh script where we can put
this.

Change-Id: I4ba6d64a84bb66e8686901b16010352de942f303
2019-11-26 13:40:15 +00:00
Andreas Jaeger
e474f5ce73 Switch openSUSE mirror
The former mirror has outdated content, use a mirror from
http://download.opensuse.org/update/leap/15.1/oss/repodata/repomd.xml.mirrorlist
that is in the US with prio 100 (highest) and current content.

Change-Id: I5649584d01f0370fb09217b00038992a69cf964c
2019-11-25 09:07:25 +01:00
Ian Wienand
3f9c737483 Fedora mirror update: use localauth release
Use the new vos_release user on the remote host to release the volume
via localauth, to avoid any timeouts.

Change-Id: I56ecdb2511597197deeeadf51f50da7e02f56954
Depends-On: https://review.opendev.org/#/c/695554/
2019-11-22 01:13:50 +00:00
Andreas Jaeger
d2095d96b7 Remove mirroring of openSUSE 15.0
openSUSE 15.0 has been removed from infra, remove it from mirrors as
well.

Change-Id: I0ce4a2cf27963c0a63c86b6705c16e379eafc627
2019-11-13 20:33:54 +01:00
Ian Wienand
fd7ffbcab4 Fedora mirror - remove 28
Add a purge phase to remove old releases; remove Fedora 28 and stop
mirroring.  Update the atomic list while we're there.

Fedora 28 was removed with Ic0b4b065a217dcfaa8c230cda53114793e93b803

Change-Id: If713844ac90ea37e8c4db30108c45d7a59832776
2019-10-28 13:10:17 +11:00
Andreas Jaeger
757aebbfc3 Stop openSUSE 42.3 mirroring
openSUSE 42.3 is removed from Infra, remove it from mirroring as well.

Change-Id: I60c77fd48e55edbacd589c2f94de977a034eb9c9
2019-10-16 11:06:21 +02:00
Ian Wienand
1ef7315ae4 mirror-update: Add EPEL 8 mirroring
Change-Id: I293fe01806743e3ec45877bdadd3e5b0fb851aee
2019-10-02 14:30:41 +10:00
Zuul
199c1c5939 Merge "logrotate: better rotation options" 2019-10-01 06:49:44 +00:00
Ian Wienand
d4a96a421b logrotate: better rotation options
The extant "logrotate_daily" varaible doesn't really do anything and
isn't used.  Modify this to be able to set a range of rotation periods
or a size.

Update mirror rsync mirrors to rotate weekly, as often releases run
overnight and it's a pain to reconstruct.

Change-Id: I121dc5f4fe7f226b66d18b9ec39e7e3839be4d40
2019-10-01 09:00:53 +10:00
Ian Wienand
d59e654936 Add CentOS 8 mirror
This adds mirroring of CentOS 8.  It is somewhat simpler because the
architecture we're interested in are in the base repos, no need for
altarch.

The current mirror doesn't have a 8/ directory; possibly they require
their own mirroring filter updates?  Use an up-to-date mirror for 8
(we can switch 7 too, but leaving alone for now).

Additionally, the altarch mirror we are using appears to have gone
offline for at least a few days.  Switch to another one that is in
Texas, which should be close-ish to the DFW servers.

Change-Id: I33d95fa6b2df23fbfdb6745a3079761e228f677b
2019-09-25 06:28:23 +00:00
Itxaka
1087cbf433
Revert to rit.edu mirror for Suse
Looks like leaseweb, kernel.org and others are not properly
syncing the Suse mirrors as they are out of date for Leap15.0 and
missing files (deltainfo.xml.gz) which causes job breakage for
Leap15.0 based jobs.

Revert this to the original mirror from a year ago which is updated
and not broken

Change-Id: Id7184ee973bbabfec3f601fc9200ffac17322558
2019-09-23 16:25:57 +02:00
Radosław Piliszek
dc2510aac7 Mirror OBS ha-clustering repo for CentOS 7
Kolla uses this to build hacluster images.
Direct usage is causing timeouts recently.

I changed the formatting to make it more readable
and slapped a comment note for maintainers.

Change-Id: I68d7155718c0ae0744198ca96aca1a207bab7ed6
Signed-off-by: Radosław Piliszek <radoslaw.piliszek@gmail.com>
2019-09-17 10:25:57 +02:00
Ian Wienand
3dcfe61d2f fedora mirror update : add sleep
As described inline, this should make our mirror pulses more robust
against timeouts.

This is probably ripe for turning into more of a library situation for
all the other "vos release" calls too.  But one thing at a time ... I
think we test with this for a while to see if stability returns.

Change-Id: I041a290053e4e8ceba80785598a5945e5adcf6f1
2019-09-11 13:15:29 +10:00