Skip to content

Update job_cache and keep_jobs docs to be more specific to their behavior - #33328

Merged
cachedout merged 4 commits into
saltstack:2015.8from
rallytime:fix-29286
May 19, 2016
Merged

cachedout merged 4 commits into
saltstack:2015.8from
rallytime:fix-29286

Conversation

@rallytime

@rallytime rallytime commented May 17, 2016 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Updates the job_cache and keep_jobs docs to be more accurate about their behavior, especially the job_cache setting. When this is set to False, it doesn't completely "disable" the job cache. It just makes the corresponding JID collision detection dirs less heavy by disregarding the minion return data.

Also fixed a bug discovered when investigating job_cache/keep_jobs functionality where the jid directory and files were removed by the cache cleaner, but not the original jid clash detection directory created in /var/cache/salt/master/jobs/.

What issues does this PR fix or reference?

Fixes #29286

Previous Behavior

The cache cleaner removes the jid files and directories from the original top jid directory (which is originally created to hold the jid file and jid/minion dirs) but it doesn't remove the original directory that was created in /var/cache/salt/master/jobs/.

For example, jid dir 30 has been cleaned, but the newest job, 19, has not been cleaned yet. This leaves around a lot of empty directories, causing the job cache to bloat over time:

root@rallytime:~# ls /var/cache/salt/master/jobs/
19  30
root@rallytime:~# ls /var/cache/salt/master/jobs/30/
root@rallytime:~# ls /var/cache/salt/master/jobs/19/
f1cca89613752b2fb9a65b1450bec7

New Behavior

The cache cleaner removes the entire jid top directory from /var/cache/salt/master/jobs:

root@rallytime:~# ls /var/cache/salt/master/jobs/
19

Tests written?

Yes!

…vior

Also fixed a bug discovered when investigating job_cache/keep_jobs functionality
where the jid directory and files were removed by the cache cleaner, but not the
original jid clash detection directory created in /var/cache/salt/master/jobs/.

Fixes saltstack#29286
@rallytime rallytime added the needs-testcase PR needs test cases written, or the issue is about a bug/feature that needs test cases label May 17, 2016
@rallytime

Copy link
Copy Markdown
Contributor Author

Don't merge this yet. I am going to write some tests for it today.

@rallytime rallytime removed the needs-testcase PR needs test cases written, or the issue is about a bug/feature that needs test cases label May 18, 2016
@cachedout

Copy link
Copy Markdown
Contributor

I've wanted to fix this for ages! Well done, @rallytime

@cachedout
cachedout merged commit 4fdb097 into saltstack:2015.8 May 19, 2016
@rallytime
rallytime deleted the fix-29286 branch May 19, 2016 16:34
@rallytime

Copy link
Copy Markdown
Contributor Author

Thanks @cachedout! :D

cachedout pushed a commit that referenced this pull request May 20, 2016
* Fix master hanging after a request from minion with removed key. (#33333)

* ZMQ monitor for MWorker connections.

* Reauth minion if the key was removed on the master side.

* Allow concurrency mode in state runs if using sudo (#33325)

Closes #30130

* Disambiguate non-exact matches when checking if sysv service is enabled (#33324)

Fixes #33323

* remove redundant, incorrect sudo_runas config documentation (#33318)

* remove sudo_runas documentation

`sudo_runas` was renamed to `sudo_user` and the documentation was not
updated accordingly.

* conf/minion: update sudo_user description

The description from sudo_runas was better.

* import ps from psutil_compat in beacons (#33334)

* beacons.network_info: import gate psutil

* beacons.ps: import gate psutil

* Add docs for mine_functions config var (#33326)

* Add docs for mine_functions config var

* Note that mine_enabled essentially just doesn't add the mine
update function to the scheduler.

* Bp 28467 calm mine (#33327)

* make minion mine update behavior more configurable

* Add docs for mine_functions config var

* Remove config dup from mine config options

Refs #28467

* 2015.8 does not have _DFLT_MULTIPROCESSING_MODE

* This won't be in until 2015.8.10.

* Fix network.managed for windows (#33312)

* Fix some link errors in the test writing tutorial (#33347)

* Describes parameters in register_instances function (#33339)

* Fix UnboundLocalError in git.latest (#33340)

Resolves #32260.

* Expanded documentation for boto_elb state and module (#33341)

* Describes what happens when the CNAME parameter is given.

* Describes what the recognized attributes are for for ELBs.

* Properly detect newer Linux Mint distros (#33359)

* Properly detect newer Linux Mint distros

LMDE 2 and Linux Mint 17.3 changed the DISTRIB_ID in /etc/lsb-release to
``LinuxMint``, breaking OS detection for these distros.

This commit fixes that by adding an entry to the OS_NAME_MAP in the core
grains.

* Remove LinuxMint os_family from aptpkg.py

It is no longer necessary as the distro is now detected properly, which
will lead to an os_family of Debian.

* Update job_cache and keep_jobs docs to be more specific to their behavior (#33328)

* Update job_cache and keep_jobs docs to be more specific to their behavior

Also fixed a bug discovered when investigating job_cache/keep_jobs functionality
where the jid directory and files were removed by the cache cleaner, but not the
original jid clash detection directory created in /var/cache/salt/master/jobs/.

Fixes #29286

* Add testcase for the changes in the local_cache.clean_old_jobs func

* Mark tests as destructive

* Put destructive test decorator in correct location

* Remove mentions of windows not supporting pkgs param (#33361)

Fixes #33313

* Updates docs version to 2015.8.9
Adds note regarding the os grain on Mint Linux
Adds an FAQ regarding grains that change due to upstream changes

* revved 2015.8 branch to .9 in version selector

* Add initscripts, SystemD service units and environment files for Debian (#32857)

* Add note to docs about api settings for Hipchat API v2 (#33365)

Fixes #27779

* Add win_pkg to list of modules that support "version" in pkg.installed (#33362)

Fixes #32913

* Add note about name parameter in git_pillar docs (#33369)

Fixes #27737

* Better YAML syntax error handling (#33375)

Closes #26574

* Improve doc clarity for disable_modules documentation (#33379)

* Improve doc clarity for disable_modules documentation

* Additional clarification on blacklisted name

* maintain the fallabck because I am totally sick of this crap

* blast, put the try/except int he right place

* restore whitespace

* Fix traceback in logging for config validation (#33386)

* 2015.8.10 release notes

* Sync pillarstack to latest upstream version (#33391)

* Don't lay down all available opts (#33385)

* Don't lay down all available opts

* We need at least one opt in there

* Condense defaults

* Put the default hash type back
@himadrisingh001

Copy link
Copy Markdown

Is this fixed in salt 2015.8.12 (Beryllium) ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants