Page MenuHomePhabricator

`sql` does not work on deployment-prep
Closed, ResolvedPublic

Description

legoktm@deployment-bastion:~$ sql metawiki
ERROR 2005 (HY000): Unknown MySQL server host 'db1' (0)

It should be connecting to deployment-db1 instead.


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=45706

Details

Reference
bz63803

Related Objects

StatusSubtypeAssignedTask
ResolvedNone
ResolvedNone

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:15 AM
bzimport set Reference to bz63803.
bzimport added a subscriber: Unknown Object (MLST).

This is the /usr/local/bin/sql script. It gets the database server name via:

echo 'echo wfGetLB()->getServerName(0);' |
/usr/local/bin/mwscript eval.php --wiki="$lookupdb"

The db-labs.php configuration file probably just needs to be updated to use valid hostnames as keys in $wgLBFactoryConf.

Change 125373 had a related patch set uploaded by BryanDavis:
Use valid hostnames in $wgLBFactoryConf

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

Change 125373 merged by jenkins-bot:
Use valid hostnames in $wgLBFactoryConf

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

There is some progress:

$ sql metawiki
/usr/local/bin/sql: line 30: /usr/local/bin/wikiadmin_pass: Permission denied
Enter password:

$ ls -l -d /usr/local/bin/wikiadmin_pass
-r-xr-x--- 1 root wikidev 43 Mar 14 14:23 /usr/local/bin/wikiadmin_pass*
$

Anyone that had its account importer from SVN has a GID 500 (svn) and thus would not be able to execute that script which has GID 550 (wikidev). That is tracked by bug 63028 "inconsistent GID number (500 or 550) which I am adding as a blocker.

Bug 45706 apparently still applies as well:

$ sql metawiki
ERROR 1045 (28000): Access denied for user 'wikiadmin'@'10.68.16.58' (using password: YES)

That has been fixed somehow :-)