Skip to content

Commit c84a7b3

Browse files
committed
CI cloud-init workaround
Signed-off-by: Justin Cinkelj <justin.cinkelj@xlab.si>
1 parent 311fd54 commit c84a7b3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/integration/targets/role_template2vm/templates/meta-data.ubuntu-20.04.yml.j2

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
dsmode: local
22
local-hostname: "{{ vm_name }}"
3+
{#
4+
Comment out network configuration to use cloud-init default
5+
which is to enable DHCP on the first detected interface.
6+
In generated /var/lib/cloud/instance/network-config.json is string "_orig_eni_name".
7+
This is invalid cloud-init config.
8+
39
network-interfaces: |
410
auto lo
511
iface lo inet loopback
@@ -13,6 +19,8 @@ network-interfaces: |
1319
# - CI VSNS v9.3.5 (https://10.5.11.203/)
1420
# - CI VSNS v9.4.17 (https://10.5.11.205/)
1521
iface ens1 inet dhcp
22+
# Device enp1s1 on VSNS 4.7.0.221603 prerelease
23+
iface enp1 inet dhcp
1624
{% endif %}
1725
{% if vm_network_mode == "static" %}
1826
iface {{ vm_network_iface }} inet static
@@ -21,3 +29,4 @@ network-interfaces: |
2129
gateway {{ vm_network_gateway }}
2230
dns-nameservers {{ vm_network_dns_nameservers }}
2331
{% endif %}
32+
#}

0 commit comments

Comments
 (0)