Merge "Refactor installers support code"
authorRyota Mibu <r-mibu@cq.jp.nec.com>
Wed, 14 Dec 2016 02:51:31 +0000 (02:51 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Wed, 14 Dec 2016 02:51:31 +0000 (02:51 +0000)
docs/design/index.rst
docs/design/inspector-design-guideline.rst [new file with mode: 0644]
tests/run.sh

index 4efbef1..dbd9d75 100644 (file)
@@ -23,3 +23,4 @@ See also https://wiki.opnfv.org/requirements_projects .
    notification-alarm-evaluator.rst
    rfe-port-status-update.rst
    port-data-plane-status.rst
+   inspector-design-guideline.rst
diff --git a/docs/design/inspector-design-guideline.rst b/docs/design/inspector-design-guideline.rst
new file mode 100644 (file)
index 0000000..4add8c0
--- /dev/null
@@ -0,0 +1,46 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+
+==========================
+Inspector Design Guideline
+==========================
+
+.. NOTE::
+   This is spec draft of design guideline for inspector component.
+   JIRA ticket to track the update and collect comments: `DOCTOR-73`_.
+
+This document summarize the best practise in designing a high performance
+inspector to meet the requirements in `OPNFV Doctor project`_.
+
+Problem Description
+===================
+
+Some pitfalls has be detected during the development of sample inspector, e.g.
+we suffered a significant `performance degrading in listing VMs in a host`_.
+
+A `patch set for caching the list`_ has been committed to solve issue. When a
+new inspector is integrated, it would be nice to have an evaluation of existing
+design and give recommendations for improvements.
+
+This document can be treated as a source of related blueprints in inspector
+projects.
+
+Guidelines
+==========
+
+Host specific VMs list
+----------------------
+
+TBD, see `DOCTOR-76`_.
+
+Parallel execution
+------------------
+
+TBD, see `discussion in mailing list`_.
+
+.. _DOCTOR-73: https://jira.opnfv.org/browse/DOCTOR-73
+.. _OPNFV Doctor project: https://wiki.opnfv.org/doctor
+.. _performance degrading in listing VMs in a host: https://lists.opnfv.org/pipermail/opnfv-tech-discuss/2016-September/012591.html
+.. _patch set for caching the list: https://gerrit.opnfv.org/gerrit/#/c/20877/
+.. _DOCTOR-76: https://jira.opnfv.org/browse/DOCTOR-76
+.. _discussion in mailing list: https://lists.opnfv.org/pipermail/opnfv-tech-discuss/2016-October/013036.html
index 141d836..f1087ba 100755 (executable)
@@ -155,12 +155,6 @@ create_alarm() {
         -q "traits.state=string::error; traits.instance_id=string::$vm_id"
 }
 
-print_log() {
-    log_file=$1
-    echo "$log_file:"
-    sed -e 's/^/    /' "$log_file"
-}
-
 start_monitor() {
     pgrep -f "python monitor.py" && return 0
     sudo -E python monitor.py "$COMPUTE_HOST" "$COMPUTE_IP" "$INSPECTOR_TYPE" \
@@ -170,7 +164,6 @@ start_monitor() {
 stop_monitor() {
     pgrep -f "python monitor.py" || return 0
     sudo kill $(pgrep -f "python monitor.py")
-    print_log monitor.log
 }
 
 congress_add_rule() {
@@ -237,7 +230,6 @@ stop_inspector() {
     if [[ "$INSPECTOR_TYPE" == "sample" ]] ; then
         pgrep -f "python inspector.py" || return 0
         kill $(pgrep -f "python inspector.py")
-        print_log inspector.log
     elif [[ "$INSPECTOR_TYPE" == "congress" ]] ; then
         congress_del_rule host_force_down classification
         congress_del_rule error_vm_states classification
@@ -277,7 +269,6 @@ start_consumer() {
 stop_consumer() {
     pgrep -f "python consumer.py" || return 0
     kill $(pgrep -f "python consumer.py")
-    print_log consumer.log
 
     # NOTE(r-mibu): terminate tunnels to the controller nodes
     if ! is_installer local; then
@@ -286,7 +277,6 @@ stop_consumer() {
             forward_rule="-R $CONSUMER_PORT:localhost:$CONSUMER_PORT"
             tunnel_command="sudo ssh $ssh_opts_cpu $COMPUTE_USER@$ip $forward_rule sleep 600"
             kill $(pgrep -f "$tunnel_command")
-            print_log "ssh_tunnel.${ip}.log"
         done
     fi
 }
@@ -370,7 +360,6 @@ cleanup() {
     sleep 240
     check_host_status "UP"
     scp $ssh_opts_cpu "$COMPUTE_USER@$COMPUTE_IP:disable_network.log" .
-    print_log disable_network.log
 
     openstack $as_doctor_user server list | grep -q " $VM_NAME " && openstack $as_doctor_user server delete "$VM_NAME"
     sleep 1