Change in vdsm[master]: bootstrap: always use /tmp for output files

danken at redhat.com danken at redhat.com
Thu Aug 16 10:18:57 UTC 2012


Dan Kenigsberg has submitted this change and it was merged.

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 at redhat.com>
---
M vdsm_reg/deployUtil.py.in
1 file changed, 1 insertion(+), 7 deletions(-)

Approvals:
  Alon Bar-Lev: Verified
  Douglas Schilling Landgraf: Looks good to me, but someone else must approve
  Dan Kenigsberg: Looks good to me, approved


--
To view, visit http://gerrit.ovirt.org/7091
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia93bcf5b3a911fba985f52391a47caf858697581
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <alonbl at redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alonbl at redhat.com>
Gerrit-Reviewer: Barak Azulay <bazulay at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfediuck at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list