From c85cc932efac8b52e1c4ee795f5b901294986f3f Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 16 Jan 2013 09:20:23 -0800 Subject: [PATCH] Remove Drydock config options Summary: Adding random config options has a higher cost now since we can't remove them without raising warnings in installs about missing/unknown config. These are a bit premature to expose just yet -- I might want to put them in web-based config, too. Test Plan: Grepped for strings. Reviewers: codeblock, btrahan Reviewed By: codeblock CC: aran Maniphest Tasks: T2255 Differential Revision: https://secure.phabricator.com/D4467 --- conf/default.conf.php | 16 ---------------- .../blueprint/DrydockLocalHostBlueprint.php | 7 +++++-- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/conf/default.conf.php b/conf/default.conf.php index 37d1db1f6a..54e322377c 100644 --- a/conf/default.conf.php +++ b/conf/default.conf.php @@ -1176,22 +1176,6 @@ return array( // -- Drydock --------------------------------------------------------------- // - // Drydock is used to allocate various software resources. For example, it - // allocates working copies so continuous integration tests can be executed. - // It needs at least one host to allocate these resources on. - // - // Set this option to true to let Drydock use the localhost for allocations. - // This is the simplest configuration, but the least scalable. You MUST - // disable this if you run daemons on more than one machine -- if you do not, - // a daemon on machine A may allocate a resource locally, and then a daemon - // on machine B may try to access it. - 'drydock.localhost.enabled' => true, - - // If the localhost is available to Drydock, specify the path on disk where - // Drydock should write files. You should create this directory and make sure - // the user that the daemons run as has permission to write to it. - 'drydock.localhost.path' => '/var/drydock/', - // If you want to use Drydock's builtin EC2 Blueprints, configure your AWS // EC2 credentials here. 'amazon-ec2.access-key' => null, diff --git a/src/applications/drydock/blueprint/DrydockLocalHostBlueprint.php b/src/applications/drydock/blueprint/DrydockLocalHostBlueprint.php index 2b03a87940..f0d8cccc08 100644 --- a/src/applications/drydock/blueprint/DrydockLocalHostBlueprint.php +++ b/src/applications/drydock/blueprint/DrydockLocalHostBlueprint.php @@ -3,7 +3,8 @@ final class DrydockLocalHostBlueprint extends DrydockBlueprint { public function isEnabled() { - return PhabricatorEnv::getEnvConfig('drydock.localhost.enabled'); + // TODO: Figure this out. + return true; } public function canAllocateMoreResources(array $pool) { @@ -20,7 +21,9 @@ final class DrydockLocalHostBlueprint extends DrydockBlueprint { } protected function executeAllocateResource(DrydockLease $lease) { - $path = PhabricatorEnv::getEnvConfig('drydock.localhost.path'); + // TODO: Don't hard-code this. + $path = '/var/drydock/'; + if (!Filesystem::pathExists($path)) { throw new Exception( "Path '{$path}' does not exist!");