-
Notifications
You must be signed in to change notification settings - Fork 32
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
Make disks optional in VM resource #195
base: master
Are you sure you want to change the base?
Conversation
@4censord apologies for the late reply. This code change definitely accomplishes the use case mentioned in #194, however, I want to make sure that we only allow this in the right context. I assume that cdrom needs to be a required field when the In addition ensuring that this new functionality is used properly, we need to add an acceptance test for this. This new test case will be very similar to this. I'll add that on top of your PR once we've determined what the behavior should be. Please let me know if you'd like to attempt that yourself. |
No need to apologize.
Sadly it only looks that easy. This entails changes to the client code, so we problably want to wait until #176 is merged.
If a vm boots from the network, a cdrom would not be required.
I would like to try this myself, but i would need a bit of guidance
For me, this is not a time critical problem, so i would like to use this as an oportunity to learn. Footnotes |
I've just closed #176. See my final comment for more details, but I'm not sure that the xo-sdk-go will see new development. It should be trivial to upstream any changes from this repo there and I was planning to redesign the API in #189 so until that is done I don't think there is a rush to move forward with xo-sdk-go.
Good point, I had not considered PXE booting.
The CONTRIBUTING.md documentation gives an overview of the tests, how to run them and what needs to exist in order for the tests to succeed. Please give that a read and let me know if you have any questions or run into problems. I can get back to you quicker over Discord as you attempt to run the test suite, so don't hesitate to ask questions there. |
d8cdca7
to
2d78cb8
Compare
0a37962
to
d3488bf
Compare
I ran the test suite for this branch and there is a compilation issue.
After fixing that the test fails on the For these 'diskless' VMs will you be installing an OS after it boots (either from cdrom or PXE)? I'm just trying to make sure I understand the use case fully. So if you can share more information on the intended workflow that would be great. |
After debugging the test more, the error is originating from the fact that the XO api iterates over the VBDs present to identify what SR to use for the cloud config drive (source). Since we are using a diskless template the sr id will be undefined and cause the following error:
I updated the test to use a template with a disk and the test fails because there is a diff after the plan is applied. This is expected since the resulting VM does have a disk while the config is diskless.
Understanding your workflow for this 'diskless' VM will be important to determine how to resolve these issues. Maybe the second option can work with the ignore_changes lifecycle meta argument on the disk attribute. |
Yes, I am live booting my VMs. I am running some stateless services like (DNS-servers, reverse/caching proxys, The OS boots fully life from an ISO (or PXE), and gets some This workflow is working already very nicely, with every vm having a I can't seem to run the acceptance tests myself right now:
|
@4censord thanks for clarifying. So based on my current understanding of the XO api, we still need to provide a disk because that's how the cloudinit integration works. I need to investigate this a bit more before I know the options that are available. As for your issues with the acceptance tests, I haven't seen that error before. Can you share the output when the following environment variable is set: |
This fixes #194