Delete Kafka topics in unstack phase

unstack.sh stack.sh sequence fails because of Kafka topics not being
deleted in unstack phase.

Change-Id: I0a5e0b029b5cb2aa5bc56131e62fa6d9cfa34be9
This commit is contained in:
Witold Bedyk 2018-01-10 14:06:32 +01:00
parent 6b7a43342c
commit 6b0dcaedbb
1 changed files with 14 additions and 3 deletions

View File

@ -726,9 +726,19 @@ function build_kibana_plugin {
}
function configure_kafka {
echo_summary "Configuring kafka topics"
/opt/kafka/bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 4 --topic log
/opt/kafka/bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 4 --topic transformed-log
echo_summary "Configuring Kafka topics"
/opt/kafka/bin/kafka-topics.sh --create --zookeeper localhost:2181 \
--replication-factor 1 --partitions 4 --topic log
/opt/kafka/bin/kafka-topics.sh --create --zookeeper localhost:2181 \
--replication-factor 1 --partitions 4 --topic transformed-log
}
function delete_kafka_topics {
echo_summary "Deleting Kafka topics"
/opt/kafka/bin/kafka-topics.sh --delete --zookeeper localhost:2181 \
--topic log || true
/opt/kafka/bin/kafka-topics.sh --delete --zookeeper localhost:2181 \
--topic transformed-log || true
}
function create_log_management_accounts {
@ -827,6 +837,7 @@ if is_service_enabled monasca-log; then
# Shut down Monasca services
echo_summary "Unstacking Monasca Log Management"
stop_monasca_log
delete_kafka_topics
fi
if [[ "$1" == "clean" ]]; then