voxpupuli / puppet-vmwaretools

Puppet module to manage VMware Operating System Specific Packages for VMware tools installation.
http://forge.puppetlabs.com/razorsedge/vmwaretools
Apache License 2.0
34 stars 44 forks source link

RHEL6: Execution of '/sbin/start vmware-tools-services' returned 1 #40

Open Bassobr opened 8 years ago

Bassobr commented 8 years ago

Running RHEL 6.7 on ESXi 6.0, using this module in version 5.0.1 throws the following error:

change from stopped to running failed: Could not start Service[vmware-tools-services]: Execution of '/sbin/start vmware-tools-services' returned 1: at /etc/puppet/environments/production/modules/vmwaretools/manifests/init.pp:324

The VM is deployed and managed by Foreman 1.8.4

crapnicki commented 8 years ago

I was having the same issue. I changed lines 319-322 in vmwaretools\manifests\init.pp from:

            start      => "/sbin/start ${service_name_real}",
            stop       => "/sbin/stop ${service_name_real}",
            status     => "/sbin/status ${service_name_real} | grep -q 'start/'",
            restart    => "/sbin/restart ${service_name_real}",

to:

            start      => "service ${service_name_real} start",
            stop       => "service ${service_name_real} stop",
            status     => "service ${service_name_real} status",
            restart    => "service ${service_name_real} restart",

It now works properly.

Bassobr commented 8 years ago

Thank you for your advice. It now works like a charm.

aholen commented 8 years ago

+1

razorsedge commented 8 years ago

I am having trouble replicating this on my test system. I am running CentOS 6.6 x86_64 in VMware Player 6.0.6 using razorsedge/vmwaretools module version 5.1.0 against 5.0, 5.1, 5.5, 6.0, and latest versions of the vmwaretools repository. All give the desired effect of using SysV init with 5.0 tools and Upstart with 5.1 and newer tools.

crapnicki commented 8 years ago

My system is a CentOS 6.7 x86_64 minimal server, upgraded from the 6.5 minimal ISO, running on ESXi 6.0. It is running Foreman 1.9.3, I believe. We are actually migrating to a new infrastructure at work right now, so I don't even have my VM reconfigured/upgraded it yet. I can power it on and give you any additional information you need.

razorsedge commented 8 years ago

@crapnicki : What razorsedge/vmwaretools module version and what parameters are you passing to that module? Output of "rpm -qa|grep vmware|sort" will be helpful.

crapnicki commented 8 years ago

@razorsedge From the CHANGELOG file, I'm running 5.0.1.

Relevant info from the site.pp file:

class { '::vmwaretools':
    tools_version       =>  'latest',
    ensure          =>  'preset',
    service_ensure      =>  running,
    service_enable      =>  true,
    autoupgrade     =>  true,
    disable_tools_version   =>  false,
    proxy           =>  'http://a.b.c.d:1234'
}
rpm -qa|grep vmware|sort
kmod-vmware-tools-vmci-9.8.1.0-2.6.32.71.el6.x86_64.5.el6.x86_64
kmod-vmware-tools-vmxnet-2.1.0.0-2.6.32.71.el6.x86_64.5.el6.x86_64
kmod-vmware-tools-vsock-9.8.1.0-2.6.32.71.el6.x86_64.5.el6.x86_64
vmware-tools-core-10.0.0-1.el6.x86_64
vmware-tools-esx-kmods-10.0.0-1.el6.x86_64
vmware-tools-esx-nox-10.0.0-1.el6.x86_64
vmware-tools-foundation-10.0.0-1.el6.x86_64
vmware-tools-guestlib-10.0.0-1.el6.x86_64
vmware-tools-libraries-nox-10.0.0-1.el6.x86_64
vmware-tools-plugins-autoUpgrade-10.0.0-1.el6.x86_64
vmware-tools-plugins-deployPkg-10.0.0-1.el6.x86_64
vmware-tools-plugins-grabbitmqProxy-10.0.0-1.el6.x86_64
vmware-tools-plugins-guestInfo-10.0.0-1.el6.x86_64
vmware-tools-plugins-hgfsServer-10.0.0-1.el6.x86_64
vmware-tools-plugins-powerOps-10.0.0-1.el6.x86_64
vmware-tools-plugins-timeSync-10.0.0-1.el6.x86_64
vmware-tools-plugins-vix-10.0.0-1.el6.x86_64
vmware-tools-plugins-vmbackup-10.0.0-1.el6.x86_64
vmware-tools-services-10.0.0-1.el6.x86_64
vmware-tools-vgauth-10.0.0-1.el6.x86_64
vmware-tools-vmci-common-10.0.0-5.el6.x86_64
vmware-tools-vmxnet-common-10.0.0-5.el6.x86_64
vmware-tools-vsock-common-10.0.0-5.el6.x86_64
razorsedge commented 8 years ago

