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 git_pillar interval timer to control how often git remotes are checked #52274

Closed

Conversation

Tanoti
Copy link
Contributor

@Tanoti Tanoti commented Mar 21, 2019

What does this PR do?

Add support for new config option git_pillar_interval so git_pillar data can be collected less frequently than the main loop_interval timer allows

What issues does this PR fix or reference?

N/A

Previous Behavior

Git pillar remotes would be checked using the loop_interval timer value (e.g. every 60 seconds).

New Behavior

Git pillar remotes can be checked using a different interval to the loop_interval. For example, if the git pillar data is not likely to change very often then a higher value such as 300 seconds could be used which would reduce the load on the git repo server by a factor of five.

Tests written?

No

Commits signed with GPG?

No

Please review Salt's Contributing Guide for best practices.

See GitHub's page on GPG signing for more information about signing commits with GPG.

… data can be collected less frequently than the main loop_interval timer allows
@Tanoti Tanoti requested a review from a team as a code owner March 21, 2019 16:12
@dwoz
Copy link
Contributor

dwoz commented Mar 21, 2019

@Tanoti can you write some basic tests for this?

@Tanoti
Copy link
Contributor Author

Tanoti commented Mar 22, 2019

@dwoz Please point me to some similar tests and I'll take a look. Not sure how far the tests have to go (i.e. just checking the option is parsed or that it actually works)?


git_pillar_interval = self.opts.get('git_pillar_interval', 0)
Copy link
Contributor

@cachedout cachedout Mar 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this intended to be a user-configurable option? If so, it needs documentation. Additionally, it would need to be added to the configuration handling code in salt.config.

@sathieu
Copy link
Contributor

sathieu commented Apr 10, 2019

@Tanoti Also the config should be named git_pillar_update_interval to match gitfs_update_interval.

@sathieu
Copy link
Contributor

sathieu commented Apr 10, 2019

Using another loop would be better (like gitfs does), but this is probably harder. See 958c99b and

class FileserverUpdate(salt.utils.process.SignalHandlingMultiprocessingProcess):

@sathieu
Copy link
Contributor

sathieu commented Jun 27, 2019

Superseded by #53621.

@waynew
Copy link
Contributor

waynew commented Jun 27, 2019

@sathieu so should we go ahead and close this PR then?

@sathieu
Copy link
Contributor

sathieu commented Jun 27, 2019

@waynew Yes I think. Unless @Tanoti wants to keep working on it.

@Tanoti
Copy link
Contributor Author

Tanoti commented Jun 27, 2019

@sathieu I'm happy for this to be closed. I've not had time to look at it any further so thanks for moving it on.

@waynew waynew closed this Jul 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants