Bug #11140
closed/etc/init.d/radosgw restart does not work correctly
0%
Description
`/etc/init.d/radosgw restart` does not guarantee proper restarting of the service.
radosgw has two configuration options:
- rgw_init_timeout (default value 300)
- rgw_exit_timeout_secs (default value 120)
First option - how long waiting for full initialization of the service, second one - how long waiting for correct shutdown.
If timeout is reached, service exits with exit code 1 first - waiting for stop
Shutdown can take time because it is waiting until all RGWFrontends stop.
As a result `/etc/init.d/radosgw restart` will be a cause that for time will be two instances of radosgw:
- second - waiting for start or started incorrectly (e.g. without admin socket)
logs linked to this situation:
2015-02-26 23:51:32.363877 7f2f62ffd700 1 handle_sigterm set alarm for 120
2015-02-26 23:51:32.363921 7f2fe827d780 -1 shutting down
2015-02-26 23:51:32.364260 7f2f62ffd700 1 handle_sigterm
2015-02-26 23:51:32.364359 7f2f627fc700 0 ERROR: FCGX_Accept_r returned -4
2015-02-26 23:51:32.446801 7f0937b93780 0 ceph version 0.80.7 (6c0127fcb58008793d3c8b62d925bc91963672a3), process radosgw, pid 12221
2015-02-26 23:51:32.446833 7f0937b93780 -1 WARNING: libcurl doesn't support curl_multi_wait()
2015-02-26 23:51:32.446840 7f0937b93780 -1 WARNING: cross zone / region transfer performance may be affected
2015-02-26 23:51:32.488104 7f0937b93780 -1 asok(0x209d060) AdminSocketConfigObs::init: failed: AdminSocket::bind_and_listen: failed to bind the UNIX domain socket to '/var/run/ceph/ceph-client.radosgw.gateway.asok': (17) File exists
2015-02-26 23:53:18.119360 7f2fe827d780 1 final shutdown
2015-02-26 23:56:32.448035 7f092f79d700 -1 Initialization timeout, failed to initialize