paketo-buildpacks / nginx

Apache License 2.0
20 stars 14 forks source link

Feature Request: default support for --with-http_v2_module in the buildpack #3

Closed vponnam closed 4 years ago

vponnam commented 4 years ago

What version of Cloud Foundry and CF CLI are you using? (i.e. What is the output of running cf curl /v2/info && cf version? cf version 6.47.1+0921a21b7.2019-10-18 api_version: 2.135.0

What version of the buildpack you are using? nginx_buildpack-cached-cflinuxfs3-v1.1.1.zip

If you were attempting to accomplish a task, what was it you were attempting to do? Compiling and loading ngx_http_v2_module as a dynamic module for HTTP2(H2) support.

What did you expect to happen? Buildpack supports ngx_http_v2_module by default as a static module.

What was the actual behavior? User manually compiles the HTTP2 module outside of buildpack and loads it to the buidpack by following the steps mentioned under loading modules

Please confirm where necessary:

Waiting for API to complete processing files...
   Downloading nginx_buildpack...
   Downloaded nginx_buildpack
   Cell 5632a252-5490-4911-8084-4ca986501912 creating container for instance 79a363a3-3753-409f-9480-0074059e8c9c
   Cell 5632a252-5490-4911-8084-4ca986501912 successfully created container for instance 79a363a3-3753-409f-9480-0074059e8c9c
   Downloading app package...
   Downloading build artifacts cache...
   Downloaded app package (905B)
   Downloaded build artifacts cache (7.5M)
   -----> Nginx Buildpack version 1.1.1
   -----> Supplying nginx
   -----> No nginx version specified - using mainline => 1.17.5
   -----> Installing nginx 1.17.5
          Copy [/tmp/buildpacks/959cdfd8a9d869dcf87df7aec864d641/dependencies/23fe53f46ac2476c6effebae0a8d56a1/nginx-1.17.5-linux-x64-cflinuxfs3-fa554ae5.tgz]
   2020/02/21 16:35:33 [emerg] 37#0: dlopen() "/tmp/contents482034713/deps/0/nginx/nginx/modules/ngx_http_v2_module.so" failed (/tmp/contents482034713/deps/0/nginx/nginx/modules/ngx_http_v2_module.so: cannot open shared object file: No such file or directory) in /tmp/conf578605558/nginx.conf:1
   nginx: configuration file /tmp/conf578605558/nginx.conf test failed
          **ERROR** Could not validate nginx.conf: nginx.conf contains syntax errors: exit status 1
   Failed to compile droplet: Failed to run all supply scripts: exit status 14
   Exit status 223
   Cell 5632a252-5490-4911-8084-4ca986501912 stopping instance 79a363a3-3753-409f-9480-0074059e8c9c
   Cell 5632a252-5490-4911-8084-4ca986501912 destroying container for instance 79a363a3-3753-409f-9480-0074059e8c9c
Error staging application: App staging failed in the buildpack compile phase
FAILED

Additional context: Although, GoRouter doesn't support HTTP/2 connections as mentioned here, HTTP/2 can be achieved through TCP Routing, hence looking to see if we can add the support for http_v2 module by default in the buildpack.

cf-gitbot commented 4 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/171413628

The labels on this github issue will be updated when the story is started.

kvedurmu commented 4 years ago

Hey @vponnam thanks for filing this! The team is currently focusing most of our feature development efforts on Cloud Native Buildpacks (CNBs). I think that we can definitely look into supporting this in the nginx-cnb (https://github.com/cloudfoundry/nginx-cnb). I'm going to go ahead and move this into the nginx-cnb.

cf-gitbot commented 4 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/171437753

The labels on this github issue will be updated when the story is started.

vponnam commented 4 years ago

Thanks for considering this feature @kvedurmu. This will greatly help users to avoid the process of compiling http_v2 module outside of the buildpack context.

kvedurmu commented 4 years ago

Note: this will be resolved when https://github.com/cloudfoundry/buildpacks-ci/pull/66 gets merged

kvedurmu commented 4 years ago

Closing this out. The PR to add in the module was merged and NGINX binaries have been re-built with this change.