From: xudan16 Date: Thu, 14 Apr 2022 09:13:26 +0000 (+0800) Subject: Fix bug of loading wrong PDF and IDF files X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?p=kuberef.git;a=commitdiff_plain;h=e1fe6a366e8cdca3d490befd0d381efe3f1921af Fix bug of loading wrong PDF and IDF files Also fix KUB-62 and another tiny bug JIRA: KUB-62 Signed-off-by: xudan16 Change-Id: I0ec0837b60110fc6af6bd49c6e5c9564dc38adc2 Reviewed-on: https://gerrit.opnfv.org/gerrit/c/kuberef/+/73306 Tested-by: jenkins-ci Reviewed-by: Rihab Banday --- diff --git a/functions.sh b/functions.sh index c4690ef..0213829 100755 --- a/functions.sh +++ b/functions.sh @@ -160,10 +160,9 @@ copy_files_jump() { # Host Provisioning provision_hosts_baremetal() { + CMD="./deploy.sh -s ironic -d ${DISTRO} -p file:///${PROJECT_ROOT}/engine/engine/pdf.yaml -i file:///${PROJECT_ROOT}/engine/engine/idf.yaml" if [ "${DEBUG:-false}" == "true" ]; then - DEBUG_FLAG="-v" - else - DEBUG_FLAG="" + CMD+=" -v" fi # shellcheck disable=SC2087 @@ -176,19 +175,11 @@ fi cp "${PROJECT_ROOT}"/"${VENDOR}"/{pdf.yaml,idf.yaml} \ "${PROJECT_ROOT}"/engine/engine cd "${PROJECT_ROOT}"/engine/engine || return -./deploy.sh -s ironic "${DEBUG_FLAG}" -d "${DISTRO}" \ --p file:///"${PROJECT_ROOT}"/engine/engine/pdf.yaml \ --i file:///"${PROJECT_ROOT}"/engine/engine/idf.yaml +${CMD} EOF } provision_hosts_vms() { - if [ "${DEBUG:-false}" == "true" ]; then - DEBUG_FLAG="-v" - else - DEBUG_FLAG="" - fi - # shellcheck disable=SC2087 # Install and run cloud-infra if [ ! -d "${CURRENTPATH}/engine" ]; then @@ -196,9 +187,12 @@ provision_hosts_vms() { fi cp "${CURRENTPATH}"/hw_config/"${VENDOR}"/{pdf.yaml,idf.yaml} "${CURRENTPATH}"/engine/engine cd "${CURRENTPATH}"/engine/engine || return - ./deploy.sh -s ironic "${DEBUG_FLAG}" \ - -p file:///"${CURRENTPATH}"/engine/engine/pdf.yaml \ - -i file:///"${CURRENTPATH}"/engine/engine/idf.yaml + CMD="./deploy.sh -s ironic -p file:///${CURRENTPATH}/engine/engine/pdf.yaml -i file:///${CURRENTPATH}/engine/engine/idf.yaml" + if [ "${DEBUG:-false}" == "true" ]; then + CMD+=" -v" + fi + + ${CMD} } # Setup networking on provisioned hosts (Adapt setup_network.sh according to your network setup) diff --git a/hw_config/intel/setup_network.sh b/hw_config/intel/setup_network.sh index 18bdeac..14cbb0a 100755 --- a/hw_config/intel/setup_network.sh +++ b/hw_config/intel/setup_network.sh @@ -10,6 +10,7 @@ # files with correct info echo nameserver 8.8.8.8 > /etc/resolv.conf +sed -i '25idns=none' /etc/NetworkManager/NetworkManager.conf sed -i 's/NM_CONTROLLED=yes/NM_CONTROLLED=no/g' \ /etc/sysconfig/network-scripts/ifcfg-eth2 echo GATEWAY=10.10.190.1 >> /etc/sysconfig/network-scripts/ifcfg-eth2 diff --git a/inventory/.keep b/inventory/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/playbooks/roles/jump-vm/tasks/main.yaml b/playbooks/roles/jump-vm/tasks/main.yaml index 89e35b2..ca8adf8 100644 --- a/playbooks/roles/jump-vm/tasks/main.yaml +++ b/playbooks/roles/jump-vm/tasks/main.yaml @@ -89,9 +89,9 @@ - name: define jump VM command: "virt-install --connect qemu:///system --name {{ jumphost.name }} \ - --ram 8192 --vcpus=8 --os-type linux --os-variant ubuntu16.04 \ - --disk path={{ workspace }}/kuberef-jump.qcow2,format=qcow2 \ - --disk {{ workspace }}/kuberef-jump-cidata.iso,device=cdrom \ + --ram 8192 --vcpus=8 --os-type linux --os-variant ubuntu18.04 \ + --disk path={{ workspace }}/{{ jumphost.name }}.qcow2,format=qcow2 \ + --disk {{ workspace }}/{{ jumphost.name }}-cidata.iso,device=cdrom \ --network network=default,model=virtio,mac='{{ jumphost.interfaces[engine.net_config[engine.public_network].interface].mac_address }}' \ {{ '--network bridge=pxebr,model=rtl8139,mac=' + jumphost.interfaces[engine.net_config[engine.pxe_network].interface].mac_address if deployment_type == 'full' else '' }} \ --import --noautoconsole"