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

Resize vmware disk needs to catch/block 'shrink' scenarios #61

Open
Axelay-Prime opened this issue Mar 29, 2018 · 11 comments
Open

Resize vmware disk needs to catch/block 'shrink' scenarios #61

Axelay-Prime opened this issue Mar 29, 2018 · 11 comments

Comments

@Axelay-Prime
Copy link
Contributor

miq-Utilities/Automate/RedHatConsulting_Utilities/Infrastructure/VM/Provisioning/StateMachines/Methods.class/methods/resize_disk.rb

For situations where new_size < orig_size vmware will fail the request, as it doesn't support shrink operations. Target disk size should be measured against request size and any requests to shrink should non-disruptively exit with (perhaps) a warn that the disk is already > request size.

@itewk
Copy link
Collaborator

itewk commented Mar 29, 2018

PR welcome :)

@Axelay-Prime
Copy link
Contributor Author

Axelay-Prime commented Mar 29, 2018 via email

@Axelay-Prime
Copy link
Contributor Author

Axelay-Prime commented Mar 30, 2018 via email

@itewk
Copy link
Collaborator

itewk commented Apr 2, 2018

@Axelay-Prime you should be able to commit those changes up to your fork of the project and then click the button to do a pull request. that will make it so we can easier review and merge.

Just so you know I actually stopped using this method and instead have started using templates with no attached disks and then using the add_new_disk method to dynamically add disks pre and post kickstart. Did this for multiple reasons, mostly because this resize code is a mess, and not provider agnostic like the add_disk code is. But still happy to review and merge any changes :)

@itewk
Copy link
Collaborator

itewk commented Feb 26, 2019

@Axelay-Prime wondering if you were still interested in doing a PR for this?

@Axelay-Prime
Copy link
Contributor Author

Axelay-Prime commented Feb 26, 2019

Lynn Dixon has produced a large amount of output with rbvmoni, including a resize function. He's still working on preparing this for public consumption, so I put in a check for smaller disks here #142 , as requested, but long term, I think we should support his methods once he releases.

@itewk
Copy link
Collaborator

itewk commented Feb 27, 2019

@Axelay-Prime alrighty, should we assign this to Lynn?

@Axelay-Prime
Copy link
Contributor Author

He has done an impressive amount of work with rbvmoni, if his work is not definitive, it is at least going to be comprehensive.
@lynndixon interested?

@lynndixon
Copy link

Sure. I have a LOT of neat RbVmomi methods, including resizing a disk. I'd be glad to get them in the repo, once I scrub the customer data out. Many of my methods rely on an RbVmomi embedded method that I also wrote, would we want all the methods in the VMware namespace to be stand-alone? Or are we OK with them relying on an embedded method (given that method is included somewhere in the repo)?

@itewk
Copy link
Collaborator

itewk commented Feb 27, 2019

@lynndixon i dont 100% follow, but whatever works that doesn't break old things is good with me

@jeffwarnica
Copy link
Collaborator

Embedded methods are the way to go, @lynndixon . Anything that is in already in StdLib should be reused, or improved, and general purpose helpers you have should be there, too.

That may trigger refactoring to class style.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants