Skip to content
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

In dsc_xservice while specifying the runsAsAccount thorough dsc_credentials getting warning about dsc_builtinaccount. #759

Open
ShubhamKumar977 opened this issue Jun 1, 2023 · 4 comments
Labels
external The issue cannot be resolved within the DSC Resource Kit.

Comments

@ShubhamKumar977
Copy link

ShubhamKumar977 commented Jun 1, 2023

Problem description

When I pass invoke a dsc_xservice resource using below puppet code

**dsc_xservice { $service_item:
  dsc_name            => $service_setting[dsc_name],
  dsc_desktopinteract => $service_setting[dsc_desktopinteract],
  dsc_state           => $service_setting[dsc_state],
  dsc_startuptype     => $service_setting[dsc_startuptype],
  dsc_credential => {
    'user'     => "${root_domain}\\${service_setting[dsc_credential][user]}",
    'password' => Sensitive($service_user_pw),
  },
}**

I get an warning like below
**Provider returned data that does not match the Type Schema for dsc_xservice[SetSqlServerAgentServiceUser]

Value type mismatch:

  • dsc_builtinaccount: smartplantcloud\KMT03-DBS-001-SQLAGT (expects an undef value or a match for Enum['LocalService', 'LocalSystem', 'NetworkService', 'localservice', 'localsystem', 'networkservice'], got 'smartplantcloud\KMT03-DBS-001-SQLAGT')**
    And the resource is always showing up as a corrective change from running to ignored, this was working with the module puppetlabs-dsc

Verbose logs

N/A

DSC configuration

dsc_xservice { $service_item:
      dsc_name            => $service_setting[dsc_name],
      dsc_desktopinteract => $service_setting[dsc_desktopinteract],
      dsc_state           => $service_setting[dsc_state],
      dsc_startuptype     => $service_setting[dsc_startuptype],
      dsc_credential => {
        'user'     => "${root_domain}\\${service_setting[dsc_credential][user]}",
        'password' => Sensitive($service_user_pw),
      },
    }

Suggested solution

N/A

Operating system the target node is running

N/A

PowerShell version and build the target node is running

N/A

xPSDesiredStateConfiguration version

9.1.0-0-4
@ShubhamKumar977
Copy link
Author

@johlju, @Indhukrishna, @KarolKaczmarek after mentioning validation_mode as 'resource' we are able to prevent the resource from registering as a corrective change but still not able to resolve the warning issue. Could I get some help here.

@johlju
Copy link
Member

johlju commented Jun 14, 2023

Not sure there is an issue with the resource, are you sure the error is coming from the resource? Suggest you debug the resource to see where in the code the error is thrown.

@BarnumD
Copy link

BarnumD commented May 22, 2024

I'm experiencing same issue with 9.1.0-0-8, where I have a custom domain account running the service and get dsc_builtinaccount: [email protected] (expects an undef value or a match for Enum['LocalService', 'LocalSystem', 'NetworkService', 'localservice', 'localsystem', 'networkservice'], got '[email protected]')
I'm not specifying dsc_credential, but have the custom domain account setup as the run-as manually.

@johlju
Copy link
Member

johlju commented May 22, 2024

This must be an issue in Puppet - it seems to return an error for the parameter BuiltInAccount in both cases above, and I'm guessing neither of you have added that parameter? So guessing the problem is in the Puppet's translation of "Puppet configuration" to the code running the resource.

I think this is an external issue that we can't resolve in this repo. Please comment if you find an actual issue with the resource's code.

@johlju johlju added the external The issue cannot be resolved within the DSC Resource Kit. label May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external The issue cannot be resolved within the DSC Resource Kit.
Projects
None yet
Development

No branches or pull requests

3 participants