Minor changes to support kafka 0.9.0.1
Change-Id: Ib5a2f02cf50f53b69ea47640eac87b3522328cda
This commit is contained in:
parent
1e27ee7dfa
commit
3f73ab2563
@ -29,7 +29,7 @@ define monasca::kafka::topics (
|
||||
cwd => $install_dir,
|
||||
user => 'root',
|
||||
group => 'root',
|
||||
onlyif => "kafka-topics.sh --topic ${name} --list --zookeeper ${kafka_zookeeper_connections}"
|
||||
onlyif => "kafka-topics.sh --topic ${name} --list --zookeeper ${kafka_zookeeper_connections} | grep -q ${name}; test $? -ne 0"
|
||||
} ->
|
||||
exec { "Ensure ${name} is has ${partitions} partitions":
|
||||
command =>"kafka-topics.sh --alter --zookeeper ${kafka_zookeeper_connections} --partitions ${partitions} --topic ${name}",
|
||||
@ -37,5 +37,6 @@ define monasca::kafka::topics (
|
||||
cwd => $install_dir,
|
||||
user => 'root',
|
||||
group => 'root',
|
||||
onlyif => "kafka-topics.sh --describe --zookeeper ${kafka_zookeeper_connections} --topic ${name} | grep 'PartitionCount:${partitions}'; test $? -ne 0"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user