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

stream logging is broken by default

Open silug opened this issue 2 years ago • 2 comments

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: puppet-agent-7.21.0-1.el8.x86_64
  • Ruby: ruby 2.7.7p221 (2022-11-24 revision 168ec2b1e5) [x86_64-linux]
  • Distribution: CentOS Stream 8
  • Module version: 4.2.0

How to reproduce (e.g Puppet code you use)

Set

nginx::stream: true

in Hiera.

What are you seeing

After an upgrade from module version 4.0.0, nginx fails to start with

nginx: [emerg] log format is not specified in /etc/nginx/nginx.conf:73

/etc/nginx/nginx.conf contains the following block:

stream {
  include /etc/nginx/conf.stream.d/*.conf;
  include /etc/nginx/streams-enabled/*;

  access_log /var/log/nginx/stream-access.log;
}

It appears that nginx::stream_log_format needs to be set as well.

What behaviour did you expect instead

A default value for nginx::stream_log_format or an empty nginx::stream_access_log, either of which would allow nginx to start successfully.

Any additional information you'd like to impart

As a workaround, I set

nginx::stream_access_log: []

which results in the same stream block in nginx.conf as I believe I had with 4.0.0. With that, nginx starts successfully.

silug avatar Dec 29 '22 05:12 silug

Must be caused by #1461.

kenyon avatar Dec 29 '22 05:12 kenyon

Must be caused by #1461.

Indeed. I apologize that I forgot to mention that.

silug avatar Dec 29 '22 05:12 silug