Comment 3 for bug 2060172

Revision history for this message
Jacopo Rota (r00ta) wrote (last edit ):

Just to recap:

This bug is caused by a nasty race condition between pebble and NGINX.
1) Pebble starts NGINX and the other services
2) The region writes the nginx config and asks pebble to restart NGINX. Pebble returns 202 and will process the request asynchronously.
3) Pebble can't send the TERM signal to NGINX because its status is still "STARTING".
The error in pebble is "[change 3 "Stop service \"http\"" task] failed: cannot stop service while starting"
See https://github.com/canonical/pebble/blob/18c93cbc280de20c9e21d323fe3a8bbb340777a2/internals/overlord/servstate/handlers.go#L701
4) Then, NGINX keeps the old configuration and does not process any request.

However, they are suggesting to use the HUP signal to reload the configuration (see also http://nginx.org/en/docs/control.html), this is what this MP is doing and I haven't observed this issue so far.