]> source.dussan.org Git - gitea.git/commit
Restore Graceful Restarting & Socket Activation (#7274)
authorzeripath <art27@cantab.net>
Tue, 15 Oct 2019 13:39:51 +0000 (14:39 +0100)
committerGitHub <noreply@github.com>
Tue, 15 Oct 2019 13:39:51 +0000 (14:39 +0100)
commit167e8f18da3aadcdcdd7bb8c488c39d73ac65803
treec2ad32fc8ced5657f62034551e72134a0a238fcb
parent4a290bd64cd4c4ba77b9f3c4908a76cc521f9621
Restore Graceful Restarting & Socket Activation (#7274)

* Prevent deadlock in indexer initialisation during graceful restart

* Move from gracehttp to our own service to add graceful ssh

* Add timeout for start of indexers and make hammer time configurable

* Fix issue with re-initialization in indexer during tests

* move the code to detect use of closed to graceful

* Handle logs gracefully - add a pid suffix just before restart

* Move to using a cond and a holder for indexers

* use time.Since

* Add some comments and attribution

* update modules.txt

* Use zero to disable timeout

* Move RestartProcess to its own file

* Add cleanup routine
45 files changed:
cmd/web.go
cmd/web_graceful.go
cmd/web_windows.go
custom/conf/app.ini.sample
docs/content/doc/advanced/config-cheat-sheet.en-us.md
go.mod
go.sum
models/repo_indexer.go
modules/graceful/cleanup.go [new file with mode: 0644]
modules/graceful/net.go [new file with mode: 0644]
modules/graceful/restart.go [new file with mode: 0644]
modules/graceful/server.go [new file with mode: 0644]
modules/graceful/server_hooks.go [new file with mode: 0644]
modules/graceful/server_http.go [new file with mode: 0644]
modules/graceful/server_signals.go [new file with mode: 0644]
modules/indexer/issues/indexer.go
modules/indexer/issues/indexer_test.go
modules/indexer/repo.go
modules/setting/indexer.go
modules/setting/log.go
modules/setting/setting.go
modules/ssh/ssh.go
modules/ssh/ssh_graceful.go [new file with mode: 0644]
modules/ssh/ssh_windows.go [new file with mode: 0644]
routers/init.go
routers/install.go
vendor/github.com/facebookgo/clock/LICENSE [deleted file]
vendor/github.com/facebookgo/clock/README.md [deleted file]
vendor/github.com/facebookgo/clock/clock.go [deleted file]
vendor/github.com/facebookgo/grace/gracehttp/http.go [deleted file]
vendor/github.com/facebookgo/grace/gracenet/net.go [deleted file]
vendor/github.com/facebookgo/httpdown/.travis.yml [deleted file]
vendor/github.com/facebookgo/httpdown/httpdown.go [deleted file]
vendor/github.com/facebookgo/httpdown/license [deleted file]
vendor/github.com/facebookgo/httpdown/patents [deleted file]
vendor/github.com/facebookgo/httpdown/readme.md [deleted file]
vendor/github.com/facebookgo/stats/.travis.yml [deleted file]
vendor/github.com/facebookgo/stats/aggregation.go [deleted file]
vendor/github.com/facebookgo/stats/counter.go [deleted file]
vendor/github.com/facebookgo/stats/license [deleted file]
vendor/github.com/facebookgo/stats/patents [deleted file]
vendor/github.com/facebookgo/stats/readme.md [deleted file]
vendor/github.com/facebookgo/stats/stats.go [deleted file]
vendor/github.com/facebookgo/stats/stopper.go [deleted file]
vendor/modules.txt