~allenap/maas/regiond-leader

« back to all changes in this revision

Viewing changes to HACKING.txt

  • Committer: MAAS Lander
  • Author(s): Gavin Panella
  • Date: 2015-04-24 17:47:07 UTC
  • mfrom: (3759.4.18 introspect-service)
  • Revision ID: maas_lander-20150424174707-9eqa8y0bedjz0vm2
[r=rbanffy][bug=][author=allenap] Allow interactive introspection of running MAAS daemons.

Show diffs side-by-side

added added

removed removed

Lines of Context:
365
365
Apparently Django needs a lot of debugging ;)
366
366
 
367
367
 
 
368
Introspecting regiond and clusterd
 
369
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
370
 
 
371
By default, the ``regiond``, ``regiond2``, and ``clusterd`` services
 
372
(when run from the tree) start an introspection service. You can connect
 
373
to these from the terminal to get a REPL-like environment *inside* the
 
374
running daemons.
 
375
 
 
376
There's a convenient script to help with this:
 
377
 
 
378
.. code-block:: console
 
379
 
 
380
  $ utilities/introspect --help
 
381
  usage: introspect [-h] service
 
382
 
 
383
  Connect to a regiond's or clusterd's introspection service.
 
384
 
 
385
  positional arguments:
 
386
    service     The name of a MAAS service to introspect.
 
387
                Choose from: clusterd, regiond, regiond2
 
388
 
 
389
  optional arguments:
 
390
    -h, --help  show this help message and exit
 
391
 
 
392
.. code-block:: console
 
393
 
 
394
  $ utilities/introspect regiond
 
395
 
 
396
  .------------------------------------------------------
 
397
  |
 
398
  |  Welcome to MAAS's Introspection Shell.
 
399
  |
 
400
  |  This is the REGION.
 
401
  |
 
402
  |  >>>
 
403
  |
 
404
  |  ...
 
405
 
 
406
Bear in mind that commands are evaluated **in the reactor thread**. If
 
407
you execute a blocking call, Twisted's reactor will *freeze* until that
 
408
call returns. You won't even be able to interact via the introspection
 
409
service because that relies upon the reactor!
 
410
 
 
411
 
368
412
Adding new dependencies
369
413
=======================
370
414