openresty / openresty/openresty
`openresty -s reload` doesn't seem to be working
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 14k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
I have an init_by_lua_block that unconditionally logs a notice to see that the control actually hits the block. The notice is logged when the service starts, but it is not logged again when openresty -s reload is executed in the container.
The reload command itself does log this to the terminal:
2019/04/12 18:40:28 [notice] 534£534: signal process started
However nothing appears on the terminal where I had run docker compose up, which is where regular log output normally appears and continues to appear e.g. when I send HTTP requests.
Am I mistaken in my belief that the init_by_lua_block code should re-execute upon config reload? Or is it the case that nginx optimizes the whole operation out if the config files are effectively unchanged?
Host uname -a:
Linux tytan 5.0.7-arch1-1-ARCH #1 SMP PREEMPT Mon Apr 8 10:37:08 UTC 2019 x86_64 GNU/Linux
Container uname -a:
Linux f5012a51b2a0 5.0.7-arch1-1-ARCH £1 SMP PREEMPT Mon Apr 8 10:37:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Image is based on openresty:bionic.
openresty -V:
nginx version: openresty/1.15.8.1rc1
built by gcc 7.3.0 (Ubuntu 7.3.0-27ubuntu1~18.04)
built with OpenSSL 1.1.0j 20 Nov 2018
TLS SNI support enabled
configure arguments: --prefix=/usr/local/openresty/nginx --with-cc-opt=-O2 --add-module=../ngx_devel_kit-0.3.1rc1 --add-module=../echo-nginx-module-0.61 --add-module=../xss-nginx-module-0.06 --add-module=../ngx_coolkit-0.2 --add-module=../set-misc-nginx-module-0.32 --add-module=../form-input-nginx-module-0.12 --add-module=../encrypted-session-nginx-module-0.08 --add-module=../srcache-nginx-module-0.31 --add-module=../ngx_lua-0.10.14 --add-module=../ngx_lua_upstream-0.07 --add-module=../headers-more-nginx-module-0.33 --add-module=../array-var-nginx-module-0.05 --add-module=../memc-nginx-module-0.19 --add-module=../redis2-nginx-module-0.15 --add-module=../redis-nginx-module-0.3.7 --add-module=../rds-json-nginx-module-0.15 --add-module=../rds-csv-nginx-module-0.09 --add-module=../ngx_stream_lua-0.0.6 --with-ld-opt=-Wl,-rpath,/usr/local/openresty/luajit/lib --with-openssl=/tmp/openssl-1.1.0j --with-pcre=/tmp/pcre-8.42 --with-file-aio --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_geoip_module=dynamic --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-http_xslt_module=dynamic --with-ipv6 --with-mail --with-mail_ssl_module --with-md5-asm --with-pcre-jit --with-sha1-asm --with-stream --with-stream_ssl_module --with-threads --with-stream --with-stream_ssl_preread_module
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the behavior around the init_by_lua_block entry point and the openresty -s reload command, comparing the service-start and reload logs. No source file or test is named; done would be determining whether the block should rerun on reload and documenting the cause of the missing notice if it does not.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker-compose, lua, nginx
- Domain
- backend, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100