-
Notifications
You must be signed in to change notification settings - Fork 203
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
[Proposal] Stop all or specific instance of appID with dapr stop
command
#1260
Comments
dapr stop
command
@pravinpushkar For enhancements, a couple of points here -
The concept of For req 3, we should probably have a But for req 1 and req 2 we need a consistent way to stop individual instances of the app since |
Right, I did not think of this scenario(assumed that a single run file would have all different apps).
Why |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as pinned, good first issue, help wanted or triaged/resolved. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as pinned, good first issue, help wanted or triaged/resolved. Thank you for your contributions. |
Describe the proposal
Today, daparized apps can be run with any one of the following ways -
dapr run --app-id test_1
dapr run -f dapr.yaml
Here, Users are allowed to run the same command having same
--app-id(appID for Multi App Run)
multiple times, resulting in having multiple instances of same apps. See the sampledapr list
output below whendapr run --app-id test
executed 2 times -When we execute
dapr stop --app-id test
, it will stop any one of the above instances.Solution
We can associate all
dapr run
runs with uniquerunID
which can be of format${appID}_${randomUniqueID}
. With this we can enhance thedapr stop
in following way -dapr stop --app-id appID || dapr stop appID
-> Will stop all instances of apps with the same app ID. Basically this command will iterate over all the started apps checking for passed appID and trying to stop. Log cumulative errors to console if there are errors while stopping the apps.dapr stop --run-id runID
-> will stop a particular instance of dapr run. TherunID
will be stored in metadata and cab fetched fromdapr list
by users. We can also output the runID in logs for easy reference. It will have two execution paths -- try to check if started with run file , then fetch process group ID and send interrupt.
- else execute the normal stop logic by getting the cliPID or daprdPID.
Originally discussed here in this PR - #1205
Release Note
RELEASE NOTE: ADD Enhance
dapr stop
to stop all and any particular instances of apps having same appIDThe text was updated successfully, but these errors were encountered: