-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Allow linking Nginx modules dynamically #258260
Comments
Please consider sending a PR, I don't think the NGINX maintenance team have the bandwidth to drive this change by themselves. We can surely try to review it. Also please do not use assignment, we are maintainers, we do not owe feature requests. Just mention us. |
Right. Sorry, the Github UI confused me here for a sec, as there are "assignees" and "reviewers" in the same place. I'll send a PR as soon as I can. |
Historically |
So uhh. I did create a patch that allows dynamic linking. The problem is Nginx modules themselves. https://github.com/opentracing-contrib/nginx-opentracing is a bit old: OpenTracing was merged into OpenTelemetry last year. If anyone is interested in the dynamic linking itself, I'm happy to submit a PR, but my main motivation for getting Opentelemetry thing to completion (which drove me to create this issue) basically vanished lol. Will try to get into Caddy I guess. |
@KFearsoff did you manage to make nginx-otel work with nix? |
@leiserfg No. Truth be told, I haven't looked at it in more depth after the last comment on this issue. From a brief look, it seems like everything stayed the same way. I have also tried running Nginx with Otel in Kubernetes, but it was an extremely janky setup. I'm guessing nobody actually uses Nginx with Otel. |
@KFearsoff Hello, I work at NGINX F5 and would love to make the Otel model less janky. Do you have any feedback on the problems or how we might be able to make it better? |
@ninaforsyth Hey, sorry for the late reply. I was meaning to write a comprehensive reply, but it was really hard for the past two months. The main issue I've had is no support for static linking. Notably, this is very inconvenient for Nixpkgs. From what I can tell, it is still unsupported. This is also a problem for |
Issue description
Currently, Nginx allows linking modules only statically:
nixpkgs/pkgs/servers/http/nginx/generic.nix
Line 117 in d0efa70
However, Nginx doesn't have feature parity between static and dynamic modules. This means that modules that don't support static linking don't work on NixOS.
Steps to reproduce
opentracing
moduleUnless I'm missing something, you can't do that: opentracing-contrib/nginx-opentracing#162
Interestingly,
nginx-otel
module that we don't have in Nixpkgs also can only be installed dynamically: nginxinc/nginx-otel#9Technical details
Thankfully, the difference in how dynamic and static compiling is done is minimal. Static compilation uses --add-module, while dynamic compilation uses --add-dynamic-module . I haven't verified if it works yet, but I'll run some tests and add an update in a few days unless someone beats me to it.
For the Nginx package, it only requires adding a new optional argument
dynamicModules
(similar tomodules
). For the Nginx NixOS module, it requires adding a new option or extending existing one.The text was updated successfully, but these errors were encountered: