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

Fix reload timeout calculation for verifying NGINX reloads #1396

Merged
merged 1 commit into from
Feb 23, 2021

Conversation

soneillf5
Copy link
Contributor

@soneillf5 soneillf5 commented Feb 19, 2021

Proposed changes

An issue was found where the time spent waiting for a reload was logged incorrectly.

I1002 17:56:06.864138       1 manager.go:282] Reloading nginx with configVersion: 11
. . .
I1002 17:56:33.685380       1 verify.go:75] success, version 11 ensured. iterations: 613. took: 15.325s

This change adjusts the logic in a polling loop to use time.duration to correctly calculate the times.

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto master
  • I will ensure my PR is targeting the master branch and pulling from my branch from my own fork

@Dean-Coakley Dean-Coakley added the bug An issue reporting a potential bug label Feb 19, 2021
Copy link
Contributor

@pleshakov pleshakov left a comment

Choose a reason for hiding this comment

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

🚀

internal/nginx/verify.go Outdated Show resolved Hide resolved
@soneillf5 soneillf5 merged commit 9bf7d27 into master Feb 23, 2021
@soneillf5 soneillf5 deleted the reload-calculation branch February 24, 2021 11:45
@pleshakov pleshakov changed the title Refactor timeout calculation to use duration Fix reload timeout calculation for verifying NGINX reloads Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue reporting a potential bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants