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
Showing progress with 'salt' command #46665
Comments
@kfdm Thanks for the report. There is a Real time output from the minion is tricky since they don't return their output to the master until the run has completed. |
While it would require
Perhaps I should try a quick implementation as a salt runner to test this idea a bit more. |
I confirm this is more than needed. |
I have the same need. |
+1 |
+1! And I would say, even within the current architectural constraints on getting realtime data back from minions, it would still be better than nothing to at least have a "Now running [state] on [target]..." or similar update from the Salt master as it moves through its work... although, hm, I guess that's still currently only known on the minion, eh? |
+1 |
1 similar comment
+1 |
+1. + if this could report not only the state transitions, but could also capture the STD outs/warning of the underlying processes being run, is very much needed. And having the ability to list only the delta output would be very helpful |
+1 |
The minion is polled to see if the job is running. But it does not return where it is up to. |
Out of interest - how difficult would it be to add some sort of progress bar? I understand that there are reasons why SaltStack doesn't do that now, and that's 100% fine, but if there was a command line switch that showed something as simple as "Running state 3/17", that would be huge.
My use case is the cloning of source from Github, which then needs to be built (Blender, specifically). I've got it all working without issue but there's zero output until the end, when the state application has either succeeded or failed. |
find_job response should lead to how many minions are working on it. |
+1 States (when im testing) and cant see why the state times out until 20 min later is really slowing things up. Being able to tail the logs to the master that executed the state would make my life incredibly easy |
+1 - we have salt-calls that can take hours and it's extremely helpful to see stdout in realtime |
Same here, this would be a very useful feature. |
+1 , get used to the ansible progress output, and find it not safe enough to run a salt script without any progress and eventually throw me an error, killing me |
+1 |
I'd love it if we could get real-time output when using Could this be implemented? |
+1 |
find_job response should lead to how many minions are working on it. Maybe even return the number of states completed. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
not stale |
Thank you for updating this issue. It is no longer marked as stale. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
Thank you for updating this issue. It is no longer marked as stale. |
+1 We have a number of systems with high resource usage peaks Being able to monitor the progress of applying states would benefit our workflow during these periods. |
+1 fwiw |
+1 otherwise it's very difficult to go on a minion and check logs which is not practical when you have 1000 of infrastructure. |
+1 We need a progress for salt |
+1 |
1 similar comment
+1 |
+999 This is really needed for anyone wanting to use salt seriously to manage their infra. |
Our organization already abandoned salt in part for this reason.
Reliability being the other.
…On Fri, Dec 11, 2020 at 11:50 AM Kolomolo123 ***@***.***> wrote:
+999 This is really needed for anyone wanting to use salt seriously to
manage their infra.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#46665 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEXQNJKDDFKFAHTAZX55HM3SUJZZPANCNFSM4EW4AVYQ>
.
|
+1 Thoughts: might be possible to listen to events on master and write salt execution module in a way that logs will be emitted on event bus or fire events explicitly throughout module execution to indicate the progress. At the same time having a runner running on salt master to listen to this events or an output module that will be listening to such an events showing the progress. IMHO, capability to subscribe to such progress events using Job ID sounds as useful feature as well. |
Would like to add my interest for this feature. I have a long running job on a minion, and I have to manually check the minion itself if the job has stalled or not. |
I Have observed in minion I often find my The following is a typical response I get , which is not very helpful
|
+ 1 to have this kind of real time reporting feature in SaltStack |
This is needed! |
THIS IS NEEDED! |
I use Gitlab-ci to deploy projects with Saltstack but effectively the real time events is missing. When the state.apply finished, then the full report appears. Can you add this feature please? |
The first step is the salt-minion to record more information in the job file. I think it would need a SEP. |
What information do people want? I do not think it should output the full data, however if it did then the user could control how much is displayed. However it would increase overhead. |
X/28 tasks complete would be a great!!
…On Sun, Nov 27, 2022, at 2:24 AM, Damon Atkins wrote:
What information do people want?
X/28 tasks complete
Or
List of all task ID and status e.g. Running/InProgress, Stable/Same/Identical, Changed/Mocked, Skipped, Failed
I do not think it should output the result, it should be suitable for an interface.
—
Reply to this email directly, view it on GitHub <#46665 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AGQGDKBA6NZMAPUZIVJEEP3WKKZ4TANCNFSM4EW4AVYQ>.
You are receiving this because you commented.Message ID: ***@***.***>
|
What is the X/28 tasks complete? |
Hi and thanks for looking into this. It is one of my main reasons to use ansible instead on machines that can be reached directly via ssh. It would be nice to have something like At least printed out when states have been completed or failed or anything, however they did It would of course be nicer to know which task in the state is being processed, but for me is more about debugging in that case. |
This is definitely needed. Why aren't the devs picking up on this?
Not jut the number of tasks completed, but like an event log for each task that is being done. Output should include the minion name, the current task ID that is running, the time stamp, the event type (started/finished/failed/etc) and maybe a few other key information that could be available and useful. It should be sort of an abbreviated version of the report that is shown after the command is complete - but should all fit in one line per event. I guess that line could even include "task X of 28" (for the given minion) in abbreviated format "X/28", to show the total progress. Best would be to see this on the salt master where the command is executed, but even if I would have to run a command on the minions to see this info I would be very happy. Even if we would simply need to just do a |
I hacked the log myself hooking to the events, so this is how it looks. That is what I would like it to look.
My solution has some issues, namely that it only shows what was already finished and not what goes on and that the number of expected events are only guessed based on previous run, which is highly incorrect and only makes sense if one does test run before. |
One very minor advantage Ansible has for new users is that when you run a command, ansible-playbook it gives you progress about what steps are executing.
If you run the command on the minion side with salt-call, you can get some general output by adding -l info though it's a touch noisy if you don't know what you're looking for.
If you add
state_events: True
to your master configuration, then you can view the general progress by runningsalt-run state.events
though this can also be a touch noisy.If you run
salt ...
there is only the final report when everything is finished.What would it take to be able to more easily watch the progress of a running state? Is this something that would make sense as an extension to the
salt
command or perhaps building it as a salt-run command would be better.The local client provides a
cmd_async
command that returns a jobid which could be used to filter eventssalt/job/<JID>/new
salt/job/<JID>/ret/<MID>
salt/job/<JID>/prog/<MID>/<RUN NUM>
though perhaps there is a slight delay between getting the jid from cmd_async and being able to subscribe to
salt.modules.state.event
Are there perhaps any other race conditions that one would need to be aware of?
Copied from: https://groups.google.com/d/msgid/salt-users/afa89988-d358-40de-a451-9417bdb90206%40googlegroups.com.
The text was updated successfully, but these errors were encountered: