Page MenuHomePhabricator

D13508.diff
No OneTemporary

D13508.diff

Index: src/applications/drydock/blueprint/DrydockAmazonEC2HostBlueprintImplementation.php
===================================================================
--- src/applications/drydock/blueprint/DrydockAmazonEC2HostBlueprintImplementation.php
+++ src/applications/drydock/blueprint/DrydockAmazonEC2HostBlueprintImplementation.php
@@ -60,6 +60,14 @@
$lease->getAttributes(),
$this->getDetail('attributes'));
+ if ($lease->getAttribute('platform') === null) {
+ // If the platform is not specified, then we can lease against any
+ // existing host resource (this is used for working copies where
+ // the platform is not known ahead of time, but the target host
+ // resource ID is).
+ $platform_match = true;
+ }
+
if ($platform_match && $custom_match) {
$this->log(pht(
'This blueprint can allocate the specified lease.'));
@@ -974,6 +982,10 @@
}
$lease->setAttribute('path', $full_path);
+ if ($lease->getAttribute('platform') === null) {
+ // If the lease didn't specify a platform, set it now.
+ $lease->setAttribute('platform', $platform);
+ }
$this->log(pht(
'Lease %d acquired on resource %d',

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 31, 1:02 PM (15 h, 29 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7078564
Default Alt Text
D13508.diff (1 KB)

Event Timeline