Page MenuHomeSoftware Heritage

Deploy swh-scrubber-checker-services to scrubber0.staging
ClosedPublic

Authored by ardumont on Apr 15 2022, 12:34 PM.

Details

Summary

This triggers the creation of {n object types x m ranges postgres} checker services.

In this current diffs, only 1 object types (release) and 4 ranges are configured.
So we can check/monitor its behavior once applied.

Related to T4102

Test Plan

Actual checks on vagrant vm named 'scrubber0.internal.staging.swh.network':

root@scrubber0:/etc/systemd/system# systemctl list-units | grep scrubber
● swh-scrubber-checker-postgres@release-0.service                                           loaded    failed failed    Software Heritage Scrubber Checker Postgres release-0
● swh-scrubber-checker-postgres@release-1.service                                           loaded    failed failed    Software Heritage Scrubber Checker Postgres release-1
● swh-scrubber-checker-postgres@release-2.service                                           loaded    failed failed    Software Heritage Scrubber Checker Postgres release-2
● swh-scrubber-checker-postgres@release-3.service                                           loaded    failed failed    Software Heritage Scrubber Checker Postgres release-3
  system-swh\x2dscrubber\x2dchecker\x2dpostgres.slice                                       loaded    active active    system-swh\x2dscrubber\x2dchecker\x2dpostgres.slice

root@scrubber0:/etc/systemd/system# systemctl cat swh-scrubber-checker-postgres@release-0
# /etc/systemd/system/swh-scrubber-checker-postgres@.service
# Scrubber checker postgres template unit file
# Managed by puppet class profile::swh::deploy::scrubber::checker::postgres
# Changes will be overwritten

[Unit]
Description=Software Heritage Scrubber Checker Postgres %i
After=network.target

[Service]
Environment=SWH_SENTRY_DSN=https://swh::deploy::scrubber::sentry_token@sentry.softwareheritage.org/23
Environment=SWH_SENTRY_ENVIRONMENT=staging
Environment=SWH_MAIN_PACKAGE=swh.scrubber
Environment=SWH_SCRUBBER_CLI_EXTRA_ARGS="--help"
User=swhworker
Group=swhdev
Type=simple
ExecStart=/usr/bin/swh scrubber --config-file /etc/softwareheritage/scrubber/postgres.yml check storage ${SWH_SCRUBBER_CLI_EXTRA_ARGS}

[Install]
WantedBy=multi-user.target

# /etc/systemd/system/swh-scrubber-checker-postgres@release-0.service.d/parameters.conf
# Managed by puppet class profile::swh::deploy::scrubber::checker::postgres
# Modifications will be overwritten

[Service]
Environment=SWH_SCRUBBER_CLI_EXTRA_ARGS="--object-type release --start-object 00000000000000000000 --end-object 44444444444444444444"

no more octo-diff since that needs to run in a new node.

Diff Detail

Repository
rSPSITE puppet-swh-site
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ardumont created this revision.
data/common/common.yaml
1921

I still need to configure that part.

vsellier added inline comments.
site-modules/profile/files/swh/deploy/scrubber/swh-scrubber.slice
5

Sounds a lot if it's running on storage1 which has already 75% of it's memory used with kafka and the storages

site-modules/role/manifests/swh_storage_with_journal.pp
5

sorry for the extra space ;)

9

Do we really want to have these clients running on storage1 ?

site-modules/profile/files/swh/deploy/scrubber/swh-scrubber.slice
5

basic copy/paste error.
i'll cut down this to 10% or so?

site-modules/role/manifests/swh_storage_with_journal.pp
9

no idea.
I just put it there as the simplest and shortest path.
That can run elsewhere.

Also i realized i wanted it to run on db1 not storage1...
But anyway, i just chose one machine to not have to bootstrap another node.

site-modules/role/manifests/swh_storage_with_journal.pp
9

Wrong reasoning here, too much happens on those backend machines.
Plus, we cannot deploy this in those bullseye machines currently as it's a swh service.
We only have swh service on buster machines anyway.

So let's go for a buster scrubber vm.

ardumont retitled this revision from Deploy swh-scrubber-checker-services to storage1.staging to Deploy swh-scrubber-checker-services to scrubber0.staging.Apr 15 2022, 3:38 PM
ardumont edited the summary of this revision. (Show Details)

Adapt to run on staging scrubber0 vm

use correct repository as source ¯\_(ツ)_/¯

ardumont added inline comments.
data/common/common.yaml
1916

btw @vlorentz, we moved away from the 'local' key configuration keyword in other modules.
You'll probably want to align this in the scrubber as well and use 'postgresql' instead (allowing both during the transition).

This revision was not accepted when it landed; it landed in state Needs Review.Apr 19 2022, 1:39 PM
This revision was automatically updated to reflect the committed changes.