Page MenuHomePhabricator

[tbs] Harbor broken in toolsbeta because of missing db password
Closed, ResolvedPublic

Description

While working on T316323 I broke the toolsbeta Harbor deployment at https://harbor.toolsbeta.wmflabs.org

Harbor is currently failing to connect to its dedicated Trove database

What I think has happened is that while I was doing some tests in the Toolsbeta instance (toolsbeta-harbor-1.toolsbeta.eqiad1.wikimedia.cloud) I ran /srv/ops/harbor/prepare and that overwrote the config files in /srv/ops/harbor/common/config/db which contained the correct password, with the value coming from /etc/puppet/private in toolsbeta-puppetmaster-04 (profile::toolforge::harbor::db_harbor_pwd) which is currently dummypass but does not seem to be the current password for the harbor user in that database.

My assumption is that the password was set manually in /srv/ops/harbor/harbor.yml, and then copied to /srv/ops/harbor/common/config/db the last time that /srv/ops/harbor/prepare was run. Puppet than overwrote the value in /srv/ops/harbor/harbor.yml with the one coming from /etc/puppet/private, but since prepare was not run until today, the value in /srv/ops/harbor/common/config/db was not modified until today.

Unless that password was also stored somewhere else or someone can remember it, it must be reset in the Trove db (which is also not easy because I don't know any credentials for that db).

The trove DB is named ttg4ncgzifw.svc.trove.eqiad1.wikimedia.cloud and was created in T316232.

Related Objects

StatusSubtypeAssignedTask
ResolvedLucasWerkmeister
Resolvedmatmarex
ResolvedLegoktm
ResolvedLegoktm
Opendcaro
Resolveddcaro
ResolvedRaymond_Ndibe
ResolvedRaymond_Ndibe
ResolvedRaymond_Ndibe
ResolvedRaymond_Ndibe
ResolvedNone
Resolveddcaro
Resolveddcaro
ResolvedRaymond_Ndibe
Resolveddcaro
ResolvedRaymond_Ndibe
Resolveddcaro
ResolvedRaymond_Ndibe
ResolvedRaymond_Ndibe
Resolvedfnegri
Resolvedfnegri

Event Timeline

fnegri changed the task status from Open to In Progress.Mar 15 2023, 6:24 PM
fnegri triaged this task as High priority.
fnegri moved this task from Next Up to In Progress on the Toolforge Build Service (Focus Week!) board.

This has been manually reset (using the root account given by trove through the ui in horizon database tab-> instanes -> manage root access)

To clarify, the "root account" has been used only to access the db with psql and modify the password of the harbor user:

harbor=# ALTER USER harbor WITH PASSWORD 'xx';

The new password has been stored in the private Git repo: /etc/puppet/private/hieradata/labs.yaml in toolsbeta-puppetmaster-04 (profile::toolforge::harbor::db_harbor_pwd).

https://harbor.toolsbeta.wmflabs.org is up and running again.