Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15418630
D10871.id.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
D10871.id.diff
View Options
diff --git a/src/applications/drydock/blueprint/DrydockAmazonEC2HostBlueprintImplementation.php b/src/applications/drydock/blueprint/DrydockAmazonEC2HostBlueprintImplementation.php
--- a/src/applications/drydock/blueprint/DrydockAmazonEC2HostBlueprintImplementation.php
+++ b/src/applications/drydock/blueprint/DrydockAmazonEC2HostBlueprintImplementation.php
@@ -871,7 +871,12 @@
if ($resource->getStatus() != DrydockResourceStatus::STATUS_OPEN) {
$message = pht(
- 'Resource %d did not move into an open status',
+ 'This lease was dependent on resource %d moving into the '.
+ 'open status (i.e. there were multiple leases about to '.
+ 'use the same resource being allocated). However the '.
+ 'resource did not allocate successfully and has been '.
+ 'moved into a non-open status. Check the drydock logs '.
+ 'of that resource to determine the failure reason.',
$resource->getID());
$this->log($message);
throw new Exception($message);
diff --git a/src/applications/drydock/worker/DrydockAllocatorWorker.php b/src/applications/drydock/worker/DrydockAllocatorWorker.php
--- a/src/applications/drydock/worker/DrydockAllocatorWorker.php
+++ b/src/applications/drydock/worker/DrydockAllocatorWorker.php
@@ -356,7 +356,8 @@
$blueprint->allocateResource($resource, $lease);
} catch (Exception $ex) {
- $resource->delete();
+ $resource->setStatus(DrydockResourceStatus::STATUS_BROKEN);
+ $resource->save();
throw $ex;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 22, 12:31 AM (1 d, 8 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7226289
Default Alt Text
D10871.id.diff (1 KB)
Attached To
Mode
D10871: Set the status of DrydockResource to BROKEN instead of performing a hard-delete
Attached
Detach File
Event Timeline
Log In to Comment