mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-09-25 09:14:05 +00:00
873ad1d41c
An administrator sets site.cleanupdiskfullxcatpost, deploys a diskfull node, and /xcatpost is empty. The next updatenode run downloads the postscripts again and leaves them there. /xcatpost is mode 0755 and most of what lands in it is world-readable, so material the administrator was told is gone comes back on every maintenance run and on every reboot. xcatdsklspost is the script that repopulates /xcatpost on all of those paths, and it reads only CLEANUPXCATPOST. CLEANUPDISKFULLXCATPOST reaches the node in the same mypostscript, exported by the site table, and no code reads it. Only xcatinstallpost does, and that runs once, at install. Read it in append_xcatpost_cleanup with the rule xcatinstallpost uses: remove the postscripts when the run returns 0, keep updateflag.awk, and leave everything in place after a failed run so the node can be examined. xCAT-test/bats/xcatdsklspost_xcatpost_cleanup.bats captures this. Three of its six tests fail on the previous commit. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>