When trying to provision MediaWiki-Vagrant after enabling the Phabricator role, a wild error appears:
==> default: Notice: /Stage[main]/Phabricator/Git::Clone[phabricator]/Exec[git_clone_phabricator]/returns: executed successfully ==> default: Notice: /Stage[main]/Phabricator/Service::Gitupdate[phd]/File[/etc/mw-vagrant/services/phd.conf]/ensure: created ==> default: Error: /vagrant/srv/phabricator/bin/config: 1: /vagrant/srv/phabricator/bin/config: ../scripts/setup/manage_config.php: not found ==> default: Error: /Stage[main]/Phabricator/Phabricator::Config[mysql.host]/Exec[phab_set_mysql.host]/returns: change from notrun to 0 failed: /vagrant/srv/phabricator/bin/config: 1: /vagrant/srv/phabricator/bin/config: ../scripts/setup/manage_config.php: not found ==> default: Error: /vagrant/srv/phabricator/bin/config: 1: /vagrant/srv/phabricator/bin/config: ../scripts/setup/manage_config.php: not found ==> default: Error: /Stage[main]/Phabricator/Phabricator::Config[mysql.port]/Exec[phab_set_mysql.port]/returns: change from notrun to 0 failed: /vagrant/srv/phabricator/bin/config: 1: /vagrant/srv/phabricator/bin/config: ../scripts/setup/manage_config.php: not found ==> default: Error: /vagrant/srv/phabricator/bin/config: 1: /vagrant/srv/phabricator/bin/config: ../scripts/setup/manage_config.php: not found ==> default: Error: /Stage[main]/Phabricator/Phabricator::Config[mysql.pass]/Exec[phab_set_mysql.pass]/returns: change from notrun to 0 failed: /vagrant/srv/phabricator/bin/config: 1: /vagrant/srv/phabricator/bin/config: ../scripts/setup/manage_config.php: not found ==> default: Notice: /Stage[main]/Phabricator/Exec[phab_setup_db]: Dependency Exec[phab_set_mysql.host] has failures: true ==> default: Notice: /Stage[main]/Phabricator/Exec[phab_setup_db]: Dependency Exec[phab_set_mysql.port] has failures: true ==> default: Notice: /Stage[main]/Phabricator/Exec[phab_setup_db]: Dependency Exec[phab_set_mysql.pass] has failures: true ==> default: Warning: /Stage[main]/Phabricator/Exec[phab_setup_db]: Skipping because of failed dependencies ==> default: Error: /vagrant/srv/phabricator/bin/config: 1: /vagrant/srv/phabricator/bin/config: ../scripts/setup/manage_config.php: not found
What happens is that the manage_config.php script is not found in ../scripts/setup/manage_config.php because the executing script is located in /vagrant/srv/phabricator/bin/config. .. resolves here to /vagrant/srv/phabricator/bin, not /vagrant/srv/phabricator, where the script directory is located. ../scripts/setup/manage_config.php should thus instead be ../../scripts/setup/manage_config.php.
config is a file-like symlink - but this didn't properly show on windows - which is the problem. If Phabricator is cloned on Linux, the symlinks will be proper symlinks, however when cloned on Windows, they turn in to regular files, which happens with Vagrant too. The virtual machine shows this too if you run ls -la in /vagrant/srv/phabricator/bin.
Potential solutions
- Modify the puppet configuration files to use the direct path instead of the symlinks
- Prevent the role from being enabled on Windows
- Somehow support Windows symlinks