Bug 1511077

Summary: Mediawiki cannot bind to MySql/MariaDB
Product: OpenShift Container Platform Reporter: cchase
Component: Service BrokerAssignee: Jason Montleon <jmontleo>
Status: CLOSED ERRATA QA Contact: Zhang Cheng <chezhang>
Severity: high Docs Contact:
Priority: high    
Version: 3.7.0CC: aos-bugs, jmatthew, xtian
Target Milestone: ---   
Target Release: 3.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-28 22:21:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description cchase 2017-11-08 15:53:47 UTC
Description of problem:  On downstream versions of the MediaWiki APB, the deployed mediawiki instance cannot bind to MySql or MariaDB.  After binding the resulting page displays an error that "no viable database extension found for type 'mysql'".  

It seems the downstream APB is missing some PHP packages to use mysql type databases.  (Postgres works as expected, however)

How reproducible:
100%

Steps to Reproduce:
1. Provision MariaDB/MySql APB
2. Provision Mediawiki APB
3. Create binding for the DB
4. Add the secret to the mediawiki application
5. Visit the mediawiki app route

Actual results:
Mediawiki is shown and usable with no errors

Expected results:
Error shown "no viable database extension found for type 'mysql'"

Additional info: 
Mediawiki log:

Setting up database
[ce501b5d] [no req]   Exception from line 851 of /usr/share/mediawiki123/includes/db/Database.php: DatabaseBase::factory no viable database extension found for type 'mysql'
Backtrace:
#0 /usr/share/mediawiki123/includes/installer/MysqlInstaller.php(167): DatabaseBase::factory(string, array)
#1 /usr/share/mediawiki123/includes/installer/DatabaseInstaller.php(154): MysqlInstaller->openConnection()
#2 /usr/share/mediawiki123/includes/installer/MysqlInstaller.php(485): DatabaseInstaller->getConnection()
#3 [internal function]: MysqlInstaller->setupDatabase(MysqlInstaller)
#4 /usr/share/mediawiki123/includes/installer/Installer.php(1543): call_user_func(array, MysqlInstaller)
#5 /usr/share/mediawiki123/includes/installer/CliInstaller.php(126): Installer->performInstallation(array, array)
#6 /usr/share/mediawiki123/maintenance/install.php(118): CliInstaller->execute()
#7 /usr/share/mediawiki123/maintenance/doMaintenance.php(105): CommandLineInstaller->execute()
#8 /usr/share/mediawiki123/maintenance/install.php(132): require_once(string)
#9 {main}
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.18.0.14. Set the 'ServerName'

Comment 1 Jason Montleon 2017-11-08 16:09:08 UTC
We appear to be missing several optional php packages, including php-mysql, downstream. Working on updating the image.

Comment 2 cchase 2017-11-08 16:24:14 UTC
To clarify upstream canary versions of Mediawiki are not affected by this bug.

Comment 3 Jason Montleon 2017-11-08 18:16:20 UTC
mediawiki-123:v3.7.0-0.198.1.1 will work with the mysql apb now.

We found a separate issue in mariadb when a random password is generated that will necessitate rebuilding the mariadb APB role and container.

Comment 5 Jason Montleon 2017-11-08 22:59:58 UTC
the latest mariadb-apb container will fix the second issue.

Comment 8 Zhang Cheng 2017-11-09 10:04:39 UTC
In fact, I'm not sure my problem have same root cause with this bug. That because only said while binding to MySql/MariaDB in original description, but all three DB failed in my testing.

Please help to confirm and review if it is a block issue for ocp3.7 GA.

Comment 9 Jason Montleon 2017-11-09 13:29:41 UTC
The only images that are likely to fully work right now are 3.7.4-2 and 3.7.5-2 when I get them built shortly. Since the puddles started incrementing versions from 3.7.0 we've been getting containers with very old images. We're trying to find out from someone what's going on.

Comment 13 Zhang Cheng 2017-11-13 02:51:44 UTC
Jason,
That is OKay for me. Thanks your explanation.

Comment 16 errata-xmlrpc 2017-11-28 22:21:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:3188