Skip to content
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

[BUG] salt runner jobs.active doesn't list runner jobs #60545

Open
wegenerbenjamin opened this issue Jul 14, 2021 · 1 comment
Open

[BUG] salt runner jobs.active doesn't list runner jobs #60545

wegenerbenjamin opened this issue Jul 14, 2021 · 1 comment
Labels
Bug broken, incorrect, or confusing behavior
Milestone

Comments

@wegenerbenjamin
Copy link

Description
Note: This may be identical to #29906
When a runner is executed, it is not listed in the active jobs, e.g. it is not visible over salt-run jobs.active. It looks like the content of the pull request #35118 is no longer in the code, but I'm definitely no expert in job cache management so perhaps this functionality was moved to a different place in the meantime.

Setup

  1. Set runner_returns to True to enable storing runner jobs information in the job cache
  2. Create a dummy runner for testing, e.g. my_test.py:
import time

def run(**kwargs):
    time.sleep(60)
    return True
  1. Call the dummy runner asynchronosly:
    salt-run mytest.run --async
  2. While the dummy runner is being executed, ask salt about active jobs:
salt@salt:~> salt-run jobs.active
salt@salt:~> salt-run jobs.master
salt@salt:~>

=> nothing is returned

Expected behavior
Every jobs including runners should be in the jobs as described in https://docs.saltproject.io/en/latest/ref/configuration/master.html#runner-returns.

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
          Salt: 3002.2

Dependency Versions:
          cffi: 1.13.2
      cherrypy: unknown
      dateutil: 2.7.3
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 2.10.1
       libgit2: 1.1.0
      M2Crypto: 0.35.2
          Mako: Not Installed
       msgpack: 0.5.6
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: 2.17
      pycrypto: Not Installed
  pycryptodome: Not Installed
        pygit2: 1.5.0
        Python: 3.6.13 (default, Mar 10 2021, 18:30:35) [GCC]
  python-gnupg: Not Installed
        PyYAML: 5.1.2
         PyZMQ: 17.0.0
         smmap: Not Installed
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.2.3

System Versions:
          dist: sles 15.2
        locale: UTF-8
       machine: x86_64
       release: 5.3.18-24.52-default
        system: Linux
       version: SLES 15.2
@wegenerbenjamin wegenerbenjamin added Bug broken, incorrect, or confusing behavior needs-triage labels Jul 14, 2021
@waynew
Copy link
Contributor

waynew commented Aug 10, 2021

Yeah, looks like this is missing. It might be one of our needs-tests port forwards that's blocking a PR bringing this to the main branch, but regardless, it's definitely not caching the job while it's running. It will store the return, but it doesn't get thrown in the active jobs.

@waynew waynew added this to the Approved milestone Aug 10, 2021
@waynew waynew removed their assignment Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior
Projects
None yet
Development

No branches or pull requests

2 participants