Alon Bar-Lev has uploaded a new change for review.
Change subject: bootstrap: always use /tmp for output files ......................................................................
bootstrap: always use /tmp for output files
Engine sends and collects files from /tmp. /tmp is *ALWAYS* used from node or from none-node installations.
While bootstrap code uses the following directory: tempfile.gettempdir()
This is invalid as there is no sync between engine and bootstrap code, because if TMPDIR environment variable is defined at computer where bootstrap is running on, files will go to whatever value in TMPDIR and not /tmp, hence failing the bootstrap process.
This is a BUG in current code, it is not a feature.
This change remove this in favor of plain /tmp usage for files, it does not imply that the bootstrap scripts are executed at /tmp, only that the input and output files are stored where engine collects them.
This change is NOT a regression as it work in more scenarios than current implementation using current engine implementation.
/tmp is mandatory in FHS[1] and in POSIX,p2 systems, all Linux distributions comply with this.
--- The /tmp directory must be made available for programs that require temporary files. Programs must not assume that any files or directories in /tmp are
preserved between invocations of the program. ---
FUTURE
If the need manifests, engine can ask destination where to place bootstrap script wither by using environment (TMPDIR, OVIRT_TMPDIR), or by looking at /etc/ file. Bootstrap script may produce certificate request or any other output at stdout to allow collection via the ssh session, it also may get input via stdin during execution, so no file transfer is required during bootstrap except of bootstrap scripts nor several iterations.
[1] http://www.pathname.com/fhs/
Change-Id: Ia93bcf5b3a911fba985f52391a47caf858697581 Signed-off-by: Alon Bar-Lev alonbl@redhat.com --- M vdsm_reg/deployUtil.py.in 1 file changed, 1 insertion(+), 7 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/91/7091/1 -- To view, visit http://gerrit.ovirt.org/7091 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: Ia93bcf5b3a911fba985f52391a47caf858697581 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Alon Bar-Lev alonbl@redhat.com