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

Resolve PV driver issues with the terraform acceptance test VM template #57

Closed
ddelnano opened this issue Aug 30, 2020 · 1 comment
Closed

Comments

@ddelnano
Copy link
Collaborator

When I was developing #54, I noticed that when my terraform acceptance code tried to create a second VIF for a VM I would receive the following error from the XO api.

Aug 27 20:56:03 xoa xo-server[501]: 2020-08-28T00:56:03.833Z - xo:api - [WARN] admin@admin.net | vm.createInterface(...) [75ms] =!> XapiError: VM_MISSING_PV_DRIVERS(OpaqueRef:1e3e2a3c-d2fe-45a1-a0c3-459d322bcae8)
Aug 27 20:56:44 xoa xo-server[501]: 2020-08-28T00:56:44.814Z - xo:api - [WARN] admin@admin.net | vif.connect(...) [65ms] =!> XapiError: VM_MISSING_PV_DRIVERS(OpaqueRef:1e3e2a3c-d2fe-45a1-a0c3-459d322bcae8)

What made this very confusing was that if I created a VM from the same template through the XO web UI or calling vm.create with the xo-cli I never experienced this issue. I did notice that when the terraform acceptance tests run that the VM created during the test has a kernel panic and goes into a crash loop. When the VM was created outside the test the kernel panic doesn't occur. Unfortunately I was only able to see the console output in the XO UI which isn't that helpful for copy and pasting or seeing the full log. I tried configuring xenconsoled to log the output to the filesystem (using --log=all). This created a file for each VM but the boot logs I was interested in weren't written to the file :(.

The acceptance criteria is to fix these missing pv drivers, update the following tests (will add link once #54 is merged) to not bypass returning errors and add additional assertions about VIF state during the acceptance tests.

ddelnano added a commit that referenced this issue Oct 15, 2020
* Pif, Template and storage repository data source panics when there are multiple matches (#66)
* Unify the pattern of retrieving XoObjects from the XO api (#52)
* Resolve PV driver issues with the terraform acceptance test VM template (#57)
* Test suite improvements to make it easy to run the tests against any XO deployment
@ddelnano
Copy link
Collaborator Author

ddelnano commented Nov 2, 2020

I found out that this actually a race condition. If the VIF attachment, detachment code runs before the guest kernel has loaded its drivers it throws that error. The key was to add time.Sleeps into the code for now and the test mentioned above has been re-enabled.

@ddelnano ddelnano closed this as completed Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant