chef-bach icon indicating copy to clipboard operation
chef-bach copied to clipboard

leftover test file prevents code from running

Open leochen4891 opened this issue 6 years ago • 3 comments

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

leochen4891 avatar Aug 03 '18 19:08 leochen4891

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.

cbaenziger avatar Aug 03 '18 19:08 cbaenziger

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.

leochen4891 avatar Aug 07 '18 15:08 leochen4891

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.

cbaenziger avatar Aug 07 '18 15:08 cbaenziger