chef-bach
chef-bach copied to clipboard
leftover test file prevents code from running
Thanks @ronny-macmaster for the help It was discovered that an old test file prevented the oozie shared lib from being updated. For some reason an old test file was left in HDFS and caused chef not being able to update oozie sharelib. If I run the check in shell, it shows
put: `/tmp/oozie-test': File exists
ubuntu@pob3-bach-r2n05:~$ echo $?
1
It seems like we should write a quick library function to see if HDFS is available for files as we have this idiom in many places in Chef-BACH.
I'm thinking instead of using only_if to skip the oozie create shared libs
section if HDFS is not writable, it may be better to escalate the failure and fail the chef-client run immediately.
HDFS will not be able to receive files when we first converge as we will have only namenodes but no datanodes. It is not until the second Chef pass we have datanodes us to receive files.