Merge "Add option to skip snapshot cycles"
This commit is contained in:
@@ -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 <gui_type>] [-n <node_name>]
|
||||
# comprises shutdown, boot, wait_for_shutdown, snapshot
|
||||
get_cmd_options $args
|
||||
|
||||
@@ -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
|
||||
;;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user