Merge "Support OSprofile usage"
This commit is contained in:
commit
dd11b3f5a4
@ -356,6 +356,7 @@ enable_neutron_bgp_dragent: "no"
|
||||
enable_nova_serialconsole_proxy: "no"
|
||||
enable_octavia: "no"
|
||||
enable_openvswitch: "{{ neutron_plugin_agent != 'linuxbridge' | bool }}"
|
||||
enable_osprofiler: "no"
|
||||
enable_panko: "no"
|
||||
enable_rally: "no"
|
||||
enable_sahara: "no"
|
||||
@ -393,7 +394,7 @@ enable_destroy_images: "no"
|
||||
elasticsearch_address: "{{ kolla_internal_vip_address }}"
|
||||
elasticsearch_protocol: "{{ internal_protocol }}"
|
||||
|
||||
enable_elasticsearch: "{{ 'yes' if enable_central_logging | bool or enable_freezer | bool else 'no' }}"
|
||||
enable_elasticsearch: "{{ 'yes' if enable_central_logging | bool or enable_freezer | bool or enable_osprofiler | bool else 'no' }}"
|
||||
enable_kibana: "{{ 'yes' if enable_central_logging | bool else 'no' }}"
|
||||
|
||||
####################
|
||||
|
@ -152,3 +152,13 @@ hnas_svc0_hdp = {{ hnas_nfs_svc0_hdp }}
|
||||
|
||||
[privsep_entrypoint]
|
||||
helper_command=sudo cinder-rootwrap /etc/cinder/rootwrap.conf privsep-helper --config-file /etc/cinder/cinder.conf
|
||||
|
||||
{% if enable_osprofiler | bool %}
|
||||
[profiler]
|
||||
enabled = true
|
||||
trace_sqlalchemy = true
|
||||
hmac_keys = {{ osprofiler_secret }}
|
||||
{% if enable_elasticsearch | bool %}
|
||||
connection_string = elasticsearch://{{ elasticsearch_address }}:{{ elasticsearch_port }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
@ -91,3 +91,13 @@ driver = messagingv2
|
||||
{% else %}
|
||||
driver = noop
|
||||
{% endif %}
|
||||
|
||||
{% if enable_osprofiler | bool %}
|
||||
[profiler]
|
||||
enabled = true
|
||||
trace_sqlalchemy = true
|
||||
hmac_keys = {{ osprofiler_secret }}
|
||||
{% if enable_elasticsearch | bool %}
|
||||
connection_string = elasticsearch://{{ elasticsearch_address }}:{{ elasticsearch_port }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
@ -50,3 +50,13 @@ driver = messagingv2
|
||||
{% else %}
|
||||
driver = noop
|
||||
{% endif %}
|
||||
|
||||
{% if enable_osprofiler | bool %}
|
||||
[profiler]
|
||||
enabled = true
|
||||
trace_sqlalchemy = true
|
||||
hmac_keys = {{ osprofiler_secret }}
|
||||
{% if enable_elasticsearch | bool %}
|
||||
connection_string = elasticsearch://{{ elasticsearch_address }}:{{ elasticsearch_port }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
@ -106,3 +106,13 @@ endpoint_type = publicURL
|
||||
[oslo_middleware]
|
||||
enable_proxy_headers_parsing = True
|
||||
{% endif %}
|
||||
|
||||
{% if enable_osprofiler | bool %}
|
||||
[profiler]
|
||||
enabled = true
|
||||
trace_sqlalchemy = true
|
||||
hmac_keys = {{ osprofiler_secret }}
|
||||
{% if enable_elasticsearch | bool %}
|
||||
connection_string = elasticsearch://{{ elasticsearch_address }}:{{ elasticsearch_port }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
@ -53,3 +53,13 @@ memcache_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansib
|
||||
[oslo_messaging_notifications]
|
||||
driver = messagingv2
|
||||
{% endif %}
|
||||
|
||||
{% if enable_osprofiler | bool %}
|
||||
[profiler]
|
||||
enabled = true
|
||||
trace_sqlalchemy = true
|
||||
hmac_keys = {{ osprofiler_secret }}
|
||||
{% if enable_elasticsearch | bool %}
|
||||
connection_string = elasticsearch://{{ elasticsearch_address }}:{{ elasticsearch_port }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
@ -76,3 +76,13 @@ topics = 'notifications'
|
||||
{% else %}
|
||||
driver = noop
|
||||
{% endif %}
|
||||
|
||||
{% if enable_osprofiler | bool %}
|
||||
[profiler]
|
||||
enabled = true
|
||||
trace_sqlalchemy = true
|
||||
hmac_keys = {{ osprofiler_secret }}
|
||||
{% if enable_elasticsearch | bool %}
|
||||
connection_string = elasticsearch://{{ elasticsearch_address }}:{{ elasticsearch_port }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
@ -40,3 +40,13 @@ url = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ mistral_api_port }}
|
||||
|
||||
[oslo_messaging_notifications]
|
||||
driver = noop
|
||||
|
||||
{% if enable_osprofiler | bool %}
|
||||
[profiler]
|
||||
enabled = true
|
||||
trace_sqlalchemy = true
|
||||
hmac_keys = {{ osprofiler_secret }}
|
||||
{% if enable_elasticsearch | bool %}
|
||||
connection_string = elasticsearch://{{ elasticsearch_address }}:{{ elasticsearch_port }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
@ -130,3 +130,13 @@ allow_reverse_dns_lookup = True
|
||||
ipv4_ptr_zone_prefix_size = 24
|
||||
ipv6_ptr_zone_prefix_size = 116
|
||||
{% endif %}
|
||||
|
||||
{% if enable_osprofiler | bool %}
|
||||
[profiler]
|
||||
enabled = true
|
||||
trace_sqlalchemy = true
|
||||
hmac_keys = {{ osprofiler_secret }}
|
||||
{% if enable_elasticsearch | bool %}
|
||||
connection_string = elasticsearch://{{ elasticsearch_address }}:{{ elasticsearch_port }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
@ -247,3 +247,13 @@ os_interface = internal
|
||||
{% if enable_ceilometer | bool or enable_searchlight | bool or enable_designate | bool %}
|
||||
notify_on_state_change = vm_and_task_state
|
||||
{% endif %}
|
||||
|
||||
{% if enable_osprofiler | bool %}
|
||||
[profiler]
|
||||
enabled = true
|
||||
trace_sqlalchemy = true
|
||||
hmac_keys = {{ osprofiler_secret }}
|
||||
{% if enable_elasticsearch | bool %}
|
||||
connection_string = elasticsearch://{{ elasticsearch_address }}:{{ elasticsearch_port }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
@ -102,3 +102,15 @@ enabled = {{ enable_neutron | bool }}
|
||||
|
||||
[resource_plugin:os_neutron_security_group]
|
||||
enabled = {{ enable_neutron | bool }}
|
||||
|
||||
{# TODO(blallau): enabling osprofiler when fixed in searchlight #}
|
||||
|
||||
{# {% if enable_osprofiler | bool %} #}
|
||||
{# [profiler] #}
|
||||
{# enabled = true #}
|
||||
{# trace_sqlalchemy = true #}
|
||||
{# hmac_keys = {{ osprofiler_secret }} #}
|
||||
{# {% if enable_elasticsearch | bool %} #}
|
||||
{# connection_string = elasticsearch://{{ elasticsearch_address }}:{{ elasticsearch_port }} #}
|
||||
{# {% endif %} #}
|
||||
{# {% endif %} #}
|
||||
|
@ -50,3 +50,13 @@ topics = 'notifications'
|
||||
{% else %}
|
||||
driver = noop
|
||||
{% endif %}
|
||||
|
||||
{% if enable_osprofiler | bool %}
|
||||
[profiler]
|
||||
enabled = true
|
||||
trace_sqlalchemy = true
|
||||
hmac_keys = {{ osprofiler_secret }}
|
||||
{% if enable_elasticsearch | bool %}
|
||||
connection_string = elasticsearch://{{ elasticsearch_address }}:{{ elasticsearch_port }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
@ -11,3 +11,13 @@ transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}
|
||||
[database]
|
||||
connection = mysql+pymysql://{{ trove_database_user }}:{{ trove_database_password }}@{{ trove_database_address }}/{{ trove_database_name }}
|
||||
max_retries = -1
|
||||
|
||||
{% if enable_osprofiler | bool %}
|
||||
[profiler]
|
||||
enabled = true
|
||||
trace_sqlalchemy = true
|
||||
hmac_keys = {{ osprofiler_secret }}
|
||||
{% if enable_elasticsearch | bool %}
|
||||
connection_string = elasticsearch://{{ elasticsearch_address }}:{{ elasticsearch_port }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
@ -32,3 +32,13 @@ topics = 'notifications'
|
||||
{% else %}
|
||||
driver = noop
|
||||
{% endif %}
|
||||
|
||||
{% if enable_osprofiler | bool %}
|
||||
[profiler]
|
||||
enabled = true
|
||||
trace_sqlalchemy = true
|
||||
hmac_keys = {{ osprofiler_secret }}
|
||||
{% if enable_elasticsearch | bool %}
|
||||
connection_string = elasticsearch://{{ elasticsearch_address }}:{{ elasticsearch_port }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
@ -43,3 +43,13 @@ topics = 'notifications'
|
||||
{% else %}
|
||||
driver = noop
|
||||
{% endif %}
|
||||
|
||||
{% if enable_osprofiler | bool %}
|
||||
[profiler]
|
||||
enabled = true
|
||||
trace_sqlalchemy = true
|
||||
hmac_keys = {{ osprofiler_secret }}
|
||||
{% if enable_elasticsearch | bool %}
|
||||
connection_string = elasticsearch://{{ elasticsearch_address }}:{{ elasticsearch_port }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
@ -53,7 +53,6 @@ memcache_security_strategy = ENCRYPT
|
||||
memcache_secret_key = {{ memcache_secret_key }}
|
||||
memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %}
|
||||
|
||||
|
||||
[glance_client]
|
||||
auth_uri = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_public_port }}
|
||||
auth_url = {{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_admin_port }}
|
||||
@ -66,3 +65,13 @@ password = {{ zun_keystone_password }}
|
||||
region_name = {{ openstack_region_name }}
|
||||
endpoint_type = internalURL
|
||||
api_version = 2
|
||||
{% if enable_osprofiler | bool %}
|
||||
|
||||
[profiler]
|
||||
enabled = true
|
||||
trace_sqlalchemy = true
|
||||
hmac_keys = {{ osprofiler_secret }}
|
||||
{% if enable_elasticsearch | bool %}
|
||||
connection_string = elasticsearch://{{ elasticsearch_address }}:{{ elasticsearch_port }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
@ -71,6 +71,7 @@ Services
|
||||
networking-guide
|
||||
kuryr-guide
|
||||
zun-guide
|
||||
osprofiler-guide
|
||||
|
||||
Developer Docs
|
||||
==============
|
||||
|
55
doc/osprofiler-guide.rst
Normal file
55
doc/osprofiler-guide.rst
Normal file
@ -0,0 +1,55 @@
|
||||
.. _osprofiler-guide:
|
||||
|
||||
===================
|
||||
OSprofiler in Kolla
|
||||
===================
|
||||
|
||||
Overview
|
||||
========
|
||||
OSProfiler provides a tiny but powerful library that is used by most
|
||||
(soon to be all) OpenStack projects and their corresponding python clients
|
||||
as well as the Openstack client.
|
||||
It provides functionality to generate 1 trace per request, that goes
|
||||
through all involved services. This trace can then be extracted and used
|
||||
to build a tree of calls which can be quite handy for a variety of reasons
|
||||
(for example in isolating cross-project performance issues).
|
||||
|
||||
Configuration on Kolla deployment
|
||||
---------------------------------
|
||||
|
||||
Enable OSprofiler in ``/etc/kolla/globals.yml``
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
enable_osprofiler: "yes"
|
||||
enable_elasticsearch: "yes"
|
||||
|
||||
Verify operation
|
||||
----------------
|
||||
|
||||
Retrieve ``osprofiler_secret`` key present at ``/etc/kolla/passwords.yml``.
|
||||
|
||||
Profiler UUIDs can be created executing OpenStack clients (Nova, Glance, Cinder, Heat, Keystone)
|
||||
with ``--profile`` option or using the official Openstack client with ``--os-profile``.
|
||||
In example to get the OSprofiler trace UUID for ``openstack server create``.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ openstack --os-profile <OSPROFILER_SECRET> \
|
||||
server create \
|
||||
--image cirros \
|
||||
--flavor m1.tiny \
|
||||
--key-name mykey \
|
||||
--nic net-id=${NETWORK_ID} \
|
||||
demo
|
||||
|
||||
|
||||
The previous command will output the command to retrieve OSprofiler trace.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ osprofiler trace show --html <TRACE_ID> --connection-string elasticsearch://<api_interface_address>:9200
|
||||
|
||||
For more information about how OSprofiler works, see
|
||||
`OSProfiler – Cross-project profiling library
|
||||
<https://docs.openstack.org/developer/osprofiler/>`__.
|
@ -180,6 +180,7 @@ kolla_internal_vip_address: "10.10.10.254"
|
||||
#enable_nova_serialconsole_proxy: "no"
|
||||
#enable_octavia: "no"
|
||||
#enable_openvswitch: "{{ neutron_plugin_agent != 'linuxbridge' | bool }}"
|
||||
#enable_osprofiler: "no"
|
||||
#enable_panko: "no"
|
||||
#enable_rally: "no"
|
||||
#enable_sahara: "no"
|
||||
|
@ -149,6 +149,9 @@ zun_keystone_password:
|
||||
|
||||
memcache_secret_key:
|
||||
|
||||
#HMAC secret key
|
||||
osprofiler_secret:
|
||||
|
||||
nova_ssh_key:
|
||||
private_key:
|
||||
public_key:
|
||||
|
@ -69,7 +69,8 @@ def main():
|
||||
blank_keys = ['docker_registry_password']
|
||||
|
||||
# HMAC-MD5 keys
|
||||
hmac_md5_keys = ['designate_rndc_key']
|
||||
hmac_md5_keys = ['designate_rndc_key',
|
||||
'osprofiler_secret']
|
||||
|
||||
# HMAC-SHA256 keys
|
||||
hmac_sha256_keys = ['barbican_crypto_key']
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Osprofiler support has been implemented in OpenStack services
|
Loading…
Reference in New Issue
Block a user