Introduce Guru Meditation Reports into Cinder

This commit integrates functionality from the
`openstack.common.report` module into Cinder.
This enables Cinder services to receive SIGUSR1
and print a Guru Meditation Report to stderr.
The required modules were added to
'openstack-common.conf' as well.

It is essentially a copy from implementation of
nova side.

Change-Id: I5bbdc0f97db9b0ebd7b48e50ab7869e2ca33aead
Implements: blueprint guru-meditation-report
This commit is contained in:
wanghao
2015-05-14 15:42:44 +08:00
parent e5cd756c1a
commit f2dc050e4d
31 changed files with 1831 additions and 0 deletions

View File

@@ -33,6 +33,7 @@ i18n.enable_lazy()
# Need to register global_opts
from cinder.common import config # noqa
from cinder.openstack.common.report import guru_meditation_report as gmr
from cinder import service
from cinder import utils
from cinder import version
@@ -46,6 +47,7 @@ def main():
version=version.version_string())
logging.setup(CONF, "cinder")
utils.monkey_patch()
gmr.TextGuruMeditation.setup_autorun(version)
server = service.Service.create(binary='cinder-backup')
service.serve(server)
service.wait()