Bug 1565377 - Service reload should check configuration file
Summary: Service reload should check configuration file
Keywords:
Status: NEW
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: nginx
Version: epel7
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Felix Kaechele
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-09 23:59 UTC by François Freitag
Modified: 2020-05-13 10:00 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)
suggested patch (372 bytes, patch)
2018-04-09 23:59 UTC, François Freitag
no flags Details | Diff
invalid configuration example (2.43 KB, text/plain)
2018-04-10 00:00 UTC, François Freitag
no flags Details

Description François Freitag 2018-04-09 23:59:24 UTC
Created attachment 1419614 [details]
suggested patch

Reloading NGINX with an invalid configuration file should report an error.

Version-Release number:
nginx-1.12.2-2.el7.x86_64 (probably affects most other versions).

How reproducible: always

Steps to Reproduce:
1. sudo yum install epel-release
2. sudo yum install nginx
3. sudo systemctl start nginx
4. sudo sed -ri 's/(error_log [^;]*);/\1 invalid_log_level;/' /etc/nginx/nginx.conf
5. sudo systemctl reload nginx
6. echo $?

Actual results:
0  # successful program termination

Expected results:
1  # non-zero error code indicates reload failure

Additional info:

- Invalid /etc/nginx/nginx.conf attached.
- Patch with the suggested change on https://src.fedoraproject.org/rpms/nginx/tree/c6a3d4500d0e9fccb1d05575fd449b95018e0ec7 attached.
- Rationale and recommendation to upstream: https://github.com/nginxinc/nginx-wiki/pull/392
-

Comment 1 François Freitag 2018-04-10 00:00:48 UTC
Created attachment 1419615 [details]
invalid configuration example


Note You need to log in before you can comment on or make changes to this bug.