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. You can store profiler trace data with Ceilometer or vRealize Log Insight.

Prerequisites

  • If you want to use Ceilometer to store trace data, enable Ceilometer. See Enable the Ceilometer Component.

  • If you want to use vRealize Log Insight to store trace data, 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. Uncomment the os_profiler_enabled parameter and set its value to true.
  4. Uncomment the os_profiler_hmac_keys parameter and enter a password for OSProfiler.
  5. If you are using vRealize Log Insight, 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.

  6. Deploy the updated configuration.
    sudo viocli deployment configure

    Deploying the configuration briefly interrupts OpenStack services.

  7. If you are using vRealize Log Insight, log in to the controller node and set the OSPROFILER_CONNECTION_STRING environment variable to the vRealize Log Insight server address that you used in Step 5.
    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. For example:

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