Sorry for the delayed response. Life keeps interfering with code.

I have tried upgrading to CentOS 6.7 and tested with Puppet 2.7.26 and Puppet-agent 1.2.2. I am unable to reproduce the error with Service[vmware-tools-services]. I am starting to wonder if this is specific to ESXi 6.0 or if deployment via the Foreman has an effect.

crapnicki commented 8 years ago

Life happens. :)

Might want to see if one of the others that were having this issue will respond with their infrastructure to see if there is a common denominator.

razorsedge commented 8 years ago

The only other thing I can think of is whether the output of "ls -l /etc/init*/vmware*" can tell us anything.

aholen commented 8 years ago

Hi, upgrading from 5.0.1 to 6.0.0 fixed the issue for me on the following system. No changes on this system other than the upgrade from 5.0.1 to 6.0.0.

CentOS 6.6 x86_64 (CentOS 6.7 also works) Not using foreman, but r10k/hiera-setup. vSphere Client reports VMware Tools: "Running (Current)"

puppet-code from base profile: (using defaults only) include vmwaretools

puppet --version
3.8.4
rpm -qa|grep vmware|sort
kmod-vmware-tools-vmci-9.7.1.0-2.6.32.71.el6.x86_64.5.el6.x86_64
kmod-vmware-tools-vmxnet-2.1.0.0-2.6.32.71.el6.x86_64.5.el6.x86_64
kmod-vmware-tools-vsock-9.7.2.0-2.6.32.71.el6.x86_64.5.el6.x86_64
vmware-tools-core-9.10.5-1.el6.x86_64
vmware-tools-esx-kmods-9.10.5-1.el6.x86_64
vmware-tools-esx-nox-9.10.5-1.el6.x86_64
vmware-tools-foundation-9.10.5-1.el6.x86_64
vmware-tools-guestlib-9.10.5-1.el6.x86_64
vmware-tools-libraries-nox-9.10.5-1.el6.x86_64
vmware-tools-plugins-autoUpgrade-9.10.5-1.el6.x86_64
vmware-tools-plugins-deployPkg-9.10.5-1.el6.x86_64
vmware-tools-plugins-grabbitmqProxy-9.10.5-1.el6.x86_64
vmware-tools-plugins-guestInfo-9.10.5-1.el6.x86_64
vmware-tools-plugins-hgfsServer-9.10.5-1.el6.x86_64
vmware-tools-plugins-powerOps-9.10.5-1.el6.x86_64
vmware-tools-plugins-timeSync-9.10.5-1.el6.x86_64
vmware-tools-plugins-vix-9.10.5-1.el6.x86_64
vmware-tools-plugins-vmbackup-9.10.5-1.el6.x86_64
vmware-tools-services-9.10.5-1.el6.x86_64
vmware-tools-vgauth-9.10.5-1.el6.x86_64
vmware-tools-vmci-common-9.10.5-5.el6.x86_64
vmware-tools-vmxnet-common-9.10.5-5.el6.x86_64
vmware-tools-vsock-common-9.10.5-5.el6.x86_64
ls -l /etc/init*/vmware*
-rw-r--r--. 1 root root 390 Aug 13  2015 /etc/init/vmware-tools-services.conf
-rw-r--r--. 1 root root 332 Aug 13  2015 /etc/init/vmware-tools-vgauth.conf
razorsedge commented 8 years ago

