mirror of
https://github.com/vitodeploy/vito.git
synced 2025-05-11 02:33:35 +00:00
Fix missing ip for AWS and DO (#461)
* Fix missing ip for AWS and DO * Fix Vultr
This commit is contained in:
parent
262c5e040d
commit
dd78c86a60
@ -86,6 +86,9 @@ private function install(Server $server): void
|
|||||||
while ($maxWait > 0) {
|
while ($maxWait > 0) {
|
||||||
sleep(10);
|
sleep(10);
|
||||||
$maxWait -= 10;
|
$maxWait -= 10;
|
||||||
|
if (! $server->provider()->isRunning()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
$server->ssh()->connect();
|
$server->ssh()->connect();
|
||||||
break;
|
break;
|
||||||
|
@ -149,6 +149,10 @@ public function isRunning(): bool
|
|||||||
$this->server->save();
|
$this->server->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! $this->server->ip) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($result['Reservations'][0]['Instances'][0]['State']) && isset($result['Reservations'][0]['Instances'][0]['State']['Name'])) {
|
if (isset($result['Reservations'][0]['Instances'][0]['State']) && isset($result['Reservations'][0]['Instances'][0]['State']['Name'])) {
|
||||||
$status = $result['Reservations'][0]['Instances'][0]['State']['Name'];
|
$status = $result['Reservations'][0]['Instances'][0]['State']['Name'];
|
||||||
if ($status == 'running') {
|
if ($status == 'running') {
|
||||||
|
@ -176,6 +176,10 @@ public function isRunning(): bool
|
|||||||
$this->server->save();
|
$this->server->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! $this->server->ip) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return $status->json()['droplet']['status'] == 'active';
|
return $status->json()['droplet']['status'] == 'active';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,6 +171,10 @@ public function isRunning(): bool
|
|||||||
$this->server->save();
|
$this->server->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! $this->server->ip) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return $status->json()['instance']['status'] == 'active';
|
return $status->json()['instance']['status'] == 'active';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user