diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2017-07-25 00:29:47 +0200 |
---|---|---|
committer | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2017-07-25 03:06:24 +0200 |
commit | e46f1da4b3342ca724fb5556a5fac547fee274b3 (patch) | |
tree | e4f10abbc6130dd4395fef0b8a3f2d73bb445b04 /patches | |
parent | 5f29466a9eece85c13b53100ca4ef980f9e7660c (diff) |
p/fuel: virtio: min libvirt 3.x and Qemu 2.6
Expect host virtualization tools (libvirt, qemu) to be recent enough
to support modern virtio-net-pci out of box as a default.
This allows us to drop some changes and a hack - see [1]:
- "model=virtio" implies "model=virtio-net-pci" on libvirt 3.x;
- "model=virtio" puts each NIC on a seperate bus, all work now;
- modern virtio is automatically used when NIC is on PCIe bus;
Revert "p/fuel: lib.sh: Revert to virtio-mmio for PXE net"
This reverts commit 4f72e6be436badd2ded546424ec4a304cd6ce5d3.
[1] https://lists.gnu.org/archive/html/qemu-devel/2017-07/msg07594.html
Change-Id: Iaa7af63846c9d9dca5b7a9be5efa54f8cd56242e
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'patches')
-rw-r--r-- | patches/opnfv-fuel/0003-lib.sh-AArch64-virt-install-Use-virtio-net-pci.patch | 80 | ||||
-rw-r--r-- | patches/opnfv-fuel/0003-lib.sh-Use-host-passthrough-when-spawning-VMs.patch (renamed from patches/opnfv-fuel/0008-lib.sh-Use-host-passthrough-when-spawning-VMs.patch) | 10 | ||||
-rw-r--r-- | patches/opnfv-fuel/0006-classes-virtual-AArch64-virtio-NIC-names-sync.patch (renamed from patches/opnfv-fuel/0006-classes-virtual-AArch64-virtio-pci-net-sync.patch) | 115 |
3 files changed, 63 insertions, 142 deletions
diff --git a/patches/opnfv-fuel/0003-lib.sh-AArch64-virt-install-Use-virtio-net-pci.patch b/patches/opnfv-fuel/0003-lib.sh-AArch64-virt-install-Use-virtio-net-pci.patch deleted file mode 100644 index c49bddec..00000000 --- a/patches/opnfv-fuel/0003-lib.sh-AArch64-virt-install-Use-virtio-net-pci.patch +++ /dev/null @@ -1,80 +0,0 @@ -From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> -Date: Tue, 11 Jul 2017 19:06:47 +0200 -Subject: [PATCH] lib.sh: AArch64: virt-install: Use virtio-net-pci - -AArch64 virt tools (i.e. libvirt) default to "virtio-mmio", instead of -"virtio-net-pci", at least before libvirt 3.x (see [1]). - -Without PCI bus info, we can't really enforce a specific order for -the guest ethernet devices. - -This leads to a mismatch between cloud-init, who expects "pxe" -network to reside on "eth0", while in fact it ends up on "eth3". -As a consequence, we have no connectivity to the guest, as DHCP -is only configured by cloud-init on "eth0", and also the boot -sequence waits ~5 minutes for "eth0" to come up, before eventually -giving up. - -Moreover, predictable network interface naming is out of the question -with virtio-mmio, as there is no bus information to rely on. - -Therefore we will enforce "virtio-net-pci" on AArch64, instead of -the default "virtio" (which translates into "virtio-mmio" currently). - -FIXME: Apparently, both legacy and modern virtio (0.9 and 1.0) are -active, which leads to triggering bug[2]. -For now, throw some sed magic at it and disable legacy mode. - -[1] https://www.redhat.com/archives/libvir-list/2016-August/msg00931.html -[2] https://bugzilla.redhat.com/show_bug.cgi?id=1370005 - -Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> ---- - mcp/scripts/lib.sh | 20 ++++++++++++++++---- - 1 file changed, 16 insertions(+), 4 deletions(-) - -diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh -index 862fdcc..7c4c46f 100644 ---- a/mcp/scripts/lib.sh -+++ b/mcp/scripts/lib.sh -@@ -58,24 +58,36 @@ create_vms() { - - # AArch64: prepare arch specific arguments - local virt_extra_args="" -+ local virt_pxe_net_model="virtio" -+ local virt_net_model="${virt_pxe_net_model}" - if [ "$(uname -i)" = "aarch64" ]; then - # No Cirrus VGA on AArch64, use vga std - virt_extra_args="$virt_extra_args --video=vga" -+ # AArch64 networking defaults to virtio-mmio before libvirt 3.x -+ virt_net_model="virtio-net-pci" - fi - - # create vms with specified options - for node in "${vnodes[@]}"; do - virt-install --name ${node} --ram ${vnodes_ram[$node]} --vcpus ${vnodes_vcpus[$node]} --cpu host --accelerate \ -- --network network:pxe,model=virtio \ -- --network network:mgmt,model=virtio \ -- --network network:internal,model=virtio \ -- --network network:public,model=virtio \ -+ --network network:pxe,model=${virt_pxe_net_model} \ -+ --network network:mgmt,model=${virt_net_model} \ -+ --network network:internal,model=${virt_net_model} \ -+ --network network:public,model=${virt_net_model} \ - --disk path=$(pwd)/images/mcp_${node}.qcow2,format=qcow2,bus=virtio,cache=none,io=native \ - --os-type linux --os-variant none \ - --boot hd --vnc --console pty --autostart --noreboot \ - --disk path=$(pwd)/images/mcp_${node}.iso,device=cdrom \ - --noautoconsole \ - ${virt_extra_args} -+ -+ # NOTE(armband): Disable legacy virtio (0.9) in favor of modern virtio (1.0) -+ # http://blog.vmsplice.net/2011/04/how-to-pass-qemu-command-line-options.html -+ # <qemu:commandline> -+ # <qemu:arg value='-global'/> -+ # <qemu:arg value='virtio-pci.disable-legacy=on'/> -+ # </qemu:commandline> -+ EDITOR="sed -i -e \"s|\(<domain.*\)>|\1 xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>|\" -e \"s|\(</domain>\)|<qemu:commandline><qemu:arg value='-global'/><qemu:arg value='virtio-pci.disable-legacy=on'/></qemu:commandline>\1|\"" virsh edit ${node} - done - } - diff --git a/patches/opnfv-fuel/0008-lib.sh-Use-host-passthrough-when-spawning-VMs.patch b/patches/opnfv-fuel/0003-lib.sh-Use-host-passthrough-when-spawning-VMs.patch index 88793337..57e45d6f 100644 --- a/patches/opnfv-fuel/0008-lib.sh-Use-host-passthrough-when-spawning-VMs.patch +++ b/patches/opnfv-fuel/0003-lib.sh-Use-host-passthrough-when-spawning-VMs.patch @@ -15,15 +15,15 @@ Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh -index 7c4c46f..2be3e65 100644 +index 862fdcc..251c5a5 100644 --- a/mcp/scripts/lib.sh +++ b/mcp/scripts/lib.sh -@@ -69,7 +69,7 @@ create_vms() { +@@ -65,7 +65,7 @@ create_vms() { # create vms with specified options for node in "${vnodes[@]}"; do - virt-install --name ${node} --ram ${vnodes_ram[$node]} --vcpus ${vnodes_vcpus[$node]} --cpu host --accelerate \ + virt-install --name ${node} --ram ${vnodes_ram[$node]} --vcpus ${vnodes_vcpus[$node]} --cpu host-passthrough --accelerate \ - --network network:pxe,model=${virt_pxe_net_model} \ - --network network:mgmt,model=${virt_net_model} \ - --network network:internal,model=${virt_net_model} \ + --network network:pxe,model=virtio \ + --network network:mgmt,model=virtio \ + --network network:internal,model=virtio \ diff --git a/patches/opnfv-fuel/0006-classes-virtual-AArch64-virtio-pci-net-sync.patch b/patches/opnfv-fuel/0006-classes-virtual-AArch64-virtio-NIC-names-sync.patch index 85434387..2c64459b 100644 --- a/patches/opnfv-fuel/0006-classes-virtual-AArch64-virtio-pci-net-sync.patch +++ b/patches/opnfv-fuel/0006-classes-virtual-AArch64-virtio-NIC-names-sync.patch @@ -1,21 +1,22 @@ From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> -Date: Sun, 16 Jul 2017 03:58:58 +0200 -Subject: [PATCH] classes: virtual: AArch64: virtio-pci-net sync +Date: Tue, 25 Jul 2017 02:53:16 +0200 +Subject: [PATCH] classes: virtual: AArch64: virtio NIC names sync grep -e "ens[[:digit:]]" -R . -l | \ xargs sed -i \ - -e 's/ens3/eth0/g' \ - -e 's/ens4/enp2s1/g' \ - -e 's/ens5/enp2s2/g' \ - -e 's/ens6/enp2s3/g' + -e 's/ens3/enp1s0/g' \ + -e 's/ens4/enp2s2/g' \ + -e 's/ens5/enp3s0/g' \ + -e 's/ens6/enp4s0/g' Since AArch64 will be using virtio-net-pci NIC model for guests, predictable interface naming yields a slightly different scheme. Update all configuration to reflect this. -NOTE: PXE interfaces still uses "virtio-mmio", which translates -into "eth0". +NOTE: Above configuration is expected with libvirt 3.x, which puts +each NIC on a separate PCIe bus (which also imposes virtio modern +is used). Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> --- @@ -35,7 +36,7 @@ Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> 13 files changed, 36 insertions(+), 36 deletions(-) diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl/infra/config.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl/infra/config.yml -index 328d6df..99e6152 100644 +index 328d6df..57c6cec 100644 --- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl/infra/config.yml +++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl/infra/config.yml @@ -27,7 +27,7 @@ parameters: @@ -43,12 +44,12 @@ index 328d6df..99e6152 100644 network: interface: - ens4: -+ enp2s1: ++ enp2s0: enabled: true type: eth proto: static diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl/opendaylight/control.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl/opendaylight/control.yml -index 6c6640a..c775090 100644 +index 6c6640a..ec02e94 100644 --- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl/opendaylight/control.yml +++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl/opendaylight/control.yml @@ -11,7 +11,7 @@ parameters: @@ -56,12 +57,12 @@ index 6c6640a..c775090 100644 network: interface: - ens4: -+ enp2s1: ++ enp2s0: enabled: true type: eth proto: static diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl/openstack/compute.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl/openstack/compute.yml -index 97eda6c..98d2ea2 100644 +index 97eda6c..3f18ccd 100644 --- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl/openstack/compute.yml +++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl/openstack/compute.yml @@ -10,9 +10,9 @@ classes: @@ -71,9 +72,9 @@ index 97eda6c..98d2ea2 100644 - primary_interface: ens4 - tenant_interface: ens5 - external_interface: ens6 -+ primary_interface: enp2s1 -+ tenant_interface: enp2s2 -+ external_interface: enp2s3 ++ primary_interface: enp2s0 ++ tenant_interface: enp3s0 ++ external_interface: enp4s0 interface_mtu: 9000 linux_system_codename: xenial loopback_device_size: 10 @@ -82,12 +83,12 @@ index 97eda6c..98d2ea2 100644 dhcp_int: enabled: true - name: ens3 -+ name: eth0 ++ name: enp1s0 proto: dhcp type: eth mtu: ${_param:interface_mtu} diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl/openstack/control.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl/openstack/control.yml -index 17c22c5..5bd4a95 100644 +index 17c22c5..ca3a812 100644 --- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl/openstack/control.yml +++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl/openstack/control.yml @@ -40,13 +40,13 @@ parameters: @@ -95,19 +96,19 @@ index 17c22c5..5bd4a95 100644 network: interface: - ens4: -+ enp2s1: ++ enp2s0: enabled: true type: eth proto: static address: ${_param:single_address} netmask: 255.255.255.0 - ens6: -+ enp2s3: ++ enp4s0: enabled: true type: eth proto: static diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl/openstack/gateway.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl/openstack/gateway.yml -index 4ea51f3..b5709e7 100644 +index 4ea51f3..ee17dbd 100644 --- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl/openstack/gateway.yml +++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl/openstack/gateway.yml @@ -6,9 +6,9 @@ classes: @@ -117,9 +118,9 @@ index 4ea51f3..b5709e7 100644 - primary_interface: ens4 - tenant_interface: ens5 - external_interface: ens6 -+ primary_interface: enp2s1 -+ tenant_interface: enp2s2 -+ external_interface: enp2s3 ++ primary_interface: enp2s0 ++ tenant_interface: enp3s0 ++ external_interface: enp4s0 interface_mtu: 9000 linux_system_codename: xenial neutron_agents: @@ -128,12 +129,12 @@ index 4ea51f3..b5709e7 100644 dhcp_int: enabled: true - name: ens3 -+ name: eth0 ++ name: enp1s0 proto: dhcp type: eth mtu: ${_param:interface_mtu} diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs-dpdk/infra/config.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs-dpdk/infra/config.yml -index 864c71d..ae06d21 100644 +index 864c71d..aec6cde 100644 --- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs-dpdk/infra/config.yml +++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs-dpdk/infra/config.yml @@ -26,7 +26,7 @@ parameters: @@ -141,7 +142,7 @@ index 864c71d..ae06d21 100644 network: interface: - ens4: -+ enp2s1: ++ enp2s0: enabled: true type: eth proto: static @@ -150,7 +151,7 @@ index 864c71d..ae06d21 100644 tenant_address: 10.1.0.105 external_address: 10.16.0.105 - dpdk0_name: ens5 -+ dpdk0_name: enp2s2 ++ dpdk0_name: enp3s0 dpdk0_pci: '"0000:00:05.0"' openstack_compute_node02: params: @@ -158,12 +159,12 @@ index 864c71d..ae06d21 100644 tenant_address: 10.1.0.106 external_address: 10.16.0.106 - dpdk0_name: ens5 -+ dpdk0_name: enp2s2 ++ dpdk0_name: enp3s0 dpdk0_pci: '"0000:00:05.0"' openstack_gateway_node01: params: diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs-dpdk/openstack/compute.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs-dpdk/openstack/compute.yml -index c23ca7f..aeb6ba1 100644 +index c23ca7f..6d2f724 100644 --- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs-dpdk/openstack/compute.yml +++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs-dpdk/openstack/compute.yml @@ -12,9 +12,9 @@ classes: @@ -173,9 +174,9 @@ index c23ca7f..aeb6ba1 100644 - primary_interface: ens4 - tenant_interface: ens5 - external_interface: ens6 -+ primary_interface: enp2s1 -+ tenant_interface: enp2s2 -+ external_interface: enp2s3 ++ primary_interface: enp2s0 ++ tenant_interface: enp3s0 ++ external_interface: enp4s0 interface_mtu: 9000 linux_system_codename: xenial loopback_device_size: 10 @@ -184,12 +185,12 @@ index c23ca7f..aeb6ba1 100644 dhcp_int: enabled: true - name: ens3 -+ name: eth0 ++ name: enp1s0 proto: dhcp type: eth mtu: ${_param:interface_mtu} diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs-dpdk/openstack/control.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs-dpdk/openstack/control.yml -index b85f085..0c4b5b9 100644 +index b85f085..20eb8f5 100644 --- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs-dpdk/openstack/control.yml +++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs-dpdk/openstack/control.yml @@ -40,13 +40,13 @@ parameters: @@ -197,19 +198,19 @@ index b85f085..0c4b5b9 100644 network: interface: - ens4: -+ enp2s1: ++ enp2s0: enabled: true type: eth proto: static address: ${_param:single_address} netmask: 255.255.255.0 - ens6: -+ enp2s3: ++ enp4s0: enabled: true type: eth proto: static diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs-dpdk/openstack/gateway.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs-dpdk/openstack/gateway.yml -index e102c10..e1800de 100644 +index e102c10..f153a19 100644 --- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs-dpdk/openstack/gateway.yml +++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs-dpdk/openstack/gateway.yml @@ -6,9 +6,9 @@ classes: @@ -219,9 +220,9 @@ index e102c10..e1800de 100644 - primary_interface: ens4 - tenant_interface: ens5 - external_interface: ens6 -+ primary_interface: enp2s1 -+ tenant_interface: enp2s2 -+ external_interface: enp2s3 ++ primary_interface: enp2s0 ++ tenant_interface: enp3s0 ++ external_interface: enp4s0 interface_mtu: 9000 linux_system_codename: xenial neutron: @@ -230,12 +231,12 @@ index e102c10..e1800de 100644 dhcp_int: enabled: true - name: ens3 -+ name: eth0 ++ name: enp1s0 proto: dhcp type: eth mtu: ${_param:interface_mtu} diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs/infra/config.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs/infra/config.yml -index 97730b1..671f2f9 100644 +index 97730b1..8cb0992 100644 --- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs/infra/config.yml +++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs/infra/config.yml @@ -26,7 +26,7 @@ parameters: @@ -243,12 +244,12 @@ index 97730b1..671f2f9 100644 network: interface: - ens4: -+ enp2s1: ++ enp2s0: enabled: true type: eth proto: static diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs/openstack/compute.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs/openstack/compute.yml -index a86a7c6..78acfba 100644 +index a86a7c6..0469fa0 100644 --- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs/openstack/compute.yml +++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs/openstack/compute.yml @@ -10,9 +10,9 @@ classes: @@ -258,9 +259,9 @@ index a86a7c6..78acfba 100644 - primary_interface: ens4 - tenant_interface: ens5 - external_interface: ens6 -+ primary_interface: enp2s1 -+ tenant_interface: enp2s2 -+ external_interface: enp2s3 ++ primary_interface: enp2s0 ++ tenant_interface: enp3s0 ++ external_interface: enp4s0 interface_mtu: 9000 linux_system_codename: xenial loopback_device_size: 10 @@ -269,12 +270,12 @@ index a86a7c6..78acfba 100644 dhcp_int: enabled: true - name: ens3 -+ name: eth0 ++ name: enp1s0 proto: dhcp type: eth mtu: ${_param:interface_mtu} diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs/openstack/control.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs/openstack/control.yml -index ae103cd..e2ecc42 100644 +index ae103cd..350b618 100644 --- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs/openstack/control.yml +++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs/openstack/control.yml @@ -40,13 +40,13 @@ parameters: @@ -282,19 +283,19 @@ index ae103cd..e2ecc42 100644 network: interface: - ens4: -+ enp2s1: ++ enp2s0: enabled: true type: eth proto: static address: ${_param:single_address} netmask: 255.255.255.0 - ens6: -+ enp2s3: ++ enp4s0: enabled: true type: eth proto: static diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs/openstack/gateway.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs/openstack/gateway.yml -index 9257d86..0a2a622 100644 +index 9257d86..26b0e4c 100644 --- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs/openstack/gateway.yml +++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs/openstack/gateway.yml @@ -6,9 +6,9 @@ classes: @@ -304,9 +305,9 @@ index 9257d86..0a2a622 100644 - primary_interface: ens4 - tenant_interface: ens5 - external_interface: ens6 -+ primary_interface: enp2s1 -+ tenant_interface: enp2s2 -+ external_interface: enp2s3 ++ primary_interface: enp2s0 ++ tenant_interface: enp3s0 ++ external_interface: enp4s0 interface_mtu: 9000 linux_system_codename: xenial neutron: @@ -315,7 +316,7 @@ index 9257d86..0a2a622 100644 dhcp_int: enabled: true - name: ens3 -+ name: eth0 ++ name: enp1s0 proto: dhcp type: eth mtu: ${_param:interface_mtu} |