Merge branch 'fix/ssh-timeout' into feature/terminate-vps

feature/node-rewrite
Sven Slootweg 11 years ago
commit 692112c9fa

@ -24,3 +24,8 @@ repository root
| |- locales/ Contains all CPHP locale files
| `- templates/ Contains all CPHP template files
`- runhelper/ This directory contains the runhelper script for the slave nodes
== DEPENDENCIES ==
* autossh
* ...

@ -236,11 +236,13 @@ class SshConnector extends CPHPBaseClass
$cmd = urlencode(json_encode($command));
$url = "http://localhost:{$this->tunnel_port}/?key={$this->tunnel_key}&command={$cmd}";
/* Setting a HTTP timeout is going to break long-running requests.
* What the hell was I thinking?!
$context = stream_context_create(array(
'http' => array(
'timeout' => 2.0
)
));
));*/
$response = @file($url, 0, $context);

@ -317,7 +317,6 @@ class Vps extends CPHPDatabaseRecordClass
$command = array("sudo", "vzctl", "create", $this->sInternalId, "--ostemplate", $this->sTemplate->sTemplateName);
$result = $this->sNode->ssh->RunCommand($command, false);
$result->returncode = 0;
if($result->returncode == 0 && strpos($result->stderr, "ERROR") === false)
{

Loading…
Cancel
Save