init script fails with error code 0 when configuration test doesn't pass
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| nginx (Ubuntu) |
Low
|
Unassigned | ||
| Trusty |
Low
|
Unassigned | ||
| Utopic |
Undecided
|
Unassigned | ||
| Vivid |
Low
|
Unassigned |
Bug Description
Ubuntu version: Ubuntu 14.04.1 LTS
Nginx version: 1.4.6-1ubuntu3.1
Steps to reproduce:
1. install nginx
2. add a configuration error to nginx's configuration (echo error > /etc/nginx/
3. reload nginx and check its exit code (/etc/init.d/nginx reload; echo $?)
What should happen:
Nginx should fail to reload with a non zero exit code.
What happens instead
Nginx does not reload, but the init script's exit code is 0. This confuses certain configuration management tools that rely on init scripts' exit codes to determine success.
Thomas Ward (teward) wrote : | #1 |
Changed in nginx (Ubuntu): | |
status: | New → Confirmed |
Changed in nginx (Ubuntu Trusty): | |
status: | New → Confirmed |
Thomas Ward (teward) wrote : | #2 |
Also, please elaborate what you mean by 'certain configuration management tools' - unless they're used regularly by a substantial portion of existence (such as a well known configuration management tool) then I'm not sure the actual impact.
Until that's clarified, I'm marking importance on this as "Low" against the nginx package as it doesn't necessarily effect the operation of the package or executable.
Changed in nginx (Ubuntu): | |
importance: | Undecided → Low |
Changed in nginx (Ubuntu Trusty): | |
importance: | Undecided → Low |
Changed in nginx (Ubuntu): | |
status: | Confirmed → New |
Thomas Ward (teward) wrote : | #3 |
Confirmed that Vivid is not affected. Log data:
teward@
Job for nginx.service failed. See "systemctl status nginx.service" and "journalctl -xe" for details.
1
Changed in nginx (Ubuntu Vivid): | |
status: | New → Invalid |
Stratos Moros (stmoros) wrote : | #4 |
Hello Thomas and thanks for taking an interest
Personally, I experienced the bug using Ansible, which I would argue is well known.
Joó Ádám (s-adam-i) wrote : | #5 |
Please see the bug report for Ansible: https:/
Launchpad Janitor (janitor) wrote : | #6 |
Status changed to 'Confirmed' because the bug affects multiple users.
Changed in nginx (Ubuntu Utopic): | |
status: | New → Confirmed |
Joó Ádám (s-adam-i) wrote : | #7 |
Also, this is not specific to Nginx.
Thomas Ward (teward) wrote : | #8 |
If this is not specific to NGINX there needs to be additonal bugs opened against the other projects. This bug will only address NGINX.
This seems specific to the init scripts packaged with the .deb for NginX to me. Unless there is an automated system creating these init-scripts and omitting the exit-codes on failure.
Thomas Ward (teward) wrote : | #10 |
Ubuntu Utopic has gone End of Life as of today. As such, this bug is being marked Won't Fix against the Utopic package.
Refer to: https:/
Changed in nginx (Ubuntu Utopic): | |
status: | Confirmed → Won't Fix |
Confirmed in 1.4.6-1ubuntu3.2 from trusty-updates. Not tested with later releases.
I'm marking this as "Confirmed" against Trusty, however it needs testing in Utopic and Vivid to determine the full extent of what's affected.