8000 Check if NGINX reload is complete by aphralG · Pull Request #1207 · nginx/agent · GitHub
[go: up one dir, main page]

Skip to content

Conversation

aphralG
Copy link
Contributor
@aphralG aphralG commented Aug 11, 2025

Proposed changes

When reloading NGINX during a config apply, check if the worker processes are finished reloading by checking the create time of each worker is more recent than the create time of the workers before the reload.

Moved function related to creating the NGINX Info from nginx_process_parser into datasource/nginx/process.go so it can be reused in the instance_operator

Renamed Info to ProcessInfo and moved it from nginx_process_parser to model/process.go

Created new interface in resource service for nginx_process_operator which just gets the nginx process, had to do this for unit tests so I could mock what the function returns

Added new config settings for the reload backoff

data_plane_config:
    nginx:
        reload_backoff:
            initial_interval: 100ms
            max_interval: 20s
            max_elapsed_time: 15s
            randomization_factor: 1.5
            multiplier: 1.5

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING document
  • I have run make install-tools and have attached any dependency changes to this pull request
  • If applicable, I have added tests that prove my fix is effective or that my feature works
  • If applicable, I have checked that any relevant tests pass after adding my changes
  • If applicable, I have updated any relevant documentation (README.md)
  • If applicable, I have tested my cross-platform changes on Ubuntu 22, Redhat 8, SUSE 15 and FreeBSD 13

@aphralG aphralG self-assigned this Aug 11, 2025
@aphralG aphralG requested a review from a team as a code owner August 11, 2025 14:59
@github-actions github-actions bot added the chore Pull requests for routine tasks label Aug 11, 2025
@aphralG aphralG requested review from dhurley and sean-breen August 12, 2025 16:05
Copy link
Contributor
@sean-breen sean-breen left a comment

Choose a reason for hiding this comment

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

datasource/nginx/proccess.go should be process.go

@aphralG aphralG requested a review from sean-breen August 13, 2025 11:16
@aphralG aphralG merged commit 2ba165d into main Aug 14, 2025
26 checks passed
@aphralG aphralG deleted the add-nginx-reload-complete-check branch August 14, 2025 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Pull requests for routine tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0