Page MenuHomePhabricator

Puppet failing when using stretch-migration branch
Closed, DeclinedPublic

Description

Hi, when using the stretch-migration branch puppet is failing with

==> default: Notice: /Stage[main]/Mediawiki/Mediawiki::Wiki[devwiki]/Exec[wiki_setup]/returns: Cannot access the database: Can't connect to local MySQL server through socket '/dev/null' (111) (localhost). Check the host, username and password and try again. 
==> default: Error: /usr/local/bin/multiversion-install /vagrant/mediawiki --wiki wiki --dbname wiki --dbpass wikipassword --dbuser wikiadmin --pass vagrant --scriptpath /w --server http://dev.wiki.local.wmftest.net --confpath /vagrant/settings.d/wikis/wiki  wiki Admin
==> default:  returned 1 instead of one of [0]
==> default: Error: /Stage[main]/Mediawiki/Mediawiki::Wiki[devwiki]/Exec[wiki_setup]/returns: change from notrun to 0 failed: /usr/local/bin/multiversion-install /vagrant/mediawiki --wiki wiki --dbname wiki --dbpass wikipassword --dbuser wikiadmin --pass vagrant --scriptpath /w --server http://dev.wiki.local.wmftest.net --confpath /vagrant/settings.d/wikis/wiki  wiki Admin
==> default:  returned 1 instead of one of [0]
root@mw2:/home/vagrant# /usr/local/bin/multiversion-install /vagrant/mediawiki --wiki wiki --dbname wiki --dbpass wikipassword --dbuser wikiadmin --pass vagrant --scriptpath /w --server http://dev.wiki.local.wmftest.net --confpath /vagrant/settings.d/wikis/wiki  wiki Admin
HHVM 3.18.6-dev is installed.
Found GD graphics library built-in. Image thumbnailing will be enabled if you enable uploads.
Found the Git version control software: /usr/bin/git.
Using server URL "http://dev.wiki.local.wmftest.net/w".
Warning: Your default directory for uploads (/vagrant/mediawiki/images/) is not checked for vulnerability to arbitrary script execution during the CLI install.
Using the intl PECL extension for Unicode normalization.
The environment has been checked. You can install MediaWiki.
Setting up database
Cannot access the database: Can't connect to local MySQL server through socket '/dev/null' (111) (localhost). Check the host, username and password and try again.

Event Timeline

Paladox created this task.Dec 16 2017, 8:38 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 16 2017, 8:38 PM
This comment was removed by Paladox.
bd808 added a comment.Dec 17 2017, 6:11 PM

Is this reproducible for you with a clean clone of mediawiki-vagrant? I can not recreate this /dev/null socket selection by the installer script when bringing up a new VM.

Paladox added a comment.EditedDec 17 2017, 7:19 PM

@bd808 hi, yes.

On gerrit-test3.

(Did you do mwvagrant destroy?)

@bd808 it dosen't seem to be creating the database called wiki thus leading to "'/dev/null' (111) (localhost).".

I have not been able to recreate this in 7 complete VM delete && create cycles. Are you sure that this happens on a clean VM/LXC container creation?

@bd808 yep i am sure this happends on a clean container. I deleted mediawiki-vagrant and got puppet to run to reclone the repo.

then i did vagrant up.

You can have a look on gerrit-test3 :).

bd808 added a comment.Dec 18 2017, 1:01 AM

This seems to be a bug with the hhvm runtime. If I edit the /usr/local/bin/multiversion-install provisioned in the VM to use php7.0 instead of php and manually run the installer it completes with no errors. If I then revert the change and run vagrant provision from outside the container it does not recognize that the wiki is already provisioned and fails as before. This seems to be at least in part related to T181918: Fix default .my.cnf/grants for vagrant user on Stretch. The check for an existing wiki is failing:

$ mysql --defaults-extra-file=/home/vagrant/.my.cnf --execute="show databases;"
ERROR 1698 (28000): Access denied for user 'root'@'localhost'

Let's fix that one and then see what remains here.

bd808 added a comment.Dec 25 2017, 5:57 AM

@Paladox, now that T181918: Fix default .my.cnf/grants for vagrant user on Stretch is fixed can you recheck this problem? To have a fair comparison with your past tests you will need to enable the hhvm role as php7 is the default runtime now.

bd808 closed this task as Declined.Jan 6 2018, 6:49 PM

Closed for inactivity. Feel free to reopen if you can produce a reproduction case with the current HEAD of the stretch-migration branch.