Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14784025
D13421.id32502.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D13421.id32502.diff
View Options
Index: src/applications/drydock/blueprint/DrydockAmazonEC2HostBlueprintImplementation.php
===================================================================
--- src/applications/drydock/blueprint/DrydockAmazonEC2HostBlueprintImplementation.php
+++ src/applications/drydock/blueprint/DrydockAmazonEC2HostBlueprintImplementation.php
@@ -695,8 +695,12 @@
pht('Waiting for successful %s connection', $protocol_name));
$resource->save();
+ $last_attempt = PhabricatorTime::getNow();
+
while (true) {
try {
+ $last_attempt = PhabricatorTime::getNow();
+
$this->log(pht(
'Attempting to connect to \'%s\' via %s',
$instance_id,
@@ -776,6 +780,16 @@
throw new Exception(
'Allocated instance, but ended up in unexpected state \''.
$instance_state.'\'!');
+ } else {
+ $check_time = PhabricatorTime::getNow() - $last_attempt;
+ if ($check_time < 60) {
+ $this->log(pht(
+ '%s connection returned too quickly, manually sleeping '.
+ 'for %d seconds to avoid a large number of AWS calls.',
+ $protocol_name,
+ $check_time));
+ sleep($check_time);
+ }
}
continue;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 25, 11:07 AM (10 h, 4 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7047903
Default Alt Text
D13421.id32502.diff (1 KB)
Attached To
Mode
D13421: Prevent rapid AWS calls being made due to SSH test returning quickly
Attached
Detach File
Event Timeline
Log In to Comment