Open aglahe opened 4 years ago
Hey @aglahe Thanks for the report. We are actively looking into this and will update soon.
I am working on some docs for this. The general approach is to manually stop all services on a given host and then upgrade it using the all.yml playbook ie:
ansible -i /path/to/hosts.yml -m shell -a "systemctl stop confluent-*" host1
ansible-playbook -i /path/to/hosts.yml all.yml --limit host1
You'll want to target kafka controller last, which can be queried with:
ansible -i /path/to/hosts.yml kafka_broker -m import_role -a "name=confluent.kafka_broker tasks_from=dynamic_groups.yml"
Hi, As per my understanding, this has been fixed. LMK if that's not the case.
Describe the issue Following the upgrade docs, it appears that after upgrading zookeeper, if the broker is on the same node as a zookeeper....when trying to set an ansible fact, it cannot, since the zookeeper upgrade yml removed the confluent_kafka_2.12 packages.
This may be related to Issue #421 and its PR #422
From the upgrade_broker.yml:
- name: Set Current Package Version set_fact: kafka_broker_current_version: "{{ ansible_facts.packages['confluent-kafka-2.12'][0]['version'] }}" when: not confluent_server_enabled|bool
The _kafka_broker_currentversion can't be set, since the upgrade_zookeeper.yml removed that confluent_kafka_2.12 package.
To Reproduce
Expected behaviour If a node/instance runs both a zookeeper and a broker service, after upgrading the zookeeper, brokers should be upgraded.
Inventory File Nothing crazy...can reproduce using simple inventory file.
Logs
TASK [Set Current Package Version] *************************************************************************************************************************************************************************************** Monday 05 October 2020 12:40:04 -0400 (0:00:00.257) 0:00:45.044 ******** fatal: [x.y.z]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'confluent-kafka-2.12'\n\nThe error appears to be in '/Users/aarong/dev/projects/cp-ansible/upgrade_kafka_broker.yml': line 71, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - name: Set Current Package Version\n ^ here\n"}
Environment (please complete the following information):