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

Add inventory cache #34086

Open
wants to merge 3 commits into
base: devel
from

Conversation

Projects
None yet
3 participants
@pymag09
Contributor

pymag09 commented Dec 20, 2017

SUMMARY

Along with bulk_load, cache feature could be implemented as a last resort.
Cache introduce eventual consistency, therefor cache_ttl have to be as short as possible (by default 30 seconds).
Basically it makes sense in environment where central ansible server executes consul_io.py very often, multiple times during cache_ttl.

Since majority of time is spent on network communication there are other ways how to speed up.
From this point of view, current PR is, kide of, controversial. Feel free to decline it if you share this point of view.

Cache mechanism is based on sessions in consul. It allows to create temporary keys, which is perfect for cache invalidation.
ISSUE TYPE

Feature Pull Request

COMPONENT NAME

dynamic inventory. consul_io.py
@ansibot

This comment has been minimized.

Contributor

ansibot commented Dec 20, 2017

The test ansible-test sanity --test pep8 [?] failed with the following errors:

contrib/inventory/consul_io.py:288:37: E126 continuation line over-indented for hanging indent
contrib/inventory/consul_io.py:329:16: E111 indentation is not a multiple of four

click here for bot help

@ansibot

This comment has been minimized.

Contributor

ansibot commented Jan 26, 2018

@pymag09 this PR contains the following merge commits:

Please rebase your branch to remove these commits.

click here for bot help

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