diff --git a/labs/osbash/lib/osbash/functions-host.sh b/labs/osbash/lib/osbash/functions-host.sh index a3a0f056..d108232d 100644 --- a/labs/osbash/lib/osbash/functions-host.sh +++ b/labs/osbash/lib/osbash/functions-host.sh @@ -345,6 +345,10 @@ function command_from_config { vm_wait_for_shutdown "$vm_name" ;; snapshot_cycle) + # Skip command if user disabled snapshot cycles + if [ "${SNAP_CYCLE:-}" = "no" ]; then + continue + fi # Format: snapshot_cycle [-g ] [-n ] # comprises shutdown, boot, wait_for_shutdown, snapshot get_cmd_options $args diff --git a/labs/osbash/osbash.sh b/labs/osbash/osbash.sh index 220f572e..45199dfc 100755 --- a/labs/osbash/osbash.sh +++ b/labs/osbash/osbash.sh @@ -38,6 +38,7 @@ function usage { echo "-g GUI GUI type during build" #echo "-e EXPORT Export node VMs" echo "--no-color Disables colors during build" + echo "--no-snap-cycle Disables snapshot cycles during build" echo echo "TARGET basedisk: build configured basedisk" echo " cluster : build OpenStack cluster [all nodes]" @@ -60,6 +61,10 @@ function print_config { echo -e "${CInfo:-}Distribution name: ${CData:-} $(get_distro_name "$DISTRO")${CReset:-}" fi + if [ "${SNAP_CYCLE:-}" = "no" ]; then + echo -e "${CInfo:-}Skipping snapshot cycles.${CReset:-}" + fi + if [ -n "${EXPORT_OVA:-}" ]; then echo "Exporting to OVA: ${EXPORT_OVA}" elif [ -n "${EXPORT_VM_DIR:-}" ]; then @@ -115,6 +120,9 @@ while getopts :be:g:-:hnt:w opt; do no-color) unset CError CStatus CInfo CProcess CData CMissing CReset ;; + no-snap-cycle) + SNAP_CYCLE="no" + ;; help) usage ;; diff --git a/labs/osbash/scripts/osbash/init_xxx_node.sh b/labs/osbash/scripts/osbash/init_xxx_node.sh index 6907a116..34c4d9cc 100755 --- a/labs/osbash/scripts/osbash/init_xxx_node.sh +++ b/labs/osbash/scripts/osbash/init_xxx_node.sh @@ -29,3 +29,7 @@ echo "$NODE_NAME" | sudo tee /etc/hostname > /dev/null # Configure network interfaces config_network + +for iface in $(ip -o link show|grep -o "eth[[:digit:]]"); do + sudo ifup "$iface" +done