Page MenuHomePhabricator

Add support for stretch in the phabricator puppet class
Closed, ResolvedPublic

Description

We should add support for stretch within puppet phabricator class.

We will need to build some php 7.1 packages for phabricator or backport them from buster.

Current puppet error i get is:

1Error: Could not set 'file' on ensure: No such file or directory @ dir_s_mkdir - /etc/php5/apache2/php.ini20180212-21897-15uv7fb.lock at /etc/puppet/modules/phabricator/manifests/init.pp:214
2Error: Could not set 'file' on ensure: No such file or directory @ dir_s_mkdir - /etc/php5/apache2/php.ini20180212-21897-15uv7fb.lock at /etc/puppet/modules/phabricator/manifests/init.pp:214
3Wrapped exception:
4No such file or directory @ dir_s_mkdir - /etc/php5/apache2/php.ini20180212-21897-15uv7fb.lock
5Error: /Stage[main]/Phabricator/File[/etc/php5/apache2/php.ini]/ensure: change from absent to file failed: Could not set 'file' on ensure: No such file or directory @ dir_s_mkdir - /etc/php5/apache2/php.ini20180212-21897-15uv7fb.lock at /etc/puppet/modules/phabricator/manifests/init.pp:214
6Notice: /Stage[main]/Phabricator::Vcs/Base::Service_unit[ssh-phab]/Service[ssh-phab]/ensure: ensure changed 'stopped' to 'running'
7Info: /Stage[main]/Phabricator::Vcs/Base::Service_unit[ssh-phab]/Service[ssh-phab]: Unscheduling refresh on Service[ssh-phab]
8Error: Systemd start for phd failed!
9journalctl log for phd:
10-- Logs begin at Mon 2018-02-12 21:10:37 UTC, end at Mon 2018-02-12 22:14:51 UTC. --
11Feb 12 22:14:51 phabricator-stretch1 systemd[1]: Starting phabricator-phd...
12Feb 12 22:14:51 phabricator-stretch1 phd[22375]: [2018-02-12 22:14:51] EXCEPTION: (PhabricatorClusterStrandedException) Unable to establish a connection to any database host (while trying "phabricator_config"). All masters and replicas are completely unreachable. at [<phabricator>/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:140]
13Feb 12 22:14:51 phabricator-stretch1 phd[22375]: arcanist(), phabricator(), phabricator-translations(), phutil(), security(), sprint(), wmf-ext-misc()
14Feb 12 22:14:51 phabricator-stretch1 phd[22375]: #0 PhabricatorLiskDAO::raiseUnreachable(string) called at [<phabricator>/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:111]
15Feb 12 22:14:51 phabricator-stretch1 phd[22375]: #1 PhabricatorLiskDAO::newClusterConnection(string, string, string) called at [<phabricator>/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:66]
16Feb 12 22:14:51 phabricator-stretch1 phd[22375]: #2 PhabricatorLiskDAO::establishLiveConnection(string) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:1008]
17Feb 12 22:14:51 phabricator-stretch1 phd[22375]: #3 LiskDAO::establishConnection(string) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:516]
18Feb 12 22:14:51 phabricator-stretch1 phd[22375]: #4 LiskDAO::loadRawDataWhere(string, string) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:476]
19Feb 12 22:14:51 phabricator-stretch1 phd[22375]: #5 LiskDAO::loadAllWhere(string, string) called at [<phabricator>/src/infrastructure/env/PhabricatorConfigDatabaseSource.php:19]
20Feb 12 22:14:51 phabricator-stretch1 phd[22375]: #6 PhabricatorConfigDatabaseSource::loadConfig(string) called at [<phabricator>/src/infrastructure/env/PhabricatorConfigDatabaseSource.php:7]
21Feb 12 22:14:51 phabricator-stretch1 phd[22375]: #7 PhabricatorConfigDatabaseSource::__construct(string) called at [<phabricator>/src/infrastructure/env/PhabricatorEnv.php:249]
22Feb 12 22:14:51 phabricator-stretch1 phd[22375]: #8 PhabricatorEnv::buildConfigurationSourceStack(boolean) called at [<phabricator>/src/infrastructure/env/PhabricatorEnv.php:95]
23Feb 12 22:14:51 phabricator-stretch1 phd[22375]: #9 PhabricatorEnv::initializeCommonEnvironment(boolean) called at [<phabricator>/src/infrastructure/env/PhabricatorEnv.php:75]
24Feb 12 22:14:51 phabricator-stretch1 phd[22375]: #10 PhabricatorEnv::initializeScriptEnvironment(boolean) called at [<phabricator>/scripts/init/lib.php:22]
25Feb 12 22:14:51 phabricator-stretch1 phd[22375]: #11 init_phabricator_script(array) called at [<phabricator>/scripts/init/init-script.php:9]
26Feb 12 22:14:51 phabricator-stretch1 phd[22375]: #12 require_once(string) called at [<phabricator>/scripts/__init_script__.php:3]
27Feb 12 22:14:51 phabricator-stretch1 phd[22375]: #13 require_once(string) called at [<phabricator>/scripts/daemon/manage_daemons.php:6]
28Feb 12 22:14:51 phabricator-stretch1 systemd[1]: phd.service: Control process exited, code=exited status=255
29Feb 12 22:14:51 phabricator-stretch1 systemd[1]: Failed to start phabricator-phd.
30Feb 12 22:14:51 phabricator-stretch1 systemd[1]: phd.service: Unit entered failed state.
31Feb 12 22:14:51 phabricator-stretch1 systemd[1]: phd.service: Failed with result 'exit-code'.
32
33Error: /Stage[main]/Phabricator/Base::Service_unit[phd]/Service[phd]/ensure: change from stopped to running failed: Systemd start for phd failed!
34journalctl log for phd:
35-- Logs begin at Mon 2018-02-12 21:10:37 UTC, end at Mon 2018-02-12 22:14:51 UTC. --
36Feb 12 22:14:51 phabricator-stretch1 systemd[1]: Starting phabricator-phd...
37Feb 12 22:14:51 phabricator-stretch1 phd[22375]: [2018-02-12 22:14:51] EXCEPTION: (PhabricatorClusterStrandedException) Unable to establish a connection to any database host (while trying "phabricator_config"). All masters and replicas are completely unreachable. at [<phabricator>/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:140]
38Feb 12 22:14:51 phabricator-stretch1 phd[22375]: arcanist(), phabricator(), phabricator-translations(), phutil(), security(), sprint(), wmf-ext-misc()
39Feb 12 22:14:51 phabricator-stretch1 phd[22375]: #0 PhabricatorLiskDAO::raiseUnreachable(string) called at [<phabricator>/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:111]
40Feb 12 22:14:51 phabricator-stretch1 phd[22375]: #1 PhabricatorLiskDAO::newClusterConnection(string, string, string) called at [<phabricator>/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:66]
41Feb 12 22:14:51 phabricator-stretch1 phd[22375]: #2 PhabricatorLiskDAO::establishLiveConnection(string) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:1008]
42Feb 12 22:14:51 phabricator-stretch1 phd[22375]: #3 LiskDAO::establishConnection(string) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:516]
43Feb 12 22:14:51 phabricator-stretch1 phd[22375]: #4 LiskDAO::loadRawDataWhere(string, string) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:476]
44Feb 12 22:14:51 phabricator-stretch1 phd[22375]: #5 LiskDAO::loadAllWhere(string, string) called at [<phabricator>/src/infrastructure/env/PhabricatorConfigDatabaseSource.php:19]
45Feb 12 22:14:51 phabricator-stretch1 phd[22375]: #6 PhabricatorConfigDatabaseSource::loadConfig(string) called at [<phabricator>/src/infrastructure/env/PhabricatorConfigDatabaseSource.php:7]
46Feb 12 22:14:51 phabricator-stretch1 phd[22375]: #7 PhabricatorConfigDatabaseSource::__construct(string) called at [<phabricator>/src/infrastructure/env/PhabricatorEnv.php:249]
47Feb 12 22:14:51 phabricator-stretch1 phd[22375]: #8 PhabricatorEnv::buildConfigurationSourceStack(boolean) called at [<phabricator>/src/infrastructure/env/PhabricatorEnv.php:95]
48Feb 12 22:14:51 phabricator-stretch1 phd[22375]: #9 PhabricatorEnv::initializeCommonEnvironment(boolean) called at [<phabricator>/src/infrastructure/env/PhabricatorEnv.php:75]
49Feb 12 22:14:51 phabricator-stretch1 phd[22375]: #10 PhabricatorEnv::initializeScriptEnvironment(boolean) called at [<phabricator>/scripts/init/lib.php:22]
50Feb 12 22:14:51 phabricator-stretch1 phd[22375]: #11 init_phabricator_script(array) called at [<phabricator>/scripts/init/init-script.php:9]
51Feb 12 22:14:51 phabricator-stretch1 phd[22375]: #12 require_once(string) called at [<phabricator>/scripts/__init_script__.php:3]
52Feb 12 22:14:51 phabricator-stretch1 phd[22375]: #13 require_once(string) called at [<phabricator>/scripts/daemon/manage_daemons.php:6]
53Feb 12 22:14:51 phabricator-stretch1 systemd[1]: phd.service: Control process exited, code=exited status=255
54Feb 12 22:14:51 phabricator-stretch1 systemd[1]: Failed to start phabricator-phd.
55Feb 12 22:14:51 phabricator-stretch1 systemd[1]: phd.service: Unit entered failed state.
56Feb 12 22:14:51 phabricator-stretch1 systemd[1]: phd.service: Failed with result 'exit-code'.
57
58Notice: /Stage[main]/Httpd/Httpd::Mod_conf[php7]/Exec[ensure_present_mod_php7]/returns: ERROR: Module php7 does not exist!
59Error: /usr/sbin/a2enmod php7 returned 1 instead of one of [0]
60Error: /Stage[main]/Httpd/Httpd::Mod_conf[php7]/Exec[ensure_present_mod_php7]/returns: change from notrun to 0 failed: /usr/sbin/a2enmod php7 returned 1 instead of one of [0]
61Notice: /Stage[main]/Phabricator::Aphlict/File[/srv/phab/phabricator//support/aphlict/server/node_modules]: Dependency File[/etc/php5/apache2/php.ini] has failures: true
62Notice: /Stage[main]/Phabricator::Aphlict/File[/srv/phab/phabricator//support/aphlict/server/node_modules]: Dependency Service[phd] has failures: true
63Warning: /Stage[main]/Phabricator::Aphlict/File[/srv/phab/phabricator//support/aphlict/server/node_modules]: Skipping because of failed dependencies
64Notice: /Stage[main]/Phabricator::Aphlict/Group[aphlict]: Dependency File[/etc/php5/apache2/php.ini] has failures: true
65Notice: /Stage[main]/Phabricator::Aphlict/Group[aphlict]: Dependency Service[phd] has failures: true
66Warning: /Stage[main]/Phabricator::Aphlict/Group[aphlict]: Skipping because of failed dependencies
67Notice: /Stage[main]/Phabricator::Aphlict/User[aphlict]: Dependency File[/etc/php5/apache2/php.ini] has failures: true
68Notice: /Stage[main]/Phabricator::Aphlict/User[aphlict]: Dependency Service[phd] has failures: true
69Warning: /Stage[main]/Phabricator::Aphlict/User[aphlict]: Skipping because of failed dependencies
70Notice: /Stage[main]/Phabricator::Aphlict/File[/srv/phab/aphlict/config.json]: Dependency File[/etc/php5/apache2/php.ini] has failures: true
71Notice: /Stage[main]/Phabricator::Aphlict/File[/srv/phab/aphlict/config.json]: Dependency Service[phd] has failures: true
72Warning: /Stage[main]/Phabricator::Aphlict/File[/srv/phab/aphlict/config.json]: Skipping because of failed dependencies
73Notice: /Stage[main]/Phabricator::Aphlict/File[/var/run/aphlict/]: Dependency File[/etc/php5/apache2/php.ini] has failures: true
74Notice: /Stage[main]/Phabricator::Aphlict/File[/var/run/aphlict/]: Dependency Service[phd] has failures: true
75Warning: /Stage[main]/Phabricator::Aphlict/File[/var/run/aphlict/]: Skipping because of failed dependencies
76Notice: /Stage[main]/Phabricator::Aphlict/File[/var/log/aphlict/]: Dependency File[/etc/php5/apache2/php.ini] has failures: true
77Notice: /Stage[main]/Phabricator::Aphlict/File[/var/log/aphlict/]: Dependency Service[phd] has failures: true
78Warning: /Stage[main]/Phabricator::Aphlict/File[/var/log/aphlict/]: Skipping because of failed dependencies
79Notice: /Stage[main]/Phabricator::Aphlict/Logrotate::Conf[aphlict]/File[/etc/logrotate.d/aphlict]: Dependency File[/etc/php5/apache2/php.ini] has failures: true
80Notice: /Stage[main]/Phabricator::Aphlict/Logrotate::Conf[aphlict]/File[/etc/logrotate.d/aphlict]: Dependency Service[phd] has failures: true
81Warning: /Stage[main]/Phabricator::Aphlict/Logrotate::Conf[aphlict]/File[/etc/logrotate.d/aphlict]: Skipping because of failed dependencies
82Notice: /Stage[main]/Phabricator::Aphlict/Base::Service_unit[aphlict]/File[/lib/systemd/system/aphlict.service]: Dependency File[/etc/php5/apache2/php.ini] has failures: true
83Notice: /Stage[main]/Phabricator::Aphlict/Base::Service_unit[aphlict]/File[/lib/systemd/system/aphlict.service]: Dependency Service[phd] has failures: true
84Warning: /Stage[main]/Phabricator::Aphlict/Base::Service_unit[aphlict]/File[/lib/systemd/system/aphlict.service]: Skipping because of failed dependencies
85Notice: /Stage[main]/Phabricator::Aphlict/Base::Service_unit[aphlict]/Exec[systemd reload for aphlict]: Dependency File[/etc/php5/apache2/php.ini] has failures: true
86Notice: /Stage[main]/Phabricator::Aphlict/Base::Service_unit[aphlict]/Exec[systemd reload for aphlict]: Dependency Service[phd] has failures: true
87Warning: /Stage[main]/Phabricator::Aphlict/Base::Service_unit[aphlict]/Exec[systemd reload for aphlict]: Skipping because of failed dependencies
88Notice: /Stage[main]/Phabricator::Aphlict/Base::Service_unit[aphlict]/Service[aphlict]: Dependency File[/etc/php5/apache2/php.ini] has failures: true
89Notice: /Stage[main]/Phabricator::Aphlict/Base::Service_unit[aphlict]/Service[aphlict]: Dependency Service[phd] has failures: true
90Warning: /Stage[main]/Phabricator::Aphlict/Base::Service_unit[aphlict]/Service[aphlict]: Skipping because of failed dependencies
91Notice: /Stage[main]/Httpd/Service[apache2]: Dependency File[/etc/php5/apache2/php.ini] has failures: true
92Notice: /Stage[main]/Httpd/Service[apache2]: Dependency Exec[ensure_present_mod_php7] has failures: true
93Warning: /Stage[main]/Httpd/Service[apache2]: Skipping because of failed dependencies
94Info: Stage[main]: Unscheduling all events on Stage[main]
95Notice: Applied catalog in 8.20 seconds

Event Timeline

Needs to be high so we can try to resolve T182832 and T186620.

Change 410245 had a related patch set uploaded (by Paladox; owner: Paladox):
[operations/puppet@production] Phabricator: Support php 7.1 under stretch

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

Needs package libsodium23 to also be imported into php 7.2 in thirdparty/component

php7.2-cli : Depends: libsodium23 (>= 1.0.14) but it is not installable

We will also need to import php-apcu and php-mailparse from there too.

With https://gerrit.wikimedia.org/r/#/c/410245/ this fixes stretch support, we need to re arange loading apache2 as we load php.ini before apache2 has even installed (or even libapache).

I've fixed upped https://gerrit.wikimedia.org/r/#/c/410245/ now, and now it works on stretch and jessie without errors (except if your starting as new and have no database, you have to setup mariadb + user before running puppet then after run bin/storage upgrade and then re run puppet).

But that has always been like that. But now stretch support is working :).

Dzahn claimed this task.

Thank you for your work on this, Paladox.

I'll call it resolved then and if we see any other issues we will simply reopen it.

Eh.. then please define "stretch support is working"

@Dzahn i cherry picked this https://gerrit.wikimedia.org/r/#/c/410245/ onto my local puppet master and phabricator on stretch works (with that applied).

Change 410245 merged by Dzahn:
[operations/puppet@production] Phabricator: Support php 7.2 under stretch

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

Paladox removed a project: Patch-For-Review.
Paladox removed a subscriber: gerritbot.