Merge "Improve VM failure data collection"

This commit is contained in:
Zuul 2019-07-02 13:39:51 +00:00 committed by Gerrit Code Review
commit 2d7398fc21
4 changed files with 23 additions and 9 deletions

View File

@ -91,6 +91,8 @@ shipyard_action_wait() {
ACTION_ID=$(shipyard_cmd create action ${options} "${action}")
ACTION_ID=$(echo "${ACTION_ID}" | grep -oE 'action/[0-9A-Z]+')
echo "Action ${ACTION_ID} has been created."
while true;
do
if [[ $(date +%s) -ge ${end_time} ]]

View File

@ -157,11 +157,13 @@ vm_create() {
log Creating VM "${NAME}" and bootstrapping the boot drive
virt-install \
--name "${NAME}" \
--os-variant ubuntu16.04 \
--virt-type kvm \
--cpu ${VIRSH_CPU_OPTS} \
--graphics vnc,listen=0.0.0.0 \
--serial file,path=${TEMP_DIR}/console/${NAME}.log \
--graphics none \
--noautoconsole \
--network "network=airship_gate,model=virtio" \
--network "network=airship_gate,model=virtio,address.type=pci,address.slot=0x03" \
--mac="${MAC_ADDRESS}" \
--vcpus "$(config_vm_vcpus ${NAME})" \
--memory "$(config_vm_memory ${NAME})" \
@ -177,11 +179,13 @@ vm_create() {
log Creating VM "${NAME}"
virt-install \
--name "${NAME}" \
--os-variant ubuntu16.04 \
--virt-type kvm \
--cpu ${VIRSH_CPU_OPTS} \
--graphics vnc,listen=0.0.0.0 \
--graphics none \
--serial file,path=${TEMP_DIR}/console/${NAME}.log \
--noautoconsole \
--network "network=airship_gate,model=virtio" \
--network "network=airship_gate,model=virtio,address.type=pci,address.slot=0x03" \
--mac="${MAC_ADDRESS}" \
--vcpus "$(config_vm_vcpus ${NAME})" \
--memory "$(config_vm_memory ${NAME})" \
@ -266,7 +270,8 @@ vol_create_root() {
virsh vol-create-as \
--pool "${VIRSH_POOL}" \
--name "airship-gate-${NAME}.img" \
--capacity 64G \
--capacity 56G \
--allocation 56G \
--format qcow2 \
--backing-vol 'airship-gate-base.img' \
--backing-vol-format qcow2 &>> "${LOG_FILE}"
@ -274,8 +279,9 @@ vol_create_root() {
virsh vol-create-as \
--pool "${VIRSH_POOL}" \
--name "airship-gate-${NAME}.img" \
--capacity 64G \
--format qcow2 &>> "${LOG_FILE}"
--capacity 56G \
--allocation 56G \
--format raw &>> "${LOG_FILE}"
fi
}

View File

@ -21,6 +21,9 @@ source "${GATE_UTILS}"
# note: currently not used
# registry_up
# Create temp_dir structure
mkdir -p ${TEMP_DIR}/console
# SSH setup
ssh_setup_declare

View File

@ -21,8 +21,11 @@ GATE_UTILS=${WORKSPACE}/multi_nodes_gate/airship_gate/lib/all.sh
GATE_COLOR=${GATE_COLOR:-1}
MANIFEST_ARG=${1:-multinode_deploy}
GATE_MANIFEST=${WORKSPACE}/multi_nodes_gate/airship_gate/manifests/${MANIFEST_ARG}.json
MANIFEST_ARG=${1:-"multinode_deploy"}
if [ -z "$GATE_MANIFEST" ]
then
GATE_MANIFEST=${WORKSPACE}/multi_nodes_gate/airship_gate/manifests/${MANIFEST_ARG}.json
fi
export GATE_COLOR
export GATE_MANIFEST