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

Redis ext job cache occurred error #38595

Closed
yue9944882 opened this issue Jan 5, 2017 · 2 comments
Closed

Redis ext job cache occurred error #38595

yue9944882 opened this issue Jan 5, 2017 · 2 comments
Labels
Bug broken, incorrect, or confusing behavior P4 Priority 4 Platform Relates to OS, containers, platform-based utilities like FS, system based apps severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone

Comments

@yue9944882
Copy link
Contributor

yue9944882 commented Jan 5, 2017

Description of Issue/Question

Unexpected error happened when use Redis as ext job cache.

Setup

I do the configurations below as the offical tutorial wrote:

redis.db: '0'
redis.host: 'xx.xx.xx.xx'
redis.port: 6379

master_job_cache: redis

And error log will be appended every 10 minutes into '/var/log/salt/master' file

2017-01-06 02:07:13,435 [salt.utils.process][ERROR   ][17537] An un-handled exception from the multiprocessing process 'Maintenance-11' was caught:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/salt/utils/process.py", line 644, in _run
    return self._original_run()
  File "/usr/lib/python2.7/site-packages/salt/master.py", line 236, in run
    salt.daemons.masterapi.clean_old_jobs(self.opts)
  File "/usr/lib/python2.7/site-packages/salt/daemons/masterapi.py", line 193, in clean_old_jobs
    mminion.returners[fstr]()
  File "/usr/lib/python2.7/site-packages/salt/returners/redis_return.py", line 230, in clean_old_jobs
    serv.delete(*to_remove)
  File "/usr/lib/python2.7/site-packages/redis/client.py", line 824, in delete
    return self.execute_command('DEL', *names)
  File "/usr/lib/python2.7/site-packages/redis/client.py", line 565, in execute_command
    return self.parse_response(connection, command_name, **options)
  File "/usr/lib/python2.7/site-packages/redis/client.py", line 577, in parse_response
    response = connection.read_response()
  File "/usr/lib/python2.7/site-packages/redis/connection.py", line 574, in read_response
    raise response

How to resolve this issue:

In the line ("/usr/lib/python2.7/site-packages/salt/returners/redis_return.py", line 230,) before we call delete, we simply judge the length of 'to_remove' varriable.

    for ret_key in serv.keys('ret:*'):
        load_key = ret_key.replace('ret:', 'load:', 1)
        if load_key not in living_jids:
            to_remove.append(ret_key)
    if(len(to_remove) != 0):
        serv.delete(*to_remove)

Versions Report

salt 2016.11.1 (Carbon)

@gtmanfred
Copy link
Contributor

Thanks for reporting this.

Can you please make a pull request with this in it? We would greatly appreciate it.

Thanks,
Daniel

@gtmanfred gtmanfred added the Bug broken, incorrect, or confusing behavior label Jan 5, 2017
@gtmanfred gtmanfred added this to the Approved milestone Jan 5, 2017
@gtmanfred gtmanfred added severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around P4 Priority 4 Platform Relates to OS, containers, platform-based utilities like FS, system based apps TEAM Platform labels Jan 5, 2017
yue9944882 added a commit to yue9944882/salt that referenced this issue Jan 6, 2017
@yue9944882
Copy link
Contributor Author

yue9944882 commented Jan 6, 2017

PR raised: #38610

yue9944882 added a commit to yue9944882/salt that referenced this issue Jan 6, 2017
cachedout pushed a commit that referenced this issue Jan 6, 2017
Fix #38595 - Unexpected error log from redis retuner in master's log
gitebra pushed a commit to gitebra/salt that referenced this issue Jan 11, 2017
* upstream/develop:
  Remove trailing whitespace
  Added preemptible flag to gce.py - see issue saltstack#31606
  Various improvements for the hipchat engine
  Move to getfullargspec() for py3 in vsphere module
  Add changes to raetkey
  add note related to issue saltstack#37027
  network.ifacestartswith throws exception on Solaris-like platforms
  Fix saltstack#38595 - Unexpected error log from redis retuner in master's log
  pillar.get: Raise exception when merge=True and default is not a dict
  Avoid errors when sudo_user is set
  State Gem: fix incorrect warning about missing rvm/rbenv
  Change daemontools __virtualname__ from service to daemontools
  Create queue if one doesn't exist
  Add hash_type argument to MultiKeyCLI.finger_all function
  Add hash_type argument to key module fingerprint functions
  Add hash_type argument to wheel fingerprint functions
  Add finger_master function to wheel.key module
  Fix eauth error with openLDAP/389 directory server groups
rallytime pushed a commit to rallytime/salt that referenced this issue Feb 9, 2017
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 P4 Priority 4 Platform Relates to OS, containers, platform-based utilities like FS, system based apps severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Projects
None yet
Development

No branches or pull requests

2 participants