-
Notifications
You must be signed in to change notification settings - Fork 376
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
vut: Extract SIGHUP handling out of daemon mode #3779
base: master
Are you sure you want to change the base?
Conversation
This allows VUTs to either ignore SIGHUP or react to it without daemonizing. This is useful in a linux container to avoid forking a new process when the doctrine is one process per container. As a result varnishlog and varnishncsa now rotate logs when the -H option is used. Daemonizing implies adding a SIGHUP handler. Coverage of both varnishncsa and varnishlog was moved to a new dedicated u20 test case to slightly simplify u3 and u6. This changes the layout of struct VUT and as a result is breaking the ABI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version bump should happen with release, other than that it makes sense
It could be useful for weekly users to break linking sooner, but yes, your mileage may vary. |
Bugwash: this one can wait until after the March release. |
" unless the -a option was specified. If the application" \ | ||
" receives a SIGHUP in daemon mode the file will be " \ | ||
" reopened allowing the old one to be rotated away. The" \ | ||
" file can then be read by varnishlog and other tools with" \ | ||
" the -r option, unless the -A option was specified. This" \ | ||
" option is required when running in daemon mode. If the" \ | ||
" application runs as a daemon (-D option) or adds a" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"application application" spotted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh okay it's for the merge with OSS VC.
Shall I do anything here to help you ?
( comment apply to the next remark as well ! )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure I'm the one who borked this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry to confirm that - I compared your branch, mine and VC master just to be sure I did not do anything wrong.
Thanks for your work !
" unless the -a option was specified. If the application" \ | ||
" receives a SIGHUP in daemon mode the file will be" \ | ||
" reopened allowing the old one to be rotated away. This" \ | ||
" option is required when running in daemon mode. If the" \ | ||
" application runs as a daemon (-D option) or adds a" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"application application" spotted.
Note: before merging, steps should be added in the release process to deal with libvarnishapi soname bumps. |
This allows VUTs to either ignore SIGHUP or react to it without daemonizing. This is useful in a linux container to avoid forking a new process when the doctrine is one process per container.
As a result varnishlog and varnishncsa now rotate logs when the -H option is used. Daemonizing implies adding a SIGHUP handler.
Coverage of both varnishncsa and varnishlog was moved to a new dedicated u20 test case to slightly simplify u3 and u6.
This changes the layout of struct VUT and as a result is breaking the ABI.
I'm opening this pull request on behalf of @Creamen to solve containers issues with log rotation. I slightly tweaked the change, added test coverage and took care of soname housekeeping.