Skip to content

Commit

Permalink
Complete removal of vitrage-collector service.
Browse files Browse the repository at this point in the history
 - vitrage-graph will execute the drivers.
 - Simplify large data transfer from drivers to processor by obsoleting rpc.
 - Drivers don't need to create the complete list by taking advantage of python
   generators in order to conserve memory.
 - Lowering the total signiture of vitrage processes.
 - LockByDriver will enforce a driver does not run get_changes and get_all in parallel.

Story: 2004384
Change-Id: Ie713456b2df96e24d0b15d2362a666162bfb4300
  • Loading branch information
Idandos committed Nov 21, 2018
1 parent a4c466a commit 842f9d6
Show file tree
Hide file tree
Showing 22 changed files with 187 additions and 419 deletions.
18 changes: 1 addition & 17 deletions devstack/plugin.sh
Expand Up @@ -300,33 +300,17 @@ function start_vitrage {
fi
fi

run_process vitrage-collector "$VITRAGE_BIN_DIR/vitrage-collector --config-file $VITRAGE_CONF"
run_process vitrage-graph "$VITRAGE_BIN_DIR/vitrage-graph --config-file $VITRAGE_CONF"
run_process vitrage-notifier "$VITRAGE_BIN_DIR/vitrage-notifier --config-file $VITRAGE_CONF"
run_process vitrage-ml "$VITRAGE_BIN_DIR/vitrage-ml --config-file $VITRAGE_CONF"
run_process vitrage-persistor "$VITRAGE_BIN_DIR/vitrage-persistor --config-file $VITRAGE_CONF"
run_process vitrage-snmp-parsing "$VITRAGE_BIN_DIR/vitrage-snmp-parsing --config-file $VITRAGE_CONF"

write_systemd_dependency vitrage-graph vitrage-collector

change_systemd_kill_mode vitrage-graph
change_systemd_kill_mode vitrage-collector
}


function write_systemd_dependency {
local service_after=$1
local service_before=$2
local systemd_service_after="devstack@$service_after.service"
local systemd_service_before="devstack@$service_before.service"

local unitfile_after="$SYSTEMD_DIR/$systemd_service_after"

iniset -sudo $unitfile_after "Unit" "After" "$systemd_service_before"

$SYSTEMCTL daemon-reload
}

