cloudera-scripts-for-log4j icon indicating copy to clipboard operation
cloudera-scripts-for-log4j copied to clipboard

/tmp as backup dir is hardcoded

Open nashvm opened this issue 4 years ago • 3 comments

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

nashvm avatar Dec 15 '21 08:12 nashvm

Thanks for the report. We will consider making it customizable.

jtran-cloudera avatar Dec 15 '21 23:12 jtran-cloudera

I had exactly the same issue ( /tmp is not big enough), due to 5GB+ CDSW parcel .tar.gz files

lhoss avatar Dec 16 '21 16:12 lhoss

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

lhoss avatar Dec 20 '21 10:12 lhoss