Page MenuHomePhabricator

Mirror OpenSearch repos from upstream
Closed, ResolvedPublic

Description

Per parent ticket (and the discussion in T403301) , we'll need to create the

thirdparty/opensearch2
thirdparty/opensearch3

repos for Bullseye, Bookworm, and Trixie (Trixie might be blocked; we'll need to check upstream's signing key. More details in this comment ).

The combination of OpenSearch 3/Bookworm is the highest priority.

AC: The following repos are mirrored to from upstream OpenSearch to WMF's internal repo infra.

  • opensearch3/bookworm
  • opensearch2/bullseye
  • opensearch2/bookworm

Event Timeline

BTullis triaged this task as High priority.

Change #1196949 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/puppet@production] Configure reprepro to mirror upstream opensearch2 and opensearch3 repos

https://gerrit.wikimedia.org/r/1196949

bking updated Other Assignee, added: BTullis.
bking added a subscriber: BTullis.

Change #1196949 merged by Bking:

[operations/puppet@production] Configure reprepro to mirror upstream opensearch2 and opensearch3 repos

https://gerrit.wikimedia.org/r/1196949

Change #1204639 had a related patch set uploaded (by Bking; author: Btullis):

[operations/puppet@production] Configure reprepro to mirror upstream opensearch2 and opensearch3 repos

https://gerrit.wikimedia.org/r/1204639

Change #1204639 merged by Bking:

[operations/puppet@production] Configure reprepro to mirror upstream opensearch2 and opensearch3 repos

https://gerrit.wikimedia.org/r/1204639

Change #1207195 had a related patch set uploaded (by Bking; author: DCausse):

[operations/puppet@production] apt: update opensearch3 key

https://gerrit.wikimedia.org/r/1207195

Change #1207195 merged by Bking:

[operations/puppet@production] apt: update opensearch3 key

https://gerrit.wikimedia.org/r/1207195

Change #1208020 had a related patch set uploaded (by Bking; author: Bking):

[operations/puppet@production] opensearch: Fix typo in repo GPG key filename.

https://gerrit.wikimedia.org/r/1208020

Change #1208020 merged by Bking:

[operations/puppet@production] opensearch: Fix typo in repo GPG key filename.

https://gerrit.wikimedia.org/r/1208020

I took another look at this today, as we (DPE SRE) are starting to build our first Docker images from the upstream package. Suddenly, I realize that I don't know enough about how our repo mirroring works. Let me explain:

If I configure the upstream OpenSearch 2.x repo , I can see many different versions of the 2.x release:

 apt policy opensearch
opensearch:
  Installed: (none)
  Candidate: 2.19.4
  Version table:
     2.19.4 500
        500 https://artifacts.opensearch.org/releases/bundle/opensearch/2.x/apt stable/main amd64 Packages
     2.19.3 500
        500 https://artifacts.opensearch.org/releases/bundle/opensearch/2.x/apt stable/main amd64 Packages
     2.19.2 500
        500 https://artifacts.opensearch.org/releases/bundle/opensearch/2.x/apt stable/main amd64 Packages
     2.19.1 500
        500 https://artifacts.opensearch.org/releases/bundle/opensearch/2.x/apt stable/main amd64 Packages
     2.19.0 500
        500 https://artifacts.opensearch.org/releases/bundle/opensearch/2.x/apt stable/main amd64 Packages
     2.18.0 500
        500 https://artifacts.opensearch.org/releases/bundle/
[...]
     2.5.0 500
        500 https://artifacts.opensearch.org/releases/bundle/opensearch/2.x/apt stable/main amd64 Packages

But if I use our mirror, I only see the latest available version:

apt policy opensearch
opensearch:
  Installed: (none)
  Candidate: 2.19.4
  Version table:
     2.19.4 1001
       1001 http://apt.wikimedia.org/wikimedia bookworm-wikimedia/thirdparty/opensearch2 amd64 Packages

We would prefer to have older versions of the package in the repo as well, if possible. Maybe I missed a setting or something when I set up a mirror? I'll go back and consult the docs, and I've also pinged in #wikimedia-sre-foundations IRC.

Checking the docs, it seems that reprepro doesn't support hosting multiple versions of the same package in the repo:

If you need to keep multiple versions of the same package in the repo, you will need to create versioned components, as reprepro doesn't support keeping foo_10-1.deb and foo_20-1.deb at the same time in the same component.

@Muehlenhoff can you confirm that there is no supported way to host multiple versions of the same package in the same repo at the moment?

Checking the docs, it seems that reprepro doesn't support hosting multiple versions of the same package in the repo:

If you need to keep multiple versions of the same package in the repo, you will need to create versioned components, as reprepro doesn't support keeping foo_10-1.deb and foo_20-1.deb at the same time in the same component.

@Muehlenhoff can you confirm that there is no supported way to host multiple versions of the same package in the same repo at the moment?

Depends on what you plan to do:
You can't have opensearch_1.0.deb, opensearch_2.0 and opensearch_3.0 in the same component, but it's possible to have to opensearch_1.0.deb in component/opensearch1, opensearch_2.0 in component/opensearch2 and opensearch_3.0 in component/opensearch3. We're already following this scheme for a lot of components like Elastic already, so maybe I misunderstand your question?

Closing the loop for IRC conversation with @Muehlenhoff :

  1. Reprepro does not support hosting multiple minor versions of the upstream repo in the same component. This is not a dealbreaker as we have never had a problem with minor version updates of Elasticsearch/OpenSearch. We can be careful in other ways (gradual rollouts).
  1. Infrastructure Foundations will be responsible for checking the upstream repo and notifying us/updating the repo if there are any security issues.
bking updated the task description. (Show Details)

I tried copying to Bullseye today, and it looks like someone already beat me to it:

 sudo -i reprepro copy bullseye-wikimedia bookworm-wikimedia opensearch
Warning: replacing 'opensearch' version '2.19.4' with equal version '2.19.4' in 'bullseye-wikimedia|thirdparty/opensearch2|amd64'!
Exporting indices...

This means the AC is completed. Closing...