Force Munki to obtain temp directories within /tmp, to avoid rare, intermittent issue where tempfile.mkdtemp() would choose to create a temp dir on an NFS path, such as /home/<username>/tmp/, causing Munki to crash when attempting to chown/etc.

This commit is contained in:
Justin McWilliams
2013-01-09 17:32:31 -05:00
parent 4784ea762b
commit ba6588acdd
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -647,7 +647,7 @@ def runAdobeCS5AAMEEInstall(dmgpath):
# installation tools, they are now happy.
basepath = os.path.dirname(deploymentmanager)
number_of_payloads = countPayloads(basepath)
tmpdir = tempfile.mkdtemp()
tmpdir = tempfile.mkdtemp(prefix='munki-', dir='/tmp')
# make our symlinks
os.symlink(os.path.join(basepath,"ASU"), os.path.join(tmpdir, "ASU"))
@@ -700,7 +700,7 @@ def runAdobeCS5PatchInstaller(dmgpath, copylocal=False):
if mountpoints:
if copylocal:
# copy the update to the local disk before installing
updatedir = tempfile.mkdtemp()
updatedir = tempfile.mkdtemp(prefix='munki-', dir='/tmp')
retcode = subprocess.call(["/bin/cp", "-r",
mountpoints[0], updatedir])
# unmount diskimage
+1 -1
View File
@@ -2453,7 +2453,7 @@ def forceLogoutNow():
#debug = False
verbose = 1
munkistatusoutput = False
tmpdir = tempfile.mkdtemp()
tmpdir = tempfile.mkdtemp(prefix='munki-', dir='/tmp')
report = {}
def main():