From f1def76fbcba6dd3b30ffc8f84b30d2b5715f042 Mon Sep 17 00:00:00 2001 From: Joe Date: Wed, 23 Dec 2015 10:46:28 -0500 Subject: [PATCH] First set of Cinder workload(s) Change-Id: I46cec50ec56b79769427a9601ead2ae502b99b4f --- .../browbeat/roles/cinder/handlers/main.yml | 27 ++++++++++++ ansible/browbeat/roles/cinder/tasks/main.yml | 23 ++++++++++ browbeat.cfg | 3 ++ browbeat.sh | 7 ++++ rally/cinder/README.md | 1 + .../cinder/cinder-create-and-attach-volume-cc | 42 +++++++++++++++++++ 6 files changed, 103 insertions(+) create mode 100644 ansible/browbeat/roles/cinder/handlers/main.yml create mode 100644 ansible/browbeat/roles/cinder/tasks/main.yml create mode 100644 rally/cinder/README.md create mode 100644 rally/cinder/cinder-create-and-attach-volume-cc diff --git a/ansible/browbeat/roles/cinder/handlers/main.yml b/ansible/browbeat/roles/cinder/handlers/main.yml new file mode 100644 index 000000000..557956799 --- /dev/null +++ b/ansible/browbeat/roles/cinder/handlers/main.yml @@ -0,0 +1,27 @@ +--- +# +# Cinder handlers for browbeat adjustment +# + +- name: unmanage cinder services + command: pcs resource unmanage {{ item }} + with_items: + - openstack-cinder-api + ignore_errors: true + +- name: restart cinder services + service: name={{ item }} state=restarted + with_items: + - openstack-cinder-api + +- name: manage cinder services + command: pcs resource manage {{ item }} + with_items: + - openstack-cinder-api + ignore_errors: true + +- name: cleanup cinder services + command: pcs resource cleanup {{ item }} + with_items: + - openstack-cinder-api + ignore_errors: true diff --git a/ansible/browbeat/roles/cinder/tasks/main.yml b/ansible/browbeat/roles/cinder/tasks/main.yml new file mode 100644 index 000000000..566b8c8fe --- /dev/null +++ b/ansible/browbeat/roles/cinder/tasks/main.yml @@ -0,0 +1,23 @@ +--- +# +# Cinder tasks for Browbeat +# * Can change worker count +# + +- name: Configure cinder.conf + ini_file: + dest: /etc/cinder/cinder.conf + mode: 0640 + section: "{{ item.section }}" + option: "{{ item.option }}" + value: "{{ item.value }}" + backup: yes + with_items: + - { section: DEFAULT, option: osapi_volume_workers, value: "{{ workers }}" } + - { section: DEFAULT, option: debug, value: False } + notify: + - unmanage cinder services + - restart cinder services + - manage cinder services + - cleanup cinder services + diff --git a/browbeat.cfg b/browbeat.cfg index eb6f3d96e..2e770c06a 100644 --- a/browbeat.cfg +++ b/browbeat.cfg @@ -19,16 +19,19 @@ declare -A WORKERS WORKERS["keystone"]="public_workers|admin_workers|processes" WORKERS["nova"]="metadata_workers|osapi_compute_workers|ec2_workers|workers|#workers" WORKERS["neutron"]="rpc_workers|api_workers" +WORKERS["cinder"]="osapi_volume_workers" declare -A TIMES TIMES["keystone"]=5000 TIMES["neutron"]=500 TIMES["nova"]=128 +TIMES["cinder"]=1024 declare -A CONCURRENCY CONCURRENCY["keystone"]="64 96 128 160 192 224 256" CONCURRENCY["neutron"]="8 16 32 48 54" CONCURRENCY["nova"]="8 16 32 48 54" +CONCURRENCY["cinder"]="64 128 256" ROOT=false LOGIN_USER="heat-admin" diff --git a/browbeat.sh b/browbeat.sh index 8b7da0ead..90322142b 100755 --- a/browbeat.sh +++ b/browbeat.sh @@ -23,6 +23,8 @@ check_controllers() log $(ssh -o "${SSH_OPTS}" ${LOGIN_USER}@$IP sudo cat /etc/nova/nova.conf | grep -vi "NONE" | grep -v "#" |grep -E ${WORKERS["nova"]}) log Service : Neutron log $(ssh -o "${SSH_OPTS}" ${LOGIN_USER}@$IP sudo cat /etc/neutron/neutron.conf | grep -vi "NONE" | grep -v "#" |grep -E ${WORKERS["neutron"]}) + log Service : Cinder + log $(ssh -o "${SSH_OPTS}" ${LOGIN_USER}@$IP sudo cat /etc/cinder/cinder.conf | grep -vi "NONE" | grep -v "#" |grep -E ${WORKERS["cinder"]}) done } @@ -38,6 +40,7 @@ check_running_workers() nova_scheduler_num=$(ssh -o "${SSH_OPTS}" ${LOGIN_USER}@$IP sudo ps afx | grep "[Nn]ova-scheduler" | wc -l) nova_consoleauth_num=$(ssh -o "${SSH_OPTS}" ${LOGIN_USER}@$IP sudo ps afx | grep "[Nn]ova-consoleauth" | wc -l) nova_novncproxy_num=$(ssh -o "${SSH_OPTS}" ${LOGIN_USER}@$IP sudo ps afx | grep "[Nn]ova-novncproxy" | wc -l) + cinder_worker_num=$(ssh -o "${SSH_OPTS}" ${LOGIN_USER}@$IP sudo ps afx | grep "[Cc]inder-api" | wc -l) log $IP : keystone : $keystone_num workers admin/main combined log $IP : "keystone(httpd)" : $keystone_admin_httpd_num admin workers, $keystone_main_httpd_num main workers log $IP : nova-api : $nova_api_num workers @@ -45,6 +48,7 @@ check_running_workers() log $IP : nova-scheduler : $nova_scheduler_num workers log $IP : nova-consoleauth : $nova_consoleauth_num workers log $IP : nova-novncproxy : $nova_novncproxy_num workers + log $IP : cinder-api : $cinder_worker_num workers # Keystone should be 2x for admin and main + 1 for main process # Nova should be 3x + 1 nova-api, core_count + 1 for conductor, and scheduler+consoleauth+novncproxy @@ -254,6 +258,9 @@ for num_wkrs in ${NUM_WORKERS} ; do check_controllers run_rally nova "${complete_test_prefix}-nova-${num_wkr_padded}" ${num_wkrs} + check_controllers + run_rally cinder "${complete_test_prefix}-cinder-${num_wkr_padded}" ${num_wkrs} + done ansible-playbook -i ansible/hosts ansible/browbeat/adjustment.yml -e "workers=${RESET_WORKERS}" check_running_workers diff --git a/rally/cinder/README.md b/rally/cinder/README.md new file mode 100644 index 000000000..6f73d9b0d --- /dev/null +++ b/rally/cinder/README.md @@ -0,0 +1 @@ +# Cinder scenarios diff --git a/rally/cinder/cinder-create-and-attach-volume-cc b/rally/cinder/cinder-create-and-attach-volume-cc new file mode 100644 index 000000000..5acbb0f4a --- /dev/null +++ b/rally/cinder/cinder-create-and-attach-volume-cc @@ -0,0 +1,42 @@ +{% set flavor_name = flavor_name or "m1.tiny" %} +{ + "CinderVolumes.create_and_attach_volume": [ + { + "args": { + "size": 1, + "image": { + "name": "centos7" + }, + "flavor": { + "name": "{{flavor_name}}" + } + }, + "runner": { + "times": 1, + "concurrency": 1, + "type": "constant" + }, + "context": { + "users": { + "tenants": 2, + "users_per_tenant": 2 + }, + "quotas": { + "neutron": { + "network": -1, + "port": -1 + }, + "nova": { + "instances": -1, + "cores": -1, + "ram": -1 + }, + "cinder": { + "gigabytes": -1, + "volumes": -1 + } + } + } + } + ] +}