-
Notifications
You must be signed in to change notification settings - Fork 134
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
xService - Add recovery options properties #679
base: main
Are you sure you want to change the base?
xService - Add recovery options properties #679
Conversation
This PR is a draft at the moment to give anyone interested a chance to see where the code is going so far and a chance to comment. Currently only Get-TargetResource and Test-TargetResource are working. Still to do:
|
Refactored the byte parsing to use I also discovered that while the UI will only represent up to three failure actions, you can specify as many as you want if you create a service in C# or if you set the failure actions using The behavior is that for whichever failure you are currently experiencing N, the action N-1 will be taken, unless that is out of bounds of the array, in wich case the last action present in the array will be selected and executed. In the case of an array with a final action of taking no action, it seems that the service will attempt corrective action N-1 times, but thereafter, for the final action, will simply give up and not bother to restart the computer, or even the service itself. As an example this appears to be the default behavior for the WSearch service, which has 6 actions specified, 5 of which restart the service, and the sixth which does nothing at all. To account for fact that the number of failure actions cannot be known ahead of time, I have had to implement the collection of failure actions to manage as a collection of objects called |
18bca55
to
a91133c
Compare
Actualy we are also interested in this configuration(in our case for a SQL service). If you like to have some assistance, just ping me. |
The In the Recovery tab of a services properties dialog, there is a check box labeled This is a very important key to manage because the value of that key makes a critical difference to the recovery behavior of a service. By default this key does not exist. It is only created when the check box is ticked. I will have to add a parameter for this value to all of the functions. |
04c3a55
to
d5f7cf6
Compare
fcac90f
to
f11d379
Compare
a7c31e9
to
c5dbd5e
Compare
Hi @RandomNoun7 - is this one still progressing? Would be great to get it in. |
@PlagueHO I would like to get started making progress again in the next week or so. Are you targeting a release date to get this in? |
Hi @RandomNoun7 - as soon as this goes in I can release it. We've adopted a continuous delivery model so we can immediately release any significant new features or bugs. For breaking changes or high risk/impact changes we might leave the module in preview for a bit and release it a month after. |
This commit is the first pass at Get,Set,Test, with comment based help for the functions. No attempt is yet made at fixing any existing tests that are broken, or adding new tests.
Still need to start adding new unit tests.
c5cf1b5
to
1ad978c
Compare
c798abb
to
d2b27db
Compare
If the ‘todo’ file is correct, it looks like the only issue remaining here is that sometimes a ‘single item ’ array does not have the Count value. This is a known PS 5.1 issue with a quick fix if you wrap the relevant object into an array: Can this be implemented?
|
Pull Request (PR) description
Implements the ability to manage service Failure Actions via the registry.
This change will add additional properties to the xService resource to specify reboot message, failure command, and all three of the Failure Actions.
This Pull Request (PR) fixes the following issues
Task list
file CHANGELOG.md. Entry should say what was changed and how that
affects users (if applicable), and reference the issue being resolved
(if applicable).
and comment-based help.
This change is