Fix bug of loading wrong PDF and IDF files 06/73306/3
authorxudan16 <xudan16@huawei.com>
Thu, 14 Apr 2022 09:13:26 +0000 (17:13 +0800)
committerRihab Banday <rihab.banday@ericsson.com>
Thu, 21 Apr 2022 09:47:08 +0000 (09:47 +0000)
Also fix KUB-62 and another tiny bug

JIRA: KUB-62

Signed-off-by: xudan16 <xudan16@huawei.com>
Change-Id: I0ec0837b60110fc6af6bd49c6e5c9564dc38adc2
Reviewed-on: https://gerrit.opnfv.org/gerrit/c/kuberef/+/73306
Tested-by: jenkins-ci <jenkins-opnfv-ci@opnfv.org>
Reviewed-by: Rihab Banday <rihab.banday@ericsson.com>
functions.sh
hw_config/intel/setup_network.sh
inventory/.keep [deleted file]
playbooks/roles/jump-vm/tasks/main.yaml

index c4690ef..0213829 100755 (executable)
@@ -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)
index 18bdeac..14cbb0a 100755 (executable)
@@ -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 (file)
index e69de29..0000000
index 89e35b2..ca8adf8 100644 (file)
@@ -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"