Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-4390

Regression: Windows service provider fails to retrieve current state on 2003

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: PUP 3.7.0
    • Fix Version/s: PUP 3.8.0, PUP 4.1.0
    • Component/s: Windows
    • Labels:
    • Template:
    • Story Points:
      2
    • Sprint:
      Windows 2015-04-22
    • Release Notes:
      Bug Fix

      Description

      As a result of this issue, using Live Management to return a list of services on 2003 will fail.

      Using puppet-agent-1.0.0-x86.msi on win2003r2-i386:

      C:\Program Files\Puppet Labs\Puppet\bin>puppet resource service --trace
      Error: Could not run: The system call level is not correct. - QueryServiceConfig2: The system call level is not correct.
      C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/gems/2.1.0/gems/win32-service-0.8.6/lib/win32/windows/helper.rb:36:in `raise_windows_error'
      C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/gems/2.1.0/gems/win32-service-0.8.6/lib/win32/service.rb:1380:in `get_config2_info'
      C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/gems/2.1.0/gems/win32-service-0.8.6/lib/win32/service.rb:1092:in `block in services'
      C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/gems/2.1.0/gems/win32-service-0.8.6/lib/win32/service.rb:1037:in `upto'
      C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/gems/2.1.0/gems/win32-service-0.8.6/lib/win32/service.rb:1037:in `services'
      C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/provider/service/windows.rb:104:in `instances'
      C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/type.rb:1143:in `block in instances'
      C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/type.rb:1136:in `collect'
      C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/type.rb:1136:in `instances'
      

      Strangely, I can manage a single service resource, just not enumerate all services, or retrieve the current state for a single service:

      C:\Program Files\Puppet Labs\Puppet\bin>puppet resource service wuauserv
      Error: Could not run: The system call level is not correct. - QueryServiceConfig
      2: The system call level is not correct.
       
      C:\Program Files\Puppet Labs\Puppet\bin>puppet resource service wuauserv ensure=stopped
      Notice: /Service[wuauserv]/ensure: ensure changed 'running' to 'stopped'
      service { 'wuauserv':
        ensure => 'stopped',
      }
       
      C:\Program Files\Puppet Labs\Puppet\bin>puppet resource service wuauserv ensure=running
      Notice: /Service[wuauserv]/ensure: ensure changed 'stopped' to 'running'
      service { 'wuauserv':
        ensure => 'running',
      }
      

      This is not an issue on 2008r2-x86_64 with either puppet-agent-1.0.0-x86 or x64:

      C:\Windows\system32>puppet resource service wuauserv
      service { 'wuauserv':
        ensure => 'running',
        enable => 'true',
      }
       
      C:\Windows\system32>ruby --version
      ruby 2.1.5p273 (2014-11-13 revision 48405) [i386-mingw32]
      

      QA Risk Analysis

      Probability Medium (but how many sites are still running 2003?)
      Impact High (invalid data in catalog)
      Risk Level Medium
      Test Level Unit

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  josh Josh Cooper
                  QA Contact:
                  Ryan Gard
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Zendesk Support