Merge "Improve VM failure data collection"
This commit is contained in:
commit
2d7398fc21
|
@ -91,6 +91,8 @@ shipyard_action_wait() {
|
||||||
ACTION_ID=$(shipyard_cmd create action ${options} "${action}")
|
ACTION_ID=$(shipyard_cmd create action ${options} "${action}")
|
||||||
ACTION_ID=$(echo "${ACTION_ID}" | grep -oE 'action/[0-9A-Z]+')
|
ACTION_ID=$(echo "${ACTION_ID}" | grep -oE 'action/[0-9A-Z]+')
|
||||||
|
|
||||||
|
echo "Action ${ACTION_ID} has been created."
|
||||||
|
|
||||||
while true;
|
while true;
|
||||||
do
|
do
|
||||||
if [[ $(date +%s) -ge ${end_time} ]]
|
if [[ $(date +%s) -ge ${end_time} ]]
|
||||||
|
|
|
@ -157,11 +157,13 @@ vm_create() {
|
||||||
log Creating VM "${NAME}" and bootstrapping the boot drive
|
log Creating VM "${NAME}" and bootstrapping the boot drive
|
||||||
virt-install \
|
virt-install \
|
||||||
--name "${NAME}" \
|
--name "${NAME}" \
|
||||||
|
--os-variant ubuntu16.04 \
|
||||||
--virt-type kvm \
|
--virt-type kvm \
|
||||||
--cpu ${VIRSH_CPU_OPTS} \
|
--cpu ${VIRSH_CPU_OPTS} \
|
||||||
--graphics vnc,listen=0.0.0.0 \
|
--serial file,path=${TEMP_DIR}/console/${NAME}.log \
|
||||||
|
--graphics none \
|
||||||
--noautoconsole \
|
--noautoconsole \
|
||||||
--network "network=airship_gate,model=virtio" \
|
--network "network=airship_gate,model=virtio,address.type=pci,address.slot=0x03" \
|
||||||
--mac="${MAC_ADDRESS}" \
|
--mac="${MAC_ADDRESS}" \
|
||||||
--vcpus "$(config_vm_vcpus ${NAME})" \
|
--vcpus "$(config_vm_vcpus ${NAME})" \
|
||||||
--memory "$(config_vm_memory ${NAME})" \
|
--memory "$(config_vm_memory ${NAME})" \
|
||||||
|
@ -177,11 +179,13 @@ vm_create() {
|
||||||
log Creating VM "${NAME}"
|
log Creating VM "${NAME}"
|
||||||
virt-install \
|
virt-install \
|
||||||
--name "${NAME}" \
|
--name "${NAME}" \
|
||||||
|
--os-variant ubuntu16.04 \
|
||||||
--virt-type kvm \
|
--virt-type kvm \
|
||||||
--cpu ${VIRSH_CPU_OPTS} \
|
--cpu ${VIRSH_CPU_OPTS} \
|
||||||
--graphics vnc,listen=0.0.0.0 \
|
--graphics none \
|
||||||
|
--serial file,path=${TEMP_DIR}/console/${NAME}.log \
|
||||||
--noautoconsole \
|
--noautoconsole \
|
||||||
--network "network=airship_gate,model=virtio" \
|
--network "network=airship_gate,model=virtio,address.type=pci,address.slot=0x03" \
|
||||||
--mac="${MAC_ADDRESS}" \
|
--mac="${MAC_ADDRESS}" \
|
||||||
--vcpus "$(config_vm_vcpus ${NAME})" \
|
--vcpus "$(config_vm_vcpus ${NAME})" \
|
||||||
--memory "$(config_vm_memory ${NAME})" \
|
--memory "$(config_vm_memory ${NAME})" \
|
||||||
|
@ -266,7 +270,8 @@ vol_create_root() {
|
||||||
virsh vol-create-as \
|
virsh vol-create-as \
|
||||||
--pool "${VIRSH_POOL}" \
|
--pool "${VIRSH_POOL}" \
|
||||||
--name "airship-gate-${NAME}.img" \
|
--name "airship-gate-${NAME}.img" \
|
||||||
--capacity 64G \
|
--capacity 56G \
|
||||||
|
--allocation 56G \
|
||||||
--format qcow2 \
|
--format qcow2 \
|
||||||
--backing-vol 'airship-gate-base.img' \
|
--backing-vol 'airship-gate-base.img' \
|
||||||
--backing-vol-format qcow2 &>> "${LOG_FILE}"
|
--backing-vol-format qcow2 &>> "${LOG_FILE}"
|
||||||
|
@ -274,8 +279,9 @@ vol_create_root() {
|
||||||
virsh vol-create-as \
|
virsh vol-create-as \
|
||||||
--pool "${VIRSH_POOL}" \
|
--pool "${VIRSH_POOL}" \
|
||||||
--name "airship-gate-${NAME}.img" \
|
--name "airship-gate-${NAME}.img" \
|
||||||
--capacity 64G \
|
--capacity 56G \
|
||||||
--format qcow2 &>> "${LOG_FILE}"
|
--allocation 56G \
|
||||||
|
--format raw &>> "${LOG_FILE}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,9 @@ source "${GATE_UTILS}"
|
||||||
# note: currently not used
|
# note: currently not used
|
||||||
# registry_up
|
# registry_up
|
||||||
|
|
||||||
|
# Create temp_dir structure
|
||||||
|
mkdir -p ${TEMP_DIR}/console
|
||||||
|
|
||||||
# SSH setup
|
# SSH setup
|
||||||
ssh_setup_declare
|
ssh_setup_declare
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,11 @@ GATE_UTILS=${WORKSPACE}/multi_nodes_gate/airship_gate/lib/all.sh
|
||||||
|
|
||||||
GATE_COLOR=${GATE_COLOR:-1}
|
GATE_COLOR=${GATE_COLOR:-1}
|
||||||
|
|
||||||
MANIFEST_ARG=${1:-multinode_deploy}
|
MANIFEST_ARG=${1:-"multinode_deploy"}
|
||||||
GATE_MANIFEST=${WORKSPACE}/multi_nodes_gate/airship_gate/manifests/${MANIFEST_ARG}.json
|
if [ -z "$GATE_MANIFEST" ]
|
||||||
|
then
|
||||||
|
GATE_MANIFEST=${WORKSPACE}/multi_nodes_gate/airship_gate/manifests/${MANIFEST_ARG}.json
|
||||||
|
fi
|
||||||
|
|
||||||
export GATE_COLOR
|
export GATE_COLOR
|
||||||
export GATE_MANIFEST
|
export GATE_MANIFEST
|
||||||
|
|
Loading…
Reference in New Issue