File: osprofiler

package info (click to toggle)
python-osprofiler 1.2.0-2~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 460 kB
  • sloc: python: 2,546; makefile: 196; sh: 43
file content (84 lines) | stat: -rw-r--r-- 1,902 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# lib/rally
# Functions to control the configuration and operation of the **Rally**

# Dependencies:
#
# - ``functions`` file
# - ``DEST``, ``DATA_DIR``, ``STACK_USER`` must be defined

# ``stack.sh`` calls the entry points in this order:
#
# - install_osprofiler
# - configure_osprofiler
# - init_osprofiler

# Save trace setting
XTRACE=$(set +o | grep xtrace)
set +o xtrace


# Defaults
# --------

OLD_STYLE_CONF_FILES=(
    /etc/cinder/cinder.conf
    /etc/heat/heat.conf
)

NEW_STYLE_CONF_FILES=(
    /etc/keystone/keystone.conf
    /etc/nova/nova.conf
    /etc/neutron/neutron.conf
    /etc/glance/glance-api.conf
    /etc/glance/glance-registry.conf
    /etc/trove/trove.conf
    /etc/trove/trove-conductor.conf
    /etc/trove/trove-guestagent.conf
    /etc/trove/trove-taskmanager.conf
)

# This will update CEILOMETER_NOTIFICATION_TOPICS in ceilometer.conf file
export CEILOMETER_NOTIFICATION_TOPICS=notifications,profiler


# Functions
# ---------

# configure_osprofiler() - Nothing for now
function configure_osprofiler() {

    for conf in ${OLD_STYLE_CONF_FILES[@]}; do
        if [ -f $conf ]
        then
            iniset $conf profiler profiler_enabled True
            iniset $conf profiler trace_sqlalchemy True
            iniset $conf profiler hmac_keys SECRET_KEY
        fi
    done

    for conf in ${NEW_STYLE_CONF_FILES[@]}; do
        if [ -f $conf ]
        then
            iniset $conf profiler enabled True
            iniset $conf profiler trace_sqlalchemy True
            iniset $conf profiler hmac_keys SECRET_KEY
        fi
    done
    CEILOMETER_CONF=/etc/ceilometer/ceilometer.conf
    iniset $CEILOMETER_CONF event store_raw info
}


# init_rally() - Initialize databases, etc.
function init_osprofiler() {

    echo "Do nothing here for now"
}

# Restore xtrace
$XTRACE

# Tell emacs to use shell-script-mode
## Local variables:
## mode: shell-script
## End: