labs: explain host/VM script interaction

This patch adds a few comments to help the reader understand how host
(osbash, wbatch) scripts and VM scripts interact.

Change-Id: I1dd07d131877200d65664ab98c39d621df3e3604
Implements: blueprint openstack-training-labs
This commit is contained in:
Roger Luethi 2014-08-04 10:54:40 +02:00
parent 257c8fd0ca
commit b00fdddbe1
2 changed files with 7 additions and 2 deletions

View File

@ -35,7 +35,9 @@ function zero_empty_space {
sudo rm /filler
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Used by guest scripts to let osbash know they are running
# For guest scripts to let osbash know they are running; used when osbashauto
# runs scripts inside of the VM (STATUS_DIR directory must be shared between
# host and VM).
function indicate_current_auto {
if [ "${VM_SHELL_USER:-}" = "osbash" ]; then

View File

@ -154,6 +154,8 @@ function autostart_reset {
clean_dir "$STATUS_DIR"
}
# Wait until all autofiles are processed (indicated by a "$STATUS_DIR/done"
# file created either by osbashauto or ssh_process_autostart)
function wait_for_autofiles {
local DONE=false
shopt -s nullglob
@ -169,7 +171,8 @@ function wait_for_autofiles {
rm "$STATUS_DIR/done"
# Return only after checking for remaining *.sh.begin files
fi
# Note: begin files are only visible with a VirtualBox shared folder
# Note: begin files (created by indicate_current_auto) are only visible
# if the STATUS_DIR directory is shared between host and VM
local PROCESSING=("$STATUS_DIR"/*.sh.begin)
if [ -n "${PROCESSING[0]-}" ]; then
for f in "${PROCESSING[@]}"; do