-
Notifications
You must be signed in to change notification settings - Fork 40
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
Enhance 'kernel_upgrade' across supported OSes #14
Enhance 'kernel_upgrade' across supported OSes #14
Conversation
kernel_upgrade currently searches for the driver "/lib/modules/${::kernelrelease}/kernel/drivers/scsi/vmw_pvscsi.ko", which isn't reliable on RHEL/CentOS 5. I've added some conditional logic to search for vmxnet3.ko instead, which appears to be universally installed regardless of distro (albeit in different locations across the different versions of RHEL/CentOS).
Enhance 'kernel_upgrade' across supported OSes
So… I glubbed up.Yuck. This turned into an annoyance.
As per your comment in #9 I checked which modules are part of the kernel by default across these four distros (Ubuntu 12.04 & 12.10, and CentOS 5/6) and What I came up with is a bunch of numbers! TL;DRDoes
|
VMware Tools version | Ubuntu 12.04 | Ubuntu 12.10 | CentOS 5.9 | CentOS 6.4 |
---|---|---|---|---|
9.0.0-782409 | ✓ | ✓ | ✓ | ✓ |
9.0.1-913578 | ✓ | ✓ | ✓ | ✓ |
9.0.5-1065307 | ✓ | ✓ | ✓ | ✓ |
Data from each instance
CentOS 5, x86_64
[root@webinf-centos5-puppetclient ~]# lsb_release -rcs
5.9 Final
[root@webinf-centos5-puppetclient ~]# uname --hardware-platform
x86_64
[root@webinf-centos5-puppetclient ~]# vmware-toolbox-cmd -v
9.0.0.15210 (build-782409)
[root@webinf-centos5-puppetclient ~]# find /lib/modules/$(uname -r) -name "vmci.ko"
/lib/modules/2.6.18-348.6.1.el5/misc/vmci.ko
------
[root@webinf-centos5-puppetclient ~]# lsb_release -rcs
5.9 Final
[root@webinf-centos5-puppetclient ~]# uname --hardware-platform
x86_64
[root@webinf-centos5-puppetclient ~]# vmware-toolbox-cmd -v
9.0.1.18551 (build-913578)
[root@webinf-centos5-puppetclient ~]# find /lib/modules/$(uname -r) -name "vmci.ko"
/lib/modules/2.6.18-348.6.1.el5/misc/vmci.ko
------
[root@webinf-centos5-puppetclient ~]# lsb_release -rcs
5.9 Final
[root@webinf-centos5-puppetclient ~]# uname --hardware-platform
x86_64
[root@webinf-centos5-puppetclient ~]# vmware-toolbox-cmd -v
9.0.5.21789 (build-1065307)
[root@webinf-centos5-puppetclient ~]# find /lib/modules/$(uname -r) -name "vmci.ko"
/lib/modules/2.6.18-348.6.1.el5/misc/vmci.ko
CentOS 6, x86_64
[root@webinf-centos6-puppetclient ~]# lsb_release -rcs
6.4 Final
[root@webinf-centos6-puppetclient ~]# uname --hardware-platform
x86_64
[root@webinf-centos6-puppetclient ~]# vmware-toolbox-cmd -v
9.0.0.15210 (build-782409)
[root@webinf-centos6-puppetclient ~]# find /lib/modules/$(uname -r) -name "vmci.ko"
/lib/modules/2.6.32-358.11.1.el6.x86_64/misc/vmci.ko
------
[root@webinf-centos6-puppetclient ~]# lsb_release -rcs
6.4 Final
[root@webinf-centos6-puppetclient ~]# uname --hardware-platform
x86_64
[root@webinf-centos6-puppetclient ~]# vmware-toolbox-cmd -v
9.0.1.18551 (build-913578)
[root@webinf-centos6-puppetclient ~]# find /lib/modules/$(uname -r) -name "vmci.ko"
/lib/modules/2.6.32-358.11.1.el6.x86_64/misc/vmci.ko
------
[root@webinf-centos6-puppetclient ~]# lsb_release -rcs
6.4 Final
[root@webinf-centos6-puppetclient ~]# uname --hardware-platform
x86_64
[root@webinf-centos6-puppetclient ~]# vmware-toolbox-cmd -v
9.0.5.21789 (build-1065307)
[root@webinf-centos6-puppetclient ~]# find /lib/modules/$(uname -r) -name "vmci.ko"
/lib/modules/2.6.32-358.11.1.el6.x86_64/misc/vmci.ko
Ubuntu 12.04, x86_64
root@webinf-ubuntu1204-puppetclient:~# lsb_release -rcs
12.04
precise
root@webinf-ubuntu1204-puppetclient:~# uname --hardware-platform
x86_64
root@webinf-ubuntu1204-puppetclient:~# vmware-toolbox-cmd -v
9.0.0.15210 (build-782409)
root@webinf-ubuntu1204-puppetclient:~# find /lib/modules/$(uname -r) -name "vmci.ko"
/lib/modules/3.2.0-48-generic/misc/vmci.ko
------
root@webinf-ubuntu1204-puppetclient:~# lsb_release -rcs
12.04
precise
root@webinf-ubuntu1204-puppetclient:~# uname --hardware-platform
x86_64
root@webinf-ubuntu1204-puppetclient:~# vmware-toolbox-cmd -v
9.0.1.18551 (build-913578)
root@webinf-ubuntu1204-puppetclient:~# find /lib/modules/$(uname -r) -name "vmci.ko"
/lib/modules/3.2.0-48-generic/misc/vmci.ko
------
root@webinf-ubuntu1204-puppetclient:~# lsb_release -rcs
12.04
precise
root@webinf-ubuntu1204-puppetclient:~# uname --hardware-platform
x86_64
root@webinf-ubuntu1204-puppetclient:~# vmware-toolbox-cmd -v
9.0.5.21789 (build-1065307)
root@webinf-ubuntu1204-puppetclient:~# find /lib/modules/$(uname -r) -name "vmci.ko"
/lib/modules/3.2.0-48-generic/misc/vmci.ko
Ubuntu 12.10, x86_64
root@webinf-ubuntu1210-puppetclient:~# lsb_release -rcs
12.10
quantal
root@webinf-ubuntu1210-puppetclient:~# uname --hardware-platform
x86_64
root@webinf-ubuntu1210-puppetclient:~# vmware-toolbox-cmd -v
9.0.0.15210 (build-782409)
root@webinf-ubuntu1210-puppetclient:~# find /lib/modules/$(uname -r) -name "vmci.ko"
/lib/modules/3.5.0-17-generic/misc/vmci.ko
------
root@webinf-ubuntu1210-puppetclient:~# lsb_release -rcs
12.10
quantal
root@webinf-ubuntu1210-puppetclient:~# uname --hardware-platform
x86_64
root@webinf-ubuntu1210-puppetclient:~# vmware-toolbox-cmd -v
9.0.1.18551 (build-913578)
root@webinf-ubuntu1210-puppetclient:~# find /lib/modules/$(uname -r) -name "vmci.ko"
/lib/modules/3.5.0-17-generic/misc/vmci.ko
------
root@webinf-ubuntu1210-puppetclient:~# lsb_release -rcs
12.10
quantal
root@webinf-ubuntu1210-puppetclient:~# uname --hardware-platform
x86_64
root@webinf-ubuntu1210-puppetclient:~# vmware-toolbox-cmd -v
9.0.5.21789 (build-1065307)
root@webinf-ubuntu1210-puppetclient:~# find /lib/modules/$(uname -r) -name "vmci.ko"
/lib/modules/3.5.0-17-generic/misc/vmci.ko
What does that have to do with anything?
vmxnet3.ko
is obviously not a good target for the check.- There's no need for the selector in
vmwaretools::params
, because it looks like/lib/modules/${::kernelrelease}/misc/vmci.ko
is pretty universal across the distros once VMware tools are installed (assuming their basic dependencies are met). vmw_pvscsi.ko
, a previous target for the check, is also part of the base distribution on newer Ubuntu variants, so that's also an invalid target for the check. So at the very least, we (the collective we) were going to have to figure this out eventually.- This is what happens when I throw code at a problem before I gather data. Due to the reports in Kernel_upgrade Exec[vmware_config_tools] runs every time on Ubuntu 12.04 LTS #9 and my own experiences with a constantly-running exec, I had assumed that there was something inherant to the way VMware tools are installed to each distro that prevented VMware tools from building
vmci.ko
. And from there I assumed that this is what kept other users from finding avmci.ko
module when they went to look for one. In retrospect, I suspect that it's more a by-product of some overlooked missing package on the machines that don't have it. When in doubt,find /lib/modules/$(uname -r) -name "vmci.ko"
(or some variant thereof) is pretty handy.
What would I do if this was my module?
I'd probably walk back some of the changes. I'd keep the vmwaretools::params
definition for $vmwaretools::params::config_creates
, but I'd remove the selector and make it a straightforward assignment:
$config_creates = "/lib/modules/${::kernelrelease}/misc/vmci.ko"
Then I'd maybe dig into any issues stating that this check was repeatedly running and try to work out why the system is out of order, not the check. I think the original idea ("does vmci.ko exist? If not, rerun the config to build the modules again") was sound.
Hi Ryan, I'll revert back to the Thanks, |
kernel_upgrade currently searches for the driver "/lib/modules/${::kernelrelease}/kernel/drivers/scsi/vmw_pvscsi.ko", which isn't reliable on RHEL/CentOS 5. I've added some conditional logic to search for vmxnet3.ko instead, which appears to be universally installed regardless of distro (albeit in different locations across the different versions of RHEL/CentOS).
This has been tested across the CentOS flavors mentioned but it probably needs at least a little bit more tire kicking on Ubuntu. I didn't have any clients handy tonight, so please merge with a grain of salt.