GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Fix Set-Service -Status Stopped runs failed on the service with dependencies by zhenggu · Pull Request #5525 · PowerShell/PowerShell Conversation
|
|
|
||
| if ((servicedependedon != null) && (servicedependedon.Length > 0)) | ||
| { | ||
| WriteNonTerminatingError(service, null, "ServiceIsDependentOnNoForce", ServiceResources.ServiceIsDependentOnNoForce, ErrorCategory.InvalidOperation); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
We should remove the resource string from RESX file it is no longer used.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if (!service.Status.Equals(ServiceControllerStatus.Stopped)) | ||
| { | ||
| //check for the dependent services as set-service dont have force parameter | ||
| //check for the dependent services |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Please correct the comment "// Check ...."
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I'm curious if this is even the right direction. Doesn't |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
We have a similar question in #5471 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I think it is necessary to remove the ServicesDependedOn check for it will block the normal function. and for parameter "Force", we can discuss it in other thread, if the parameter may be not acceptable. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Steve Lee (@SteveL-MSFT) Could you please review the PR with #5471 on PowerShell committee? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Yes,
On the flip side, it currently doesn't support As for the issue at hand: Preventing a service from stopping because it depends on other services - as opposed to having other services depend on it (having dependents) - is an arbitrary and nonsensical restriction. I presume it was introduced based on a misconception and should therefore be removed, which will make Ilya (@iSazonov): How is #5471 related to this? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Michael Klement (@mklement0) Thanks for useful comments!
Design review needed. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Yea, but stopping a service is NOT setting a service. We have specific verbs for that kind of action. if there is a current bug in how it operates, that should be fixed, but adding On your second point about I'm just trying to keep things simple here and it seems like this PR is going in the wrong direction from simple. There is nothing wrong with doing something like |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I don't why it was decided to provide duplicate functionality in
Adding a Yes, you can argue that the
And, finally, another aspect in which |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
No, it doesn't at all. Tell me, absent Edit: as a compromise, if everyone really thinks that having
I disagree, setting it to manual, when you are "manually" forcing the service to start certainly serves as a sensible setting. But this is a discussion for another time, lets not continue it in this thread. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ilya (@iSazonov) committee is on taking time off this week for Thanksgiving (US holiday), will resume next week |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@PowerShell/powershell-committee reviewed this. Given that |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Zheng Gu (@zhenggu) Please add tests at : https://github.com/PowerShell/PowerShell/blob/master/test/powershell/Modules/Microsoft.PowerShell.Management/Set-Service.Tests.ps1 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Steve Lee (@SteveL-MSFT) I would like the comittee to reconsider the approval of |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@PowerShell/powershell-committee reviewed this. The only applicable parameter to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Travis Plunk (@TravisEz13) Please help to review again. Thanks. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 4 files at r13.
Reviewable status:complete! all files reviewed
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Does this PR need another review? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Aditya Patwardhan (@adityapatwardhan) This looks ready for merge. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Zheng Gu (@zhenggu) Thanks for your contribution. Please add the PR submission template and update the appropriate fields. https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission The template is here: https://github.com/PowerShell/PowerShell/blob/master/.github/PULL_REQUEST_TEMPLATE.md |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Aditya Patwardhan (@adityapatwardhan) for this PR adds a "-Force" parameter for Set-Service, but I am not sure should I modify https://github.com/PowerShell/PowerShell-Docs/blob/staging/reference/6/Microsoft.PowerShell.Management/Set-Service.md before this PR merged or it should be changed after it this PR is merged? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Zheng Gu (@zhenggu) Please open an issue or PR in PowerShell-Docs repo and add the link here. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Ilya (@iSazonov) Thanks, will add it |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Aditya Patwardhan (@adityapatwardhan) have added the document, and all the actions are ready, please help to review. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Zheng Gu (@zhenggu) The tests are classified as |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Zheng Gu (@zhenggu) Please have a look at the failures and for the next commit have |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Aditya Patwardhan (@adityapatwardhan), all test cases passed, please help to merge. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Zheng Gu (@zhenggu) Thank you for your contribution! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Thanks everyone's help to my first PR |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Zheng Gu (@zhenggu) Thanks for your contribution and patience! I hope you will continue. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Set-Service -Status Stopped should not prevent stopping of services without dependents only because they depend on others
There was an error while loading. Please reload this page.