puppet-nginx icon indicating copy to clipboard operation
puppet-nginx copied to clipboard

fix cookie name in http_upstream sticky directive

Open hbog opened this issue 6 years ago • 4 comments
trafficstars

Pull Request (PR) description

The syntax for the cookie method of the sticky directive in the ngx_http_upstream_module is:

sticky cookie name [expires=time] [domain=domain] ...

The cookie name parameter must be specified without 'name=' prefix.

This Pull Request (PR) fixes the following issues

Fixes #1285

hbog avatar Dec 13 '18 20:12 hbog

Hi @hbog. Could you add an acceptance test so we know for sure that the generated config works?

bastelfreak avatar Dec 15 '18 11:12 bastelfreak

The sticky directive that I use is only available in the commercial offering NGINX-Plus.

While looking to setup an acceptance test, I noticed that there is also an open source third party module (nginx-sticky-module-ng) implementing the sticky directive with a slightly different syntax. It is this syntax which is implemented in the current master branch of puppet-nginx. In other words, this PR is NGINX-Plus specific and will break setups using nginx-sticky-module-ng.

Shall I add logic to detect the nginx edition in use and generate the appropriate configuration? Is there a license to add nginx-plus to the acceptance tests ?

hbog avatar Dec 15 '18 12:12 hbog

Sadly we don't have a license available and I don't have a contact to nginx. Can you add support for the nginx-sticky-module-ng as well? Please update the README.md accordingly.

bastelfreak avatar Dec 25 '18 23:12 bastelfreak

Ping @hbog :)

bastelfreak avatar Jun 10 '19 10:06 bastelfreak