Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

hooked a PostCreateCheck for checking the configuration setting #892

Closed
wants to merge 2 commits into from

Conversation

soleo
Copy link
Contributor

@soleo soleo commented Mar 27, 2015

Added a method called PostCreateCheck to enable to check if the configuration matches with the params provided or default value after the virtual machine is created. The same method could apply to each driver to do after creation checking.

Fix #843

@ehazlett
Copy link
Contributor

@soleo thanks! we didn't implement PostCreate as the checking for creation is at start and once that is done it's handed to the provisioner. I'm not sure we would need to check anything after creation since we just use SSH and that is checked as part of the provisioning process.

/cc @nathanleclaire @sthulb thoughts?

@sthulb
Copy link
Contributor

sthulb commented Mar 27, 2015

@ehazlett you could use it to verify the host created. However that could be implemented in Create.

… vmbox is created.

Fix docker#843

Signed-off-by: Xinjiang Shao <shaoxinjiang@gmail.com>
Fix docker#863

Signed-off-by: Xinjiang Shao <shaoxinjiang@gmail.com>
@ehazlett
Copy link
Contributor

@sthulb yeah essentially that is what the SSH connect is doing isn't it, albeit not via a remote API but still checking what we expect to have. I could see a potential case where the provider API says it is created but we still can't connect. I'm not sure what this would gain us.

@sthulb
Copy link
Contributor

sthulb commented Mar 27, 2015

Me neither.

@nathanleclaire
Copy link
Contributor

Yes, I'm -1 on this change. I can see the utility of smoke checks like this but I don't think this implementation is the correct way to approach it. Eventually I would prefer to move over to declarative configuration of machines and do checks like this to calculate the "delta" to move to our desired state. So, we would be doing stuff like this "up front" rather than "after the fact" and if one "apply" step mutated state incorrectly, subsequent runs might (should be expected to) fix it.

@soleo I definitely encourage opening an issue/proposal to discuss the problem you want to solve with this functionality and get the ball rolling on a conversation about it.

@soleo
Copy link
Contributor Author

soleo commented Mar 29, 2015

I didn't think too much about it. The initial thought for this is just to have universal way to validate the configuration after the vm is created. And, I saw several issues related with this. @nathanleclaire , probably it will be better used as a utility func, and it can also be used for health check of virtual machines, something like "brew doctor" in homebrew

@ehazlett
Copy link
Contributor

Closing this for now. @soleo please watch #773 for the machine declaration functionality @nathanleclaire was mentioning -- that should achieve what you are looking for. Thanks!

@ehazlett ehazlett closed this Mar 30, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validate instance creation for Virtualbox using driver flags
4 participants