function change_systemd_kill_mode {
local service=$1
local systemd_service="devstack@$service.service"
Expand All @@ -343,7 +327,7 @@ function stop_vitrage {
disable_apache_site vitrage
restart_apache_server
fi
for serv in vitrage-api vitrage-collector vitrage-graph vitrage-notifier vitrage-persistor vitrage-ml vitrage-snmp-parsing; do
for serv in vitrage-api vitrage-graph vitrage-notifier vitrage-persistor vitrage-ml vitrage-snmp-parsing; do
stop_process $serv
done
}
Expand Down
2 changes: 0 additions & 2 deletions devstack/settings
Expand Up @@ -5,8 +5,6 @@ enable_service vitrage-api
enable_service vitrage-graph
# Notifier
enable_service vitrage-notifier
# Collector
enable_service vitrage-collector
# machine_learning
enable_service vitrage-ml
# Persistor
Expand Down
4 changes: 2 additions & 2 deletions devstack/upgrade/settings
Expand Up @@ -7,7 +7,7 @@ VITRAGE_BASE_DEVSTACK_DIR=$TOP_DIR/../../old/vitrage/devstack
VITRAGE_DIR=$TOP_DIR/../../new/vitrage
source $VITRAGE_BASE_DEVSTACK_DIR/settings

devstack_localrc base enable_service vitrage-api vitrage-collector vitrage-graph vitrage-notifier vitrage-ml vitrage-persistor vitrage-snmp-parsing
devstack_localrc target enable_service vitrage-api vitrage-collector vitrage-graph vitrage-notifier vitrage-ml vitrage-persistor vitrage-snmp-parsing
devstack_localrc base enable_service vitrage-api vitrage-graph vitrage-notifier vitrage-ml vitrage-persistor vitrage-snmp-parsing
devstack_localrc target enable_service vitrage-api vitrage-graph vitrage-notifier vitrage-ml vitrage-persistor vitrage-snmp-parsing
BASE_RUN_SMOKE=False
TARGET_RUN_SMOKE=False
2 changes: 1 addition & 1 deletion devstack/upgrade/shutdhown.sh
Expand Up @@ -29,7 +29,7 @@ set -o xtrace

stop_vitrage

SERVICES_DOWN="vitrage-api vitrage-collector vitrage-graph vitrage-notifier vitrage-ml vitrage-persistor vitrage-snmp-parsing"
SERVICES_DOWN="vitrage-api vitrage-graph vitrage-notifier vitrage-ml vitrage-persistor vitrage-snmp-parsing"

# sanity check that services are actually down
ensure_services_stopped $SERVICES_DOWN
2 changes: 1 addition & 1 deletion devstack/upgrade/upgrade.sh
Expand Up @@ -84,7 +84,7 @@ start_vitrage

# Don't succeed unless the services come up
# Truncating some service names to 11 characters
ensure_services_started vitrage-api vitrage-collector vitrage-graph vitrage-notifier vitrage-ml vitrage-persistor vitrage-snmp-parsing
ensure_services_started vitrage-api vitrage-graph vitrage-notifier vitrage-ml vitrage-persistor vitrage-snmp-parsing

set +o xtrace
echo "*********************************************************************"
Expand Down
5 changes: 2 additions & 3 deletions doc/source/contributor/high-scale.rst
Expand Up @@ -7,7 +7,8 @@ In a production environment with > 50,000 entities, the following configuration
Tune RPC
--------

Vitrage-graph uses RPC to request data from vitrage-collector, these requests take longer, and there is a need to increase the timeout.
Vitrage-api uses RPC to request data from vitrage-graph, these requests take longer, and there may be a need to
increase the timeout.
The following should be set in ``/etc/vitrage/vitrage.conf``, under ``[DEFAULT]`` section:

+----------------------+---------------------------------------------------------+-----------------+-----------------+
Expand All @@ -20,8 +21,6 @@ To apply, restart these:

``sudo service vitrage-graph restart``

``sudo service vitrage-collector restart``

Restart the Vitrage api (either vitrage-api or apache)


Expand Down
3 changes: 1 addition & 2 deletions doc/source/install/get_started.rst
Expand Up @@ -8,13 +8,12 @@ The Root Cause Analysis service consists of the following components:

``vitrage-graph`` service
The main process. It includes the in-memory entity graph and the template evaluator.
Also responsible for retrieving data from the different datasources
``vitrage-notifier`` service
Used for notifying external systems about Vitrage alarms/state changes. It only calls Nova force-down API
and Simple Network Management Protocol (SNMP) in the Ocata release.
``vitrage-api`` service
The API layer for Vitrage.
``vitrage-collector`` service
Responsible for retrieving data from the different datasources.
``vitrage-ml`` service
Performs alarm analysis using Machine Learning methods.
``vitrage-persistor`` service
Expand Down
1 change: 0 additions & 1 deletion doc/source/install/install-rdo.rst
Expand Up @@ -174,7 +174,6 @@ Run the following commands:

.. code:: bash
vitrage-collector
vitrage-graph
vitrage-api
vitrage-notifier
Expand Down
7 changes: 7 additions & 0 deletions releasenotes/notes/collector-removal-fd805c6298d66eb0.yaml
@@ -0,0 +1,7 @@
---
features:
- Collector service removal to simplify and enhance scale performance.
vitrage-collector service was removed and vitrage-graph is responsible
to execute the drivers.
Allowing drivers to take advantage of python yield generators and conserve
memory.
1 change: 0 additions & 1 deletion setup.cfg
Expand Up @@ -28,7 +28,6 @@ console_scripts =
vitrage-api = vitrage.cli.api:main
vitrage-graph = vitrage.cli.graph:main
vitrage-notifier = vitrage.cli.notifier:main
vitrage-collector = vitrage.cli.collector:main
vitrage-persistor = vitrage.cli.persistor:main
vitrage-ml = vitrage.cli.machine_learning:main
vitrage-dbsync = vitrage.cli.storage:dbsync
Expand Down
53 changes: 0 additions & 53 deletions vitrage/cli/collector.py

This file was deleted.

4 changes: 0 additions & 4 deletions vitrage/datasources/__init__.py
Expand Up @@ -53,8 +53,4 @@
cfg.StrOpt('notification_exchange',
required=False,
help='Exchange that is used for notifications.'),
cfg.StrOpt('notification_topic_collector',
default='vitrage_collector_notifications',
help='The topic on which event will be sent from the '
'datasources to the graph processor')
]
103 changes: 0 additions & 103 deletions vitrage/datasources/listener_service.py

This file was deleted.

93 changes: 0 additions & 93 deletions vitrage/datasources/rpc_service.py

This file was deleted.

0 comments on commit 842f9d6

Please sign in to comment.