You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow for CTRL-C to break the current operationΒ #126
In large environments specific API calls take too long to respond because the query was not fine tuned. However - there is no way to terminate the existing running cmk command - as CTRL-C or CTRL-Z would not respond. In this case I launch another cmk instance or terminate the currently running one - but it's rather unnecessary.
Please consider adding a support for "break" to terminate the command running in session.
I couldn't reproduce this with the QA server, http://qa.cloudstack.cloud/, using latest cmk for osx/darwin (arm64). I tried the listEvents and listAlerts APIs. Ctrl+C on API call, terminated the API call and cmk shell. However, it's possible to explore handling a Ctrl+C by a go-routine to terminate an on-going activity.
I've come up with a fix, which allows a current on-going http request to cancel and allow quick recovery to the prompt. I've tested both long-running list APIs and async APIs such as deploy VM command. This needs testing so reopening this.
Activity
yadvr commentedon Mar 2, 2023
I couldn't reproduce this with the QA server, http://qa.cloudstack.cloud/, using latest cmk for osx/darwin (arm64). I tried the listEvents and listAlerts APIs. Ctrl+C on API call, terminated the API call and cmk shell. However, it's possible to explore handling a Ctrl+C by a go-routine to terminate an on-going activity.
Which version of cmk are you using @serverchief
borisstoyanov commentedon Mar 2, 2023
I've tested it out and it terminates the current cmk process (of course not in Cloudstack), it's hanging or being non-responsive in any way:
The issue is that it kills cmk but not the api call, is this what you're after @serverchief ?
yadvr commentedon Apr 26, 2023
Hi @serverchief any advise on how to reproduce this, can you confirm if you face this while using the latest cmk? cc @borisstoyanov @nvazquez
yadvr commentedon Feb 9, 2024
Hi @serverchief I've added some changes (d1599ea) to allow breaking an long-running async job polling, for example:
This only works to break async APIs such as deploy VMs. Does this address your issue?
network: allow breaking async job loop when Ctrl+C is pressed
yadvr commentedon Feb 9, 2024
I've come up with a fix, which allows a current on-going http request to cancel and allow quick recovery to the prompt. I've tested both long-running list APIs and async APIs such as deploy VM command. This needs testing so reopening this.
Could you help test this @serverchief ? cc @borisstoyanov @mlsorensen
yadvr commentedon Mar 21, 2024
Closing this, tested myself. Pl re-open if there are any issues.
network: improve ctrl+c interupts