-
Notifications
You must be signed in to change notification settings - Fork 658
Add dynamic disks support #2652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mariash
wants to merge
8
commits into
cloudfoundry:main
Choose a base branch
from
mariash:dynamic-disks-squashed
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Add database migration for dynamic_disks table * Handle NATS request to provide dynamic disk * Attach disk via CPI, save disk info in the database Co-authored-by: Maria Shaldybin <maria.shaldybin@broadcom.com>
* Handle NATS API request to delete dynamic disk * Send CPI request to delete disk * Remove disk from dynamic_disks table Signed-off-by: Nishad Mathur <nishad.mathur@broadcom.com> Co-authored-by: Nishad Mathur <nishad.mathur@broadcom.com>
* Handle NATS request to detach dynamic disk * Send CPI request to detach disk * Update disk in the database Signed-off-by: Maria Shaldybin <maria.shaldybin@broadcom.com> Co-authored-by: Maria Shaldybin <maria.shaldybin@broadcom.com>
Signed-off-by: Maria Shaldybin <maria.shaldybin@broadcom.com> Co-authored-by: Maria Shaldybin <maria.shaldybin@broadcom.com>
The following endpoints were added: /dynamic_disks/provide /dynamic_disks/detach /dynamic_disks/delete Remove all NATS dynamic disks related code
* bosh.dynamic_disks.update allows to create, attach and detach dynamic disks * bosh.dynamic_disks.delete allows to delete dynamic disks * bosh director admin scopes allow update and delete dynamic disks
4eb13e0 to
70633ac
Compare
* Change dynamic disks jobs to be in dynamic_disks queue * Add dynamic_disks_workers property to director * When dynamic_disks_workers is greater than 0, start separate dynamic_disks_worker process * Update drain to drain dynamic_disks workers
70633ac to
b540264
Compare
Contributor
|
As discussed during the FI working group meeting, a change like this especially if it is gonna be used by something like diego needs an RFC. For more information about the RFC process please look here: https://github.com/cloudfoundry/community |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is this change about?
This PR adds support for dynamically managed disks.
The following API endpoints are added for dynamic disk management:
POST /dynamic_disks/providePOST /dynamic_disks/:disk_name/detachDELETE /dynamic_disks/:disk_nameThe following corresponding jobs were added:
ProvideDynamicDisk- creates disk in the cloud if it doesn't exist, saves record in dynamic_disks database table and attaches it to VM, callsadd_dynamic_diskagent methodDetachDynamicDisk- detaches disk from VM, callsremove_dynamic_diskagent methodDeleteDynamicDisk- deletes disk in the cloud and from the database.These operations are idempotent.
The implementation also introduces:
New database migration adds dynamic_disks table
VM lock for VM cloud operations - attach disk, detach disk, reboot VM and delete VM to make sure only 1 operation is executed per VM.
New UAA scopes for dynamic disk operations introduced:
bosh.dynamic_disks.update (provide/detach)bosh.dynamic_disks.delete (delete)Dynamic disks are deleted when deployment is deleted
Dedicated dynamic disk workers and queue (configurable via a new
dynamic_disks_workersDirector property; when > 0, a separate worker process is started and drain behavior is updated accordingly).Please provide contextual information.
What tests have you run against this PR?
bundle exec rake specHow should this change be described in bosh release notes?
Add support for dynamic disks
Does this PR introduce a breaking change?
No, this PR only adds new functionality.
Tag your pair, your PM, and/or team!
@Alphasite @mkocher @cppforlife