Adding BlockStorage Node type

BlockStoage Node type Updates
* Add functionality to generate_tripleo_hostfile.sh to capture BlockStorage
  Nodes
* Add BlockStoage Nodes to Grafana Dashboards (General Dashboard and Cloud-
  Specific Dashboards)

Change-Id: I2c219e1fea65c6268071ca03391a074f5671ef99
This commit is contained in:
akrzos 2017-01-16 15:33:22 -05:00
parent fb907124f2
commit fa150260e3
13 changed files with 296 additions and 37 deletions

View File

@ -27,6 +27,11 @@ if [ ${#controller_id} -lt 1 ]; then
echo "Error: Controller ID is not reporting correctly. Please see check the openstack-heat-api on the undercloud."
exit 1
fi
blockstorage_id=$(ssh -tt -o "UserKnownHostsFile /dev/null" -o "StrictHostKeyChecking no" stack@${tripleo_ip_address} ". ~/stackrc; openstack stack resource show overcloud BlockStorage > >(grep physical_resource_id) 2>/dev/null" | awk '{print $4}')
if [ ${#blockstorage_id} -lt 1 ]; then
echo "Error: BlockStorage ID is not reporting correctly. Please see check the openstack-heat-api on the undercloud."
exit 1
fi
objectstorage_id=$(ssh -tt -o "UserKnownHostsFile /dev/null" -o "StrictHostKeyChecking no" stack@${tripleo_ip_address} ". ~/stackrc; openstack stack resource show overcloud ObjectStorage > >(grep physical_resource_id) 2>/dev/null" | awk '{print $4}')
if [ ${#objectstorage_id} -lt 1 ]; then
echo "Error: ObjectStorage ID is not reporting correctly. Please see check the openstack-heat-api on the undercloud."
@ -48,6 +53,10 @@ if [ ${#controller_ids} -lt 1 ]; then
echo "Error: Controller IDs is not reporting correctly. Please see check the openstack-heat-api on the undercloud."
exit 1
fi
blockstorage_ids=$(ssh -tt -o "UserKnownHostsFile /dev/null" -o "StrictHostKeyChecking no" stack@${tripleo_ip_address} ". ~/stackrc; openstack stack resource list ${blockstorage_id} > >(grep -i blockstorage) 2>/dev/null" | awk '{print $2}')
if [ ${#blockstorage_ids} -lt 1 ]; then
echo "Info: No BlockStorage resources."
fi
objectstorage_ids=$(ssh -tt -o "UserKnownHostsFile /dev/null" -o "StrictHostKeyChecking no" stack@${tripleo_ip_address} ". ~/stackrc; openstack stack resource list ${objectstorage_id} > >(grep -i objectstorage) 2>/dev/null" | awk '{print $2}')
if [ ${#objectstorage_ids} -lt 1 ]; then
echo "Info: No ObjectStorage resources."
@ -72,6 +81,15 @@ do
controller_uuids+=$(ssh -tt -o "UserKnownHostsFile /dev/null" -o "StrictHostKeyChecking no" stack@${tripleo_ip_address} ". ~/stackrc; openstack stack resource show ${controller_id} ${controller} > >(grep -oP \"'nova_server_resource': u'([a-z0-9]+-[a-z0-9]+-[a-z0-9]+-[a-z0-9]+-[a-z0-9]+)'\") 2>/dev/null" | awk '{print $2}' | grep -oP [a-z0-9]+-[a-z0-9]+-[a-z0-9]+-[a-z0-9]+-[a-z0-9]+)
fi
done
blockstorage_uuids=()
for blockstorage in ${blockstorage_ids}
do
if [[ ${version_tripleo} -lt 2 ]] ; then
blockstorage_uuids+=$(ssh -tt -o "UserKnownHostsFile /dev/null" -o "StrictHostKeyChecking no" stack@${tripleo_ip_address} ". ~/stackrc; heat resource-show ${blockstorage_id} ${blockstorage} | grep -i nova_server_resource" | awk '{print $4}')
else
blockstorage_uuids+=$(ssh -tt -o "UserKnownHostsFile /dev/null" -o "StrictHostKeyChecking no" stack@${tripleo_ip_address} ". ~/stackrc; openstack stack resource show ${blockstorage_id} ${blockstorage} > >(grep -oP \"'nova_server_resource': u'([a-z0-9]+-[a-z0-9]+-[a-z0-9]+-[a-z0-9]+-[a-z0-9]+)'\") 2>/dev/null" | awk '{print $2}' | grep -oP [a-z0-9]+-[a-z0-9]+-[a-z0-9]+-[a-z0-9]+-[a-z0-9]+)
fi
done
objectstorage_uuids=()
for objectstorage in ${objectstorage_ids}
do
@ -130,7 +148,9 @@ echo " UserKnownHostsFile=/dev/null" | tee -a ${ssh_config_file}
compute_hn=()
controller_hn=()
ceph_hn=()
blockstorage_hn=()
objectstorage_hn=()
cephstorage_hn=()
IFS=$'\n'
for line in $nodes; do
uuid=$(echo $line | awk '{print $2}')
@ -138,6 +158,8 @@ for line in $nodes; do
IP=$(echo $line | awk '{print $12}' | cut -d "=" -f2)
if grep -q $uuid <<< {$controller_uuids}; then
controller_hn+=("$host")
elif grep -q $uuid <<< {$blockstorage_uuids}; then
blockstorage_hn+=("$host")
elif grep -q $uuid <<< {$objectstorage_uuids}; then
objectstorage_hn+=("$host")
elif grep -q $uuid <<< {$cephstorage_uuids}; then
@ -170,6 +192,13 @@ if [[ ${#controller_hn} -gt 0 ]]; then
echo "${ct}" | tee -a ${ansible_inventory_file}
done
fi
if [[ ${#blockstorage_hn} -gt 0 ]]; then
echo "" | tee -a ${ansible_inventory_file}
echo "[blockstorage]" | tee -a ${ansible_inventory_file}
for blockstorage in ${blockstorage_hn[@]}; do
echo "${blockstorage}" | tee -a ${ansible_inventory_file}
done
fi
if [[ ${#objectstorage_hn} -gt 0 ]]; then
echo "" | tee -a ${ansible_inventory_file}
echo "[objectstorage]" | tee -a ${ansible_inventory_file}

View File

@ -8,6 +8,7 @@
# Or use tags:
# ansible-playbook -i hosts install/collectd-openstack.yml --tag "undercloud"
# ansible-playbook -i hosts install/collectd-openstack.yml --tag "controller"
# ansible-playbook -i hosts install/collectd-openstack.yml --tag "blockstorage"
# ansible-playbook -i hosts install/collectd-openstack.yml --tag "objectstorage"
# ansible-playbook -i hosts install/collectd-openstack.yml --tag "cephstorage"
# ansible-playbook -i hosts install/collectd-openstack.yml --tag "compute"
@ -46,6 +47,22 @@
ignore_errors: true
tags: controller
- hosts: blockstorage
remote_user: "{{ host_remote_user }}"
vars:
config_type: blockstorage
roles:
- { role: common, when: collectd_blockstorage }
- { role: epel, when: collectd_blockstorage }
- { role: collectd-openstack, when: collectd_blockstorage }
tasks:
- name: Collectd off if not collectd_blockstorage
service: name=collectd state=stopped enabled=false
become: true
when: not collectd_blockstorage
ignore_errors: true
tags: blockstorage
- hosts: objectstorage
remote_user: "{{ host_remote_user }}"
vars:

View File

@ -29,6 +29,9 @@
- template_name: openstack
template_node_type: controller
process_list_name: OpenStack-Controller
- template_name: openstack
template_node_type: blockstorage
process_list_name: OpenStack-BlockStorage
- template_name: openstack
template_node_type: objectstorage
process_list_name: OpenStack-ObjectStorage

View File

@ -68,6 +68,7 @@ collectd_interval: 10
# Run collectd on specific openstack nodes:
collectd_undercloud: true
collectd_controller: true
collectd_blockstorage: true
collectd_objectstorage: true
collectd_cephstorage: true
collectd_compute: false

View File

@ -0,0 +1,139 @@
# Installed by Browbeat Ansible Installer
# Config type: {{config_type}}
# Interval default is 10s
Interval {{collectd_interval}}
# Hostname for this machine, if not defined, use gethostname(2) system call
Hostname "{{inventory_hostname}}"
# Loaded Plugins:
LoadPlugin "logfile"
<Plugin "logfile">
LogLevel "info"
File "/var/log/collectd.log"
Timestamp true
</Plugin>
LoadPlugin write_graphite
LoadPlugin cpu
LoadPlugin conntrack
LoadPlugin df
LoadPlugin disk
LoadPlugin exec
LoadPlugin interface
LoadPlugin irq
LoadPlugin load
LoadPlugin match_regex
LoadPlugin memory
LoadPlugin numa
LoadPlugin processes
LoadPlugin swap
LoadPlugin tail
LoadPlugin turbostat
LoadPlugin unixsock
LoadPlugin uptime
# Open unix domain socket for collectdctl
<Plugin unixsock>
SocketFile "/var/run/collectd-unixsock"
SocketGroup "collectd"
SocketPerms "0770"
DeleteSocket true
</Plugin>
PreCacheChain "PreCache"
<Chain "PreCache">
<Rule "ignore_tap">
<Match "regex">
Plugin "^interface$"
PluginInstance "^tap*"
</Match>
Target "stop"
</Rule>
<Rule "ignore_interfaces_q">
<Match "regex">
Plugin "^interface$"
PluginInstance "^q.*"
</Match>
Target "stop"
</Rule>
Target "return"
</Chain>
# Graphite Host Configuration
<Plugin write_graphite>
<Carbon>
Host "{{graphite_host}}"
Port "2003"
Prefix "{{graphite_prefix}}."
Protocol "tcp"
LogSendErrors true
StoreRates true
AlwaysAppendDS false
EscapeCharacter "_"
</Carbon>
</Plugin>
<Plugin df>
ValuesPercentage true
</Plugin>
<Plugin disk>
Disk "/^[hsv]d[a-z]+[0-9]?$/"
IgnoreSelected false
</Plugin>
# (akrzos) Including the version of OpenStack that the process was verified as running after
# OpenStack Installation with a comment at the end of each Process/ProcessMatch statement.
# A Minus before the version means the process was not found in that version. (Ex -9)
<Plugin processes>
# Collectd (Browbeat Installed)
ProcessMatch "collectd" "/usr/sbin/collectd"
# OVS (OpenStack Installed)
ProcessMatch "ovs-vswitchd" "ovs-vswitchd.+openvswitch" # 10
ProcessMatch "ovsdb-server" "ovsdb-server.+openvswitch" # 10
# Cinder (OpenStack Installed)
ProcessMatch "cinder-volume" "python.+cinder-volume" # 10
</Plugin>
<Plugin swap>
ReportBytes true
ValuesPercentage true
</Plugin>
# Tail plugin configuration
<Plugin "tail">
<File "/var/log/cinder/volume.log">
Instance "cinder-volume"
<Match>
Regex " ERROR "
DSType "CounterInc"
Type "counter"
Instance "error"
</Match>
{%if regex_warn %}
<Match>
Regex " WARNING "
DSType "CounterInc"
Type "counter"
Instance "warn"
</Match>
{% endif %}
{%if regex_info %}
<Match>
Regex " INFO "
DSType "CounterInc"
Type "counter"
Instance "info"
</Match>
{% endif %}
</File>
</Plugin>
# Include other collectd configuration files
Include "/etc/collectd.d"

View File

@ -1,5 +1,5 @@
{% set vars = {'panel_idx': 0, 'initial': 0} %}
{% set dashboard_groups = ['undercloud', 'controller', 'objectstorage', 'cephstorage', 'compute'] %}
{% set dashboard_groups = ['undercloud', 'controller', 'blockstorage', 'objectstorage', 'cephstorage', 'compute'] %}
{
"dashboard": {
"id": null,

View File

@ -1,5 +1,5 @@
{% set vars = {'panel_idx': 0, 'initial1': 0, 'initial2': 0, 'initial3': 0} %}
{% set dashboard_groups = ['undercloud', 'controller', 'objectstorage', 'cephstorage', 'compute'] %}
{% set dashboard_groups = ['undercloud', 'controller', 'blockstorage', 'objectstorage', 'cephstorage', 'compute'] %}
{
"dashboard": {
"id": null,
@ -398,6 +398,39 @@
"refresh": true,
"type": "query"
},
{
"allFormat": "glob",
"current": {
"text": "disk-sda",
"value": "disk-sda"
},
"datasource": null,
"includeAll": false,
"multi": false,
"multiFormat": "glob",
"name": "compute_disk",
"options": [],
"query": "{{dashboard_cloud_name}}.*compute*.disk-*",
"refresh": true,
"type": "query"
},
{
"allFormat": "glob",
"current": {
"text": "None",
"value": "",
"isNone": true
},
"datasource": null,
"includeAll": false,
"multi": false,
"multiFormat": "glob",
"name": "cephstorage_disk",
"options": [],
"query": "{{dashboard_cloud_name}}.*cephstorage*.disk-*",
"refresh": true,
"type": "query"
},
{
"allFormat": "glob",
"current": {
@ -426,25 +459,9 @@
"includeAll": false,
"multi": false,
"multiFormat": "glob",
"name": "cephstorage_disk",
"name": "blockstorage_disk",
"options": [],
"query": "{{dashboard_cloud_name}}.*cephstorage*.disk-*",
"refresh": true,
"type": "query"
},
{
"allFormat": "glob",
"current": {
"text": "disk-sda",
"value": "disk-sda"
},
"datasource": null,
"includeAll": false,
"multi": false,
"multiFormat": "glob",
"name": "compute_disk",
"options": [],
"query": "{{dashboard_cloud_name}}.*compute*.disk-*",
"query": "{{dashboard_cloud_name}}.*blockstorage*.disk-*",
"refresh": true,
"type": "query"
}

View File

@ -1,5 +1,5 @@
{% set vars = {'panel_idx': 0, 'initial1': 0, 'initial2': 0, 'initial3': 0} %}
{% set dashboard_groups = ['undercloud', 'controller', 'objectstorage', 'cephstorage', 'compute'] %}
{% set dashboard_groups = ['undercloud', 'controller', 'blockstorage', 'objectstorage', 'cephstorage', 'compute'] %}
{
"dashboard": {
"id": null,
@ -401,9 +401,9 @@
"includeAll": true,
"multi": true,
"multiFormat": "glob",
"name": "objectstorage_disk",
"name": "compute_disk",
"options": [],
"query": "{{dashboard_cloud_name}}.*objectstorage*.disk-*",
"query": "{{dashboard_cloud_name}}.*compute*.disk-*",
"refresh": true,
"type": "query",
"regex": "/disk-[a-z]*$/"
@ -435,9 +435,26 @@
"includeAll": true,
"multi": true,
"multiFormat": "glob",
"name": "compute_disk",
"name": "objectstorage_disk",
"options": [],
"query": "{{dashboard_cloud_name}}.*compute*.disk-*",
"query": "{{dashboard_cloud_name}}.*objectstorage*.disk-*",
"refresh": true,
"type": "query",
"regex": "/disk-[a-z]*$/"
},
{
"allFormat": "glob",
"current": {
"text": "all",
"value": "all"
},
"datasource": null,
"includeAll": true,
"multi": true,
"multiFormat": "glob",
"name": "blockstorage_disk",
"options": [],
"query": "{{dashboard_cloud_name}}.*blockstorage*.disk-*",
"refresh": true,
"type": "query",
"regex": "/disk-[a-z]*$/"

View File

@ -1,5 +1,5 @@
{% set vars = {'panel_idx': 0, 'initial': 0} %}
{% set dashboard_groups = ['undercloud', 'controller', 'objectstorage', 'cephstorage', 'compute'] %}
{% set dashboard_groups = ['undercloud', 'controller', 'blockstorage', 'objectstorage', 'cephstorage', 'compute'] %}
{
"dashboard": {
"id": null,

View File

@ -1,5 +1,5 @@
{% set vars = {'panel_idx': 0, 'initial': 0} %}
{% set dashboard_groups = ['undercloud', 'controller', 'objectstorage', 'cephstorage', 'compute'] %}
{% set dashboard_groups = ['undercloud', 'controller', 'blockstorage', 'objectstorage', 'cephstorage', 'compute'] %}
{
"dashboard": {
"id": null,

View File

@ -1,5 +1,5 @@
{% set vars = {'panel_idx': 0, 'initial': 0, 'initial2': 0} %}
{% set dashboard_groups = ['undercloud', 'controller', 'objectstorage', 'cephstorage', 'compute'] %}
{% set dashboard_groups = ['undercloud', 'controller', 'blockstorage', 'objectstorage', 'cephstorage', 'compute'] %}
{
"dashboard": {
"id": null,
@ -294,17 +294,16 @@
{
"allFormat": "glob",
"current": {
"text": "None",
"value": "",
"isNone": true
"text": "interface-br-ex",
"value": "interface-br-ex"
},
"datasource": null,
"includeAll": false,
"multi": false,
"multiFormat": "glob",
"name": "objectstorage_interface",
"name": "compute_interface",
"options": [],
"query": "{{dashboard_cloud_name}}.*objectstorage*.interface-*",
"query": "{{dashboard_cloud_name}}.*compute*.interface-*",
"refresh": true,
"type": "query"
},
@ -325,6 +324,23 @@
"refresh": true,
"type": "query"
},
{
"allFormat": "glob",
"current": {
"text": "None",
"value": "",
"isNone": true
},
"datasource": null,
"includeAll": false,
"multi": false,
"multiFormat": "glob",
"name": "objectstorage_interface",
"options": [],
"query": "{{dashboard_cloud_name}}.*objectstorage*.interface-*",
"refresh": true,
"type": "query"
},
{
"allFormat": "glob",
"current": {
@ -335,9 +351,9 @@
"includeAll": false,
"multi": false,
"multiFormat": "glob",
"name": "compute_interface",
"name": "blockstorage_interface",
"options": [],
"query": "{{dashboard_cloud_name}}.*compute*.interface-*",
"query": "{{dashboard_cloud_name}}.*blockstorage*.interface-*",
"refresh": true,
"type": "query"
}

View File

@ -4092,13 +4092,18 @@
"text": "objectstorage",
"value": "objectstorage"
},
{
"selected": false,
"text": "blockstorage",
"value": "blockstorage"
},
{
"selected": true,
"text": "*",
"value": "*"
}
],
"query": "undercloud,controller,objectstorage,cephstorage,compute,*",
"query": "undercloud,controller,blockstorage,objectstorage,cephstorage,compute,*",
"refresh": false,
"type": "custom"
},

View File

@ -242,6 +242,21 @@ per_process_panels:
processes:
- collectd
#
# This dashboard should only contain OpenStack BlockStorage Node processes
#
OpenStack-BlockStorage:
- name: "Cinder"
processes:
- cinder-volume
- name: "Open vSwitch"
processes:
- ovs-vswitchd
- ovsdb-server
- name: "Collectd"
processes:
- collectd
#
# This dashboard should only contain OpenStack ObjectStorage Node processes
#