@aholen And before the upgrade, you were getting the change from stopped to running failed... error on each Pupet run?

aholen commented 8 years ago

@razorsedge That's correct - but the picture doesn't seem so simple as in my previous post. I have a another system that failed, despite new module version:

before update: CentOS 6.6 x86_64

rpm -qa|grep vmware|sort

kmod-vmware-tools-vmci-9.0.4.0-2.6.32.71.el6.x86_64.4.el6.x86_64
kmod-vmware-tools-vmxnet-2.0.9.3-2.6.32.71.el6.x86_64.4.el6.x86_64
kmod-vmware-tools-vsock-1.0.0.0-2.6.32.71.el6.x86_64.4.el6.x86_64
vmware-tools-core-8.6.16-1.el6.x86_64
vmware-tools-esx-kmods-8.6.16-1.el6.x86_64
vmware-tools-esx-nox-8.6.16-1.el6.x86_64
vmware-tools-foundation-8.6.16-1.el6.x86_64
vmware-tools-guestlib-8.6.16-1.el6.x86_64
vmware-tools-help-8.6.16-1.el6.x86_64
vmware-tools-libraries-nox-8.6.16-1.el6.x86_64
vmware-tools-plugins-autoUpgrade-8.6.16-1.el6.x86_64
vmware-tools-plugins-deployPkg-8.6.16-1.el6.x86_64
vmware-tools-plugins-guestInfo-8.6.16-1.el6.x86_64
vmware-tools-plugins-hgfsServer-8.6.16-1.el6.x86_64
vmware-tools-plugins-powerOps-8.6.16-1.el6.x86_64
vmware-tools-plugins-timeSync-8.6.16-1.el6.x86_64
vmware-tools-plugins-vix-8.6.16-1.el6.x86_64
vmware-tools-plugins-vmbackup-8.6.16-1.el6.x86_64
vmware-tools-services-8.6.16-1.el6.x86_64
vmware-tools-vmci-common-8.6.16-4.el6.x86_64
vmware-tools-vmxnet-common-8.6.16-4.el6.x86_64
vmware-tools-vsock-common-8.6.16-4.el6.x86_64
puppet agent -t:

Error: Could not start Service[vmware-tools-services]: Execution of '/sbin/start vmware-tools-services' returned 1: start: Unknown job: vmware-tools-services
Error: /Stage[main]/Vmwaretools/Service[vmware-tools-services]/ensure: change from stopped to running failed: Could not start Service[vmware-tools-services]: Execution of '/sbin/start vmware-tools-services' returned 1: start: Unknown job: vmware-tools-services

after update of all vmware-packages it started working: yum update *vmware* -y

rpm -qa|grep vmware|sort
kmod-vmware-tools-vmci-9.8.1.0-2.6.32.71.el6.x86_64.5.el6.x86_64
kmod-vmware-tools-vmxnet-2.1.0.0-2.6.32.71.el6.x86_64.5.el6.x86_64
kmod-vmware-tools-vsock-9.8.1.0-2.6.32.71.el6.x86_64.5.el6.x86_64
vmware-tools-core-10.0.0-1.el6.x86_64
vmware-tools-esx-kmods-10.0.0-1.el6.x86_64
vmware-tools-esx-nox-10.0.0-1.el6.x86_64
vmware-tools-foundation-10.0.0-1.el6.x86_64
vmware-tools-guestlib-10.0.0-1.el6.x86_64
vmware-tools-libraries-nox-10.0.0-1.el6.x86_64
vmware-tools-plugins-autoUpgrade-10.0.0-1.el6.x86_64
vmware-tools-plugins-deployPkg-10.0.0-1.el6.x86_64
vmware-tools-plugins-grabbitmqProxy-10.0.0-1.el6.x86_64
vmware-tools-plugins-guestInfo-10.0.0-1.el6.x86_64
vmware-tools-plugins-hgfsServer-10.0.0-1.el6.x86_64
vmware-tools-plugins-powerOps-10.0.0-1.el6.x86_64
vmware-tools-plugins-timeSync-10.0.0-1.el6.x86_64
vmware-tools-plugins-vix-10.0.0-1.el6.x86_64
vmware-tools-plugins-vmbackup-10.0.0-1.el6.x86_64
vmware-tools-services-10.0.0-1.el6.x86_64
vmware-tools-vgauth-10.0.0-1.el6.x86_64
vmware-tools-vmci-common-10.0.0-5.el6.x86_64
vmware-tools-vmxnet-common-10.0.0-5.el6.x86_64
vmware-tools-vsock-common-10.0.0-5.el6.x86_64

