This patch does the following: * Adds osprofiler wsgi middleware This middleware is used for 2 things: - It checks that person who wants to trace is trusted and knows secret HMAC key. - It starts tracing in case of proper trace headers and adds first wsgi trace point, with info about HTTP request. * Adds initialization of osprofiler at start of service - Initialize and set an oslo.messaging based notifier instance to osprofiler, which will be used to send notifications to Ceilometer. * Traces HTTP/RPC/DB API calls and SQL requests NOTE to test this patch: 1) Make the following changes in localrc to configure DevStack to enable OSProfiler: enable_plugin panko https://git.openstack.org/openstack/panko enable_plugin ceilometer https://git.openstack.org/openstack/ceilometer enable_plugin osprofiler https://git.openstack.org/openstack/osprofiler # Enable the following services CEILOMETER_NOTIFICATION_TOPICS=notifications,profiler ENABLED_SERVICES+=,ceilometer-acompute,ceilometer-acentral ENABLED_SERVICES+=,ceilometer-anotification,ceilometer-collector ENABLED_SERVICES+=,ceilometer-alarm-evaluator,ceilometer-alarm-notifier ENABLED_SERVICES+=,ceilometer-api NOTE: the order of enabling plugins matters. 2) Run stack.sh. Once DevStack environment is setup, enable profiler options in ironic.conf and restart ironic services: [profiler] enabled = true hmac_keys = SECRET_KEY trace_sqlalchemy = true 3) Use openstackclient and run baremetal command with --os-profile SECRET_KEY [--profile can be used, but it is deprecated.] For example, the following will cause the <trace-id> to be printed after node list: $ openstack --os-profile SECRET_KEY baremetal node list ..... ..... Trace ID: <trace-id> Display trace with command: osprofiler trace show --html <trace-id> 4) The trace results can be saved using this command: $ osprofiler trace show --html <trace-id> --out trace.html OSprofiler spec: https://review.openstack.org/#/c/103825/ Co-Authored-By: Tovin Seven <vinhnt@vn.fujitsu.com> Co-Authored-By: Hieu LE <hieulq@vn.fujitsu.com> Partial-Bug: #1560704 Change-Id: Icd3d7c62cf7442de8a77fc67f119ae9b03725f02
2.7 KiB
Developer's Guide
Getting Started
If you are new to ironic, this section contains information that should help you get started as a developer working on the project or contributing to the project.
Developer Contribution Guide <code-contribution-guide> Setting Up Your Development Environment <dev-quickstart> Frequently Asked Questions <faq>
The following pages describe the architecture of the Bare Metal service and may be helpful to anyone working on or with the service, but are written primarily for developers.
Ironic System Architecture <architecture> Provisioning State Machine <states> Developing New Notifications <notifications> OSProfiler Tracing <osprofiler-support>
These pages contain information for PTLs, cross-project liaisons, and core reviewers.
Releasing Ironic Projects <releasing> Ironic Governance Structure <governance>
Writing Drivers
Ironic's community includes many hardware vendors who contribute drivers that enable more advanced functionality when Ironic is used in conjunction with that hardware. To do this, the Ironic developer community is committed to standardizing on a Python Driver API that meets the common needs of all hardware vendors, and evolving this API without breaking backwards compatibility. However, it is sometimes necessary for driver authors to implement functionality - and expose it through the REST API - that can not be done through any existing API.
To facilitate that, we also provide the means for API calls to be "passed through" ironic and directly to the driver. Some guidelines on how to implement this are provided below. Driver authors are strongly encouraged to talk with the developer community about any implementation using this functionality.
Driver Overview <drivers> Driver Base Class Definition <api/ironic.drivers.base> Writing "vendor_passthru" methods <vendor-passthru> Third party continuous integration testing <third-party-ci>
Testing Network Integration
In order to test the integration between the Bare Metal and Networking services, support has been added to devstack to mimic an external physical switch. Here we include a recommended configuration for devstack to bring up this environment.
Configuring Devstack for multitenant network testing <ironic-multitenant-networking>
Full Ironic Server Python API Reference
modindex
api/autoindex