Remove connmon
Unfortunately connmon hasn't been used in a while and isn't well tested on latest releases, thus ideally in order to prevent any more cruft issues, lets remove it for now and if it becomes relevant again we can add it back in. Change-Id: I0759d164621f3aac1c36dbe1fac49acd7dde97e3
This commit is contained in:
parent
b56d9c18e4
commit
4052a93f50
@ -15,7 +15,7 @@ Ansible for Browbeat
|
||||
Currently we support Ansible 1.9.4 within browbeat-venv and Ansible 2.0+ for installation.
|
||||
|
||||
Playbooks for:
|
||||
* Installing Browbeat, collectd, connmon, ELK stack and clients, graphite, grafana, and grafana dashboards
|
||||
* Installing Browbeat, collectd, ELK stack and clients, graphite, grafana, and grafana dashboards
|
||||
* Check overcloud for performance issues
|
||||
* Tune overcloud for performance (Experimental)
|
||||
* Adjust number of workers for cinder/keystone/neutron/nova
|
||||
@ -90,15 +90,6 @@ To Install Kibana Visuals
|
||||
|
||||
# ansible-playbook -i hosts install/kibana-visuals.yml
|
||||
|
||||
Install Connmon
|
||||
'''''''''''''''
|
||||
|
||||
Requires Ansible 2.0
|
||||
|
||||
::
|
||||
|
||||
# ansible-playbook -i hosts install/connmon.yml
|
||||
|
||||
Install Generic ELK Stack
|
||||
'''''''''''''''''''''''''
|
||||
Listening ports and other options can be changed in ``install/group_vars/all.yml``
|
||||
@ -290,4 +281,3 @@ To switch to UUID tokens:
|
||||
::
|
||||
|
||||
# ansible-playbook -i hosts browbeat/adjustment-keystone-token.yml -e "token_provider=uuid"
|
||||
|
||||
|
@ -1,25 +0,0 @@
|
||||
---
|
||||
#
|
||||
# Playbook to install connmon on undercloud/overcloud
|
||||
#
|
||||
|
||||
- hosts: undercloud
|
||||
remote_user: "{{ local_remote_user }}"
|
||||
vars:
|
||||
undercloud: true
|
||||
roles:
|
||||
- common
|
||||
- connmon
|
||||
|
||||
- hosts: controller
|
||||
remote_user: "{{ host_remote_user }}"
|
||||
vars:
|
||||
undercloud: false
|
||||
roles:
|
||||
- common
|
||||
- connmon
|
||||
- nova
|
||||
- neutron
|
||||
- keystone
|
||||
- cinder
|
||||
- heat
|
@ -121,9 +121,6 @@ repos: {}
|
||||
# rhel-7-server-beta:
|
||||
# baseurl: http://walkabout.foobar.com/released/RHEL-7/7.3-Beta/Server/x86_64/os/
|
||||
|
||||
# Host where connmond will be running
|
||||
connmon_host: 192.0.2.1
|
||||
|
||||
########################################
|
||||
# Collectd Configuration
|
||||
########################################
|
||||
@ -341,13 +338,6 @@ shaker_port: 5555
|
||||
shaker_image: centos7
|
||||
shaker_region: regionOne
|
||||
|
||||
|
||||
#######################################
|
||||
# Connman Configuration
|
||||
#######################################
|
||||
# Port for Connman
|
||||
connmon_port: 5800
|
||||
|
||||
########################################
|
||||
# ELK Server Variables
|
||||
########################################
|
||||
|
@ -1,39 +0,0 @@
|
||||
---
|
||||
#
|
||||
# Cinder handlers for browbeat install connmon
|
||||
#
|
||||
|
||||
- name: unmanage cinder services
|
||||
command: pcs resource unmanage {{ item }}
|
||||
become: true
|
||||
with_items:
|
||||
- openstack-cinder-api
|
||||
- openstack-cinder-scheduler
|
||||
- openstack-cinder-volume
|
||||
ignore_errors: true
|
||||
|
||||
- name: restart cinder services
|
||||
service: name={{ item }} state=restarted
|
||||
become: true
|
||||
with_items:
|
||||
- openstack-cinder-api
|
||||
- openstack-cinder-scheduler
|
||||
- openstack-cinder-volume
|
||||
|
||||
- name: manage cinder services
|
||||
command: pcs resource manage {{ item }}
|
||||
become: true
|
||||
with_items:
|
||||
- openstack-cinder-api
|
||||
- openstack-cinder-scheduler
|
||||
- openstack-cinder-volume
|
||||
ignore_errors: true
|
||||
|
||||
- name: cleanup cinder services
|
||||
command: pcs resource cleanup {{ item }}
|
||||
become: true
|
||||
with_items:
|
||||
- openstack-cinder-api
|
||||
- openstack-cinder-scheduler
|
||||
- openstack-cinder-volume
|
||||
ignore_errors: true
|
@ -1,21 +0,0 @@
|
||||
---
|
||||
#
|
||||
# Cinder connmon tasks
|
||||
#
|
||||
|
||||
- name: Check for connmon in cinder.conf
|
||||
command: grep -Eq 'connection\s?=\s?mysql:' /etc/cinder/cinder.conf
|
||||
register: cinder_mysql
|
||||
become: true
|
||||
ignore_errors: true
|
||||
changed_when: false
|
||||
|
||||
- name: Enable Connmon in cinder.conf
|
||||
command: sed -i 's/mysql:/mysql+connmon:/g' /etc/cinder/cinder.conf
|
||||
when: cinder_mysql.rc == 0
|
||||
become: true
|
||||
notify:
|
||||
- unmanage cinder services
|
||||
- restart cinder services
|
||||
- manage cinder services
|
||||
- cleanup cinder services
|
@ -1,115 +0,0 @@
|
||||
---
|
||||
#
|
||||
# Connmon Install
|
||||
#
|
||||
|
||||
- name: Install pip
|
||||
easy_install: name=pip
|
||||
become: true
|
||||
|
||||
- name: Install connmon
|
||||
pip: name=connmon
|
||||
become: true
|
||||
|
||||
#
|
||||
# Connmon Setup
|
||||
#
|
||||
|
||||
- name: Configure Connmon Host IP Address
|
||||
template:
|
||||
src: connmon.cfg.j2
|
||||
dest: /etc/connmon.cfg
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
become: true
|
||||
|
||||
- name: Install Screen for connmon
|
||||
yum: name=screen state=present
|
||||
become: true
|
||||
when: undercloud
|
||||
|
||||
# To remove the screen session: screen -X -S connmond kill
|
||||
- name: Run connmond in screen session on undercloud
|
||||
command: screen -d -S connmond -m connmond
|
||||
when: undercloud
|
||||
changed_when: false
|
||||
|
||||
### begin firewall ###
|
||||
# we need TCP/5555 open
|
||||
# determine firewall status and take action
|
||||
# 1) use firewall-cmd if firewalld is utilized
|
||||
# 2) insert iptables rule if iptables is used
|
||||
|
||||
# Firewalld
|
||||
- name: (connmon) Determine if firewalld is in use
|
||||
shell: systemctl is-enabled firewalld.service | egrep -qv 'masked|disabled'
|
||||
ignore_errors: true
|
||||
register: firewalld_in_use
|
||||
no_log: true
|
||||
tags:
|
||||
# Skip ANSIBLE0012 Commands should not change things if nothing needs doing
|
||||
# Need to check if firewall is in use
|
||||
- skip_ansible_lint
|
||||
|
||||
- name: (connmon) Determine if firewalld is active
|
||||
shell: systemctl is-active firewalld.service | grep -vq inactive
|
||||
ignore_errors: true
|
||||
register: firewalld_is_active
|
||||
no_log: true
|
||||
tags:
|
||||
# Skip ANSIBLE0012 Commands should not change things if nothing needs doing
|
||||
# Need to check if firewall is active
|
||||
- skip_ansible_lint
|
||||
|
||||
- name: (connmon) Determine if TCP/{{connmon_port}} is already active
|
||||
shell: firewall-cmd --list-ports | egrep -q "^{{connmon_port}}/tcp"
|
||||
ignore_errors: true
|
||||
register: firewalld_connmon_port_exists
|
||||
no_log: true
|
||||
tags:
|
||||
# Skip ANSIBLE0012 Commands should not change things if nothing needs doing
|
||||
# Need to check if port is already active
|
||||
- skip_ansible_lint
|
||||
|
||||
# add firewall rule via firewall-cmd
|
||||
- name: (connmon) Add firewall rule for TCP/{{connmon_port}} (firewalld)
|
||||
command: "{{ item }}"
|
||||
with_items:
|
||||
- firewall-cmd --zone=public --add-port={{connmon_port}}/tcp --permanent
|
||||
- firewall-cmd --reload
|
||||
ignore_errors: true
|
||||
become: true
|
||||
when: firewalld_in_use.rc == 0 and firewalld_is_active.rc == 0 and firewalld_connmon_port_exists.rc != 0
|
||||
|
||||
# iptables-services
|
||||
- name: (connmon) check firewall rules for TCP/{{connmon_port}} (iptables-services)
|
||||
shell: grep "dport {{connmon_port}} \-j ACCEPT" /etc/sysconfig/iptables | wc -l
|
||||
ignore_errors: true
|
||||
become: true
|
||||
register: iptables_connmon_port_exists
|
||||
failed_when: iptables_connmon_port_exists == 127
|
||||
no_log: true
|
||||
tags:
|
||||
# Skip ANSIBLE0012 Commands should not change things if nothing needs doing
|
||||
# Need to check if port is already active
|
||||
- skip_ansible_lint
|
||||
|
||||
- name: (connmon) Add firewall rule for TCP/{{connmon_port}} (iptables-services)
|
||||
lineinfile:
|
||||
dest: /etc/sysconfig/iptables
|
||||
line: '-A INPUT -p tcp -m tcp --dport {{connmon_port}} -j ACCEPT'
|
||||
regexp: '^INPUT -i lo -j ACCEPT'
|
||||
insertbefore: '-A INPUT -i lo -j ACCEPT'
|
||||
backup: yes
|
||||
become: true
|
||||
when: firewalld_in_use.rc != 0 and firewalld_is_active.rc != 0 and iptables_connmon_port_exists.stdout|int == 0
|
||||
register: iptables_needs_restart
|
||||
|
||||
- name: (connmon) Restart iptables-services for TCP/{{connmon_port}} (iptables-services)
|
||||
command: systemctl restart iptables.service
|
||||
ignore_errors: true
|
||||
become: true
|
||||
when: iptables_needs_restart != 0 and firewalld_in_use.rc != 0 and firewalld_is_active.rc != 0
|
||||
|
||||
### end firewall ###
|
@ -1,5 +0,0 @@
|
||||
[connmon_service_default]
|
||||
name: default
|
||||
csv_dump: /tmp/connmon_results.csv
|
||||
nodes:
|
||||
node1 hostname={{ connmon_host }}:5800 bind=0.0.0.0
|
@ -1,35 +0,0 @@
|
||||
---
|
||||
#
|
||||
## Heat handlers for browbeat install connmon
|
||||
##
|
||||
#
|
||||
- name: unmanage heat services
|
||||
command: pcs resource unmanage {{ item }}
|
||||
become: true
|
||||
with_items:
|
||||
- openstack-heat-api
|
||||
- openstack-heat-engine
|
||||
ignore_errors: true
|
||||
|
||||
- name: restart heat services
|
||||
service: name={{ item }} state=restarted
|
||||
become: true
|
||||
with_items:
|
||||
- openstack-heat-api
|
||||
- openstack-heat-engine
|
||||
|
||||
- name: manage heat services
|
||||
command: pcs resource manage {{ item }}
|
||||
become: true
|
||||
with_items:
|
||||
- openstack-heat-api
|
||||
- openstack-heat-engine
|
||||
ignore_errors: true
|
||||
|
||||
- name: cleanup heat services
|
||||
command: pcs resource cleanup {{ item }}
|
||||
become: true
|
||||
with_items:
|
||||
- openstack-heat-api
|
||||
- openstack-heat-engine
|
||||
ignore_errors: true
|
@ -1,20 +0,0 @@
|
||||
#
|
||||
## Heat connmon tasks
|
||||
##
|
||||
#
|
||||
- name: Check for connmon in heat.conf
|
||||
command: grep -Eq 'connection\s?=\s?mysql:' /etc/heat/heat.conf
|
||||
register: heat_mysql
|
||||
become: true
|
||||
ignore_errors: true
|
||||
changed_when: false
|
||||
|
||||
- name: Enable Connmon in heat.conf
|
||||
command: sed -i 's/mysql:/mysql+connmon:/g' /etc/heat/heat.conf
|
||||
when: heat_mysql.rc == 0
|
||||
become: true
|
||||
notify:
|
||||
- unmanage heat services
|
||||
- restart heat services
|
||||
- manage heat services
|
||||
- cleanup heat services
|
@ -1,40 +0,0 @@
|
||||
---
|
||||
#
|
||||
# Keystone handlers for browbeat install connmon
|
||||
#
|
||||
|
||||
#
|
||||
# Restart keystone when in httpd
|
||||
#
|
||||
|
||||
- name: restart httpd
|
||||
service: name=httpd state=restarted
|
||||
when: "'httpd' == '{{ keystone_deployment }}'"
|
||||
become: true
|
||||
|
||||
#
|
||||
# Restart keystone when in eventlet
|
||||
#
|
||||
|
||||
- name: unmanage keystone
|
||||
command: pcs resource unmanage openstack-keystone
|
||||
when: "'eventlet' == '{{ keystone_deployment }}'"
|
||||
become: true
|
||||
ignore_errors: true
|
||||
|
||||
- name: restart keystone
|
||||
service: name=openstack-keystone state=restarted
|
||||
when: "'eventlet' == '{{ keystone_deployment }}'"
|
||||
become: true
|
||||
|
||||
- name: manage keystone
|
||||
command: pcs resource manage openstack-keystone
|
||||
when: "'eventlet' == '{{ keystone_deployment }}'"
|
||||
become: true
|
||||
ignore_errors: true
|
||||
|
||||
- name: cleanup keystone
|
||||
command: pcs resource cleanup openstack-keystone
|
||||
when: "'eventlet' == '{{ keystone_deployment }}'"
|
||||
become: true
|
||||
ignore_errors: true
|
@ -1,40 +0,0 @@
|
||||
---
|
||||
#
|
||||
# Keystone connmon tasks
|
||||
#
|
||||
|
||||
- name: Determine if keystone is deployed in eventlet
|
||||
command: ps afx | grep "[Kk]eystone-all" -c
|
||||
register: deployed
|
||||
ignore_errors: true
|
||||
changed_when: false
|
||||
|
||||
- name: Set keystone_deployment variable/fact to httpd
|
||||
set_fact: keystone_deployment='httpd'
|
||||
when: deployed.stdout|int == 0
|
||||
|
||||
- name: Set keystone_deployment variable/fact to eventlet
|
||||
set_fact: keystone_deployment='eventlet'
|
||||
when: deployed.stdout|int > 0
|
||||
|
||||
#
|
||||
# Configure connmon in keystone.conf
|
||||
#
|
||||
|
||||
- name: Check for connmon in keystone.conf
|
||||
command: grep -Eq 'connection\s?=\s?mysql:' /etc/keystone/keystone.conf
|
||||
register: keystone_mysql
|
||||
become: true
|
||||
ignore_errors: true
|
||||
changed_when: false
|
||||
|
||||
- name: Enable connmon in keystone.conf
|
||||
command: sed -i 's/mysql:/mysql+connmon:/g' /etc/keystone/keystone.conf
|
||||
when: keystone_mysql.rc == 0
|
||||
become: true
|
||||
notify:
|
||||
- restart httpd
|
||||
- unmanage keystone
|
||||
- restart keystone
|
||||
- manage keystone
|
||||
- cleanup keystone
|
@ -1,23 +0,0 @@
|
||||
---
|
||||
#
|
||||
# Neutron handlers for browbeat install connmon
|
||||
#
|
||||
|
||||
- name: unmanage neutron-server
|
||||
command: pcs resource unmanage neutron-server
|
||||
become: true
|
||||
ignore_errors: true
|
||||
|
||||
- name: restart neutron-server
|
||||
service: name=neutron-server state=restarted
|
||||
become: true
|
||||
|
||||
- name: manage neutron-server
|
||||
command: pcs resource manage neutron-server
|
||||
become: true
|
||||
ignore_errors: true
|
||||
|
||||
- name: cleanup neutron-server
|
||||
command: pcs resource cleanup neutron-server
|
||||
become: true
|
||||
ignore_errors: true
|
@ -1,21 +0,0 @@
|
||||
---
|
||||
#
|
||||
# Neutron connmon tasks
|
||||
#
|
||||
|
||||
- name: Check for connmon in neutron.conf
|
||||
command: grep -Eq 'connection\s?=\s?mysql:' /etc/neutron/neutron.conf
|
||||
register: neutron_mysql
|
||||
become: true
|
||||
ignore_errors: true
|
||||
changed_when: false
|
||||
|
||||
- name: Enable Connmon in neutron.conf
|
||||
command: sed -i 's/mysql:/mysql+connmon:/g' /etc/neutron/neutron.conf
|
||||
when: neutron_mysql.rc == 0
|
||||
become: true
|
||||
notify:
|
||||
- unmanage neutron-server
|
||||
- restart neutron-server
|
||||
- manage neutron-server
|
||||
- cleanup neutron-server
|
@ -1,39 +0,0 @@
|
||||
---
|
||||
#
|
||||
# Nova handlers for browbeat install connmon
|
||||
#
|
||||
|
||||
- name: unmanage nova services
|
||||
command: pcs resource unmanage {{ item }}
|
||||
become: true
|
||||
with_items:
|
||||
- openstack-nova-api
|
||||
- openstack-nova-scheduler
|
||||
- openstack-nova-conductor
|
||||
ignore_errors: true
|
||||
|
||||
- name: restart nova services
|
||||
service: name={{ item }} state=restarted
|
||||
become: true
|
||||
with_items:
|
||||
- openstack-nova-api
|
||||
- openstack-nova-scheduler
|
||||
- openstack-nova-conductor
|
||||
|
||||
- name: manage nova services
|
||||
command: pcs resource manage {{ item }}
|
||||
become: true
|
||||
with_items:
|
||||
- openstack-nova-api
|
||||
- openstack-nova-scheduler
|
||||
- openstack-nova-conductor
|
||||
ignore_errors: true
|
||||
|
||||
- name: cleanup nova services
|
||||
command: pcs resource cleanup {{ item }}
|
||||
become: true
|
||||
with_items:
|
||||
- openstack-nova-api
|
||||
- openstack-nova-scheduler
|
||||
- openstack-nova-conductor
|
||||
ignore_errors: true
|
@ -1,21 +0,0 @@
|
||||
---
|
||||
#
|
||||
# Nova connmon tasks
|
||||
#
|
||||
|
||||
- name: Check for connmon in nova.conf
|
||||
command: grep -Eq 'connection\s?=\s?mysql:' /etc/nova/nova.conf
|
||||
register: nova_mysql
|
||||
become: true
|
||||
ignore_errors: true
|
||||
changed_when: false
|
||||
|
||||
- name: Enable Connmon in nova.conf
|
||||
command: sed -i 's/mysql:/mysql+connmon:/g' /etc/nova/nova.conf
|
||||
when: nova_mysql.rc == 0
|
||||
become: true
|
||||
notify:
|
||||
- unmanage nova services
|
||||
- restart nova services
|
||||
- manage nova services
|
||||
- cleanup nova services
|
@ -25,9 +25,6 @@ ansible:
|
||||
nova_db: ansible/browbeat/adjustment-db.yml
|
||||
workers: ansible/browbeat/adjustment-workers.yml
|
||||
metadata: ansible/gather/site.yml
|
||||
connmon:
|
||||
enabled: {{ connmon_enabled }}
|
||||
sudo: true
|
||||
grafana:
|
||||
enabled: {{ grafana_enabled }}
|
||||
grafana_ip: {{ grafana_host }}
|
||||
|
@ -27,9 +27,6 @@ ansible:
|
||||
nova_db: ansible/browbeat/adjustment-db.yml
|
||||
workers: ansible/browbeat/adjustment-workers.yml
|
||||
metadata: ansible/gather/site.yml
|
||||
connmon:
|
||||
enabled: {{ connmon_enabled }}
|
||||
sudo: true
|
||||
grafana:
|
||||
enabled: {{ grafana_enabled }}
|
||||
grafana_ip: {{ grafana_host }}
|
||||
|
@ -27,9 +27,6 @@ ansible:
|
||||
nova_db: ansible/browbeat/adjustment-db.yml
|
||||
workers: ansible/browbeat/adjustment-workers.yml
|
||||
metadata: ansible/gather/site.yml
|
||||
connmon:
|
||||
enabled: {{ connmon_enabled }}
|
||||
sudo: true
|
||||
grafana:
|
||||
enabled: {{ grafana_enabled }}
|
||||
grafana_ip: {{ grafana_host }}
|
||||
|
@ -27,9 +27,6 @@ ansible:
|
||||
nova_db: ansible/browbeat/adjustment-db.yml
|
||||
workers: ansible/browbeat/adjustment-workers.yml
|
||||
metadata: ansible/gather/site.yml
|
||||
connmon:
|
||||
enabled: {{ connmon_enabled }}
|
||||
sudo: true
|
||||
grafana:
|
||||
enabled: {{ grafana_enabled }}
|
||||
grafana_ip: {{ grafana_host }}
|
||||
|
@ -1,6 +1,5 @@
|
||||
elastic_enabled: false
|
||||
elastic_host: "1.2.3.4.5"
|
||||
connmon_enabled: false
|
||||
grafana_enabled: false
|
||||
grafana_host: "1.2.3.4.5"
|
||||
browbeat_config_file: "browbeat-basic.yaml.j2"
|
||||
|
@ -26,9 +26,6 @@ ansible:
|
||||
nova_db: ansible/browbeat/adjustment-db.yml
|
||||
workers: ansible/browbeat/adjustment-workers.yml
|
||||
metadata: ansible/gather/site.yml
|
||||
connmon:
|
||||
enabled: false
|
||||
sudo: true
|
||||
grafana:
|
||||
enabled: true
|
||||
grafana_ip: 1.1.1.1
|
||||
|
@ -26,9 +26,6 @@ ansible:
|
||||
nova_db: ansible/browbeat/adjustment-db.yml
|
||||
workers: ansible/browbeat/adjustment-workers.yml
|
||||
metadata: ansible/gather/site.yml
|
||||
connmon:
|
||||
enabled: false
|
||||
sudo: true
|
||||
grafana:
|
||||
enabled: true
|
||||
grafana_ip: 1.1.1.1
|
||||
|
@ -1,73 +0,0 @@
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import tools
|
||||
import os
|
||||
import logging
|
||||
import shutil
|
||||
|
||||
|
||||
class Connmon(object):
|
||||
|
||||
def __init__(self, config):
|
||||
self.logger = logging.getLogger('browbeat.connmon')
|
||||
self.config = config
|
||||
self.tools = tools.Tools(self.config)
|
||||
return None
|
||||
|
||||
# Start connmond
|
||||
def start_connmon(self, retry=None):
|
||||
self.stop_connmon()
|
||||
tool = "connmond"
|
||||
connmond = self.tools.find_cmd(tool)
|
||||
if not connmond:
|
||||
self.logger.error("Unable to find {}".format(tool))
|
||||
as_sudo = self.config['connmon']['sudo']
|
||||
cmd = ""
|
||||
if as_sudo:
|
||||
cmd += "sudo "
|
||||
cmd += "screen -X -S connmond kill"
|
||||
self.tools.run_cmd(cmd)
|
||||
self.logger.info("Starting connmond")
|
||||
cmd = ""
|
||||
cmd += "{} --config /etc/connmon.cfg > /tmp/connmond 2>&1 &".format(
|
||||
connmond)
|
||||
self.tools.run_cmd(cmd)
|
||||
if self.check_connmon_results is False:
|
||||
if retry is None:
|
||||
self.start_connmon(retry=True)
|
||||
else:
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
def check_connmon_results(self, result_file='/tmp/connmon_results.csv'):
|
||||
return os.path.isfile(result_file)
|
||||
|
||||
# Stop connmond
|
||||
def stop_connmon(self):
|
||||
self.logger.info("Stopping connmond")
|
||||
return self.tools.run_cmd("pkill -9 connmond")
|
||||
|
||||
# Create Connmon graphs
|
||||
def connmon_graphs(self, result_dir, test_name):
|
||||
cmd = "python graphing/connmonplot.py {}/connmon/{}.csv".format(result_dir,
|
||||
test_name)
|
||||
return self.tools.run_cmd(cmd)['stdout']
|
||||
|
||||
# Move connmon results
|
||||
def move_connmon_results(self, result_dir, test_name):
|
||||
path = "%s/connmon" % result_dir
|
||||
if not os.path.exists(path):
|
||||
os.mkdir(path)
|
||||
return shutil.move("/tmp/connmon_results.csv",
|
||||
"{}/connmon/{}.csv".format(result_dir, test_name))
|
@ -19,7 +19,6 @@ import shutil
|
||||
import subprocess
|
||||
import time
|
||||
|
||||
import connmon
|
||||
import elastic
|
||||
import grafana
|
||||
from path import get_overcloudrc
|
||||
@ -35,7 +34,6 @@ class PerfKit(workloadbase.WorkloadBase):
|
||||
self.config = config
|
||||
self.error_count = 0
|
||||
self.tools = tools.Tools(self.config)
|
||||
self.connmon = connmon.Connmon(self.config)
|
||||
self.grafana = grafana.Grafana(self.config)
|
||||
self.elastic = elastic.Elastic(self.config, self.__class__.__name__.lower())
|
||||
self.test_count = 0
|
||||
@ -144,9 +142,6 @@ class PerfKit(workloadbase.WorkloadBase):
|
||||
if os.path.exists("/tmp/perfkitbenchmarker/runs/browbeat"):
|
||||
shutil.rmtree("/tmp/perfkitbenchmarker/runs/browbeat")
|
||||
|
||||
if self.config['connmon']['enabled']:
|
||||
self.connmon.start_connmon()
|
||||
|
||||
self.logger.info("Running Perfkit Command: {}".format(cmd))
|
||||
stdout_file = open("{}/pkb.stdout.log".format(result_dir), 'w')
|
||||
stderr_file = open("{}/pkb.stderr.log".format(result_dir), 'w')
|
||||
@ -160,16 +155,6 @@ class PerfKit(workloadbase.WorkloadBase):
|
||||
time.sleep(self.config['perfkit']['sleep_after'])
|
||||
to_ts = time.time()
|
||||
|
||||
# Stop connmon at end of perfkit task
|
||||
if self.config['connmon']['enabled']:
|
||||
self.connmon.stop_connmon()
|
||||
try:
|
||||
self.connmon.move_connmon_results(result_dir, test_name)
|
||||
self.connmon.connmon_graphs(result_dir, test_name)
|
||||
except Exception:
|
||||
self.logger.error(
|
||||
"Connmon Result data missing, Connmon never started")
|
||||
|
||||
# Determine success
|
||||
success = False
|
||||
try:
|
||||
|
@ -20,7 +20,6 @@ import re
|
||||
import shutil
|
||||
import time
|
||||
|
||||
import connmon
|
||||
import elastic
|
||||
import grafana
|
||||
from path import get_workload_venv
|
||||
@ -34,7 +33,6 @@ class Rally(workloadbase.WorkloadBase):
|
||||
self.logger = logging.getLogger('browbeat.rally')
|
||||
self.config = config
|
||||
self.tools = tools.Tools(self.config)
|
||||
self.connmon = connmon.Connmon(self.config)
|
||||
self.grafana = grafana.Grafana(self.config)
|
||||
self.elastic = elastic.Elastic(self.config, self.__class__.__name__.lower())
|
||||
self.error_count = 0
|
||||
@ -307,27 +305,10 @@ class Rally(workloadbase.WorkloadBase):
|
||||
"Failed to create result directory")
|
||||
exit(1)
|
||||
|
||||
# Start connmon before rally
|
||||
if self.config['connmon']['enabled']:
|
||||
self.connmon.start_connmon()
|
||||
|
||||
from_time, to_time = self.run_scenario(
|
||||
scenario_file, scenario, result_dir, test_name,
|
||||
benchmark['name'])
|
||||
|
||||
# Stop connmon at end of rally task
|
||||
if self.config['connmon']['enabled']:
|
||||
self.connmon.stop_connmon()
|
||||
try:
|
||||
self.connmon.move_connmon_results(
|
||||
result_dir, test_name)
|
||||
except Exception:
|
||||
self.logger.error(
|
||||
"Connmon Result data missing, \
|
||||
Connmon never started")
|
||||
return False
|
||||
self.connmon.connmon_graphs(
|
||||
result_dir, test_name)
|
||||
new_test_name = test_name.split('-')
|
||||
new_test_name = new_test_name[3:]
|
||||
new_test_name = "-".join(new_test_name)
|
||||
|
@ -74,14 +74,6 @@ mapping:
|
||||
type: str
|
||||
required: True
|
||||
|
||||
connmon:
|
||||
type: map
|
||||
allowempty: True
|
||||
mapping:
|
||||
enabled:
|
||||
type: bool
|
||||
required: True
|
||||
|
||||
grafana:
|
||||
required: True
|
||||
type: map
|
||||
|
@ -25,9 +25,6 @@ ansible:
|
||||
nova_db: ansible/browbeat/adjustment-db.yml
|
||||
workers: ansible/browbeat/adjustment-workers.yml
|
||||
metadata: ansible/gather/site.yml
|
||||
connmon:
|
||||
enabled: false
|
||||
sudo: true
|
||||
grafana:
|
||||
enabled: true
|
||||
grafana_ip: 1.1.1.1
|
||||
|
@ -26,9 +26,6 @@ ansible:
|
||||
nova_db: ansible/browbeat/adjustment-db.yml
|
||||
workers: ansible/browbeat/adjustment-workers.yml
|
||||
metadata: ansible/gather/site.yml
|
||||
connmon:
|
||||
enabled: false
|
||||
sudo: true
|
||||
grafana:
|
||||
enabled: true
|
||||
grafana_ip: 1.1.1.1
|
||||
|
@ -28,9 +28,6 @@ ansible:
|
||||
nova_db: ansible/browbeat/adjustment-db.yml
|
||||
workers: ansible/browbeat/adjustment-workers.yml
|
||||
metadata: ansible/gather/site.yml
|
||||
connmon:
|
||||
enabled: false
|
||||
sudo: true
|
||||
grafana:
|
||||
enabled: false
|
||||
grafana_ip: 1.1.1.1
|
||||
|
@ -28,9 +28,6 @@ ansible:
|
||||
nova_db: ansible/browbeat/adjustment-db.yml
|
||||
workers: ansible/browbeat/adjustment-workers.yml
|
||||
metadata: ansible/gather/site.yml
|
||||
connmon:
|
||||
enabled: false
|
||||
sudo: true
|
||||
grafana:
|
||||
enabled: false
|
||||
grafana_ip: 1.1.1.1
|
||||
|
@ -26,9 +26,6 @@ ansible:
|
||||
nova_db: ansible/browbeat/adjustment-db.yml
|
||||
workers: ansible/browbeat/adjustment-workers.yml
|
||||
metadata: ansible/gather/site.yml
|
||||
connmon:
|
||||
enabled: false
|
||||
sudo: true
|
||||
grafana:
|
||||
enabled: true
|
||||
grafana_ip: 1.1.1.1
|
||||
|
@ -26,9 +26,6 @@ ansible:
|
||||
nova_db: ansible/browbeat/adjustment-db.yml
|
||||
workers: ansible/browbeat/adjustment-workers.yml
|
||||
metadata: ansible/gather/site.yml
|
||||
connmon:
|
||||
enabled: false
|
||||
sudo: true
|
||||
grafana:
|
||||
enabled: false
|
||||
grafana_ip: 1.1.1.1
|
||||
|
@ -29,9 +29,6 @@ ansible:
|
||||
nova_db: ansible/browbeat/adjustment-db.yml
|
||||
workers: ansible/browbeat/adjustment-workers.yml
|
||||
metadata: ansible/gather/site.yml
|
||||
connmon:
|
||||
enabled: false
|
||||
sudo: true
|
||||
grafana:
|
||||
enabled: false
|
||||
grafana_ip: 1.1.1.1
|
||||
|
@ -27,9 +27,6 @@ ansible:
|
||||
nova_db: ansible/browbeat/adjustment-db.yml
|
||||
workers: ansible/browbeat/adjustment-workers.yml
|
||||
metadata: ansible/gather/site.yml
|
||||
connmon:
|
||||
enabled: false
|
||||
sudo: true
|
||||
grafana:
|
||||
enabled: true
|
||||
grafana_ip: 1.1.1.1
|
||||
|
@ -31,9 +31,6 @@ ansible:
|
||||
nova_db: ansible/browbeat/adjustment-db.yml
|
||||
workers: ansible/browbeat/adjustment-workers.yml
|
||||
metadata: ansible/gather/site.yml
|
||||
connmon:
|
||||
enabled: false
|
||||
sudo: true
|
||||
grafana:
|
||||
enabled: false
|
||||
grafana_ip: 1.1.1.1
|
||||
|
@ -33,9 +33,6 @@ ansible:
|
||||
nova_db: ansible/browbeat/adjustment-db.yml
|
||||
workers: ansible/browbeat/adjustment-workers.yml
|
||||
metadata: ansible/gather/site.yml
|
||||
connmon:
|
||||
enabled: false
|
||||
sudo: true
|
||||
grafana:
|
||||
enabled: false
|
||||
grafana_ip: 1.1.1.1
|
||||
|
@ -33,9 +33,6 @@ ansible:
|
||||
nova_db: ansible/browbeat/adjustment-db.yml
|
||||
workers: ansible/browbeat/adjustment-workers.yml
|
||||
metadata: ansible/gather/site.yml
|
||||
connmon:
|
||||
enabled: false
|
||||
sudo: true
|
||||
grafana:
|
||||
enabled: false
|
||||
grafana_ip: 1.1.1.1
|
||||
|
@ -33,9 +33,6 @@ ansible:
|
||||
nova_db: ansible/browbeat/adjustment-db.yml
|
||||
workers: ansible/browbeat/adjustment-workers.yml
|
||||
metadata: ansible/gather/site.yml
|
||||
connmon:
|
||||
enabled: false
|
||||
sudo: true
|
||||
grafana:
|
||||
enabled: false
|
||||
grafana_ip: 1.1.1.1
|
||||
|
@ -33,9 +33,6 @@ ansible:
|
||||
nova_db: ansible/browbeat/adjustment-db.yml
|
||||
workers: ansible/browbeat/adjustment-workers.yml
|
||||
metadata: ansible/gather/site.yml
|
||||
connmon:
|
||||
enabled: false
|
||||
sudo: true
|
||||
grafana:
|
||||
enabled: false
|
||||
grafana_ip: 1.1.1.1
|
||||
|
@ -30,9 +30,6 @@ ansible:
|
||||
nova_db: ansible/browbeat/adjustment-db.yml
|
||||
workers: ansible/browbeat/adjustment-workers.yml
|
||||
metadata: ansible/gather/site.yml
|
||||
connmon:
|
||||
enabled: false
|
||||
sudo: true
|
||||
grafana:
|
||||
enabled: false
|
||||
grafana_ip: 1.1.1.1
|
||||
|
@ -30,9 +30,6 @@ ansible:
|
||||
nova_db: ansible/browbeat/adjustment-db.yml
|
||||
workers: ansible/browbeat/adjustment-workers.yml
|
||||
metadata: ansible/gather/site.yml
|
||||
connmon:
|
||||
enabled: false
|
||||
sudo: true
|
||||
grafana:
|
||||
enabled: false
|
||||
grafana_ip: 1.1.1.1
|
||||
|
@ -29,9 +29,6 @@ ansible:
|
||||
nova_db: ansible/browbeat/adjustment-db.yml
|
||||
workers: ansible/browbeat/adjustment-workers.yml
|
||||
metadata: ansible/gather/site.yml
|
||||
connmon:
|
||||
enabled: false
|
||||
sudo: true
|
||||
grafana:
|
||||
enabled: false
|
||||
grafana_ip: 1.1.1.1
|
||||
|
@ -31,9 +31,6 @@ ansible:
|
||||
nova_db: ansible/browbeat/adjustment-db.yml
|
||||
workers: ansible/browbeat/adjustment-workers.yml
|
||||
metadata: ansible/gather/site.yml
|
||||
connmon:
|
||||
enabled: false
|
||||
sudo: true
|
||||
grafana:
|
||||
enabled: false
|
||||
grafana_ip: 1.1.1.1
|
||||
|
@ -30,9 +30,6 @@ ansible:
|
||||
nova_db: ansible/browbeat/adjustment-db.yml
|
||||
workers: ansible/browbeat/adjustment-workers.yml
|
||||
metadata: ansible/gather/site.yml
|
||||
connmon:
|
||||
enabled: false
|
||||
sudo: true
|
||||
grafana:
|
||||
enabled: false
|
||||
grafana_ip: 1.1.1.1
|
||||
|
Loading…
Reference in New Issue
Block a user