cloudera-scripts-for-log4j
cloudera-scripts-for-log4j copied to clipboard
/tmp as backup dir is hardcoded
Hi,
backups go the /tmp hardcoded. On our systems /tmp is not big enough., so we change it to an other directory.
Question: can you make the “/tmp” backup dir an option or variable?
export TMPDIR=/opt/cloudera/tmp
changes we need to make: local_path=“/opt/cloudera/tmp/hdfs_tar_files.${current_time}” hdfs_bc_path=“/opt/cloudera/tmp/backup.${current_time}"
Regards, Hans
Thanks for the report. We will consider making it customizable.
I had exactly the same issue ( /tmp is not big enough), due to 5GB+ CDSW parcel .tar.gz files
Update
- Most of the code now uses a configurable tmp dir (via TMPDIR Env var): https://github.com/cloudera/cloudera-scripts-for-log4j/commit/5f516bd2a151f23bf3abfcae59deb84b1619c078
- ps: I could not find the matching PR, the link in the commit redirects to the issue of the same number
- HowEver .tar.gz processing still happens in /tmp (subdir), due to mktemp logic, see: https://github.com/cloudera/cloudera-scripts-for-log4j/blob/main/cm_cdp_cdh_log4j_jndi_removal.sh#L218
- So we still have no fix for larger .tar.gz / parcels