Lately we've been noticing some weird behaviour in our production environment, apprently there's a task pulling the data from Prod Redis into Staging Redis, the process itself is managed by Salt.
Bottom line: I want to understand the triger for this action (There's no schedule
command for this task, the command is being launched from the Salt master in a different manner).
This is the .sls
which is running this task:
redis-server:
service.dead:
- enable: True
fetchredis:
cmd.run:
- names:
- /usr/bin/redis-cli -h {{grains['shost']}} --rdb /etc/redis-cluster/dump.rdb
- gsutil cp /etc/redis-cluster/dump.rdb gs://redis-rtp-bkp/{{salt['cmd.run']('date +"%Y-%m-%d-%H-%M"')}}-{{grains['shost']}}.rdb
- prereq:
- service: redis-server
chown:
cmd.run:
- name: chown -R redis /etc/redis-cluster/*
- cwd: /
- user: root
- require:
- cmd: fetchredis
start_redis:
service.running:
- name: redis-server
- require:
- cmd: chown
I used all sorts of salt-run
queries, either on specific jids that showed nothing or some errors.
Any suggestions on finding the trigger?
Thank you.
Found it, next time I'll know where to look, there was an .sls
in the Pillars directory, the content is as follows:
schedule:
bkp:
function: state.sls
seconds: 600
args:
- redis.bkp
Thank you all for your kind help.