Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-10717

puppetlabs/dsc: dsc_powerplan unable to set powerplan on w2019

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: dsc
    • Labels:
      None
    • Template:
      MODULES Bug Template
    • Acceptance Criteria:
      Hide

      dsc_powerplan is able to enable/set/change powerplan successfully

      Show
      dsc_powerplan is able to enable/set/change powerplan successfully
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      Basic Info
      Module Version: v1.9.4
      Puppet Version: PE 2019.7.0
      OS Name/Version: Windows 2019

      Describe your issue in as much detail as possible...
      Customer currently using counsyl-windows windows::power_scheme to set powerplan on Windows 2019. Attempt to switch to dsc_powerplan, however this fails as dsc_powerplan cannot change/set powerplan as still using Win32_Powerplan (reference)

      This appears to be the error described here: https://github.com/dsccommunity/ComputerManagementDsc/issues/155#issuecomment-386300871

      Somewhere between 1703 to 1709, the Win32_PowerPlan class's "Activate" method was broken.

      This appears to have been fixed upstream ~March 2019 https://github.com/dsccommunity/ComputerManagementDsc/pull/203

      Desired Behavior:
      Update underlying module so dsc_powerplan is able to enable/set/change powerplan

      Actual Behavior:
      Using the following configuration: (where $plan = 'High performance')

        dsc_powerplan { $plan:
          dsc_name             => $plan,
          dsc_isactive         => true,
          dsc_issingleinstance => 'Yes',
        }
      

      If powerplan is already enabled + set to desired setting there are no errors.

      If powerplan needs to be enabled/changed, it fails with the following error:

      change from 'absent' to 'present' failed: Could not set 'present' on ensure: This method is not implemented in any class (file: /etc/puppetlabs/code/environments/development/modules/base_windows/manifests/powerplan.pp, line: 11)
      Source: /Stage[main]/Base_windows::Powerplan/Dsc_powerplan[High performance]/ensureFile: /etc/puppetlabs/code/environments/development/modules/base_windows/manifests/powerplan.ppLine: 11

      Please take a moment and attach any relevant log output and/or manifests. This will help us immensely when troubleshooting the issue.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            grace.lee Grace Lee
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Zendesk Support