DataDog / puppet-datadog-agent

Puppet module to install the Datadog agent
Other
51 stars 261 forks source link

system probe does not honor non-default windows user #804

Open shbakesas opened 4 months ago

shbakesas commented 4 months ago

Attempting to install NPM on some DCs where we have configured a GMSA. The system_probe module uses the default dd_user from params.pp. It does not account for the $windows_ddagentuser_name variable in init.pp if it is set.

params.pp should be updated to detect if $windows_ddagentuser_name is set, and if so use that value in params for other modules to call.

The current behavior causes the module to fail because when it goes to set permissions on the system-probe.yaml file, it's attempting to use a user that does not exist instead of the user passed to the class in $windows_ddagentuser_name.

Error: Could not find user ddagentuser Error: /Stage[main]/Datadog_agent::System_probe/File[C:/ProgramData/Datadog/system-probe.yaml]/owner: change from 'BUILTIN\Administrators' to 'ddagentuser' failed: Could not find user ddagentuser (corrective)

peter-iglaev commented 4 months ago

We got the same issue in case we specify $windows_ddagentuser_name.

Error: Failed to install: Fatal error during installation. Error: /Stage[main]/Datadog_agent::Windows/Package[Datadog Agent]/ensure: change from 'absent' to 'present' failed: Failed to install: Fatal error during installation. (corrective) Notice: /Stage[main]/Datadog_agent::Service/Service[datadogagent]: Dependency Package[Datadog Agent] has failures: true Warning: /Stage[main]/Datadog_agent::Service/Service[datadogagent]: Skipping because of failed dependencies