salt icon indicating copy to clipboard operation
salt copied to clipboard

[BUG] "master_job_cache" option failed in CentOS7

Open aramcap opened this issue 3 years ago • 3 comments

Description "master_job_cache" option failed in CentOS7 with "postgres", "postgres_local_cache" and "pgjsonb" returners, when I execute any "salt-ssh" command.

Setup

master_job_cache: postgres
event_return: postgres
returner.postgres.host: '127.0.0.1'
returner.postgres.user: 'salt'
returner.postgres.pass: 'salt'
returner.postgres.db: 'salt'
returner.postgres.port: 5432
keep_jobs: 24
archive_jobs: True

Please be as specific as possible and give set-up details.

  • [X] VM Vagrant with CentOS7 box
  • [X] VM running on a cloud service with CentOS7 image

Steps to Reproduce the behavior

$ salt-ssh --user=vagrant --passwd=vagrant --sudo "192.168.10.2" -ir "echo hi"

[ERROR   ] An un-handled exception was caught by salt's global exception handler:
KeyError: 'postgres.prep_jid'
Traceback (most recent call last):
  File "/bin/salt-ssh", line 11, in <module>
    load_entry_point('salt==3004.2', 'console_scripts', 'salt-ssh')()
  File "/usr/lib/python3.6/site-packages/salt/scripts.py", line 459, in salt_ssh
    client.run()
  File "/usr/lib/python3.6/site-packages/salt/cli/ssh.py", line 22, in run
    ssh.run()
  File "/usr/lib/python3.6/site-packages/salt/client/ssh/__init__.py", line 738, in run
    jid = self.returners[fstr](passed_jid=jid or self.opts.get("jid", None))
  File "/usr/lib/python3.6/site-packages/salt/loader/lazy.py", line 334, in __getitem__
    super().__getitem__(item)  # try to get the item from the dictionary
  File "/usr/lib/python3.6/site-packages/salt/utils/lazy.py", line 105, in __getitem__
    raise KeyError(key)
KeyError: 'postgres.prep_jid'
Traceback (most recent call last):
  File "/bin/salt-ssh", line 11, in <module>
    load_entry_point('salt==3004.2', 'console_scripts', 'salt-ssh')()
  File "/usr/lib/python3.6/site-packages/salt/scripts.py", line 459, in salt_ssh
    client.run()
  File "/usr/lib/python3.6/site-packages/salt/cli/ssh.py", line 22, in run
    ssh.run()
  File "/usr/lib/python3.6/site-packages/salt/client/ssh/__init__.py", line 738, in run
    jid = self.returners[fstr](passed_jid=jid or self.opts.get("jid", None))
  File "/usr/lib/python3.6/site-packages/salt/loader/lazy.py", line 334, in __getitem__
    super().__getitem__(item)  # try to get the item from the dictionary
  File "/usr/lib/python3.6/site-packages/salt/utils/lazy.py", line 105, in __getitem__
    raise KeyError(key)
KeyError: 'postgres.prep_jid'

Expected behavior Execute correctly the "salt-ssh" command and returns "hi".

Versions Report

salt --versions-report
Salt Version:
          Salt: 3004.2
 
Dependency Versions:
          cffi: Not Installed
      cherrypy: unknown
      dateutil: Not Installed
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 2.11.1
       libgit2: Not Installed
      M2Crypto: 0.35.2
          Mako: Not Installed
       msgpack: 0.6.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: Not Installed
      pycrypto: Not Installed
  pycryptodome: Not Installed
        pygit2: Not Installed
        Python: 3.6.8 (default, Nov 16 2020, 16:55:22)
  python-gnupg: Not Installed
        PyYAML: 3.13
         PyZMQ: 17.0.0
         smmap: Not Installed
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.1.4
 
System Versions:
          dist: centos 7 Core
        locale: ANSI_X3.4-1968
       machine: x86_64
       release: 3.10.0-1127.el7.x86_64
        system: Linux
       version: CentOS Linux 7 Core

Additional context I've tested this config on RockyLinux8 and runs perfectly.

aramcap avatar Jul 21 '22 10:07 aramcap

Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey. Please be sure to review our Code of Conduct. Also, check out some of our community resources including:

There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. If you have additional questions, email us at [email protected]. We’re glad you’ve joined our community and look forward to doing awesome things with you!

welcome[bot] avatar Jul 21 '22 10:07 welcome[bot]

I suspect this is a duplicate of #32567 and returners in general will not work with salt-ssh.

OrangeDog avatar Jul 21 '22 11:07 OrangeDog

I suspect this is a duplicate of #32567 and returners in general will not work with salt-ssh.

Already I've see this issue and other similars. I've the sensation that this project is not maintained very well because have important issues opened since 2016... Thanks for your reply @OrangeDog

aramcap avatar Jul 21 '22 11:07 aramcap