Details
- Reviewers
epriestley chad - Group Reviewers
Blessed Reviewers - Maniphest Tasks
- T2015: Implement Drydock
Set a custom attribute of test=host onto a preallocated host blueprint and ran:
june-linux-laptop:~/Projects/Phabricator/phabricator> bin/drydock lease --type host --attributes platform=linux,attr_test=abc [2015-08-24 05:21:08] EXCEPTION: (Exception) Lease has been broken! at [<phabricator>/src/applications/drydock/storage/DrydockLease.php:172] arcanist(head=master, ref.master=9b8c9d280ea4), phabricator(head=hachque-reconstructed, ref.master=e0faa66772ed, ref.hachque-reconstructed=8aac04eb678f), phutil(head=hachque-master, ref.master=81eed10bea57, ref.hachque-master=fd52935292b9) #0 DrydockLease::waitForLeases(array) called at [<phabricator>/src/applications/drydock/storage/DrydockLease.php:198] #1 DrydockLease::waitUntilActive() called at [<phabricator>/src/applications/drydock/management/DrydockManagementLeaseWorkflow.php:61] #2 DrydockManagementLeaseWorkflow::execute(PhutilArgumentParser) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:406] #3 PhutilArgumentParser::parseWorkflowsFull(array) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:301] #4 PhutilArgumentParser::parseWorkflows(array) called at [<phabricator>/scripts/drydock/drydock_control.php:21] june-linux-laptop:~/Projects/Phabricator/phabricator> bin/drydock lease --type host --attributes platform=linux,attr_test=host Acquired Lease 418
Diff Detail
- Repository
- rP Phabricator
- Branch
- hachque-reconstructed
- Lint
Lint Passed Severity Location Code Message Advice src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldTextarea.php:51 XHP16 TODO Comment - Unit
Tests Passed - Build Status
Buildable 7753 Build 8538: [Placeholder Plan] Wait for 30 Seconds Build 8537: arc lint + arc unit
Event Timeline
Let's say you have two Linux blueprints, one that is configured to have GCC with a C++ compiler installed, and another that is configured to have the Java compiler. When acquiring hosts in Harbormaster, you need to some way of requiring certain features on the hosts that are obtained. Custom attributes allow blueprints to indicate that their resources have certain features.
In actual real world scenarios, this is used for:
- Making sure deployment commands run on machines in the appropriate network
- Making sure that large build processes use hosts with more computing power and memory than light weight builds
- Making sure that builds run under a correct environment
Alright. This isn't a problem I want to include in the scope of Drydock v1, so I'm going to wait until we're ready to solve this problem in the upstream before looking at this.
I've found that explicit authorization pretty much covers 90% of the stuff here anyway.