diff --git a/src/applications/almanac/util/AlmanacKeys.php b/src/applications/almanac/util/AlmanacKeys.php --- a/src/applications/almanac/util/AlmanacKeys.php +++ b/src/applications/almanac/util/AlmanacKeys.php @@ -63,7 +63,7 @@ // protocol does not have a mechanism like a "Host" header. $username = PhabricatorEnv::getEnvConfig('cluster.instance'); if (strlen($username)) { - return $username; +// return $username; } $username = PhabricatorEnv::getEnvConfig('diffusion.ssh-user'); diff --git a/src/applications/diffusion/ssh/DiffusionGitReceivePackSSHWorkflow.php b/src/applications/diffusion/ssh/DiffusionGitReceivePackSSHWorkflow.php --- a/src/applications/diffusion/ssh/DiffusionGitReceivePackSSHWorkflow.php +++ b/src/applications/diffusion/ssh/DiffusionGitReceivePackSSHWorkflow.php @@ -30,7 +30,7 @@ if ($this->shouldProxy()) { $command = $this->getProxyCommand(true); - $did_synchronize = false; + $did_write = false; if ($device) { $this->writeClusterEngineLogMessage( @@ -40,7 +40,7 @@ } } else { $command = csprintf('git-receive-pack %s', $repository->getLocalPath()); - $did_synchronize = true; + $did_write = true; $cluster_engine->synchronizeWorkingCopyBeforeWrite(); if ($device) { @@ -60,7 +60,7 @@ // We've committed the write (or rejected it), so we can release the lock // without waiting for the client to receive the acknowledgement. - if ($did_synchronize) { + if ($did_write) { $cluster_engine->synchronizeWorkingCopyAfterWrite(); } @@ -69,18 +69,23 @@ } if (!$err) { - $repository->writeStatusMessage( - PhabricatorRepositoryStatusMessage::TYPE_NEEDS_UPDATE, - PhabricatorRepositoryStatusMessage::CODE_OKAY); $this->waitForGitClient(); - $host_wait_end = microtime(true); + // When a repository is clustered, we reach this cleanup code on both + // the proxy and the actual final endpoint node. Don't do more cleanup + // or logging than we need to. + if ($did_write) { + $repository->writeStatusMessage( + PhabricatorRepositoryStatusMessage::TYPE_NEEDS_UPDATE, + PhabricatorRepositoryStatusMessage::CODE_OKAY); - $this->updatePushLogWithTimingInformation( - $this->getClusterEngineLogProperty('writeWait'), - $this->getClusterEngineLogProperty('readWait'), - ($host_wait_end - $host_wait_start)); + $host_wait_end = microtime(true); + $this->updatePushLogWithTimingInformation( + $this->getClusterEngineLogProperty('writeWait'), + $this->getClusterEngineLogProperty('readWait'), + ($host_wait_end - $host_wait_start)); + } } return $err; diff --git a/src/applications/drydock/interface/command/DrydockSSHCommandInterface.php b/src/applications/drydock/interface/command/DrydockSSHCommandInterface.php --- a/src/applications/drydock/interface/command/DrydockSSHCommandInterface.php +++ b/src/applications/drydock/interface/command/DrydockSSHCommandInterface.php @@ -30,8 +30,8 @@ $full_command = call_user_func_array('csprintf', $argv); $flags = array(); - $flags[] = '-o'; - $flags[] = 'LogLevel=quiet'; + // $flags[] = '-o'; + // $flags[] = 'LogLevel=quiet'; $flags[] = '-o'; $flags[] = 'StrictHostKeyChecking=no';