Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1565377

Summary: Service reload should check configuration file
Product: [Fedora] Fedora EPEL Reporter: François Freitag <mail>
Component: nginxAssignee: Felix Kaechele <felix>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: epel7CC: affix, athmanem, bperkins, jeremy, jkaluza, jon.dufresne, jorton, luhliari, pavel.lisy, peter.borsa, tadej.j, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: nginx-1.20.0-2.fc33 nginx-1.20.0-2.fc32 nginx-1.20.0-2.fc34 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-29 00:57:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
suggested patch
none
invalid configuration example none

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

Comment 2 Fedora Update System 2021-04-21 17:02:32 UTC
FEDORA-2021-10c1cd4cba has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-10c1cd4cba

Comment 3 Fedora Update System 2021-04-21 17:02:50 UTC
FEDORA-2021-1556d440ba has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2021-1556d440ba

Comment 4 Fedora Update System 2021-04-21 17:03:08 UTC
FEDORA-2021-3aa9ac7fd1 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-3aa9ac7fd1

Comment 5 Fedora Update System 2021-04-21 21:51:39 UTC
FEDORA-2021-1556d440ba has been pushed to the Fedora 32 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-1556d440ba`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-1556d440ba

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2021-04-21 22:01:53 UTC
FEDORA-2021-10c1cd4cba has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-10c1cd4cba`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-10c1cd4cba

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2021-04-22 18:24:24 UTC
FEDORA-2021-3aa9ac7fd1 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-3aa9ac7fd1`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-3aa9ac7fd1

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2021-04-29 00:57:19 UTC
FEDORA-2021-10c1cd4cba has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Fedora Update System 2021-04-29 01:22:00 UTC
FEDORA-2021-1556d440ba has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 10 Fedora Update System 2021-04-30 00:54:50 UTC
FEDORA-2021-3aa9ac7fd1 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.