saltstack / saltstack/salt

several issue when using cassandra_cql_return

Open
#53,752 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Confirmed severity-high
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description of Issue

i'm using cassandra_cql for master job cache.
there is several issue using cassandra cql returner

  1. load data is overwritten when the minion returns a result.
    every time when the minion returns, salt.utils.job:store_job is called(i think). Then save_load is also called with data that is returned from minion because this code. So origin load is overwritten with the data (insert query for cassandra works like update if primary key is already exist). As a result, some data(e.g. Target) in origin load is lost. I don't know why save_load should called when the minion returns for all returner except local_cache. could you guys fix it?

  2. missing save minions in cassandra_cql_returner
    why save_minions does not written? is it not supported for cassandra or any other reason is existed? it causes inconsistent return data with other returner like local_cache. if it is just missing spec, i could write code for that. please check.

Versions Report
Salt Version:
           Salt: 2019.2.0-19-g48b25d5

Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: Not Installed
      docker-py: Not Installed
          gitdb: 2.0.5
      gitpython: 2.1.11
          ioflo: Not Installed
         Jinja2: 2.10.1
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.6.1
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 3.6.8 (default, Jun  4 2019, 17:53:35)
   python-gnupg: Not Installed
         PyYAML: 5.1
          PyZMQ: 18.0.1
           RAET: Not Installed
          smmap: 2.0.5
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.3.1

System Versions:
           dist: centos 6.8 Final
         locale: UTF-8
        machine: x86_64
        release: 2.6.32-642.15.1.el6.x86_64
         system: Linux
        version: CentOS 6.8 Final

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading salt/utils/job.py around store_job and save_load, then inspect salt/returners/cassandra_cql_return.py near save_minions. Compare the Cassandra returner with local_cache to determine why the original load is overwritten and whether minion data is omitted. Done means both reported inconsistencies are resolved without losing fields from the original load.

Written by the indexing model from the issue text.

Assessment

Tech stack
cassandra, python
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.