summaryrefslogtreecommitdiff
path: root/doc/source/contributor/gmr.rst
blob: 7549f517b550fbcf2492708d8a1d74a2d4fd5c5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
.. _gmr:

=========================
 Guru Meditation Reports
=========================

A Guru Meditation Report (GMR) is generated by the Designate services when
service processes receiving SIGUSR2 signal. The report is a general-purpose
debug report for developers and system admins which contains the current state
of a running Designate service process.

Structure of a GMR
==================

Package
  Shows information about the package to which this process belongs, including
  version information

Threads
  Shows stack traces and thread ids for each of the threads within this process

Green Threads
  Shows stack traces for each of the green threads within this process (green
  threads don't have thread ids)

Processes
  Shows information about this process, including pid, ppid, uid and process
  state

Configuration
  Lists all the configuration options currently accessible via the CONF object
  for the current process

Generate a GMR
==============

A GMR can be generated by sending the USR2 signal to any Designate processes.

For example, suppose ``designate-central`` has pid ``15097``, ``kill -USR2
15097`` will trigger a GMR.

If option ``logdir`` has been set in ``designate.conf``, the GMR will be saved
in the folder which ``logdir`` specified. Otherwise, the GMR will be printed to
the stderr.

Reference
=========

For more information about GMR, see `GMR wiki`_.

.. _GMR wiki: https://wiki.openstack.org/wiki/GuruMeditationReport

GMR Example
===========

::

    ========================================================================
    ====                        Guru Meditation                         ====
    ========================================================================
    ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||


    ========================================================================
    ====                            Package                             ====
    ========================================================================
    product = OpenStack Designate
    vendor = OpenStack Foundation
    version = 2015.1
    ========================================================================
    ====                            Threads                             ====
    ========================================================================
    ------                  Thread #140098874533632                   ------

    /usr/local/lib/python2.7/dist-packages/eventlet/hubs/hub.py:346 in run
        `self.wait(sleep_time)`

    /usr/local/lib/python2.7/dist-packages/eventlet/hubs/poll.py:85 in wait
        `presult = self.do_poll(seconds)`

    /usr/local/lib/python2.7/dist-packages/eventlet/hubs/epolls.py:62 in do_poll
        `return self.poll.poll(seconds)`

    ========================================================================
    ====                         Green Threads                          ====
    ========================================================================
    ------                        Green Thread                        ------

    /usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py:214 in main
        `result = function(*args, **kwargs)`

    /opt/stack/designate/designate/openstack/common/service.py:492 in run_service
        `done.wait()`

    /usr/local/lib/python2.7/dist-packages/eventlet/event.py:121 in wait
        `return hubs.get_hub().switch()`

    /usr/local/lib/python2.7/dist-packages/eventlet/hubs/hub.py:294 in switch
        `return self.greenlet.switch()`

    ------                        Green Thread                        ------

    /usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py:214 in main
        `result = function(*args, **kwargs)`

    /usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py:95 in inner_func
        `return infunc(*args, **kwargs)`

    /usr/local/lib/python2.7/dist-packages/oslo_messaging/_executors/impl_eventlet.py:96 in _executor_thread
        `incoming = self.listener.poll()`

    /usr/local/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqpdriver.py:121 in poll
        `self.conn.consume(limit=1, timeout=timeout)`

    /usr/local/lib/python2.7/dist-packages/oslo_messaging/_drivers/impl_rabbit.py:867 in consume
        `six.next(it)`

    /usr/local/lib/python2.7/dist-packages/oslo_messaging/_drivers/impl_rabbit.py:782 in iterconsume
        `yield self.ensure(_error_callback, _consume)`

    /usr/local/lib/python2.7/dist-packages/oslo_messaging/_drivers/impl_rabbit.py:688 in ensure
        `ret, channel = autoretry_method()`

    /usr/local/lib/python2.7/dist-packages/kombu/connection.py:436 in _ensured
        `return fun(*args, **kwargs)`

    /usr/local/lib/python2.7/dist-packages/kombu/connection.py:508 in __call__
        `return fun(*args, channel=channels[0], **kwargs), channels[0]`

    /usr/local/lib/python2.7/dist-packages/oslo_messaging/_drivers/impl_rabbit.py:675 in execute_method
        `method()`

    /usr/local/lib/python2.7/dist-packages/oslo_messaging/_drivers/impl_rabbit.py:774 in _consume
        `return self.connection.drain_events(timeout=poll_timeout)`

    /usr/local/lib/python2.7/dist-packages/kombu/connection.py:275 in drain_events
        `return self.transport.drain_events(self.connection, **kwargs)`

    /usr/local/lib/python2.7/dist-packages/kombu/transport/pyamqp.py:91 in drain_events
        `return connection.drain_events(**kwargs)`

    /usr/local/lib/python2.7/dist-packages/amqp/connection.py:302 in drain_events
        `chanmap, None, timeout=timeout,`

    /usr/local/lib/python2.7/dist-packages/amqp/connection.py:365 in _wait_multiple
        `channel, method_sig, args, content = read_timeout(timeout)`

    /usr/local/lib/python2.7/dist-packages/amqp/connection.py:336 in read_timeout
        `return self.method_reader.read_method()`

    /usr/local/lib/python2.7/dist-packages/amqp/method_framing.py:186 in read_method
        `self._next_method()`

    /usr/local/lib/python2.7/dist-packages/amqp/method_framing.py:107 in _next_method
        `frame_type, channel, payload = read_frame()`

    /usr/local/lib/python2.7/dist-packages/amqp/transport.py:154 in read_frame
        `frame_header = read(7, True)`

    /usr/local/lib/python2.7/dist-packages/amqp/transport.py:277 in _read
        `s = recv(n - len(rbuf))`

    /usr/local/lib/python2.7/dist-packages/eventlet/greenio/base.py:326 in recv
        `timeout_exc=socket.timeout("timed out"))`

    /usr/local/lib/python2.7/dist-packages/eventlet/greenio/base.py:201 in _trampoline
        `mark_as_closed=self._mark_as_closed)`

    /usr/local/lib/python2.7/dist-packages/eventlet/hubs/__init__.py:162 in trampoline
        `return hub.switch()`

    /usr/local/lib/python2.7/dist-packages/eventlet/hubs/hub.py:294 in switch
        `return self.greenlet.switch()`

    ------                        Green Thread                        ------

    /usr/local/bin/designate-central:10 in <module>
        `sys.exit(main())`

    /opt/stack/designate/designate/cmd/central.py:37 in main
        `service.wait()`

    /opt/stack/designate/designate/service.py:356 in wait
        `_launcher.wait()`

    /opt/stack/designate/designate/openstack/common/service.py:187 in wait
        `status, signo = self._wait_for_exit_or_signal(ready_callback)`

    /opt/stack/designate/designate/openstack/common/service.py:170 in _wait_for_exit_or_signal
        `super(ServiceLauncher, self).wait()`

    /opt/stack/designate/designate/openstack/common/service.py:133 in wait
        `self.services.wait()`

    /opt/stack/designate/designate/openstack/common/service.py:473 in wait
        `self.tg.wait()`

    /opt/stack/designate/designate/openstack/common/threadgroup.py:145 in wait
        `x.wait()`

    /opt/stack/designate/designate/openstack/common/threadgroup.py:47 in wait
        `return self.thread.wait()`

    /usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py:175 in wait
        `return self._exit_event.wait()`

    /usr/local/lib/python2.7/dist-packages/eventlet/event.py:121 in wait
        `return hubs.get_hub().switch()`

    /usr/local/lib/python2.7/dist-packages/eventlet/hubs/hub.py:294 in switch
        `return self.greenlet.switch()`

    ------                        Green Thread                        ------

    No Traceback!

    ========================================================================
    ====                           Processes                            ====
    ========================================================================
    Process 15097 (under 7312) [ run by: stanzgy (1000), state: running ]

    ========================================================================
    ====                         Configuration                          ====
    ========================================================================

    backend:agent:bind9:
      query-destination = 127.0.0.1
      rndc-config-file = None
      rndc-host = 127.0.0.1
      rndc-key-file = None
      rndc-port = 953
      zone-file-path = /opt/stack/data/designate/zones

    backend:bind9:
      masters =
        127.0.0.1:5354
      rndc-config-file = None
      rndc-host = 127.0.0.1
      rndc-key-file = None
      rndc-port = 953
      server_ids =

    backend:fake:
      masters =
        127.0.0.1:5354
      server_ids =

    backend:powerdns:
      backend = sqlalchemy
      connection = ***
      connection_debug = 0
      connection_trace = False
      db_inc_retry_interval = True
      db_max_retries = 20
      db_max_retry_interval = 10
      db_retry_interval = 1
      idle_timeout = 3600
      masters =
        10.180.64.117:5354
      max_overflow = None
      max_pool_size = None
      max_retries = 10
      min_pool_size = 1
      mysql_sql_mode = TRADITIONAL
      pool_timeout = None
      retry_interval = 10
      server_ids =
        f26e0b32-736f-4f0a-831b-039a415c481e
      slave_connection = ***
      sqlite_db = oslo.sqlite
      sqlite_synchronous = True
      use_db_reconnect = False

    backend:powerdns:f26e0b32-736f-4f0a-831b-039a415c481e:
      backend = None
      connection = ***
      connection_debug = None
      connection_trace = None
      db_inc_retry_interval = None
      db_max_retries = None
      db_max_retry_interval = None
      db_retry_interval = None
      host = 10.180.64.117
      idle_timeout = None
      masters = None
      max_overflow = None
      max_pool_size = None
      max_retries = None
      min_pool_size = None
      mysql_sql_mode = None
      pool_timeout = None
      port = 53
      retry_interval = None
      slave_connection = ***
      sqlite_db = None
      sqlite_synchronous = None
      tsig-key = None
      use_db_reconnect = None

    default:
      allowed_remote_exmods =
      backdoor_port = None
      backlog = 4096
      central-topic = central
      config-dir = None
      config-file =
        /etc/designate/designate.conf
      control_exchange = designate
      debug = True
      default-soa-expire = 86400
      default-soa-minimum = 3600
      default-soa-refresh-min = 3500
      default-soa-refresh-max = 3600
      default-soa-retry = 600
      default-ttl = 3600
      default_log_levels =
        amqp=WARN
        amqplib=WARN
        boto=WARN
        eventlet.wsgi.server=WARN
        keystone=INFO
        keystonemiddleware.auth_token=INFO
        oslo.messaging=WARN
        sqlalchemy=WARN
        stevedore=WARN
        suds=INFO
      fatal_deprecations = False
      host = cns-dev2
      instance_format = [instance: %(uuid)s]
      instance_uuid_format = [instance: %(uuid)s]
      log-config-append = None
      log-date-format = %Y-%m-%d %H:%M:%S
      log-dir = /opt/stack/logs/designate
      log-file = None
      log-format = None
      logging_context_format_string = %(asctime)s.%(msecs)03d %(color)s%(levelname)s %(name)s [%(request_id)s %(user)s %(tenant)s%(color)s] %(instance)s%(color)s%(message)s
      logging_debug_format_suffix = from (pid=%(process)d) %(funcName)s %(pathname)s:%(lineno)d
      logging_default_format_string = %(asctime)s.%(msecs)03d %(color)s%(levelname)s %(name)s [-%(color)s] %(instance)s%(color)s%(message)s
      logging_exception_prefix = %(color)s%(asctime)s.%(msecs)03d TRACE %(name)s %(instance)s
      mdns-topic = mdns
      network_api = neutron
      notification_driver =
      notification_topics =
        notifications
      policy_default_rule = default
      policy_dirs =
        policy.d
      policy_file = /etc/designate/policy.json
      pool-manager-topic = pool_manager
      publish_errors = False
      pybasedir = /opt/stack/designate
      quota-domain-records = 500
      quota-domain-recordsets = 500
      quota-domains = 10
      quota-driver = storage
      quota-recordset-records = 20
      root-helper = sudo designate-rootwrap /etc/designate/rootwrap.conf
      rpc_backend = rabbit
      rpc_thread_pool_size = 64
      state-path = /opt/stack/data/designate
      syslog-log-facility = LOG_USER
      tcp_keepidle = 600
      transport_url = None
      use-syslog = False
      use-syslog-rfc-format = False
      use_stderr = True
      verbose = True

    network_api:neutron:
      admin_password = ***
      admin_tenant_name = None
      admin_username = None
      auth_strategy = keystone
      auth_url = None
      ca_certificates_file = None
      endpoint_type = publicURL
      endpoints = None
      insecure = False
      timeout = 30

    oslo_concurrency:
      disable_process_locking = False
      lock_path = None

    oslo_messaging_rabbit:
      amqp_auto_delete = False
      amqp_durable_queues = False
      fake_rabbit = False
      kombu_reconnect_delay = 1.0
      kombu_ssl_ca_certs =
      kombu_ssl_certfile =
      kombu_ssl_keyfile =
      kombu_ssl_version =
      rabbit_ha_queues = False
      rabbit_host = localhost
      rabbit_hosts =
        127.0.0.1
      rabbit_login_method = AMQPLAIN
      rabbit_max_retries = 0
      rabbit_password = ***
      rabbit_port = 5672
      rabbit_retry_backoff = 2
      rabbit_retry_interval = 1
      rabbit_use_ssl = False
      rabbit_userid = stackrabbit
      rabbit_virtual_host = /
      rpc_conn_pool_size = 30

    proxy:
      http_proxy = None
      https_proxy = None
      no_proxy =

    service:central:
      default_pool_id = 794ccc2c-d751-44fe-b57f-8894c9f5c842
      enabled-notification-handlers =
      managed_resource_email = hostmaster@example.com
      managed_resource_tenant_id = None
      max_domain_name_len = 255
      max_recordset_name_len = 255
      min_ttl = None
      storage-driver = sqlalchemy
      workers = None

    service:pool_manager:
      backends =
        powerdns
      cache-driver = sqlalchemy
      enable-recovery-timer = True
      enable-sync-timer = True
      periodic-recovery-interval = 120
      periodic-sync-interval = 300
      periodic-sync-seconds = None
      poll-delay = 1
      poll-max-retries = 3
      poll-retry-interval = 2
      poll-timeout = 30
      pool-id = 794ccc2c-d751-44fe-b57f-8894c9f5c842
      threshold-percentage = 100
      workers = None

    ssl:
      ca_file = None
      cert_file = None
      key_file = None

    storage:sqlalchemy:
      backend = sqlalchemy
      connection = ***
      connection_debug = 0
      connection_trace = False
      db_inc_retry_interval = True
      db_max_retries = 20
      db_max_retry_interval = 10
      db_retry_interval = 1
      idle_timeout = 3600
      max_overflow = None
      max_pool_size = None
      max_retries = 10
      min_pool_size = 1
      mysql_sql_mode = TRADITIONAL
      pool_timeout = None
      retry_interval = 10
      slave_connection = ***
      sqlite_db = oslo.sqlite
      sqlite_synchronous = True
      use_db_reconnect = False