After the update the puppet agent ran successfully (didn't have to reboot). The vSphere client reports: "Running (3rd-party/Independent)

cat /etc/yum.repos.d/vmware-tools.repo
[vmware-tools]
protect=0
name=VMware Tools latest - rhel6 x86_64
gpgkey=http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-DSA-KEY.pub
    http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub
enabled=1
baseurl=http://packages.vmware.com/tools/esx/latest/rhel6/x86_64/
gpgcheck=1
priority=50
ps aux | grep vmware
root      1082  0.0  0.0  53088   908 ?        S    15:54   0:00 /usr/lib/vmware-vgauth/VGAuthService -s
aholen commented 8 years ago

@razorsedge One a third system:

rpm -qa|grep vmware|sort
kmod-vmware-tools-vmci-9.0.4.0-2.6.32.71.el6.x86_64.4.el6.x86_64
kmod-vmware-tools-vmxnet-2.0.9.3-2.6.32.71.el6.x86_64.4.el6.x86_64
kmod-vmware-tools-vsock-1.0.0.0-2.6.32.71.el6.x86_64.4.el6.x86_64
vmware-tools-core-8.6.16-1.el6.x86_64
vmware-tools-esx-kmods-8.6.16-1.el6.x86_64
vmware-tools-esx-nox-8.6.16-1.el6.x86_64
vmware-tools-foundation-8.6.16-1.el6.x86_64
vmware-tools-guestlib-8.6.16-1.el6.x86_64
vmware-tools-help-8.6.16-1.el6.x86_64
vmware-tools-libraries-nox-8.6.16-1.el6.x86_64
vmware-tools-plugins-autoUpgrade-8.6.16-1.el6.x86_64
vmware-tools-plugins-deployPkg-8.6.16-1.el6.x86_64
vmware-tools-plugins-guestInfo-8.6.16-1.el6.x86_64
vmware-tools-plugins-hgfsServer-8.6.16-1.el6.x86_64
vmware-tools-plugins-powerOps-8.6.16-1.el6.x86_64
vmware-tools-plugins-timeSync-8.6.16-1.el6.x86_64
vmware-tools-plugins-vix-8.6.16-1.el6.x86_64
vmware-tools-plugins-vmbackup-8.6.16-1.el6.x86_64
vmware-tools-services-8.6.16-1.el6.x86_64
vmware-tools-vmci-common-8.6.16-4.el6.x86_64
vmware-tools-vmxnet-common-8.6.16-4.el6.x86_64
vmware-tools-vsock-common-8.6.16-4.el6.x86_64
xorg-x11-drv-vmware-13.0.1-9.el6.x86_64

yum update vmware-tools-services -y

rpm -qa|grep vmware|sort
kmod-vmware-tools-vmci-9.0.4.0-2.6.32.71.el6.x86_64.4.el6.x86_64
kmod-vmware-tools-vmxnet-2.0.9.3-2.6.32.71.el6.x86_64.4.el6.x86_64
kmod-vmware-tools-vsock-1.0.0.0-2.6.32.71.el6.x86_64.4.el6.x86_64
vmware-tools-core-10.0.0-1.el6.x86_64
vmware-tools-esx-kmods-8.6.16-1.el6.x86_64
vmware-tools-esx-nox-10.0.0-1.el6.x86_64
vmware-tools-foundation-10.0.0-1.el6.x86_64
vmware-tools-guestlib-10.0.0-1.el6.x86_64
vmware-tools-libraries-nox-10.0.0-1.el6.x86_64
vmware-tools-plugins-autoUpgrade-10.0.0-1.el6.x86_64
vmware-tools-plugins-deployPkg-10.0.0-1.el6.x86_64
vmware-tools-plugins-grabbitmqProxy-10.0.0-1.el6.x86_64
vmware-tools-plugins-guestInfo-10.0.0-1.el6.x86_64
vmware-tools-plugins-hgfsServer-10.0.0-1.el6.x86_64
vmware-tools-plugins-powerOps-10.0.0-1.el6.x86_64
vmware-tools-plugins-timeSync-10.0.0-1.el6.x86_64
vmware-tools-plugins-vix-10.0.0-1.el6.x86_64
vmware-tools-plugins-vmbackup-10.0.0-1.el6.x86_64
vmware-tools-services-10.0.0-1.el6.x86_64
vmware-tools-vgauth-10.0.0-1.el6.x86_64
vmware-tools-vmci-common-8.6.16-4.el6.x86_64
vmware-tools-vmxnet-common-8.6.16-4.el6.x86_64
vmware-tools-vsock-common-8.6.16-4.el6.x86_64
xorg-x11-drv-vmware-13.0.1-9.el6.x86_64

Puppet agent now runs fine.

Whole update-process: http://pastebin.com/nd7ahSxy

Looks like a combination of yum update vmware-tools-services and using module version 6.0.0 is the fix.

razorsedge commented 8 years ago

OK. I am starting to see the problem more clearly.

razorsedge/vmwaretools (and I, since Foreman was mentioned) assumes a new install and determines whether to use upstart based on the URL in the YUM repository. In the case of this issue, Tools are already installed and are of a version (vmware-tools-esx-nox < 9.0.0) that still uses SysV Init and autoupgrade => true is not set in razorsedge/vmwaretools. Thus the error.

razorsedge commented 8 years ago

Can anyone confirm whether I am off my rocker here?

esarakaitis commented 7 years ago

Fresh RHEL 6.8 install:

I was having the same issue. I changed lines 319-322 in vmwaretools\manifests\init.pp from:

        start      => "/sbin/start ${service_name_real}",
        stop       => "/sbin/stop ${service_name_real}",
        status     => "/sbin/status ${service_name_real} | grep -q 'start/'",
        restart    => "/sbin/restart ${service_name_real}",

to:

        start      => "service ${service_name_real} start",
        stop       => "service ${service_name_real} stop",
        status     => "service ${service_name_real} status",
        restart    => "service ${service_name_real} restart",

It now works properly.

divad commented 7 years ago

I'm having the same problem on a fresh install as well.

@razorsedge this is because VMware in the latest versions have reverted back to using /etc/init.d/vmware-tools-services rather than an upstart init script :( Not sure exactly how you're gonna fix this, but...right now your module is broken on RHEL6.

divad commented 7 years ago

Oh, actually @razorsedge the problem is caused by this bug https://github.com/razorsedge/puppet-vmwaretools/issues/49

Its because the URL is now installing an /old/ package version (8.7) rather than 10.x...

claytonpeters commented 7 years ago

It looks like VMware has changed the URL of their packages for the latest VMware Tools: https://packages.vmware.com/tools/releases/latest/rhel6/x86_64/index.html for RHEL 6 for example.

jcitarello-ercot commented 5 years ago

"Start", "Stop" and "Status" are generally Ubuntu commands, but adding provider => 'upstart' to the service resource on RHEL6 systems corrects the issue. I have a support case in with Puppet for further explanation.