[prev in list] [next in list] [prev in thread] [next in thread]
List: lxc-devel
Subject: [lxc-devel] [lxc/master] templates: actually create DOWNLOAD_TEMP directory
From: masselstine on Github <lxc-bot () linuxcontainers ! org>
Date: 2018-05-31 20:35:02
Message-ID: 20180531203502.AC4D256F03 () mailman01 ! srv ! dcmtl ! stgraber ! net
[Download RAW message or body]
[Attachment #2 (text/x-mailbox)]
The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/2369
This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.
=== Description (from pull-request) ===
The way 'mktemp' is currently used you will get a temp directory in
$TMPDIR or '/tmp' and DOWNLOAD_TEMP will not be pointing to an actual
directory. This will result in the wget operations failing and the
container will fail to create:
ERROR: Failed to download http://....
Instead we want to use the '-p' option for mktemp to set the base path
and this will ensure that the temp directory is created in the correct
location and DOWNLOAD_TEMP will be consistent with this location.
Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
[Attachment #3 (text/plain)]
From 6e62213e029497fad264ba0d48549ee5e6f5e92d Mon Sep 17 00:00:00 2001
From: Mark Asselstine <mark.asselstine@windriver.com>
Date: Thu, 31 May 2018 16:21:45 -0400
Subject: [PATCH] templates: actually create DOWNLOAD_TEMP directory
The way 'mktemp' is currently used you will get a temp directory in
$TMPDIR or '/tmp' and DOWNLOAD_TEMP will not be pointing to an actual
directory. This will result in the wget operations failing and the
container will fail to create:
ERROR: Failed to download http://....
Instead we want to use the '-p' option for mktemp to set the base path
and this will ensure that the temp directory is created in the correct
location and DOWNLOAD_TEMP will be consistent with this location.
Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
---
templates/lxc-download.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/templates/lxc-download.in b/templates/lxc-download.in
index f87518359..5f1138ccf 100644
--- a/templates/lxc-download.in
+++ b/templates/lxc-download.in
@@ -320,7 +320,7 @@ fi
if ! command -V mktemp >/dev/null 2>&1; then
DOWNLOAD_TEMP="${DOWNLOAD_TEMP}/tmp/lxc-download.$$"
else
- DOWNLOAD_TEMP="${DOWNLOAD_TEMP}$(mktemp -d)"
+ DOWNLOAD_TEMP="$(mktemp -p ${DOWNLOAD_TEMP} -d)"
fi
# Simply list images
[Attachment #4 (text/plain)]
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic