Software to automate the management and configuration of any infrastructure or application at scale. Install Salt from the Salt package repositories here:
Is your feature request related to a problem? Please describe.
When we want to investigate a problem on a minion, one of the first thing to do is to check if something changed that could cause the problem. To do that, we could use he jobs.list_jobs function.
The problem is that, when we use a grain or a pillar as a filter, there is no way to filter using the minion id:
admin@dev-master:~$ salt -G os:ubuntu grains.get os
dev-master:
Ubuntu
dev-consul:
Ubuntu
admin@dev-master:~$ sudo salt-run jobs.list_jobs search_target='dev-master' search_function='grains.get'
To get the information we want, we need to know the exact target that was used to call the function:
admin@dev-master:~$ salt -G os:ubuntu grains.get os
dev-master:
Ubuntu
dev-consul:
Ubuntu
admin@dev-master:~$ sudo salt-run jobs.list_jobs search_function='grains.get' search_target='os:ubuntu'
20210513171425970846:
----------
Arguments:
- os
Function:
grains.get
StartTime:
2021, May 13 17:14:25.970846
Target:
os:ubuntu
Target-type:
grain
User:
admin
On our infrastructure, we have a lot of use-cases that require using different targets to deploy or changes (progressive deployment, apply changes only on minion providing certain services, etc).
We could index the minion output to an elasticsearch cluster and use that to search the changes instead. One of the difficulty would be to parse the output and adapt it so it can be easily indexed.
There is already an elasticsearch returner but it looks a bit dated and the json output module would need to be adapted.
Is your feature request related to a problem? Please describe. When we want to investigate a problem on a minion, one of the first thing to do is to check if something changed that could cause the problem. To do that, we could use he jobs.list_jobs function. The problem is that, when we use a grain or a pillar as a filter, there is no way to filter using the minion id:
To get the information we want, we need to know the exact target that was used to call the function:
On our infrastructure, we have a lot of use-cases that require using different targets to deploy or changes (progressive deployment, apply changes only on minion providing certain services, etc).
Describe the solution you'd like
Add a way to list jobs using the minion_id:
Describe alternatives you've considered
We could index the minion output to an elasticsearch cluster and use that to search the changes instead. One of the difficulty would be to parse the output and adapt it so it can be easily indexed.
There is already an elasticsearch returner but it looks a bit dated and the json output module would need to be adapted.
Additional context
Please Note