bootstrap-vz
bootstrap-vz copied to clipboard
ENI drive compilation fails
Copy pasta from comment on PR #162 by @daveloyall
So, did you end up using the host's build environment for this? I think so, because today (using HEAD of master) I got this:
Error! Your kernel headers for kernel 3.2.0-4-amd64 cannot be found. Please install the linux-headers-3.2.0-4-amd64 package, or use the --kernelsourcedir option to tell DKMS where it's located Command 'chroot /target/c670114b/root dkms build -m ixgbevf -v 2.16.1' returned non-zero exit status 1 The host is:
hobbes@somemachine:~/bootstrap-vz$ uname -a Linux someothermachine 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2 x86_64 GNU/Linux The guest (target new AMI) is (this is from the bootstrap-vz's --debug console output):
...
Determining kernel version Kernel version is 4.0.0-2-amd64 ... Wait a minute... Here's the host again:hobbes@somemachine:~/bootstrap-vz$ uname -v
1 SMP Debian 3.2.41-2
Where does ${kernelver} come from? https://github.com/andsens/bootstrap-vz/blob/master/bootstrapvz/providers/ec2/tasks/network.py#L56
To be clear: it appears that dkms is attempting to target a kernel version that is neither that of the target nor that of the host. (Or, I'm reading this wrong! :) )
It seems the kernel version is not detected correctly. We can fix that though. There's a task for that :-)
Thanks @andsens!
If you ask me to run some commands and give your the output, or checkout some branch and try it, etc, I'm happy to oblige.
I've always thought that this piece of code were somewhat duplicated (and badly located, as it's part of a task which has another purpose) as DetermineKernelVersion
exists. But this makes sense, as when Jonas' PR was merged I didn't knew/remembered/thought about it. :-(
Edit: worth to mention that his PR was based on my code that was sitting on a temporary branch, so it's not his fault. :-)