Yelp/kafka-utils

How to pass argument to command

Closed this issue · 2 comments

When I try to hit below command it works

`ubuntu@mynode:~$ kafka-rolling-restart --cluster-type qa_kafka_test --broker-ids

Will restart the following brokers in cluster-1:
101: mynode1
102: mynode2
Do you want to restart these brokers? yes
`
However when I tried to pass that "yes" as argument it doesn't work

`ubuntu@mynode:~$ kafka-rolling-restart --cluster-type qa_kafka_test --task-args yes

Will restart the following brokers in cluster-1:
101: mynode1
102: mynode2
Do you want to restart these brokers?
`
It still ask for confirmation.

What can be done to get this in one command?

I think you want to add the --no-confirm flag, so your invocation should look like this:

kafka-rolling-restart --cluster-type qa_kafka_test --no-confirm

Thank you @Baisang
That worked like charm.