jaytaylor / ansible-kafka

Ansible Kafka role
https://galaxy.ansible.com/jaytaylor/kafka/
Other
67 stars 52 forks source link

Unpacking Kafka archive does not work with differing version #3

Closed kareblak closed 8 years ago

kareblak commented 8 years ago
TASK: [jaytaylor.kafka | Extract downloaded kafka archive] ********************
ok: [52.31.200.214] => {"changed": false, "check_results": {"cmd": "/bin/tar -C \"/usr/local/\" --diff -zf \"/tmp/kafka.tar.gz\"", "err": "", "out": "", "rc": 0, "unarchived": true}, "dest": "/usr/local/", "gid": 0, "group": "root", "handler": "TgzArchive", "mode": "0755", "owner": "root", "size": 4096, "src": "/tmp/kafka.tar.gz", "state": "directory", "uid": 0}
ok: [52.48.44.129] => {"changed": false, "check_results": {"cmd": "/bin/tar -C \"/usr/local/\" --diff -zf \"/tmp/kafka.tar.gz\"", "err": "", "out": "", "rc": 0, "unarchived": true}, "dest": "/usr/local/", "gid": 0, "group": "root", "handler": "TgzArchive", "mode": "0755", "owner": "root", "size": 4096, "src": "/tmp/kafka.tar.gz", "state": "directory", "uid": 0}
ok: [52.48.12.7] => {"changed": false, "check_results": {"cmd": "/bin/tar -C \"/usr/local/\" --diff -zf \"/tmp/kafka.tar.gz\"", "err": "", "out": "", "rc": 0, "unarchived": true}, "dest": "/usr/local/", "gid": 0, "group": "root", "handler": "TgzArchive", "mode": "0755", "owner": "root", "size": 4096, "src": "/tmp/kafka.tar.gz", "state": "directory", "uid": 0}

TASK: [jaytaylor.kafka | Link /usr/local/kafka to the right version] **********
failed: [52.48.44.129] => {"failed": true, "path": "/usr/local/kafka", "src": "/usr/local/kafka_2.11-0.9.0.0", "state": "absent"}
msg: src file does not exist, use "force=yes" if you really want to create the link: /usr/local/kafka_2.11-0.9.0.0
failed: [52.48.12.7] => {"failed": true, "gid": 0, "group": "root", "mode": "0777", "owner": "root", "path": "/usr/local/kafka", "size": 29, "src": "/usr/local/kafka_2.11-0.9.0.0", "state": "link", "uid": 0}
msg: src file does not exist, use "force=yes" if you really want to create the link: /usr/local/kafka_2.11-0.9.0.0
failed: [52.31.200.214] => {"failed": true, "gid": 0, "group": "root", "mode": "0777", "owner": "root", "path": "/usr/local/kafka", "size": 29, "src": "/usr/local/kafka_2.11-0.9.0.0", "state": "link", "uid": 0}
msg: src file does not exist, use "force=yes" if you really want to create the link: /usr/local/kafka_2.11-0.9.0.0

I had 0.8.2.0 installed and tried to install 0.9.0.0 on top of that. The unpack module was unable to change state.

kareblak commented 8 years ago

As I suck in Ansible, I have no clue how to fix this. I'm not sure it's really necessary, but since the symlinking is there, it should be able to work.

jaytaylor commented 8 years ago

This is probably due to the pre-existing artifact in /tmp/, kafka.tar.gz or something. I agree it could be better and would happily merge a PR to fix this, and until then just wipe the archive from /tmp to resolve.

aisch commented 8 years ago

@kareblak has been fixed by https://github.com/jaytaylor/ansible-kafka/pull/6