Skip to content
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

Block Storage Improvements #9

Merged
merged 10 commits into from
Dec 2, 2019
Merged

Block Storage Improvements #9

merged 10 commits into from
Dec 2, 2019

Conversation

Oogy
Copy link
Contributor

@Oogy Oogy commented Nov 25, 2019

  • Attach on create if attached_id parameter set. Previously it would have required a second terraform apply run.
  • Sleep 5 seconds prior to attaching on create. This allows new servers sufficient time for last mile bootstrap scripts to complete prior to attaching block storage.
  • Cleaned up resourceVultrBlockStorageRead() to use Get()(returns the specified subscription) vs. List()(returns list of all subscriptions, requires searching).
  • Handle a previously attached server(attached_id) having been destroyed in resourceVultrBlockStorageUpdate().
  • Detach on delete.

@ghost ghost added the size/S label Nov 25, 2019
@ddymko ddymko self-requested a review November 25, 2019 14:50
@badgerwithagun
Copy link

@Oogy - with this fix, if both the block storage and vultr server are managed by terraform, if I taint the server and run an apply, will the block storage be modified in-place with the new attached_id?

@Oogy
Copy link
Contributor Author

Oogy commented Dec 2, 2019

@badgerwithagun Yes that is correct.

@badgerwithagun
Copy link

Fantastic. This is a bit concerning:

Sleep 5 seconds prior to attaching on create. This allows new servers sufficient time for last mile bootstrap scripts to complete prior to attaching block storage.

Is it possible that this will end up being unstable in practice?

@Oogy
Copy link
Contributor Author

Oogy commented Dec 2, 2019

@badgerwithagun This is necessary since it is not possible to live attach block storage. Without this the reboot during the attachment process will interrupt the server bootstrap scripts leaving the server in a non-working state. So with the sleep stability is improved.

@ddymko
Copy link
Contributor

ddymko commented Dec 2, 2019

@badgerwithagun as @Oogy stated this due to a constraint as to how we handle deployment and attaching of block storage to instances. This shouldn't cause any instability issues.

@Oogy Tested and verified that everything is working with the ability to taint servers and have the block storage get reattached. The acceptance tests also pass locally with no issues!

@ddymko ddymko merged commit 0ef0fef into vultr:master Dec 2, 2019
@ddymko ddymko mentioned this pull request Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants