-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Closed
Labels
Bugbroken, incorrect, or confusing behaviorbroken, incorrect, or confusing behaviorCorerelates to code central or existential to Saltrelates to code central or existential to Saltneeds-triage
Description
Description
Scheduling jobs on the master using "when" fails. This is caused by
Lines 1066 to 1068 in 45ead10
elif ( | |
"whens" in self.opts["grains"] and i in self.opts["grains"]["whens"] | |
): |
opts["grains"]
exists, which is only true on a minion.
Setup
# master config
schedule:
highstate:
function: state.orchestrate
args:
- orch.sys.salt.highstate
when:
- 4:00am
Please be as specific as possible and give set-up details.
- on-prem machine
- VM (KVM)
Steps to Reproduce the behavior
- install python-dateutil
- set the time appropriately
- watch the master log
Expected behavior
Job is executed.
Screenshots
Exception 'grains' occurred in scheduled job
(The error description could be much better imho).
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Salt Version:
Salt: 3004.2
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.8.2
docker-py: Not Installed
gitdb: 2.0.5
gitpython: 2.1.9
Jinja2: 2.11.3
libgit2: Not Installed
M2Crypto: 0.38.0
Mako: Not Installed
msgpack: 0.6.2
msgpack-pure: Not Installed
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 3.10.1
pycryptodome: 3.14.1
pygit2: Not Installed
Python: 3.8.12 (default, Sep 26 2021, 13:12:50)
python-gnupg: Not Installed
PyYAML: 5.3.1
PyZMQ: 18.0.1
smmap: 2.0.3
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.4
System Versions:
dist: openbsd 7.0
locale: utf-8
machine: amd64
release: 7.0
system: OpenBSD
version: OpenBSD 7.0
Additional context
PR incoming.
Metadata
Metadata
Assignees
Labels
Bugbroken, incorrect, or confusing behaviorbroken, incorrect, or confusing behaviorCorerelates to code central or existential to Saltrelates to code central or existential to Saltneeds-triage