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

Add inventory cache to the netbox plugin #57644

Merged
merged 2 commits into from Oct 17, 2019
Merged

Conversation

steffann
Copy link
Contributor

SUMMARY

The netbox inventory plugin can be quite slow, especially when config_context is enabled. This
patch adds caching support to the plugin so that delays can be minimised.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

netbox

ADDITIONAL INFORMATION

@ansibot
Copy link
Contributor

ansibot commented Jun 10, 2019

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 community_review In order to be merged, this PR must follow the community review workflow. feature This issue/PR relates to a feature request. inventory Inventory category needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. labels Jun 10, 2019
@FragmentedPacket
Copy link
Contributor

I'm not seeing the caching affect. Can you specify what I need in order for the caching to work?

@steffann
Copy link
Contributor Author

I'm not seeing the caching affect. Can you specify what I need in order for the caching to work?

The manual is here: https://docs.ansible.com/ansible/latest/plugins/cache.html

I'm using this in my setup in ansible.cfg:

[inventory]
cache = yes
cache_plugin = yaml
cache_connection = .cache/inventory
cache_timeout = 43200

@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label Jun 11, 2019
@FragmentedPacket
Copy link
Contributor

shipit

@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Jun 19, 2019
@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed community_review In order to be merged, this PR must follow the community review workflow. labels Sep 9, 2019
@martink2
Copy link

@steffann thanks for the effort we would be really happy to see this in the next Ansible release, would you mind rebasing your PR so it hopefully will get merged ?

Thanks

Martin

@Shm013
Copy link

Shm013 commented Sep 26, 2019

I think it will be great to add --flush-cache option for ansible-inventory and ansible command after this

@ansibot
Copy link
Contributor

ansibot commented Sep 26, 2019

@steffann this PR contains the following merge commits:

Please rebase your branch to remove these commits.

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Sep 26, 2019

@steffann This PR was evaluated as a potentially problematic PR for the following reasons:

  • More than 50 changed files.
  • More than 50 commits.

Such PR can only be merged by human. Contact a Core team member to review this PR on IRC: #ansible-devel on irc.freenode.net

click here for bot help

@ansibot ansibot added the merge_commit This PR contains at least one merge commit. Please resolve! label Sep 26, 2019
@steffann steffann closed this Sep 26, 2019
@steffann steffann reopened this Sep 26, 2019
@steffann
Copy link
Contributor Author

Apologies, that was a bit of a mess. Clean patch available now.

@ansibot ansibot removed merge_commit This PR contains at least one merge commit. Please resolve! needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Sep 26, 2019
@ansibot ansibot added community_review In order to be merged, this PR must follow the community review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Sep 26, 2019
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Oct 4, 2019
Yannis100 added a commit to Yannis100/ansible that referenced this pull request Oct 15, 2019
@s-hertel
Copy link
Contributor

rebuild_merge

@ansibot ansibot added has_issue shipit This PR is ready to be merged by Core and removed community_review In order to be merged, this PR must follow the community review workflow. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Oct 17, 2019
@ansibot ansibot merged commit faf8fc6 into ansible:devel Oct 17, 2019
@ansible ansible locked and limited conversation to collaborators Nov 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 feature This issue/PR relates to a feature request. has_issue inventory Inventory category shipit This PR is ready to be merged by Core support:community This issue/PR relates to code supported by the Ansible community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants