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

vmwaretools v4.4.1 fails to compute "majdistrelease" if "manage_repository" is false #13

Closed rkeene closed 11 years ago

rkeene commented 11 years ago

vmwaretools v4.4.1 fails to start the vmware tools service on RHEL6 if "manage_repository" is false because it does not compute "majdistrelease"

naive patch below:

--- modules/vmwaretools/manifests/init.pp
+++ modules/vmwaretools/manifests/init.pp
@@ -220,23 +220,23 @@
       $yum_basearch = $tools_version ? {
         /3\..+/ => $vmwaretools::params::yum_basearch_4x,
         /4\..+/ => $vmwaretools::params::yum_basearch_4x,
         default => $vmwaretools::params::yum_basearch_5x,
       }
+
+      $majdistrelease = $::lsbmajdistrelease ? {
+            ''      => regsubst($::operatingsystemrelease,'^(\d+)\.(\d+)','\1'),
+            default => $::lsbmajdistrelease,
+      }

       if $manage_repository {
         # We use $::operatingsystem and not $::osfamily because certain things
         # (like Fedora) need to be excluded.
         case $::operatingsystem {
           'RedHat', 'CentOS', 'Scientific', 'SLC', 'Ascendos', 'PSBM',
           'OracleLinux', 'OVS', 'OEL', 'SLES', 'SLED', 'OpenSuSE',
           'SuSE': {
-            $majdistrelease = $::lsbmajdistrelease ? {
-              ''      => regsubst($::operatingsystemrelease,'^(\d+)\.(\d+)','\1'),
-              default => $::lsbmajdistrelease,
-            }
-
             if ( $yum_path == $vmwaretools::params::yum_path ) or ( $just_prepend_yum_path == true ) {
               $gpgkey_url  = "${yum_server}${yum_path}/keys/"
               $baseurl_url = "${yum_server}${yum_path}/esx/${tools_version}/${vmwaretools::params::baseurl_string}${majdistrelease}/${yum_basearch}/"
             } else {
               $gpgkey_url  = "${yum_server}${yum_path}/"
razorsedge commented 11 years ago

Oh, poop. I missed that bit. :-( I will try and get out a hotfix.

razorsedge commented 11 years ago

@rkeene : It should be fixed in b35a888d or in 4.5.0 on the Forge.

razorsedge commented 11 years ago

Please reopen if this problem is not resolved.