Open rdavisunr opened 5 years ago
I ended up using a script resource to make this work, but definitely not ideal. Can anyone from the team comment on this issue?
Sorry for the delay. Yes you're right, your config should enforce the service to be running with that credential, so probably best for the resource to restart the service at that point in time, BUT...
Was your new credential using the same Username? If so, the problem is that I don't think we'd have a way to test whether the password is new or not. Without looking at the code, that could be your problem.
Could you please let me know if it was the same username or a different one in your $Credential data?
@gaelcolas - in this case, I was changing the credential from running as LocalSystem to a domain user. So, different username.
Here's the relevant part from the DSC log above:
The start name of service OctopusDeploy Tentacle does not match the expected username from the given credential. The expected value is someDomain\someDomainUser. The actual value is LocalSystem.
Details of the scenario you tried and the problem that is occurring
When using xService to change the credentials of an existing, running service. The credentials are changed successfully, but the service does not restart. Thus, it continues to run under the context it was running under prior to applying DSC. Thus, it is not in the desired state,
Verbose logs showing the problem
Suggested solution to the issue
Restart running services after credential changes.
The DSC configuration that is used to reproduce the issue (as detailed as possible)
The operating system the target node is running
Version and build of PowerShell the target node is running
5.1.14393.2969 10.0.14393.2969
Version of the DSC module that was used ('dev' if using current dev branch)
8.1.0.0