Reorder ifup interfaces and modifying /etc/resolv.conf
With day01 image, /etc/resolv.conf gets wrong IPs for nameservers
if modified before ifdown/ifup ens3
Change-Id: Ib30887735ad5d4e48da1ab9bb34fba39d0ceec03
diff --git a/tcp_tests/templates/mcp-ocata-local-repo-dvr/underlay--user-data-apt01.yaml b/tcp_tests/templates/mcp-ocata-local-repo-dvr/underlay--user-data-apt01.yaml
index 7faeee0..fc3d284 100644
--- a/tcp_tests/templates/mcp-ocata-local-repo-dvr/underlay--user-data-apt01.yaml
+++ b/tcp_tests/templates/mcp-ocata-local-repo-dvr/underlay--user-data-apt01.yaml
@@ -27,6 +27,13 @@
all: '| tee -a /var/log/cloud-init-output.log /dev/tty0'
runcmd:
+ # Prepare network connection
+ - sudo ifup ens3
+ #- sudo route add default gw {gateway} {interface_name}
+ - sudo ifup ens4
+ - sudo ifup ens5
+ - sudo ifup ens6
+
- rm /etc/resolv.conf
- touch /etc/resolv.conf
- export LOCAL_DNS_IP=$(ifconfig ens3 | grep "inet addr" | cut -d ':' -f 2 | cut -d ' ' -f 1)
@@ -37,12 +44,6 @@
- export TERM=linux
- export LANG=C
- # Prepare network connection
- - sudo ifup ens3
- #- sudo route add default gw {gateway} {interface_name}
- - sudo ifup ens4
- - sudo ifup ens5
- - sudo ifup ens6
# Create swap
- fallocate -l 4G /swapfile