You can use OSProfiler to enable tracing for the core services in your OpenStack deployment. Tracing captures the response time of all API, RPC, driver, and database calls that are part of an OpenStack operation.

VMware Integrated OpenStack supports the profiling of Cinder, Glance, Heat, Neutron, and Nova commands. Profiler trace data is stored in vRealize Log Insight.

Prerequisites

Deploy and configure vRealize Log Insight. See the Getting Started document for vRealize Log Insight.

Procedure

  1. Log in to the OpenStack Management Server as viouser.
  2. If your deployment is not using a custom.yml file, copy the template custom.yml file to the /opt/vmware/vio/custom directory.
    sudo mkdir -p /opt/vmware/vio/custom
    sudo cp /var/lib/vio/ansible/custom/custom.yml.sample /opt/vmware/vio/custom/custom.yml
  3. Open the /opt/vmware/vio/custom/custom.yml file in a text editor.
  4. Uncomment the os_profiler_enabled parameter and set its value to true.
  5. Uncomment the os_profiler_hmac_keys parameter and enter a password for OSProfiler.
  6. Uncomment the os_profiler_connection_string parameter and set its value to the location of your vRealize Log Insight server.

    Enter the vRealize Log Insight server address in the following format: "loginsight://username:password@loginsight-ip"

    Specify the user name and password of a user with the USER role on your vRealize Log Insight deployment.

  7. Deploy the updated configuration.
    sudo viocli deployment configure

    Deploying the configuration briefly interrupts OpenStack services.

  8. Log in to the controller node and set the OSPROFILER_CONNECTION_STRING environment variable to the vRealize Log Insight server address that you specified in the custom.yml file.
    export OSPROFILER_CONNECTION_STRING="loginsight://username:password@loginsight-ip"

Results

You can now enable profiling on OpenStack commands. Run the desired command with the --profile parameter and specify your OSProfiler password. The command outputs a profiling trace UUID. Run OSProfiler with that UUID to generate a report. The following example profiles the cinder list command:

cinder --profile osprofiler-password list
osprofiler trace show --html profiling-uuid