From 9519a11e1fe0eb26cf5b776d8479065f2f710737 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Mon, 11 Sep 2017 20:17:20 +0200 Subject: u/fuel: Bump & rebase for multiarch reclass Change-Id: I3de41645b7424195b9c8d5884a7c9de1fabf68cb Signed-off-by: Alexandru Avadanii --- ...1-mcp-config-AArch64-Use-UEFI-arm64-image.patch | 33 -- ...-salt-formulas-Add-enable-armband-formula.patch | 218 +++++++ ...ses-virtual-AArch64-virtio-NIC-names-sync.patch | 180 ------ ...etwork-public-Use-arm-virtual2-POD-config.patch | 109 ++++ ...-salt-formulas-Add-enable-armband-formula.patch | 218 ------- ...alt-formulas-opendaylight-AArch64-leveldb.patch | 48 ++ ...s-baremetal-AArch64-virtio-NIC-names-sync.patch | 648 +++++++++++++++++++++ ...etwork-public-Use-arm-virtual2-POD-config.patch | 160 ----- ...-Add-curtin_userdata_arm64_generic_xenial.patch | 112 ++++ ...alt-formulas-opendaylight-AArch64-leveldb.patch | 48 -- ...-config-AArch64-baremetal-Use-arm64-image.patch | 60 -- ...twork-public-mgmt-Use-arm-pod3-POD-config.patch | 304 ++++++++++ ...s-baremetal-AArch64-virtio-NIC-names-sync.patch | 648 --------------------- ...lasses-baremetal-arm-pod3-config-hardcode.patch | 186 ++++++ ...-Add-curtin_userdata_arm64_generic_xenial.patch | 112 ---- ...aas-boot-resources-Add-arm64-architecture.patch | 39 ++ .../0009-libvirt-Use-libvirt-unix_sock_group.patch | 58 ++ ...twork-public-mgmt-Use-arm-pod3-POD-config.patch | 316 ---------- ...lasses-baremetal-arm-pod3-config-hardcode.patch | 186 ------ ...lt-formulas-armband-Extend-libvirt_domain.patch | 105 ++++ ...aas-boot-resources-Add-arm64-architecture.patch | 39 -- ...-virtng.py-virt.sls-Extend-libvirt_domain.patch | 263 +++++++++ .../0012-libvirt-Use-libvirt-unix_sock_group.patch | 58 -- ...p-salt-formulas-armband-AArch64-bootstrap.patch | 90 +++ ...lt-formulas-armband-Extend-libvirt_domain.patch | 105 ---- .../0013-seedng-module-Add-AArch64-repo.patch | 59 ++ ...ib.sh-rm-Ubuntu-boot-entry-on-EFI-systems.patch | 60 ++ ...-virtng.py-virt.sls-Extend-libvirt_domain.patch | 263 --------- ...5-aarch64-skip-configuration-of-hugepages.patch | 96 +++ ...p-salt-formulas-armband-AArch64-bootstrap.patch | 90 --- ...remetal-odl-Extend-arch-list-for-UCA-repo.patch | 32 + .../0016-seedng-module-Add-AArch64-repo.patch | 59 -- .../0017-Add-opnfv-user-to-the-deployment.patch | 88 +++ ...ib.sh-rm-Ubuntu-boot-entry-on-EFI-systems.patch | 60 -- ...8-aarch64-skip-configuration-of-hugepages.patch | 96 --- ...remetal-odl-Extend-arch-list-for-UCA-repo.patch | 32 - .../0020-Add-opnfv-user-to-the-deployment.patch | 88 --- upstream/fuel | 2 +- 38 files changed, 2516 insertions(+), 2852 deletions(-) delete mode 100644 patches/opnfv-fuel/0001-mcp-config-AArch64-Use-UEFI-arm64-image.patch create mode 100644 patches/opnfv-fuel/0001-mcp-salt-formulas-Add-enable-armband-formula.patch delete mode 100644 patches/opnfv-fuel/0002-classes-virtual-AArch64-virtio-NIC-names-sync.patch create mode 100644 patches/opnfv-fuel/0002-network-public-Use-arm-virtual2-POD-config.patch delete mode 100644 patches/opnfv-fuel/0003-mcp-salt-formulas-Add-enable-armband-formula.patch create mode 100644 patches/opnfv-fuel/0003-mcp-salt-formulas-opendaylight-AArch64-leveldb.patch create mode 100644 patches/opnfv-fuel/0004-classes-baremetal-AArch64-virtio-NIC-names-sync.patch delete mode 100644 patches/opnfv-fuel/0004-network-public-Use-arm-virtual2-POD-config.patch create mode 100644 patches/opnfv-fuel/0005-maas-Add-curtin_userdata_arm64_generic_xenial.patch delete mode 100644 patches/opnfv-fuel/0005-mcp-salt-formulas-opendaylight-AArch64-leveldb.patch delete mode 100644 patches/opnfv-fuel/0006-mcp-config-AArch64-baremetal-Use-arm64-image.patch create mode 100644 patches/opnfv-fuel/0006-network-public-mgmt-Use-arm-pod3-POD-config.patch delete mode 100644 patches/opnfv-fuel/0007-classes-baremetal-AArch64-virtio-NIC-names-sync.patch create mode 100644 patches/opnfv-fuel/0007-classes-baremetal-arm-pod3-config-hardcode.patch delete mode 100644 patches/opnfv-fuel/0008-maas-Add-curtin_userdata_arm64_generic_xenial.patch create mode 100644 patches/opnfv-fuel/0008-maas-boot-resources-Add-arm64-architecture.patch create mode 100644 patches/opnfv-fuel/0009-libvirt-Use-libvirt-unix_sock_group.patch delete mode 100644 patches/opnfv-fuel/0009-network-public-mgmt-Use-arm-pod3-POD-config.patch delete mode 100644 patches/opnfv-fuel/0010-classes-baremetal-arm-pod3-config-hardcode.patch create mode 100644 patches/opnfv-fuel/0010-mcp-salt-formulas-armband-Extend-libvirt_domain.patch delete mode 100644 patches/opnfv-fuel/0011-maas-boot-resources-Add-arm64-architecture.patch create mode 100644 patches/opnfv-fuel/0011-virtng.py-virt.sls-Extend-libvirt_domain.patch delete mode 100644 patches/opnfv-fuel/0012-libvirt-Use-libvirt-unix_sock_group.patch create mode 100644 patches/opnfv-fuel/0012-mcp-salt-formulas-armband-AArch64-bootstrap.patch delete mode 100644 patches/opnfv-fuel/0013-mcp-salt-formulas-armband-Extend-libvirt_domain.patch create mode 100644 patches/opnfv-fuel/0013-seedng-module-Add-AArch64-repo.patch create mode 100644 patches/opnfv-fuel/0014-lib.sh-rm-Ubuntu-boot-entry-on-EFI-systems.patch delete mode 100644 patches/opnfv-fuel/0014-virtng.py-virt.sls-Extend-libvirt_domain.patch create mode 100644 patches/opnfv-fuel/0015-aarch64-skip-configuration-of-hugepages.patch delete mode 100644 patches/opnfv-fuel/0015-mcp-salt-formulas-armband-AArch64-bootstrap.patch create mode 100644 patches/opnfv-fuel/0016-baremetal-odl-Extend-arch-list-for-UCA-repo.patch delete mode 100644 patches/opnfv-fuel/0016-seedng-module-Add-AArch64-repo.patch create mode 100644 patches/opnfv-fuel/0017-Add-opnfv-user-to-the-deployment.patch delete mode 100644 patches/opnfv-fuel/0017-lib.sh-rm-Ubuntu-boot-entry-on-EFI-systems.patch delete mode 100644 patches/opnfv-fuel/0018-aarch64-skip-configuration-of-hugepages.patch delete mode 100644 patches/opnfv-fuel/0019-baremetal-odl-Extend-arch-list-for-UCA-repo.patch delete mode 100644 patches/opnfv-fuel/0020-Add-opnfv-user-to-the-deployment.patch diff --git a/patches/opnfv-fuel/0001-mcp-config-AArch64-Use-UEFI-arm64-image.patch b/patches/opnfv-fuel/0001-mcp-config-AArch64-Use-UEFI-arm64-image.patch deleted file mode 100644 index 37df22c0..00000000 --- a/patches/opnfv-fuel/0001-mcp-config-AArch64-Use-UEFI-arm64-image.patch +++ /dev/null @@ -1,33 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: All rights reserved. This program and the accompanying materials -: are made available under the terms of the Apache License, Version 2.0 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii -Date: Tue, 11 Jul 2017 18:24:24 +0200 -Subject: [PATCH] mcp/config: AArch64: Use UEFI arm64 image - -While at it, bump default vCPU number from 2 to 6. - -Signed-off-by: Guillermo Herrero -Signed-off-by: Alexandru Avadanii ---- - mcp/config/scenario/virtual/defaults.yaml | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/mcp/config/scenario/virtual/defaults.yaml b/mcp/config/scenario/virtual/defaults.yaml -index b841e88..17fbbfc 100644 ---- a/mcp/config/scenario/virtual/defaults.yaml -+++ b/mcp/config/scenario/virtual/defaults.yaml -@@ -1,6 +1,6 @@ --base_image: https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img -+base_image: https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-arm64-uefi1.img - virtual: - default: -- vcpus: 2 -+ vcpus: 6 - ram: 4096 - diff --git a/patches/opnfv-fuel/0001-mcp-salt-formulas-Add-enable-armband-formula.patch b/patches/opnfv-fuel/0001-mcp-salt-formulas-Add-enable-armband-formula.patch new file mode 100644 index 00000000..4bf56480 --- /dev/null +++ b/patches/opnfv-fuel/0001-mcp-salt-formulas-Add-enable-armband-formula.patch @@ -0,0 +1,218 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: Copyright (c) 2017 Enea AB and others. +: +: All rights reserved. This program and the accompanying materials +: are made available under the terms of the Apache License, Version 2.0 +: which accompanies this distribution, and is available at +: http://www.apache.org/licenses/LICENSE-2.0 +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +From: Guillermo Herrero +Date: Tue, 25 Jul 2017 00:58:32 +0200 +Subject: [PATCH] mcp: salt-formulas: Add & enable armband formula + +FIXME: Re-enable apparmor. +FIXME: Detect baremetal and re-enable acceleration. + +- install qemu-efi; +- install vgabios; +- disable apparmor as security driver for libvirt (temporary); +- fix missing link for vgabios binary blob; +- nova: virt_type=qemu (temporary, until we support baremetal too); +- nova: pointer_model=ps2mouse since AArch64 has no USB tablet; +- nova: cpu_model=cortex-a57; +- nova: libvirt driver: Add ttyAMA0 by default on AArch64; +- nova: libvirt driver: Use VGA video type by default on AArch64; + +Signed-off-by: Guillermo Herrero +Signed-off-by: Charalampos Kominos +Signed-off-by: Alexandru Avadanii +--- + mcp/config/states/maas | 1 + + mcp/config/states/openstack | 2 + + mcp/config/states/openstack_ha | 1 + + .../armband/files/nova-libvirt-driver.diff | 48 ++++++++++++++++++++++ + mcp/salt-formulas/armband/init.sls | 6 +++ + mcp/salt-formulas/armband/libvirt_driver.sls | 5 +++ + mcp/salt-formulas/armband/nova.sls | 30 ++++++++++++++ + mcp/salt-formulas/armband/qemu.sls | 7 ++++ + mcp/salt-formulas/armband/vgabios.sls | 6 +++ + 9 files changed, 106 insertions(+) + create mode 100644 mcp/salt-formulas/armband/files/nova-libvirt-driver.diff + create mode 100644 mcp/salt-formulas/armband/init.sls + create mode 100644 mcp/salt-formulas/armband/libvirt_driver.sls + create mode 100644 mcp/salt-formulas/armband/nova.sls + create mode 100644 mcp/salt-formulas/armband/qemu.sls + create mode 100644 mcp/salt-formulas/armband/vgabios.sls + +diff --git a/mcp/config/states/maas b/mcp/config/states/maas +index db0bd3f..9576333 100755 +--- a/mcp/config/states/maas ++++ b/mcp/config/states/maas +@@ -86,6 +86,7 @@ wait_for 90 "! salt 'kvm*' test.ping | tee /dev/stderr | fgrep -q 'Not connected + + salt -C '* and not cfg01* and not mas01*' state.apply linux,ntp + ++salt -C 'kvm*' state.sls armband + salt -C 'kvm*' state.sls libvirt + + salt -C '* and not cfg01* and not mas01*' state.apply salt +diff --git a/mcp/config/states/openstack b/mcp/config/states/openstack +index eaab135..050b648 100755 +--- a/mcp/config/states/openstack ++++ b/mcp/config/states/openstack +@@ -31,3 +31,5 @@ salt -I 'ceilometer:server' state.sls ceilometer + salt -I 'ceilometer:agent' state.sls ceilometer + + salt -I 'horizon:server' state.sls horizon ++ ++salt -I 'nova:compute' state.sls armband +diff --git a/mcp/config/states/openstack_ha b/mcp/config/states/openstack_ha +index 8ca76e4..c0b8ee3 100755 +--- a/mcp/config/states/openstack_ha ++++ b/mcp/config/states/openstack_ha +@@ -41,6 +41,7 @@ salt -I 'neutron:server' state.sls neutron -b 1 + salt -I 'neutron:gateway' state.sls neutron.gateway + + salt -I 'nova:compute' state.sls nova ++salt -I 'nova:compute' state.sls armband + + salt -I 'mongodb:server' state.sls mongodb + while true; do sleep 5; salt -C 'I@mongodb:server and *01*' cmd.run 'mongo localhost:27017/admin' && break; done +diff --git a/mcp/salt-formulas/armband/files/nova-libvirt-driver.diff b/mcp/salt-formulas/armband/files/nova-libvirt-driver.diff +new file mode 100644 +index 0000000..a5b08da +--- /dev/null ++++ b/mcp/salt-formulas/armband/files/nova-libvirt-driver.diff +@@ -0,0 +1,48 @@ ++From: Stanislaw Kardach ++Date: Tue, 22 Mar 2016 12:05:09 +0100 ++Subject: [PATCH] nova: Update vga, console defaults for armv7, aarch64 ++ ++Nova hardcodes default options for both video=cirrus and console. ++armv7 and aarch64 VMs require video=vga, and since most applications ++use PL011 serial driver for guests, adding console=ttyAMA0 is also ++a nice UX addition. ++ ++Signed-off-by: Stanislaw Kardach ++Signed-off-by: Alexandru Avadanii ++Signed-off-by: Guillermo Herrero ++ ++--- ++ usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py | 10 +++++++++- ++ 1 file changed, 9 insertions(+), 1 deletion(-) ++ ++diff --git a/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py b/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py ++index bba9b00..99e86be 100644 ++--- a/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py +++++ b/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py ++@@ -4179,7 +4179,12 @@ class LibvirtDriver(driver.ComputeDriver): ++ if virt_type == "xen": ++ guest.os_cmdline = "ro root=%s" % root_device_name ++ else: +++ guestarch = libvirt_utils.get_arch(image_meta) ++ guest.os_cmdline = ("root=%s %s" % (root_device_name, CONSOLE)) +++ if guestarch in (fields.Architecture.ARMV7, +++ fields.Architecture.AARCH64): +++ # NOTE(armband): ARM v7/v8 use PL011 drv, add ttyAMA0 console +++ guest.os_cmdline += " console=ttyAMA0" ++ if virt_type == "qemu": ++ guest.os_cmdline += " no_timer_check" ++ if instance.ramdisk_id: ++@@ -4288,9 +4293,12 @@ class LibvirtDriver(driver.ComputeDriver): ++ video.type = 'xen' ++ elif CONF.libvirt.virt_type == 'parallels': ++ video.type = 'vga' ++- elif guestarch in (fields.Architecture.PPC, +++ elif guestarch in (fields.Architecture.ARMV7, +++ fields.Architecture.AARCH64, +++ fields.Architecture.PPC, ++ fields.Architecture.PPC64, ++ fields.Architecture.PPC64LE): +++ # NOTE(armband): Added ARM v7/v8, same as on PPC. ++ # NOTE(ldbragst): PowerKVM doesn't support 'cirrus' be default ++ # so use 'vga' instead when running on Power hardware. ++ video.type = 'vga' +diff --git a/mcp/salt-formulas/armband/init.sls b/mcp/salt-formulas/armband/init.sls +new file mode 100644 +index 0000000..6e7b6ad +--- /dev/null ++++ b/mcp/salt-formulas/armband/init.sls +@@ -0,0 +1,6 @@ ++include: ++ - armband.qemu ++ - armband.vgabios ++ - armband.nova ++ - armband.libvirt_driver ++ +diff --git a/mcp/salt-formulas/armband/libvirt_driver.sls b/mcp/salt-formulas/armband/libvirt_driver.sls +new file mode 100644 +index 0000000..c309035 +--- /dev/null ++++ b/mcp/salt-formulas/armband/libvirt_driver.sls +@@ -0,0 +1,5 @@ ++/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py: ++ file.patch: ++ - source: salt://armband/files/nova-libvirt-driver.diff ++ - hash: "668641080c6a77a9205d0f71d510ad5f" ++ +diff --git a/mcp/salt-formulas/armband/nova.sls b/mcp/salt-formulas/armband/nova.sls +new file mode 100644 +index 0000000..674f371 +--- /dev/null ++++ b/mcp/salt-formulas/armband/nova.sls +@@ -0,0 +1,30 @@ ++{% if grains['virtual'] == 'kvm' %} ++nova_virt_type: ++ file.replace: ++ - name: "/etc/nova/nova.conf" ++ - pattern: '^virt_type\s*=.*$' ++ - repl: "virt_type = qemu" ++{% endif %} ++nova_pointer_model: ++ file.replace: ++ - name: "/etc/nova/nova.conf" ++ - pattern: '^#pointer_model\s*=.*$' ++ - repl: "pointer_model = ps2mouse" ++nova_cpu_mode: ++ file.replace: ++ - name: "/etc/nova/nova.conf" ++ - pattern: '^cpu_mode\s*=\s*host-passthrough' ++ - repl: "cpu_mode = custom" ++nova_cpu_model: ++ file.replace: ++ - name: "/etc/nova/nova.conf" ++ - pattern: '^#cpu_model\s*=.*$' ++ {% if grains['virtual'] == 'kvm' %} ++ - repl: "cpu_model = cortex-a57" ++ {% else %} ++ - repl: "cpu_model = host" ++ {% endif %} ++restart_nova-compute: ++ cmd: ++ - run ++ - name: "service nova-compute restart" +diff --git a/mcp/salt-formulas/armband/qemu.sls b/mcp/salt-formulas/armband/qemu.sls +new file mode 100644 +index 0000000..ecdb5ae +--- /dev/null ++++ b/mcp/salt-formulas/armband/qemu.sls +@@ -0,0 +1,7 @@ ++qemu-efi: ++ pkg.installed ++/etc/libvirt/qemu.conf: ++ file.replace: ++ - pattern: ^#security_driver =.*$ ++ - repl: "security_driver = \"none\"" ++ +diff --git a/mcp/salt-formulas/armband/vgabios.sls b/mcp/salt-formulas/armband/vgabios.sls +new file mode 100644 +index 0000000..a31eafa +--- /dev/null ++++ b/mcp/salt-formulas/armband/vgabios.sls +@@ -0,0 +1,6 @@ ++vgabios: ++ pkg.installed ++/usr/share/qemu/vgabios-stdvga.bin: ++ file.symlink: ++ - target: "/usr/share/vgabios/vgabios.bin" ++ diff --git a/patches/opnfv-fuel/0002-classes-virtual-AArch64-virtio-NIC-names-sync.patch b/patches/opnfv-fuel/0002-classes-virtual-AArch64-virtio-NIC-names-sync.patch deleted file mode 100644 index e3cb48fa..00000000 --- a/patches/opnfv-fuel/0002-classes-virtual-AArch64-virtio-NIC-names-sync.patch +++ /dev/null @@ -1,180 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: All rights reserved. This program and the accompanying materials -: are made available under the terms of the Apache License, Version 2.0 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii -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/enp1s0/g' \ - -e 's/ens4/enp2s0/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: 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 ---- - .../cluster/virtual-mcp-ocata-common/openstack_compute.yml | 8 ++++---- - .../cluster/virtual-mcp-ocata-common/openstack_control.yml | 4 ++-- - .../cluster/virtual-mcp-ocata-common/openstack_gateway.yml | 8 ++++---- - .../classes/cluster/virtual-mcp-ocata-odl-router/infra/config.yml | 2 +- - .../cluster/virtual-mcp-ocata-odl-router/opendaylight/control.yml | 2 +- - .../classes/cluster/virtual-mcp-ocata-ovs-dpdk/infra/config.yml | 6 +++--- - .../classes/cluster/virtual-mcp-ocata-ovs/infra/config.yml | 2 +- - 7 files changed, 16 insertions(+), 16 deletions(-) - -diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_compute.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_compute.yml -index 0cb7ccb..808fbab 100644 ---- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_compute.yml -+++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_compute.yml -@@ -12,9 +12,9 @@ classes: - - system.ceilometer.client.cinder_volume - parameters: - _param: -- primary_interface: ens4 -- tenant_interface: ens5 -- external_interface: ens6 -+ primary_interface: enp2s0 -+ tenant_interface: enp3s0 -+ external_interface: enp4s0 - interface_mtu: 9000 - linux_system_codename: xenial - loopback_device_size: 10 -@@ -50,7 +50,7 @@ parameters: - interface: - dhcp_int: - enabled: true -- name: ens3 -+ name: enp1s0 - proto: dhcp - type: eth - mtu: ${_param:interface_mtu} -diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_control.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_control.yml -index 0927900..69fedb6 100644 ---- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_control.yml -+++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_control.yml -@@ -48,13 +48,13 @@ parameters: - version: latest - network: - interface: -- ens4: -+ enp2s0: - enabled: true - type: eth - proto: static - address: ${_param:single_address} - netmask: 255.255.255.0 -- ens6: -+ enp4s0: - enabled: true - type: eth - proto: static -diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_gateway.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_gateway.yml -index 9262590..f5479fc 100644 ---- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_gateway.yml -+++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_gateway.yml -@@ -4,9 +4,9 @@ classes: - - system.linux.system.repo.saltstack.xenial - parameters: - _param: -- primary_interface: ens4 -- tenant_interface: ens5 -- external_interface: ens6 -+ primary_interface: enp2s0 -+ tenant_interface: enp3s0 -+ external_interface: enp4s0 - interface_mtu: 9000 - linux_system_codename: xenial - neutron: -@@ -19,7 +19,7 @@ parameters: - interface: - dhcp_int: - enabled: true -- name: ens3 -+ name: enp1s0 - proto: dhcp - type: eth - mtu: ${_param:interface_mtu} -diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/infra/config.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/infra/config.yml -index 63e58a2..2f8e94a 100644 ---- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/infra/config.yml -+++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/infra/config.yml -@@ -27,7 +27,7 @@ parameters: - linux: - network: - interface: -- ens4: -+ enp2s0: - enabled: true - type: eth - proto: static -diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/opendaylight/control.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/opendaylight/control.yml -index 6bc0f51..4dacc73 100644 ---- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/opendaylight/control.yml -+++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/opendaylight/control.yml -@@ -10,7 +10,7 @@ parameters: - linux: - network: - interface: -- ens4: -+ enp2s0: - enabled: true - type: eth - proto: static -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..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: - linux: - network: - interface: -- ens4: -+ enp2s0: - enabled: true - type: eth - proto: static -@@ -51,14 +51,14 @@ parameters: - single_address: 172.16.10.105 - tenant_address: 10.1.0.105 - external_address: 10.16.0.105 -- dpdk0_name: ens5 -+ dpdk0_name: enp3s0 - dpdk0_pci: '"0000:00:05.0"' - openstack_compute_node02: - params: - single_address: 172.16.10.106 - tenant_address: 10.1.0.106 - external_address: 10.16.0.106 -- dpdk0_name: ens5 -+ dpdk0_name: enp3s0 - dpdk0_pci: '"0000:00:05.0"' - openstack_gateway_node01: - params: -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..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: - linux: - network: - interface: -- ens4: -+ enp2s0: - enabled: true - type: eth - proto: static diff --git a/patches/opnfv-fuel/0002-network-public-Use-arm-virtual2-POD-config.patch b/patches/opnfv-fuel/0002-network-public-Use-arm-virtual2-POD-config.patch new file mode 100644 index 00000000..086fa62d --- /dev/null +++ b/patches/opnfv-fuel/0002-network-public-Use-arm-virtual2-POD-config.patch @@ -0,0 +1,109 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: Copyright (c) 2017 Enea AB and others. +: +: All rights reserved. This program and the accompanying materials +: are made available under the terms of the Apache License, Version 2.0 +: which accompanies this distribution, and is available at +: http://www.apache.org/licenses/LICENSE-2.0 +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +From: Alexandru Avadanii +Date: Tue, 18 Jul 2017 19:17:24 +0200 +Subject: [PATCH] network: public: Use arm-virtual2 POD config + +grep -e "10\.16\.0\." -R . -l | \ + xargs sed -i \ + -e 's/10\.16\.0\./10.0.9./g' \ + -e 's/10\.0\.9\.254/10.0.9.200/g' \ + -e 's/10\.0\.9\.1/10.0.9.254/g' + +NOTE: This should be converted into a dynamic configuration read from +the universal POD descriptor in securedlab, once that is ready. + +Until then, just align the public network configuration used by the +virtual POD with the Enea lab configuration specific to arm-virtual2 +(i.e. public network on 10.0.9.0/24). + +NOTE: Replace the gateway at 10.16.0.1 (now 10.0.9.1) with the same +IP address as our lab's gateway (10.0.9.254), to keep both possible +network layouts in sync (using all virtual networks created via +virsh, respectively our lab's static config). +This will ensure deploys continue to work in both enviroments. + +Also, since our new gateway resides at 10.0.9.254, trim the DHCP pool +range for the public network to not include that address. + +Signed-off-by: Alexandru Avadanii +--- + mcp/config/states/networks | 6 +++--- + .../classes/cluster/virtual-mcp-ocata-common/infra/config.yml | 6 +++--- + .../classes/cluster/virtual-mcp-ocata-common/openstack_init.yml | 2 +- + mcp/scripts/net_public.xml | 2 +- + 4 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/mcp/config/states/networks b/mcp/config/states/networks +index 505153a..bd6e923 100755 +--- a/mcp/config/states/networks ++++ b/mcp/config/states/networks +@@ -10,7 +10,7 @@ PUBLIC_NET=$(salt --out yaml 'cmp*' pillar.get _param:external_address | \ + pillar.get _param:openstack_compute_node01_external_address | \ + awk --re-interval '/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/{print $2; exit}') + +-[ -n "${PUBLIC_NET}" ] && PUBLIC_NET="${PUBLIC_NET%.*}.0/24" || PUBLIC_NET="10.16.0.0/24" ++[ -n "${PUBLIC_NET}" ] && PUBLIC_NET="${PUBLIC_NET%.*}.0/24" || PUBLIC_NET="10.0.9.0/24" + + salt 'ctl01*' cmd.run ". /root/keystonercv3; \ + openstack compute service list; \ +@@ -21,6 +21,6 @@ salt 'ctl01*' cmd.run ". /root/keystonercv3; \ + openstack network create --external --default --provider-network-type flat \ + --provider-physical-network physnet1 floating_net" + salt 'ctl01*' cmd.run ". /root/keystonercv3; \ +- openstack subnet create --gateway ${PUBLIC_NET%.*}.1 --no-dhcp \ +- --allocation-pool start=${PUBLIC_NET%.*}.130,end=${PUBLIC_NET%.*}.254 \ ++ openstack subnet create --gateway ${PUBLIC_NET%.*}.254 --no-dhcp \ ++ --allocation-pool start=${PUBLIC_NET%.*}.130,end=${PUBLIC_NET%.*}.200 \ + --network floating_net --subnet-range ${PUBLIC_NET} floating_subnet" +diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/infra/config.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/infra/config.yml +index d60c81d..f31624e 100644 +--- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/infra/config.yml ++++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/infra/config.yml +@@ -53,13 +53,13 @@ parameters: + params: + single_address: 172.16.10.105 + tenant_address: 10.1.0.105 +- external_address: 10.16.0.105 ++ external_address: 10.0.9.105 + openstack_compute_node02: + params: + single_address: 172.16.10.106 + tenant_address: 10.1.0.106 +- external_address: 10.16.0.106 ++ external_address: 10.0.9.106 + openstack_gateway_node01: + params: + tenant_address: 10.1.0.110 +- external_address: 10.16.0.110 ++ external_address: 10.0.9.110 +diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_init.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_init.yml +index a14a711..055d98c 100644 +--- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_init.yml ++++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_init.yml +@@ -6,7 +6,7 @@ parameters: + openstack_region: RegionOne + admin_email: root@localhost + cluster_public_protocol: http +- cluster_public_host: 10.16.0.101 ++ cluster_public_host: 10.0.9.101 + neutron_public_protocol: http + neutron_control_dvr: False + neutron_l3_ha: False +diff --git a/mcp/scripts/net_public.xml b/mcp/scripts/net_public.xml +index 61650d5..f455480 100644 +--- a/mcp/scripts/net_public.xml ++++ b/mcp/scripts/net_public.xml +@@ -2,5 +2,5 @@ + public + + +- ++ + diff --git a/patches/opnfv-fuel/0003-mcp-salt-formulas-Add-enable-armband-formula.patch b/patches/opnfv-fuel/0003-mcp-salt-formulas-Add-enable-armband-formula.patch deleted file mode 100644 index 326cf117..00000000 --- a/patches/opnfv-fuel/0003-mcp-salt-formulas-Add-enable-armband-formula.patch +++ /dev/null @@ -1,218 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: All rights reserved. This program and the accompanying materials -: are made available under the terms of the Apache License, Version 2.0 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Guillermo Herrero -Date: Tue, 25 Jul 2017 00:58:32 +0200 -Subject: [PATCH] mcp: salt-formulas: Add & enable armband formula - -FIXME: Re-enable apparmor. -FIXME: Detect baremetal and re-enable acceleration. - -- install qemu-efi; -- install vgabios; -- disable apparmor as security driver for libvirt (temporary); -- fix missing link for vgabios binary blob; -- nova: virt_type=qemu (temporary, until we support baremetal too); -- nova: pointer_model=ps2mouse since AArch64 has no USB tablet; -- nova: cpu_model=cortex-a57; -- nova: libvirt driver: Add ttyAMA0 by default on AArch64; -- nova: libvirt driver: Use VGA video type by default on AArch64; - -Signed-off-by: Guillermo Herrero -Signed-off-by: Charalampos Kominos -Signed-off-by: Alexandru Avadanii ---- - mcp/config/states/maas | 1 + - mcp/config/states/openstack | 2 + - mcp/config/states/openstack_ha | 1 + - .../armband/files/nova-libvirt-driver.diff | 48 ++++++++++++++++++++++ - mcp/salt-formulas/armband/init.sls | 6 +++ - mcp/salt-formulas/armband/libvirt_driver.sls | 5 +++ - mcp/salt-formulas/armband/nova.sls | 30 ++++++++++++++ - mcp/salt-formulas/armband/qemu.sls | 7 ++++ - mcp/salt-formulas/armband/vgabios.sls | 6 +++ - 9 files changed, 106 insertions(+) - create mode 100644 mcp/salt-formulas/armband/files/nova-libvirt-driver.diff - create mode 100644 mcp/salt-formulas/armband/init.sls - create mode 100644 mcp/salt-formulas/armband/libvirt_driver.sls - create mode 100644 mcp/salt-formulas/armband/nova.sls - create mode 100644 mcp/salt-formulas/armband/qemu.sls - create mode 100644 mcp/salt-formulas/armband/vgabios.sls - -diff --git a/mcp/config/states/maas b/mcp/config/states/maas -index 710ec0e..6c2ae04 100755 ---- a/mcp/config/states/maas -+++ b/mcp/config/states/maas -@@ -81,6 +81,7 @@ wait_for 90 "! salt 'kvm*' test.ping | tee /dev/stderr | fgrep -q 'Not connected - - salt -C '* and not cfg01* and not mas01*' state.apply linux,ntp - -+salt -C 'kvm*' state.sls armband - salt -C 'kvm*' state.sls libvirt - - salt -C '* and not cfg01* and not mas01*' state.apply salt -diff --git a/mcp/config/states/openstack b/mcp/config/states/openstack -index eaab135..050b648 100755 ---- a/mcp/config/states/openstack -+++ b/mcp/config/states/openstack -@@ -31,3 +31,5 @@ salt -I 'ceilometer:server' state.sls ceilometer - salt -I 'ceilometer:agent' state.sls ceilometer - - salt -I 'horizon:server' state.sls horizon -+ -+salt -I 'nova:compute' state.sls armband -diff --git a/mcp/config/states/openstack_ha b/mcp/config/states/openstack_ha -index b9db817..cec5895 100755 ---- a/mcp/config/states/openstack_ha -+++ b/mcp/config/states/openstack_ha -@@ -41,6 +41,7 @@ salt -I 'neutron:server' state.sls neutron -b 1 - salt -I 'neutron:gateway' state.sls neutron.gateway - - salt -I 'nova:compute' state.sls nova -+salt -I 'nova:compute' state.sls armband - - salt -I 'mongodb:server' state.sls mongodb - while true; do sleep 5; salt -C 'I@mongodb:server and *01*' cmd.run 'mongo localhost:27017/admin' && break; done -diff --git a/mcp/salt-formulas/armband/files/nova-libvirt-driver.diff b/mcp/salt-formulas/armband/files/nova-libvirt-driver.diff -new file mode 100644 -index 0000000..a5b08da ---- /dev/null -+++ b/mcp/salt-formulas/armband/files/nova-libvirt-driver.diff -@@ -0,0 +1,48 @@ -+From: Stanislaw Kardach -+Date: Tue, 22 Mar 2016 12:05:09 +0100 -+Subject: [PATCH] nova: Update vga, console defaults for armv7, aarch64 -+ -+Nova hardcodes default options for both video=cirrus and console. -+armv7 and aarch64 VMs require video=vga, and since most applications -+use PL011 serial driver for guests, adding console=ttyAMA0 is also -+a nice UX addition. -+ -+Signed-off-by: Stanislaw Kardach -+Signed-off-by: Alexandru Avadanii -+Signed-off-by: Guillermo Herrero -+ -+--- -+ usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py | 10 +++++++++- -+ 1 file changed, 9 insertions(+), 1 deletion(-) -+ -+diff --git a/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py b/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py -+index bba9b00..99e86be 100644 -+--- a/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py -++++ b/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py -+@@ -4179,7 +4179,12 @@ class LibvirtDriver(driver.ComputeDriver): -+ if virt_type == "xen": -+ guest.os_cmdline = "ro root=%s" % root_device_name -+ else: -++ guestarch = libvirt_utils.get_arch(image_meta) -+ guest.os_cmdline = ("root=%s %s" % (root_device_name, CONSOLE)) -++ if guestarch in (fields.Architecture.ARMV7, -++ fields.Architecture.AARCH64): -++ # NOTE(armband): ARM v7/v8 use PL011 drv, add ttyAMA0 console -++ guest.os_cmdline += " console=ttyAMA0" -+ if virt_type == "qemu": -+ guest.os_cmdline += " no_timer_check" -+ if instance.ramdisk_id: -+@@ -4288,9 +4293,12 @@ class LibvirtDriver(driver.ComputeDriver): -+ video.type = 'xen' -+ elif CONF.libvirt.virt_type == 'parallels': -+ video.type = 'vga' -+- elif guestarch in (fields.Architecture.PPC, -++ elif guestarch in (fields.Architecture.ARMV7, -++ fields.Architecture.AARCH64, -++ fields.Architecture.PPC, -+ fields.Architecture.PPC64, -+ fields.Architecture.PPC64LE): -++ # NOTE(armband): Added ARM v7/v8, same as on PPC. -+ # NOTE(ldbragst): PowerKVM doesn't support 'cirrus' be default -+ # so use 'vga' instead when running on Power hardware. -+ video.type = 'vga' -diff --git a/mcp/salt-formulas/armband/init.sls b/mcp/salt-formulas/armband/init.sls -new file mode 100644 -index 0000000..6e7b6ad ---- /dev/null -+++ b/mcp/salt-formulas/armband/init.sls -@@ -0,0 +1,6 @@ -+include: -+ - armband.qemu -+ - armband.vgabios -+ - armband.nova -+ - armband.libvirt_driver -+ -diff --git a/mcp/salt-formulas/armband/libvirt_driver.sls b/mcp/salt-formulas/armband/libvirt_driver.sls -new file mode 100644 -index 0000000..c309035 ---- /dev/null -+++ b/mcp/salt-formulas/armband/libvirt_driver.sls -@@ -0,0 +1,5 @@ -+/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py: -+ file.patch: -+ - source: salt://armband/files/nova-libvirt-driver.diff -+ - hash: "668641080c6a77a9205d0f71d510ad5f" -+ -diff --git a/mcp/salt-formulas/armband/nova.sls b/mcp/salt-formulas/armband/nova.sls -new file mode 100644 -index 0000000..674f371 ---- /dev/null -+++ b/mcp/salt-formulas/armband/nova.sls -@@ -0,0 +1,30 @@ -+{% if grains['virtual'] == 'kvm' %} -+nova_virt_type: -+ file.replace: -+ - name: "/etc/nova/nova.conf" -+ - pattern: '^virt_type\s*=.*$' -+ - repl: "virt_type = qemu" -+{% endif %} -+nova_pointer_model: -+ file.replace: -+ - name: "/etc/nova/nova.conf" -+ - pattern: '^#pointer_model\s*=.*$' -+ - repl: "pointer_model = ps2mouse" -+nova_cpu_mode: -+ file.replace: -+ - name: "/etc/nova/nova.conf" -+ - pattern: '^cpu_mode\s*=\s*host-passthrough' -+ - repl: "cpu_mode = custom" -+nova_cpu_model: -+ file.replace: -+ - name: "/etc/nova/nova.conf" -+ - pattern: '^#cpu_model\s*=.*$' -+ {% if grains['virtual'] == 'kvm' %} -+ - repl: "cpu_model = cortex-a57" -+ {% else %} -+ - repl: "cpu_model = host" -+ {% endif %} -+restart_nova-compute: -+ cmd: -+ - run -+ - name: "service nova-compute restart" -diff --git a/mcp/salt-formulas/armband/qemu.sls b/mcp/salt-formulas/armband/qemu.sls -new file mode 100644 -index 0000000..ecdb5ae ---- /dev/null -+++ b/mcp/salt-formulas/armband/qemu.sls -@@ -0,0 +1,7 @@ -+qemu-efi: -+ pkg.installed -+/etc/libvirt/qemu.conf: -+ file.replace: -+ - pattern: ^#security_driver =.*$ -+ - repl: "security_driver = \"none\"" -+ -diff --git a/mcp/salt-formulas/armband/vgabios.sls b/mcp/salt-formulas/armband/vgabios.sls -new file mode 100644 -index 0000000..a31eafa ---- /dev/null -+++ b/mcp/salt-formulas/armband/vgabios.sls -@@ -0,0 +1,6 @@ -+vgabios: -+ pkg.installed -+/usr/share/qemu/vgabios-stdvga.bin: -+ file.symlink: -+ - target: "/usr/share/vgabios/vgabios.bin" -+ diff --git a/patches/opnfv-fuel/0003-mcp-salt-formulas-opendaylight-AArch64-leveldb.patch b/patches/opnfv-fuel/0003-mcp-salt-formulas-opendaylight-AArch64-leveldb.patch new file mode 100644 index 00000000..31308fd4 --- /dev/null +++ b/patches/opnfv-fuel/0003-mcp-salt-formulas-opendaylight-AArch64-leveldb.patch @@ -0,0 +1,48 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: Copyright (c) 2017 Enea AB and others. +: +: All rights reserved. This program and the accompanying materials +: are made available under the terms of the Apache License, Version 2.0 +: which accompanies this distribution, and is available at +: http://www.apache.org/licenses/LICENSE-2.0 +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +From: Alexandru Avadanii +Date: Thu, 27 Jul 2017 23:42:29 +0200 +Subject: [PATCH] mcp: salt-formulas: opendaylight: AArch64 leveldb + +ODL requires native leveldbjni support on architectures like AArch64. +Armband provides a Debian package that provides exactly that, +specially tailored to be applied on top of upstream Opendaylight +Debian package. + +Install as part of the existing Opendaylight +salt-formula (and not as part of Armband's separate salt-formula, like +previous fixups). + +Some dependencies are not self-contained in this formula yet, and +should be handled before upstreaming this patch: +- Armband DEB repository (mcp-repos) is added by "openstack" state; +- only Debian systems are supported (no equivalent RPM provided); +- only systemd is supported (unlikely to change); + +JIRA: https://jira.opnfv.org/browse/ARMBAND-283 + +Signed-off-by: Alexandru Avadanii +--- + mcp/salt-formulas/opendaylight/server.sls | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/mcp/salt-formulas/opendaylight/server.sls b/mcp/salt-formulas/opendaylight/server.sls +index 8c6c3b2..a2236ae 100644 +--- a/mcp/salt-formulas/opendaylight/server.sls ++++ b/mcp/salt-formulas/opendaylight/server.sls +@@ -58,4 +58,9 @@ opendaylight: + - service: opendaylight + {%- endif %} + ++opendaylight_aarch64_leveldbjni: ++ pkg.installed: ++ {% if grains['cpuarch'] == 'aarch64'%} ++ - name: armband-odl-leveldb-fix ++ {% endif %} + {%- endif %} diff --git a/patches/opnfv-fuel/0004-classes-baremetal-AArch64-virtio-NIC-names-sync.patch b/patches/opnfv-fuel/0004-classes-baremetal-AArch64-virtio-NIC-names-sync.patch new file mode 100644 index 00000000..2f256992 --- /dev/null +++ b/patches/opnfv-fuel/0004-classes-baremetal-AArch64-virtio-NIC-names-sync.patch @@ -0,0 +1,648 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: Copyright (c) 2017 Enea AB and others. +: +: All rights reserved. This program and the accompanying materials +: are made available under the terms of the Apache License, Version 2.0 +: which accompanies this distribution, and is available at +: http://www.apache.org/licenses/LICENSE-2.0 +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +From: Alexandru Avadanii +Date: Sun, 6 Aug 2017 20:42:47 +0200 +Subject: [PATCH] classes: baremetal: AArch64: virtio NIC names sync + +grep -e "ens[[:digit:]]" -R . -l | \ + xargs sed -i \ + -e 's/ens3/enp1s0/g' \ + -e 's/ens4/enp2s0/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: 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 +--- + .../baremetal-mcp-ocata-odl-ha/infra/config.yml | 4 ++-- + .../baremetal-mcp-ocata-odl-ha/infra/kvm.yml | 18 +++++++++----- + .../baremetal-mcp-ocata-odl-ha/infra/maas.yml | 8 +++---- + .../opendaylight/control.yml | 2 +- + .../openstack/compute.yml | 28 ++++++++-------------- + .../openstack/control.yml | 6 ++--- + .../openstack/dashboard.yml | 4 ++-- + .../openstack/database.yml | 6 ++--- + .../openstack/message_queue.yml | 6 ++--- + .../baremetal-mcp-ocata-odl-ha/openstack/proxy.yml | 6 ++--- + .../openstack/telemetry.yml | 6 ++--- + .../baremetal-mcp-ocata-ovs-ha/infra/config.yml | 4 ++-- + .../baremetal-mcp-ocata-ovs-ha/infra/kvm.yml | 18 +++++++++----- + .../baremetal-mcp-ocata-ovs-ha/infra/maas.yml | 8 +++---- + .../openstack/compute.yml | 27 ++++++++------------- + .../openstack/control.yml | 6 ++--- + .../openstack/dashboard.yml | 4 ++-- + .../openstack/database.yml | 6 ++--- + .../openstack/message_queue.yml | 6 ++--- + .../baremetal-mcp-ocata-ovs-ha/openstack/proxy.yml | 6 ++--- + .../openstack/telemetry.yml | 6 ++--- + 21 files changed, 91 insertions(+), 94 deletions(-) + +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/config.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/config.yml +index 3f72e18..bd439a4 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/config.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/config.yml +@@ -33,8 +33,8 @@ parameters: + linux: + network: + interface: +- ens3: ${_param:linux_dhcp_interface} +- ens4: ${_param:linux_single_interface} ++ enp1s0: ${_param:linux_dhcp_interface} ++ enp2s0: ${_param:linux_single_interface} + salt: + master: + accept_policy: open_mode +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/kvm.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/kvm.yml +index 41366f3..766a495 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/kvm.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/kvm.yml +@@ -25,7 +25,8 @@ parameters: + cluster_node03_address: ${_param:infra_kvm_node03_address} + keepalived_vip_interface: br-ctl + keepalived_vip_virtual_router_id: 69 +- deploy_nic: enp6s0 ++ deploy_nic: eth0 ++ trunk_nic: eth1 + salt: + control: + size: #RAM 4096,8192,16384,32768,65536 +@@ -123,7 +124,7 @@ parameters: + linux: + network: + interface: +- eth3: ++ eth0: + enabled: true + type: eth + proto: manual +@@ -131,6 +132,11 @@ parameters: + netmask: 255.255.255.0 + name: ${_param:deploy_nic} + noifupdown: true ++ eth1: ++ enabled: true ++ type: eth ++ proto: manual ++ name: ${_param:trunk_nic} + br-mgmt: + enabled: true + proto: dhcp +@@ -141,13 +147,13 @@ parameters: + use_interfaces: + - ${_param:deploy_nic} + noifupdown: true +- vlan300: ++ vlan2183: + enabled: true + proto: manual + type: vlan +- name: ${_param:deploy_nic}.300 ++ name: ${_param:trunk_nic}.2183 + use_interfaces: +- - ${_param:deploy_nic} ++ - ${_param:trunk_nic} + br-ctl: + enabled: true + type: bridge +@@ -155,4 +161,4 @@ parameters: + address: ${_param:single_address} + netmask: 255.255.255.0 + use_interfaces: +- - ${_param:deploy_nic}.300 ++ - ${_param:trunk_nic}.2183 +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/maas.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/maas.yml +index c4bc929..5649990 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/maas.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/maas.yml +@@ -4,10 +4,10 @@ classes: + - cluster.baremetal-mcp-ocata-odl-ha.infra + parameters: + _param: +- dhcp_interface: ens3 +- primary_interface: ens4 +- pxe_interface: ens5 +- external_interface: ens6 ++ dhcp_interface: enp1s0 ++ primary_interface: enp2s0 ++ pxe_interface: enp3s0 ++ external_interface: enp4s0 + interface_mtu: 1500 + # MaaS has issues using MTU > 1500 for PXE interface + pxe_interface_mtu: 1500 +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/opendaylight/control.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/opendaylight/control.yml +index 0a01af7..367343a 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/opendaylight/control.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/opendaylight/control.yml +@@ -10,7 +10,7 @@ parameters: + linux: + network: + interface: +- ens3: ++ enp2s0: + enabled: true + type: eth + proto: static +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/compute.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/compute.yml +index 6d2c7f3..3dd94e6 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/compute.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/compute.yml +@@ -23,10 +23,9 @@ parameters: + cluster_node03_hostname: ctl03 + cluster_node03_address: ${_param:openstack_control_node03_address} + nova_vncproxy_url: https://${_param:cluster_public_host}:6080 +- mgmt_nic: enp6s0 +- tenant_nic: enp7s0 ++ mgmt_nic: eth0 ++ tenant_nic: eth1 + linux_system_codename: xenial +- external_nic: enp8s0 + interface_mtu: 1500 + keepalived_vip_interface: br-ctl + keepalived_vip_virtual_router_id: 69 +@@ -61,12 +60,6 @@ parameters: + type: eth + proto: manual + name: ${_param:tenant_nic} +- external_nic: +- enabled: true +- name: ${_param:external_nic} +- mtu: ${_param:interface_mtu} +- proto: manual +- type: eth + br-mesh: + enabled: true + type: bridge +@@ -74,19 +67,19 @@ parameters: + netmask: 255.255.255.0 + mtu: 1500 + use_interfaces: +- - ${_param:tenant_nic}.302 +- vlan300: ++ - ${_param:tenant_nic}.2185 ++ vlan2183: + enabled: true + proto: manual + type: vlan +- name: ${_param:mgmt_nic}.300 ++ name: ${_param:tenant_nic}.2183 + use_interfaces: +- - ${_param:mgmt_nic} +- vlan302: ++ - ${_param:tenant_nic} ++ vlan2185: + enabled: true + proto: manual + type: vlan +- name: ${_param:tenant_nic}.302 ++ name: ${_param:tenant_nic}.2185 + use_interfaces: + - ${_param:tenant_nic} + br-ctl: +@@ -96,7 +89,7 @@ parameters: + address: ${_param:single_address} + netmask: 255.255.255.0 + use_interfaces: +- - ${_param:mgmt_nic}.300 ++ - ${_param:tenant_nic}.2183 + br-floating: + enabled: true + type: ovs_bridge +@@ -113,7 +106,6 @@ parameters: + address: ${_param:external_address} + netmask: 255.255.255.0 + use_interfaces: +- - ${_param:external_nic} ++ - ${_param:tenant_nic} + use_ovs_ports: + - float-to-ex +- +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/control.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/control.yml +index b46e23d..040ea2c 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/control.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/control.yml +@@ -23,7 +23,7 @@ classes: + - cluster.baremetal-mcp-ocata-odl-ha.infra + parameters: + _param: +- keepalived_vip_interface: ens3 ++ keepalived_vip_interface: enp2s0 + keepalived_vip_virtual_router_id: 50 + cluster_vip_address: ${_param:openstack_control_address} + cluster_local_address: ${_param:single_address} +@@ -37,8 +37,8 @@ parameters: + linux: + network: + interface: +- ens2: ${_param:linux_dhcp_interface} +- ens3: ${_param:linux_single_interface} ++ enp1s0: ${_param:linux_dhcp_interface} ++ enp2s0: ${_param:linux_single_interface} + keystone: + server: + cacert: /etc/ssl/certs/mcp_os_cacert +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/dashboard.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/dashboard.yml +index 9748c4c..a5317b1 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/dashboard.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/dashboard.yml +@@ -7,5 +7,5 @@ parameters: + linux: + network: + interface: +- ens2: ${_param:linux_dhcp_interface} +- ens3: ${_param:linux_single_interface} ++ enp1s0: ${_param:linux_dhcp_interface} ++ enp2s0: ${_param:linux_single_interface} +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/database.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/database.yml +index 6c26d26..d74e5ad 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/database.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/database.yml +@@ -16,7 +16,7 @@ classes: + - cluster.baremetal-mcp-ocata-odl-ha + parameters: + _param: +- keepalived_vip_interface: ens3 ++ keepalived_vip_interface: enp2s0 + keepalived_vip_virtual_router_id: 80 + galera_server_cluster_name: openstack_cluster + cluster_vip_address: ${_param:openstack_database_address} +@@ -30,5 +30,5 @@ parameters: + linux: + network: + interface: +- ens2: ${_param:linux_dhcp_interface} +- ens3: ${_param:linux_single_interface} ++ enp1s0: ${_param:linux_dhcp_interface} ++ enp2s0: ${_param:linux_single_interface} +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/message_queue.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/message_queue.yml +index f5312c1..d2e6a40 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/message_queue.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/message_queue.yml +@@ -7,7 +7,7 @@ classes: + - cluster.baremetal-mcp-ocata-odl-ha + parameters: + _param: +- keepalived_vip_interface: ens3 ++ keepalived_vip_interface: enp2s0 + keepalived_vip_virtual_router_id: 90 + cluster_vip_address: ${_param:openstack_message_queue_address} + cluster_local_address: ${_param:single_address} +@@ -20,5 +20,5 @@ parameters: + linux: + network: + interface: +- ens2: ${_param:linux_dhcp_interface} +- ens3: ${_param:linux_single_interface} ++ enp1s0: ${_param:linux_dhcp_interface} ++ enp2s0: ${_param:linux_single_interface} +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/proxy.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/proxy.yml +index 4aa7bb0..118d22d 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/proxy.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/proxy.yml +@@ -17,7 +17,7 @@ classes: + # - cluster.baremetal-mcp-ocata-odl-ha.stacklight.proxy + parameters: + _param: +- keepalived_vip_interface: ens3 ++ keepalived_vip_interface: enp2s0 + keepalived_vip_virtual_router_id: 240 + nginx_proxy_ssl: + enabled: true +@@ -29,8 +29,8 @@ parameters: + linux: + network: + interface: +- ens2: ${_param:linux_dhcp_interface} +- ens3: ${_param:linux_single_interface} ++ enp1s0: ${_param:linux_dhcp_interface} ++ enp2s0: ${_param:linux_single_interface} + system: + package: + libapache2-mod-wsgi: +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/telemetry.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/telemetry.yml +index 4e90090..c08f209 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/telemetry.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/telemetry.yml +@@ -12,7 +12,7 @@ classes: + - cluster.baremetal-mcp-ocata-odl-ha.infra + parameters: + _param: +- keepalived_openstack_telemetry_vip_interface: ens3 ++ keepalived_openstack_telemetry_vip_interface: enp2s0 + keepalived_vip_virtual_router_id: 230 + cluster_vip_address: ${_param:openstack_telemetry_address} + cluster_local_address: ${_param:single_address} +@@ -25,8 +25,8 @@ parameters: + linux: + network: + interface: +- ens2: ${_param:linux_dhcp_interface} +- ens3: ${_param:linux_single_interface} ++ enp1s0: ${_param:linux_dhcp_interface} ++ enp2s0: ${_param:linux_single_interface} + mongodb: + server: + logging: +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/config.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/config.yml +index a75b41d..3979fd1 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/config.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/config.yml +@@ -32,8 +32,8 @@ parameters: + linux: + network: + interface: +- ens3: ${_param:linux_dhcp_interface} +- ens4: ${_param:linux_single_interface} ++ enp1s0: ${_param:linux_dhcp_interface} ++ enp2s0: ${_param:linux_single_interface} + salt: + master: + accept_policy: open_mode +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/kvm.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/kvm.yml +index 5c8026f..ca1b44b 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/kvm.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/kvm.yml +@@ -25,7 +25,8 @@ parameters: + cluster_node03_address: ${_param:infra_kvm_node03_address} + keepalived_vip_interface: br-ctl + keepalived_vip_virtual_router_id: 69 +- deploy_nic: enp6s0 ++ deploy_nic: eth0 ++ trunk_nic: eth1 + salt: + control: + size: #RAM 4096,8192,16384,32768,65536 +@@ -115,7 +116,7 @@ parameters: + linux: + network: + interface: +- eth3: ++ eth0: + enabled: true + type: eth + proto: manual +@@ -123,6 +124,11 @@ parameters: + netmask: 255.255.255.0 + name: ${_param:deploy_nic} + noifupdown: true ++ eth1: ++ enabled: true ++ type: eth ++ proto: manual ++ name: ${_param:trunk_nic} + br-mgmt: + enabled: true + proto: dhcp +@@ -133,13 +139,13 @@ parameters: + use_interfaces: + - ${_param:deploy_nic} + noifupdown: true +- vlan300: ++ vlan2183: + enabled: true + proto: manual + type: vlan +- name: ${_param:deploy_nic}.300 ++ name: ${_param:trunk_nic}.2183 + use_interfaces: +- - ${_param:deploy_nic} ++ - ${_param:trunk_nic} + br-ctl: + enabled: true + type: bridge +@@ -147,4 +153,4 @@ parameters: + address: ${_param:single_address} + netmask: 255.255.255.0 + use_interfaces: +- - ${_param:deploy_nic}.300 ++ - ${_param:trunk_nic}.2183 +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/maas.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/maas.yml +index d193469..73215ee 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/maas.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/maas.yml +@@ -4,10 +4,10 @@ classes: + - cluster.baremetal-mcp-ocata-ovs-ha.infra + parameters: + _param: +- dhcp_interface: ens3 +- primary_interface: ens4 +- pxe_interface: ens5 +- external_interface: ens6 ++ dhcp_interface: enp1s0 ++ primary_interface: enp2s0 ++ pxe_interface: enp3s0 ++ external_interface: enp4s0 + interface_mtu: 1500 + # MaaS has issues using MTU > 1500 for PXE interface + pxe_interface_mtu: 1500 +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/compute.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/compute.yml +index e11e35e..cea8c81 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/compute.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/compute.yml +@@ -22,9 +22,8 @@ parameters: + cluster_node03_hostname: ctl03 + cluster_node03_address: ${_param:openstack_control_node03_address} + nova_vncproxy_url: https://${_param:cluster_public_host}:6080 +- mgmt_nic: enp6s0 +- tenant_nic: enp7s0 +- external_nic: enp8s0 ++ mgmt_nic: eth0 ++ tenant_nic: eth1 + linux_system_codename: xenial + interface_mtu: 1500 + keepalived_vip_interface: br-ctl +@@ -44,12 +43,6 @@ parameters: + type: eth + proto: manual + name: ${_param:tenant_nic} +- external_nic: +- enabled: true +- name: ${_param:external_nic} +- mtu: ${_param:interface_mtu} +- proto: manual +- type: eth + br-mesh: + enabled: true + type: bridge +@@ -57,19 +50,19 @@ parameters: + netmask: 255.255.255.0 + mtu: 1500 + use_interfaces: +- - ${_param:tenant_nic}.302 +- vlan300: ++ - ${_param:tenant_nic}.2185 ++ vlan2183: + enabled: true + proto: manual + type: vlan +- name: ${_param:mgmt_nic}.300 ++ name: ${_param:tenant_nic}.2183 + use_interfaces: +- - ${_param:mgmt_nic} +- vlan302: ++ - ${_param:tenant_nic} ++ vlan2185: + enabled: true + proto: manual + type: vlan +- name: ${_param:tenant_nic}.302 ++ name: ${_param:tenant_nic}.2185 + use_interfaces: + - ${_param:tenant_nic} + br-ctl: +@@ -79,7 +72,7 @@ parameters: + address: ${_param:single_address} + netmask: 255.255.255.0 + use_interfaces: +- - ${_param:mgmt_nic}.300 ++ - ${_param:tenant_nic}.2183 + br-floating: + enabled: true + type: ovs_bridge +@@ -96,6 +89,6 @@ parameters: + address: ${_param:external_address} + netmask: 255.255.255.0 + use_interfaces: +- - ${_param:external_nic} ++ - ${_param:tenant_nic} + use_ovs_ports: + - float-to-ex +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/control.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/control.yml +index 1711ab0..0571320 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/control.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/control.yml +@@ -23,7 +23,7 @@ classes: + - cluster.baremetal-mcp-ocata-ovs-ha.infra + parameters: + _param: +- keepalived_vip_interface: ens3 ++ keepalived_vip_interface: enp2s0 + keepalived_vip_virtual_router_id: 50 + cluster_vip_address: ${_param:openstack_control_address} + cluster_local_address: ${_param:single_address} +@@ -37,8 +37,8 @@ parameters: + linux: + network: + interface: +- ens2: ${_param:linux_dhcp_interface} +- ens3: ${_param:linux_single_interface} ++ enp1s0: ${_param:linux_dhcp_interface} ++ enp2s0: ${_param:linux_single_interface} + keystone: + server: + cacert: /etc/ssl/certs/mcp_os_cacert +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/dashboard.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/dashboard.yml +index 39cc073..18f622c 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/dashboard.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/dashboard.yml +@@ -7,5 +7,5 @@ parameters: + linux: + network: + interface: +- ens2: ${_param:linux_dhcp_interface} +- ens3: ${_param:linux_single_interface} ++ enp1s0: ${_param:linux_dhcp_interface} ++ enp2s0: ${_param:linux_single_interface} +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/database.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/database.yml +index dabda49..7a6934b 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/database.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/database.yml +@@ -16,7 +16,7 @@ classes: + - cluster.baremetal-mcp-ocata-ovs-ha + parameters: + _param: +- keepalived_vip_interface: ens3 ++ keepalived_vip_interface: enp2s0 + keepalived_vip_virtual_router_id: 80 + galera_server_cluster_name: openstack_cluster + cluster_vip_address: ${_param:openstack_database_address} +@@ -30,5 +30,5 @@ parameters: + linux: + network: + interface: +- ens2: ${_param:linux_dhcp_interface} +- ens3: ${_param:linux_single_interface} ++ enp1s0: ${_param:linux_dhcp_interface} ++ enp2s0: ${_param:linux_single_interface} +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/message_queue.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/message_queue.yml +index 881644b..f510a7b 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/message_queue.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/message_queue.yml +@@ -7,7 +7,7 @@ classes: + - cluster.baremetal-mcp-ocata-ovs-ha + parameters: + _param: +- keepalived_vip_interface: ens3 ++ keepalived_vip_interface: enp2s0 + keepalived_vip_virtual_router_id: 90 + cluster_vip_address: ${_param:openstack_message_queue_address} + cluster_local_address: ${_param:single_address} +@@ -20,5 +20,5 @@ parameters: + linux: + network: + interface: +- ens2: ${_param:linux_dhcp_interface} +- ens3: ${_param:linux_single_interface} ++ enp1s0: ${_param:linux_dhcp_interface} ++ enp2s0: ${_param:linux_single_interface} +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/proxy.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/proxy.yml +index 5e9a2c5..939fd7f 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/proxy.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/proxy.yml +@@ -17,7 +17,7 @@ classes: + # - cluster.baremetal-mcp-ocata-ovs-ha.stacklight.proxy + parameters: + _param: +- keepalived_vip_interface: ens3 ++ keepalived_vip_interface: enp2s0 + keepalived_vip_virtual_router_id: 240 + nginx_proxy_ssl: + enabled: true +@@ -29,8 +29,8 @@ parameters: + linux: + network: + interface: +- ens2: ${_param:linux_dhcp_interface} +- ens3: ${_param:linux_single_interface} ++ enp1s0: ${_param:linux_dhcp_interface} ++ enp2s0: ${_param:linux_single_interface} + system: + package: + libapache2-mod-wsgi: +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/telemetry.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/telemetry.yml +index 0e3c7bd..9702576 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/telemetry.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/telemetry.yml +@@ -12,7 +12,7 @@ classes: + - cluster.baremetal-mcp-ocata-ovs-ha.infra + parameters: + _param: +- keepalived_openstack_telemetry_vip_interface: ens3 ++ keepalived_openstack_telemetry_vip_interface: enp2s0 + keepalived_vip_virtual_router_id: 230 + cluster_vip_address: ${_param:openstack_telemetry_address} + cluster_local_address: ${_param:single_address} +@@ -25,8 +25,8 @@ parameters: + linux: + network: + interface: +- ens2: ${_param:linux_dhcp_interface} +- ens3: ${_param:linux_single_interface} ++ enp1s0: ${_param:linux_dhcp_interface} ++ enp2s0: ${_param:linux_single_interface} + mongodb: + server: + logging: diff --git a/patches/opnfv-fuel/0004-network-public-Use-arm-virtual2-POD-config.patch b/patches/opnfv-fuel/0004-network-public-Use-arm-virtual2-POD-config.patch deleted file mode 100644 index 0097a574..00000000 --- a/patches/opnfv-fuel/0004-network-public-Use-arm-virtual2-POD-config.patch +++ /dev/null @@ -1,160 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: All rights reserved. This program and the accompanying materials -: are made available under the terms of the Apache License, Version 2.0 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii -Date: Tue, 18 Jul 2017 19:17:24 +0200 -Subject: [PATCH] network: public: Use arm-virtual2 POD config - -grep -e "10\.16\.0\." -R . -l | \ - xargs sed -i \ - -e 's/10\.16\.0\./10.0.9./g' \ - -e 's/10\.0\.9\.254/10.0.9.200/g' \ - -e 's/10\.0\.9\.1/10.0.9.254/g' - -NOTE: This should be converted into a dynamic configuration read from -the universal POD descriptor in securedlab, once that is ready. - -Until then, just align the public network configuration used by the -virtual POD with the Enea lab configuration specific to arm-virtual2 -(i.e. public network on 10.0.9.0/24). - -NOTE: Replace the gateway at 10.16.0.1 (now 10.0.9.1) with the same -IP address as our lab's gateway (10.0.9.254), to keep both possible -network layouts in sync (using all virtual networks created via -virsh, respectively our lab's static config). -This will ensure deploys continue to work in both enviroments. - -Also, since our new gateway resides at 10.0.9.254, trim the DHCP pool -range for the public network to not include that address. - -Signed-off-by: Alexandru Avadanii ---- - mcp/config/states/networks | 6 +++--- - .../classes/cluster/virtual-mcp-ocata-common/openstack_init.yml | 2 +- - .../classes/cluster/virtual-mcp-ocata-odl-router/infra/config.yml | 6 +++--- - .../classes/cluster/virtual-mcp-ocata-ovs-dpdk/infra/config.yml | 6 +++--- - mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs/infra/config.yml | 6 +++--- - mcp/scripts/net_public.xml | 2 +- - 6 files changed, 14 insertions(+), 14 deletions(-) - -diff --git a/mcp/config/states/networks b/mcp/config/states/networks -index 505153a..bd6e923 100755 ---- a/mcp/config/states/networks -+++ b/mcp/config/states/networks -@@ -10,7 +10,7 @@ PUBLIC_NET=$(salt --out yaml 'cmp*' pillar.get _param:external_address | \ - pillar.get _param:openstack_compute_node01_external_address | \ - awk --re-interval '/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/{print $2; exit}') - --[ -n "${PUBLIC_NET}" ] && PUBLIC_NET="${PUBLIC_NET%.*}.0/24" || PUBLIC_NET="10.16.0.0/24" -+[ -n "${PUBLIC_NET}" ] && PUBLIC_NET="${PUBLIC_NET%.*}.0/24" || PUBLIC_NET="10.0.9.0/24" - - salt 'ctl01*' cmd.run ". /root/keystonercv3; \ - openstack compute service list; \ -@@ -21,6 +21,6 @@ salt 'ctl01*' cmd.run ". /root/keystonercv3; \ - openstack network create --external --default --provider-network-type flat \ - --provider-physical-network physnet1 floating_net" - salt 'ctl01*' cmd.run ". /root/keystonercv3; \ -- openstack subnet create --gateway ${PUBLIC_NET%.*}.1 --no-dhcp \ -- --allocation-pool start=${PUBLIC_NET%.*}.130,end=${PUBLIC_NET%.*}.254 \ -+ openstack subnet create --gateway ${PUBLIC_NET%.*}.254 --no-dhcp \ -+ --allocation-pool start=${PUBLIC_NET%.*}.130,end=${PUBLIC_NET%.*}.200 \ - --network floating_net --subnet-range ${PUBLIC_NET} floating_subnet" -diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_init.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_init.yml -index a14a711..055d98c 100644 ---- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_init.yml -+++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_init.yml -@@ -6,7 +6,7 @@ parameters: - openstack_region: RegionOne - admin_email: root@localhost - cluster_public_protocol: http -- cluster_public_host: 10.16.0.101 -+ cluster_public_host: 10.0.9.101 - neutron_public_protocol: http - neutron_control_dvr: False - neutron_l3_ha: False -diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/infra/config.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/infra/config.yml -index 2f8e94a..bc95642 100644 ---- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/infra/config.yml -+++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/infra/config.yml -@@ -51,16 +51,16 @@ parameters: - params: - single_address: 172.16.10.105 - tenant_address: 10.1.0.105 -- external_address: 10.16.0.105 -+ external_address: 10.0.9.105 - openstack_compute_node02: - params: - single_address: 172.16.10.106 - tenant_address: 10.1.0.106 -- external_address: 10.16.0.106 -+ external_address: 10.0.9.106 - openstack_gateway_node01: - params: - tenant_address: 10.1.0.110 -- external_address: 10.16.0.110 -+ external_address: 10.0.9.110 - opendaylight_control_node01: - classes: - - cluster.${_param:cluster_name}.opendaylight.control -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 aec6cde..b69258f 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 -@@ -50,17 +50,17 @@ parameters: - params: - single_address: 172.16.10.105 - tenant_address: 10.1.0.105 -- external_address: 10.16.0.105 -+ external_address: 10.0.9.105 - dpdk0_name: enp3s0 - dpdk0_pci: '"0000:00:05.0"' - openstack_compute_node02: - params: - single_address: 172.16.10.106 - tenant_address: 10.1.0.106 -- external_address: 10.16.0.106 -+ external_address: 10.0.9.106 - dpdk0_name: enp3s0 - dpdk0_pci: '"0000:00:05.0"' - openstack_gateway_node01: - params: - tenant_address: 10.1.0.110 -- external_address: 10.16.0.110 -+ external_address: 10.0.9.110 -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 8cb0992..c8f8477 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 -@@ -50,13 +50,13 @@ parameters: - params: - single_address: 172.16.10.105 - tenant_address: 10.1.0.105 -- external_address: 10.16.0.105 -+ external_address: 10.0.9.105 - openstack_compute_node02: - params: - single_address: 172.16.10.106 - tenant_address: 10.1.0.106 -- external_address: 10.16.0.106 -+ external_address: 10.0.9.106 - openstack_gateway_node01: - params: - tenant_address: 10.1.0.110 -- external_address: 10.16.0.110 -+ external_address: 10.0.9.110 -diff --git a/mcp/scripts/net_public.xml b/mcp/scripts/net_public.xml -index 61650d5..f455480 100644 ---- a/mcp/scripts/net_public.xml -+++ b/mcp/scripts/net_public.xml -@@ -2,5 +2,5 @@ - public - - -- -+ - diff --git a/patches/opnfv-fuel/0005-maas-Add-curtin_userdata_arm64_generic_xenial.patch b/patches/opnfv-fuel/0005-maas-Add-curtin_userdata_arm64_generic_xenial.patch new file mode 100644 index 00000000..8b8cfefe --- /dev/null +++ b/patches/opnfv-fuel/0005-maas-Add-curtin_userdata_arm64_generic_xenial.patch @@ -0,0 +1,112 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: Copyright (c) 2017 Enea AB and others. +: +: All rights reserved. This program and the accompanying materials +: are made available under the terms of the Apache License, Version 2.0 +: which accompanies this distribution, and is available at +: http://www.apache.org/licenses/LICENSE-2.0 +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +From: Alexandru Avadanii +Date: Mon, 7 Aug 2017 19:45:01 +0200 +Subject: [PATCH] maas: Add curtin_userdata_arm64_generic_xenial + +Add AArch64 specific configuration. + +Signed-off-by: Alexandru Avadanii +--- + ...-Add-curtin_userdata_arm64_generic_xenial.patch | 76 ++++++++++++++++++++++ + mcp/patches/patches.list | 1 + + 2 files changed, 77 insertions(+) + create mode 100644 mcp/patches/0101-maas-Add-curtin_userdata_arm64_generic_xenial.patch + +diff --git a/mcp/patches/0101-maas-Add-curtin_userdata_arm64_generic_xenial.patch b/mcp/patches/0101-maas-Add-curtin_userdata_arm64_generic_xenial.patch +new file mode 100644 +index 0000000..b969e07 +--- /dev/null ++++ b/mcp/patches/0101-maas-Add-curtin_userdata_arm64_generic_xenial.patch +@@ -0,0 +1,76 @@ ++From: Alexandru Avadanii ++Date: Sat, 5 Aug 2017 02:03:01 +0200 ++Subject: [PATCH] maas: Add curtin_userdata_arm64_generic_xenial ++ ++Based on curtin_userdata_amd64_generic_xenial, add new arm64 ++specific configuration file: ++- curtin_userdata_arm64_generic_xenial ++ ++Signed-off-by: Alexandru Avadanii ++--- ++ ++diff --git a/maas/region.sls b/maas/region.sls ++--- a/maas/region.sls +++++ b/maas/region.sls ++@@ -70,6 +70,18 @@ ++ - require: ++ - pkg: maas_region_packages ++ +++/etc/maas/preseeds/curtin_userdata_arm64_generic_xenial: +++ file.managed: +++ - source: salt://maas/files/curtin_userdata_arm64_generic_xenial +++ - template: jinja +++ - user: root +++ - group: root +++ - mode: 644 +++ - context: +++ salt_master_ip: {{ region.salt_master_ip }} +++ - require: +++ - pkg: maas_region_packages +++ ++ maas_region_services: ++ service.running: ++ - enable: true ++diff --git a/maas/files/curtin_userdata_arm64_generic_xenial b/maas/files/curtin_userdata_arm64_generic_xenial ++new file mode 100644 ++--- /dev/null +++++ b/maas/files/curtin_userdata_arm64_generic_xenial ++@@ -0,0 +1,38 @@ +++{%- from "maas/map.jinja" import server with context %} +++{% raw %} +++#cloud-config +++debconf_selections: +++ maas: | +++ {{for line in str(curtin_preseed).splitlines()}} +++ {{line}} +++ {{endfor}} +++{{if third_party_drivers and driver}} +++early_commands: +++ {{py: key_string = ''.join(['\\x%x' % x for x in map(ord, driver['key_binary'])])}} +++ driver_00_get_key: /bin/echo -en '{{key_string}}' > /tmp/maas-{{driver['package']}}.gpg +++ driver_01_add_key: ["apt-key", "add", "/tmp/maas-{{driver['package']}}.gpg"] +++ driver_02_add: ["add-apt-repository", "-y", "deb {{driver['repository']}} {{node.get_distro_series()}} main"] +++ driver_03_update_install: ["sh", "-c", "apt-get update --quiet && apt-get --assume-yes install {{driver['package']}}"] +++ driver_04_load: ["sh", "-c", "depmod && modprobe {{driver['module']}}"] +++{{endif}} +++late_commands: +++ maas: [wget, '--no-proxy', {{node_disable_pxe_url|escape.json}}, '--post-data', {{node_disable_pxe_data|escape.json}}, '-O', '/dev/null'] +++ apt_00_set_repo: ["curtin", "in-target", "--", "sh", "-c", "echo 'deb [arch=arm64] http://linux.enea.com/saltstack/apt/ubuntu/16.04/arm64/latest xenial main' >> /etc/apt/sources.list"] +++ apt_01_set_gpg: ["curtin", "in-target", "--", "sh", "-c", "echo 'LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tClZlcnNpb246IEdudVBHIHYxCgptUUVOQkZhZ0Fyb0JDQURXYm9OSWp1RjZsQjFtV3YyK0VidnFZM2xLbDVtTEtocjJEblNVa0tlSFVQQnY4Z05NCnFLOFEwMEFNSXlQaXlFaGdqQStkV2l6Wis1YUJneG9pWTdvTWVMSjJYeW0zNlUvOFNZcTJCV2QzU0dDYk1Ob3oKU0pEeERVU00vSEZWczZhdEYxTTNEWTlvTjY1aFNWbnU0dXk1VHU2YXNmNms0cmhBeWswejQrcFJjUEJDdTJ2cQptbkdpM0NPTS8rOVBTaHJFS2VWT3g1VzJ2Ukp5d1VGdXE4RUR2UW5Sb0owR3ZNMjhKaUpJYW53MTdZd0lQeGhnCkJLWlZwWmphbjVYK2loVk1Yd0EyaC9HL0ZTNU9taGQ1MFJxVjZMV1NZczk0VkpKZ1lxSHg4VU1tN2l6Y3hJK1AKY3QzSWNiRDE5NWJQYkorU2J1aUZlNDVaTHNkWTFNeUdpVTJCQUJFQkFBRzBLMFZ1WldFZ1FYSnRZbUZ1WkNCRQpaWFp2Y0hNZ1ZHVmhiU0E4WVhKdFltRnVaRUJsYm1WaExtTnZiVDZKQVQ0RUV3RUNBQ2dGQWxhZ0Fyb0NHd01GCkNRUENad0FHQ3drSUJ3TUNCaFVJQWdrS0N3UVdBZ01CQWg0QkFoZUFBQW9KRU42cmtMcDVpckhSc0c4SC8yUDIKaE82akZIUFJEMXU4ajl1Zk85QXhvSW5hRUc5R2VSanV2TWMxdENVem92WHZUczEwNlRaMGFzNk1iQUoxUzZ1NQpFOFV5UTErVkdlcHZkSUpQWHgzUEN4TG1VdDZXSXFtZE9kcUZyeEljbG9oaWcva2FyZGkzTmZYMU1CdmxFVi9jCjdRNTFINDNocmxNcU1wcWdZMUJtKzUzUExDNHVqamxESkJ0Sk9FVTlka2kzMTliVW1uZytnTzlCQWxqREpGWHYKSnFZNitQL2VyN0lnQ2JSWFVYWWZ5Snpnang5SndsS2JtZFE4UW5DclpqRi9WSElXNDAvbXU1SUlKdUZ2dUN0aQp0Y29nK1NOU2xEbUNPUyt3RThDQ29qZXVKcXVwSU9jejl6eXBWR3pldXMvTjVRNUVFRmU3R1lXWVMvNU5LVWtFCjFUdXVGZVpLdTVOSkM1cmt3SVU9Cj03cDYwCi0tLS0tRU5EIFBHUCBQVUJMSUMgS0VZIEJMT0NLLS0tLS0K'|base64 -d|apt-key add -"] +++ apt_03_update: ["curtin", "in-target", "--", "apt-get", "update"] +++ salt_01_install: ["curtin", "in-target", "--", "apt-get", "-y", "install", "salt-minion"] +++{% endraw %} +++ salt_02_hostname_set: ["curtin", "in-target", "--", "echo", "{% raw %}{{node.hostname}}{% endraw %}.{{pillar.linux.system.domain}}"] +++ salt_03_hostname_get: ["curtin", "in-target", "--", "sh", "-c", "echo 'id: {% raw %}{{node.hostname}}{% endraw %}.{{pillar.linux.system.domain}}' >> /etc/salt/minion"] +++ salt_04_master: ["curtin", "in-target", "--", "sh", "-c", "echo 'master: {{ salt_master_ip }}' >> /etc/salt/minion"] +++{% raw %} +++{{if third_party_drivers and driver}} +++ driver_00_key_get: curtin in-target -- sh -c "/bin/echo -en '{{key_string}}' > /tmp/maas-{{driver['package']}}.gpg" +++ driver_02_key_add: ["curtin", "in-target", "--", "apt-key", "add", "/tmp/maas-{{driver['package']}}.gpg"] +++ driver_03_add: ["curtin", "in-target", "--", "add-apt-repository", "-y", "deb {{driver['repository']}} {{node.get_distro_series()}} main"] +++ driver_04_update_install: ["curtin", "in-target", "--", "apt-get", "update", "--quiet"] +++ driver_05_install: ["curtin", "in-target", "--", "apt-get", "-y", "install", "{{driver['package']}}"] +++ driver_06_depmod: ["curtin", "in-target", "--", "depmod"] +++ driver_07_update_initramfs: ["curtin", "in-target", "--", "update-initramfs", "-u"] +++{{endif}} +++{% endraw %} +diff --git a/mcp/patches/patches.list b/mcp/patches/patches.list +index f65daab..ed2dd4e 100644 +--- a/mcp/patches/patches.list ++++ b/mcp/patches/patches.list +@@ -7,3 +7,4 @@ + /usr/share/salt-formulas/env: 0007-linux.network.interface-noifupdown-support.patch + /usr/share/salt-formulas/env: 0008-Handle-file_recv-option.patch + /usr/share/salt-formulas/env: 0009-seedng-module-Sync-salt-version.patch ++/usr/share/salt-formulas/env: 0101-maas-Add-curtin_userdata_arm64_generic_xenial.patch diff --git a/patches/opnfv-fuel/0005-mcp-salt-formulas-opendaylight-AArch64-leveldb.patch b/patches/opnfv-fuel/0005-mcp-salt-formulas-opendaylight-AArch64-leveldb.patch deleted file mode 100644 index 31308fd4..00000000 --- a/patches/opnfv-fuel/0005-mcp-salt-formulas-opendaylight-AArch64-leveldb.patch +++ /dev/null @@ -1,48 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: All rights reserved. This program and the accompanying materials -: are made available under the terms of the Apache License, Version 2.0 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii -Date: Thu, 27 Jul 2017 23:42:29 +0200 -Subject: [PATCH] mcp: salt-formulas: opendaylight: AArch64 leveldb - -ODL requires native leveldbjni support on architectures like AArch64. -Armband provides a Debian package that provides exactly that, -specially tailored to be applied on top of upstream Opendaylight -Debian package. - -Install as part of the existing Opendaylight -salt-formula (and not as part of Armband's separate salt-formula, like -previous fixups). - -Some dependencies are not self-contained in this formula yet, and -should be handled before upstreaming this patch: -- Armband DEB repository (mcp-repos) is added by "openstack" state; -- only Debian systems are supported (no equivalent RPM provided); -- only systemd is supported (unlikely to change); - -JIRA: https://jira.opnfv.org/browse/ARMBAND-283 - -Signed-off-by: Alexandru Avadanii ---- - mcp/salt-formulas/opendaylight/server.sls | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/mcp/salt-formulas/opendaylight/server.sls b/mcp/salt-formulas/opendaylight/server.sls -index 8c6c3b2..a2236ae 100644 ---- a/mcp/salt-formulas/opendaylight/server.sls -+++ b/mcp/salt-formulas/opendaylight/server.sls -@@ -58,4 +58,9 @@ opendaylight: - - service: opendaylight - {%- endif %} - -+opendaylight_aarch64_leveldbjni: -+ pkg.installed: -+ {% if grains['cpuarch'] == 'aarch64'%} -+ - name: armband-odl-leveldb-fix -+ {% endif %} - {%- endif %} diff --git a/patches/opnfv-fuel/0006-mcp-config-AArch64-baremetal-Use-arm64-image.patch b/patches/opnfv-fuel/0006-mcp-config-AArch64-baremetal-Use-arm64-image.patch deleted file mode 100644 index a47f2995..00000000 --- a/patches/opnfv-fuel/0006-mcp-config-AArch64-baremetal-Use-arm64-image.patch +++ /dev/null @@ -1,60 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: All rights reserved. This program and the accompanying materials -: are made available under the terms of the Apache License, Version 2.0 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii -Date: Sun, 6 Aug 2017 19:34:06 +0200 -Subject: [PATCH] mcp/config: AArch64 baremetal: Use arm64 image - -While at it, bump default vCPU number from 2 to 6. - -Signed-off-by: Alexandru Avadanii ---- - mcp/config/scenario/baremetal/defaults.yaml | 4 ++-- - mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml | 2 +- - mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/init.yml | 2 +- - 3 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/mcp/config/scenario/baremetal/defaults.yaml b/mcp/config/scenario/baremetal/defaults.yaml -index b841e88..17fbbfc 100644 ---- a/mcp/config/scenario/baremetal/defaults.yaml -+++ b/mcp/config/scenario/baremetal/defaults.yaml -@@ -1,6 +1,6 @@ --base_image: https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img -+base_image: https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-arm64-uefi1.img - virtual: - default: -- vcpus: 2 -+ vcpus: 6 - ram: 4096 - -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml -index 0baebb6..c5a999b 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml -@@ -54,7 +54,7 @@ parameters: - address: ${_param:single_address} - netmask: 255.255.255.0 - -- salt_control_xenial_image: http://apt.mirantis.com/images/ubuntu-16-04-x64-latest.qcow2 -+ salt_control_xenial_image: https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-arm64-uefi1.img - salt_api_password_hash: "$6$WV0P1shnoDh2gI/Z$22/Bcd7ffMv0jDlFpT63cAU4PiXHz9pjXwngToKwqAsgoeK4HNR3PiKaushjxp3JsQ8hNoJmAC6TxzVqfV8WH/" - linux: - system: -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/init.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/init.yml -index 62f887d..23f205f 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/init.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/init.yml -@@ -54,7 +54,7 @@ parameters: - address: ${_param:single_address} - netmask: 255.255.255.0 - -- salt_control_xenial_image: http://apt.mirantis.com/images/ubuntu-16-04-x64-latest.qcow2 -+ salt_control_xenial_image: https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-arm64-uefi1.img - salt_api_password_hash: "$6$WV0P1shnoDh2gI/Z$22/Bcd7ffMv0jDlFpT63cAU4PiXHz9pjXwngToKwqAsgoeK4HNR3PiKaushjxp3JsQ8hNoJmAC6TxzVqfV8WH/" - linux: - system: diff --git a/patches/opnfv-fuel/0006-network-public-mgmt-Use-arm-pod3-POD-config.patch b/patches/opnfv-fuel/0006-network-public-mgmt-Use-arm-pod3-POD-config.patch new file mode 100644 index 00000000..d9f64a1e --- /dev/null +++ b/patches/opnfv-fuel/0006-network-public-mgmt-Use-arm-pod3-POD-config.patch @@ -0,0 +1,304 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: Copyright (c) 2017 Enea AB and others. +: +: All rights reserved. This program and the accompanying materials +: are made available under the terms of the Apache License, Version 2.0 +: which accompanies this distribution, and is available at +: http://www.apache.org/licenses/LICENSE-2.0 +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +From: Alexandru Avadanii +Date: Tue, 8 Aug 2017 03:49:53 +0200 +Subject: [PATCH] network: public, mgmt: Use arm-pod3 POD config + +Move MaaS IPs to x.y.z.2 (upstream Fuel uses x.y.z.3). + +Signed-off-by: Alexandru Avadanii +--- + ci/deploy.sh | 2 +- + mcp/config/states/maas | 2 +- + .../baremetal-mcp-ocata-odl-ha/infra/init.yml | 22 ++++---- + .../baremetal-mcp-ocata-odl-ha/openstack/init.yml | 62 +++++++++++----------- + .../baremetal-mcp-ocata-ovs-ha/infra/init.yml | 22 ++++---- + .../baremetal-mcp-ocata-ovs-ha/openstack/init.yml | 60 ++++++++++----------- + 6 files changed, 85 insertions(+), 85 deletions(-) + +diff --git a/ci/deploy.sh b/ci/deploy.sh +index 36056c8..a2a0c02 100755 +--- a/ci/deploy.sh ++++ b/ci/deploy.sh +@@ -142,7 +142,7 @@ URI_REGEXP='(file|https?|ftp)://.*' + export SSH_KEY=${SSH_KEY:-"/var/lib/opnfv/mcp.rsa"} + export SALT_MASTER=${SALT_MASTER_IP:-192.168.10.100} + export SALT_MASTER_USER=${SALT_MASTER_USER:-ubuntu} +-export MAAS_IP=${MAAS_IP:-192.168.10.3} ++export MAAS_IP=${MAAS_IP:-192.168.10.2} + export SSH_OPTS="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${SSH_KEY}" + export SSH_SALT="${SALT_MASTER_USER}@${SALT_MASTER}" + +diff --git a/mcp/config/states/maas b/mcp/config/states/maas +index 9576333..603b530 100755 +--- a/mcp/config/states/maas ++++ b/mcp/config/states/maas +@@ -57,7 +57,7 @@ salt -C 'mas01*' state.apply linux.network.interface + salt -C 'mas01*' state.apply maas.pxe_nat + salt -C 'mas01*' state.apply maas.cluster + salt -C 'cfg01*' cmd.run \ +- "route add -net 192.168.11.0/24 gw ${MAAS_IP:-192.168.10.3}" ++ "route add -net 192.168.11.0/24 gw ${MAAS_IP:-192.168.10.2}" + + wait_for 10 "salt -C 'mas01*' state.apply maas.region" + +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml +index f1769d7..393cbb3 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml +@@ -16,19 +16,19 @@ parameters: + infra_maas_database_password: opnfv_secret + + # infra service addresses +- infra_config_address: 10.167.4.100 ++ infra_config_address: 172.16.10.100 + infra_config_deploy_address: 192.168.10.100 +- infra_maas_node01_address: 10.167.4.3 +- infra_maas_node01_deploy_address: 192.168.11.3 +- infra_maas_node01_external_address: 10.16.0.3 +- infra_compute_node01_address: 10.167.4.141 +- infra_compute_node02_address: 10.167.4.142 +- infra_compute_node03_address: 10.167.4.143 ++ infra_maas_node01_address: 172.16.10.2 ++ infra_maas_node01_deploy_address: 192.168.11.2 ++ infra_maas_node01_external_address: 10.0.8.2 ++ infra_compute_node01_address: 172.16.10.141 ++ infra_compute_node02_address: 172.16.10.142 ++ infra_compute_node03_address: 172.16.10.143 + +- infra_kvm_address: 10.167.4.140 +- infra_kvm_node01_address: 10.167.4.141 +- infra_kvm_node02_address: 10.167.4.142 +- infra_kvm_node03_address: 10.167.4.143 ++ infra_kvm_address: 172.16.10.140 ++ infra_kvm_node01_address: 172.16.10.141 ++ infra_kvm_node02_address: 172.16.10.142 ++ infra_kvm_node03_address: 172.16.10.143 + + infra_maas_node01_hostname: mas01 + infra_kvm_node01_hostname: kvm01 +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml +index e49a205..ad99447 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml +@@ -3,9 +3,9 @@ parameters: + + openstack_version: ocata + +- openstack_gateway_node01_address: 10.167.4.124 +- openstack_gateway_node02_address: 10.167.4.125 +- openstack_gateway_node03_address: 10.167.4.126 ++ openstack_gateway_node01_address: 172.16.10.124 ++ openstack_gateway_node02_address: 172.16.10.125 ++ openstack_gateway_node03_address: 172.16.10.126 + openstack_gateway_node01_tenant_address: 10.1.0.6 + openstack_gateway_node02_tenant_address: 10.1.0.7 + openstack_gateway_node03_tenant_address: 10.1.0.9 +@@ -14,21 +14,21 @@ parameters: + openstack_gateway_node03_hostname: gtw03 + + # openstack service addresses +- openstack_proxy_address: 10.167.4.80 +- openstack_proxy_node01_address: 10.167.4.81 +- openstack_proxy_node02_address: 10.167.4.82 +- openstack_control_address: 10.167.4.10 +- openstack_control_node01_address: 10.167.4.11 +- openstack_control_node02_address: 10.167.4.12 +- openstack_control_node03_address: 10.167.4.13 +- openstack_database_address: 10.167.4.50 +- openstack_database_node01_address: 10.167.4.51 +- openstack_database_node02_address: 10.167.4.52 +- openstack_database_node03_address: 10.167.4.53 +- openstack_message_queue_address: 10.167.4.40 +- openstack_message_queue_node01_address: 10.167.4.41 +- openstack_message_queue_node02_address: 10.167.4.42 +- openstack_message_queue_node03_address: 10.167.4.43 ++ openstack_proxy_address: 172.16.10.80 ++ openstack_proxy_node01_address: 172.16.10.81 ++ openstack_proxy_node02_address: 172.16.10.82 ++ openstack_control_address: 172.16.10.10 ++ openstack_control_node01_address: 172.16.10.11 ++ openstack_control_node02_address: 172.16.10.12 ++ openstack_control_node03_address: 172.16.10.13 ++ openstack_database_address: 172.16.10.50 ++ openstack_database_node01_address: 172.16.10.51 ++ openstack_database_node02_address: 172.16.10.52 ++ openstack_database_node03_address: 172.16.10.53 ++ openstack_message_queue_address: 172.16.10.40 ++ openstack_message_queue_node01_address: 172.16.10.41 ++ openstack_message_queue_node02_address: 172.16.10.42 ++ openstack_message_queue_node03_address: 172.16.10.43 + + + openstack_telemetry_hostname: mdb +@@ -36,26 +36,26 @@ parameters: + openstack_telemetry_node02_hostname: mdb02 + openstack_telemetry_node03_hostname: mdb03 + +- openstack_telemetry_address: 10.167.4.75 +- openstack_telemetry_node01_address: 10.167.4.76 +- openstack_telemetry_node02_address: 10.167.4.77 +- openstack_telemetry_node03_address: 10.167.4.78 ++ openstack_telemetry_address: 172.16.10.75 ++ openstack_telemetry_node01_address: 172.16.10.76 ++ openstack_telemetry_node02_address: 172.16.10.77 ++ openstack_telemetry_node03_address: 172.16.10.78 + + # OpenStack Compute +- openstack_compute_node01_single_address: 10.167.4.101 +- openstack_compute_node02_single_address: 10.167.4.102 +- openstack_compute_node03_single_address: 10.167.4.103 +- openstack_compute_node01_control_address: 10.167.4.101 +- openstack_compute_node02_control_address: 10.167.4.102 +- openstack_compute_node03_control_address: 10.167.4.103 ++ openstack_compute_node01_single_address: 172.16.10.101 ++ openstack_compute_node02_single_address: 172.16.10.102 ++ openstack_compute_node03_single_address: 172.16.10.103 ++ openstack_compute_node01_control_address: 172.16.10.101 ++ openstack_compute_node02_control_address: 172.16.10.102 ++ openstack_compute_node03_control_address: 172.16.10.103 + openstack_compute_node01_tenant_address: 10.1.0.101 + openstack_compute_node02_tenant_address: 10.1.0.102 + openstack_compute_node03_tenant_address: 10.1.0.103 +- openstack_compute_node01_external_address: 172.30.10.2 +- openstack_compute_node02_external_address: 172.30.10.3 ++ openstack_compute_node01_external_address: 10.0.8.101 ++ openstack_compute_node02_external_address: 10.0.8.102 + + # opendaylight options +- opendaylight_server_node01_single_address: 10.167.4.111 ++ opendaylight_server_node01_single_address: 172.16.10.111 + opendaylight_service_host: ${_param:opendaylight_server_node01_single_address} + opendaylight_server_node01_hostname: odl01 + opendaylight_router: odl-router_v2 +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/init.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/init.yml +index d7e365a..0b8bf2f 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/init.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/init.yml +@@ -16,19 +16,19 @@ parameters: + infra_maas_database_password: opnfv_secret + + # infra service addresses +- infra_config_address: 10.167.4.100 ++ infra_config_address: 172.16.10.100 + infra_config_deploy_address: 192.168.10.100 +- infra_maas_node01_address: 10.167.4.3 +- infra_maas_node01_deploy_address: 192.168.11.3 +- infra_maas_node01_external_address: 10.16.0.3 +- infra_compute_node01_address: 10.167.4.141 +- infra_compute_node02_address: 10.167.4.142 +- infra_compute_node03_address: 10.167.4.143 ++ infra_maas_node01_address: 172.16.10.2 ++ infra_maas_node01_deploy_address: 192.168.11.2 ++ infra_maas_node01_external_address: 10.0.8.2 ++ infra_compute_node01_address: 172.16.10.141 ++ infra_compute_node02_address: 172.16.10.142 ++ infra_compute_node03_address: 172.16.10.143 + +- infra_kvm_address: 10.167.4.140 +- infra_kvm_node01_address: 10.167.4.141 +- infra_kvm_node02_address: 10.167.4.142 +- infra_kvm_node03_address: 10.167.4.143 ++ infra_kvm_address: 172.16.10.140 ++ infra_kvm_node01_address: 172.16.10.141 ++ infra_kvm_node02_address: 172.16.10.142 ++ infra_kvm_node03_address: 172.16.10.143 + + infra_maas_node01_hostname: mas01 + infra_kvm_node01_hostname: kvm01 +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/init.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/init.yml +index 9c2bc7b..90e0cf3 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/init.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/init.yml +@@ -3,9 +3,9 @@ parameters: + + openstack_version: ocata + +- openstack_gateway_node01_address: 10.167.4.124 +- openstack_gateway_node02_address: 10.167.4.125 +- openstack_gateway_node03_address: 10.167.4.126 ++ openstack_gateway_node01_address: 172.16.10.124 ++ openstack_gateway_node02_address: 172.16.10.125 ++ openstack_gateway_node03_address: 172.16.10.126 + openstack_gateway_node01_tenant_address: 10.1.0.6 + openstack_gateway_node02_tenant_address: 10.1.0.7 + openstack_gateway_node03_tenant_address: 10.1.0.9 +@@ -14,21 +14,21 @@ parameters: + openstack_gateway_node03_hostname: gtw03 + + # openstack service addresses +- openstack_proxy_address: 10.167.4.80 +- openstack_proxy_node01_address: 10.167.4.81 +- openstack_proxy_node02_address: 10.167.4.82 +- openstack_control_address: 10.167.4.10 +- openstack_control_node01_address: 10.167.4.11 +- openstack_control_node02_address: 10.167.4.12 +- openstack_control_node03_address: 10.167.4.13 +- openstack_database_address: 10.167.4.50 +- openstack_database_node01_address: 10.167.4.51 +- openstack_database_node02_address: 10.167.4.52 +- openstack_database_node03_address: 10.167.4.53 +- openstack_message_queue_address: 10.167.4.40 +- openstack_message_queue_node01_address: 10.167.4.41 +- openstack_message_queue_node02_address: 10.167.4.42 +- openstack_message_queue_node03_address: 10.167.4.43 ++ openstack_proxy_address: 172.16.10.80 ++ openstack_proxy_node01_address: 172.16.10.81 ++ openstack_proxy_node02_address: 172.16.10.82 ++ openstack_control_address: 172.16.10.10 ++ openstack_control_node01_address: 172.16.10.11 ++ openstack_control_node02_address: 172.16.10.12 ++ openstack_control_node03_address: 172.16.10.13 ++ openstack_database_address: 172.16.10.50 ++ openstack_database_node01_address: 172.16.10.51 ++ openstack_database_node02_address: 172.16.10.52 ++ openstack_database_node03_address: 172.16.10.53 ++ openstack_message_queue_address: 172.16.10.40 ++ openstack_message_queue_node01_address: 172.16.10.41 ++ openstack_message_queue_node02_address: 172.16.10.42 ++ openstack_message_queue_node03_address: 172.16.10.43 + + + openstack_telemetry_hostname: mdb +@@ -36,23 +36,23 @@ parameters: + openstack_telemetry_node02_hostname: mdb02 + openstack_telemetry_node03_hostname: mdb03 + +- openstack_telemetry_address: 10.167.4.75 +- openstack_telemetry_node01_address: 10.167.4.76 +- openstack_telemetry_node02_address: 10.167.4.77 +- openstack_telemetry_node03_address: 10.167.4.78 ++ openstack_telemetry_address: 172.16.10.75 ++ openstack_telemetry_node01_address: 172.16.10.76 ++ openstack_telemetry_node02_address: 172.16.10.77 ++ openstack_telemetry_node03_address: 172.16.10.78 + + # OpenStack Compute +- openstack_compute_node01_single_address: 10.167.4.101 +- openstack_compute_node02_single_address: 10.167.4.102 +- openstack_compute_node03_single_address: 10.167.4.103 +- openstack_compute_node01_control_address: 10.167.4.101 +- openstack_compute_node02_control_address: 10.167.4.102 +- openstack_compute_node03_control_address: 10.167.4.103 ++ openstack_compute_node01_single_address: 172.16.10.101 ++ openstack_compute_node02_single_address: 172.16.10.102 ++ openstack_compute_node03_single_address: 172.16.10.103 ++ openstack_compute_node01_control_address: 172.16.10.101 ++ openstack_compute_node02_control_address: 172.16.10.102 ++ openstack_compute_node03_control_address: 172.16.10.103 + openstack_compute_node01_tenant_address: 10.1.0.101 + openstack_compute_node02_tenant_address: 10.1.0.102 + openstack_compute_node03_tenant_address: 10.1.0.103 +- openstack_compute_node01_external_address: 172.30.10.2 +- openstack_compute_node02_external_address: 172.30.10.3 ++ openstack_compute_node01_external_address: 10.0.8.101 ++ openstack_compute_node02_external_address: 10.0.8.102 + + # openstack service hostnames + openstack_proxy_hostname: prx diff --git a/patches/opnfv-fuel/0007-classes-baremetal-AArch64-virtio-NIC-names-sync.patch b/patches/opnfv-fuel/0007-classes-baremetal-AArch64-virtio-NIC-names-sync.patch deleted file mode 100644 index 2f256992..00000000 --- a/patches/opnfv-fuel/0007-classes-baremetal-AArch64-virtio-NIC-names-sync.patch +++ /dev/null @@ -1,648 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: All rights reserved. This program and the accompanying materials -: are made available under the terms of the Apache License, Version 2.0 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii -Date: Sun, 6 Aug 2017 20:42:47 +0200 -Subject: [PATCH] classes: baremetal: AArch64: virtio NIC names sync - -grep -e "ens[[:digit:]]" -R . -l | \ - xargs sed -i \ - -e 's/ens3/enp1s0/g' \ - -e 's/ens4/enp2s0/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: 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 ---- - .../baremetal-mcp-ocata-odl-ha/infra/config.yml | 4 ++-- - .../baremetal-mcp-ocata-odl-ha/infra/kvm.yml | 18 +++++++++----- - .../baremetal-mcp-ocata-odl-ha/infra/maas.yml | 8 +++---- - .../opendaylight/control.yml | 2 +- - .../openstack/compute.yml | 28 ++++++++-------------- - .../openstack/control.yml | 6 ++--- - .../openstack/dashboard.yml | 4 ++-- - .../openstack/database.yml | 6 ++--- - .../openstack/message_queue.yml | 6 ++--- - .../baremetal-mcp-ocata-odl-ha/openstack/proxy.yml | 6 ++--- - .../openstack/telemetry.yml | 6 ++--- - .../baremetal-mcp-ocata-ovs-ha/infra/config.yml | 4 ++-- - .../baremetal-mcp-ocata-ovs-ha/infra/kvm.yml | 18 +++++++++----- - .../baremetal-mcp-ocata-ovs-ha/infra/maas.yml | 8 +++---- - .../openstack/compute.yml | 27 ++++++++------------- - .../openstack/control.yml | 6 ++--- - .../openstack/dashboard.yml | 4 ++-- - .../openstack/database.yml | 6 ++--- - .../openstack/message_queue.yml | 6 ++--- - .../baremetal-mcp-ocata-ovs-ha/openstack/proxy.yml | 6 ++--- - .../openstack/telemetry.yml | 6 ++--- - 21 files changed, 91 insertions(+), 94 deletions(-) - -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/config.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/config.yml -index 3f72e18..bd439a4 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/config.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/config.yml -@@ -33,8 +33,8 @@ parameters: - linux: - network: - interface: -- ens3: ${_param:linux_dhcp_interface} -- ens4: ${_param:linux_single_interface} -+ enp1s0: ${_param:linux_dhcp_interface} -+ enp2s0: ${_param:linux_single_interface} - salt: - master: - accept_policy: open_mode -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/kvm.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/kvm.yml -index 41366f3..766a495 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/kvm.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/kvm.yml -@@ -25,7 +25,8 @@ parameters: - cluster_node03_address: ${_param:infra_kvm_node03_address} - keepalived_vip_interface: br-ctl - keepalived_vip_virtual_router_id: 69 -- deploy_nic: enp6s0 -+ deploy_nic: eth0 -+ trunk_nic: eth1 - salt: - control: - size: #RAM 4096,8192,16384,32768,65536 -@@ -123,7 +124,7 @@ parameters: - linux: - network: - interface: -- eth3: -+ eth0: - enabled: true - type: eth - proto: manual -@@ -131,6 +132,11 @@ parameters: - netmask: 255.255.255.0 - name: ${_param:deploy_nic} - noifupdown: true -+ eth1: -+ enabled: true -+ type: eth -+ proto: manual -+ name: ${_param:trunk_nic} - br-mgmt: - enabled: true - proto: dhcp -@@ -141,13 +147,13 @@ parameters: - use_interfaces: - - ${_param:deploy_nic} - noifupdown: true -- vlan300: -+ vlan2183: - enabled: true - proto: manual - type: vlan -- name: ${_param:deploy_nic}.300 -+ name: ${_param:trunk_nic}.2183 - use_interfaces: -- - ${_param:deploy_nic} -+ - ${_param:trunk_nic} - br-ctl: - enabled: true - type: bridge -@@ -155,4 +161,4 @@ parameters: - address: ${_param:single_address} - netmask: 255.255.255.0 - use_interfaces: -- - ${_param:deploy_nic}.300 -+ - ${_param:trunk_nic}.2183 -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/maas.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/maas.yml -index c4bc929..5649990 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/maas.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/maas.yml -@@ -4,10 +4,10 @@ classes: - - cluster.baremetal-mcp-ocata-odl-ha.infra - parameters: - _param: -- dhcp_interface: ens3 -- primary_interface: ens4 -- pxe_interface: ens5 -- external_interface: ens6 -+ dhcp_interface: enp1s0 -+ primary_interface: enp2s0 -+ pxe_interface: enp3s0 -+ external_interface: enp4s0 - interface_mtu: 1500 - # MaaS has issues using MTU > 1500 for PXE interface - pxe_interface_mtu: 1500 -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/opendaylight/control.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/opendaylight/control.yml -index 0a01af7..367343a 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/opendaylight/control.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/opendaylight/control.yml -@@ -10,7 +10,7 @@ parameters: - linux: - network: - interface: -- ens3: -+ enp2s0: - enabled: true - type: eth - proto: static -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/compute.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/compute.yml -index 6d2c7f3..3dd94e6 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/compute.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/compute.yml -@@ -23,10 +23,9 @@ parameters: - cluster_node03_hostname: ctl03 - cluster_node03_address: ${_param:openstack_control_node03_address} - nova_vncproxy_url: https://${_param:cluster_public_host}:6080 -- mgmt_nic: enp6s0 -- tenant_nic: enp7s0 -+ mgmt_nic: eth0 -+ tenant_nic: eth1 - linux_system_codename: xenial -- external_nic: enp8s0 - interface_mtu: 1500 - keepalived_vip_interface: br-ctl - keepalived_vip_virtual_router_id: 69 -@@ -61,12 +60,6 @@ parameters: - type: eth - proto: manual - name: ${_param:tenant_nic} -- external_nic: -- enabled: true -- name: ${_param:external_nic} -- mtu: ${_param:interface_mtu} -- proto: manual -- type: eth - br-mesh: - enabled: true - type: bridge -@@ -74,19 +67,19 @@ parameters: - netmask: 255.255.255.0 - mtu: 1500 - use_interfaces: -- - ${_param:tenant_nic}.302 -- vlan300: -+ - ${_param:tenant_nic}.2185 -+ vlan2183: - enabled: true - proto: manual - type: vlan -- name: ${_param:mgmt_nic}.300 -+ name: ${_param:tenant_nic}.2183 - use_interfaces: -- - ${_param:mgmt_nic} -- vlan302: -+ - ${_param:tenant_nic} -+ vlan2185: - enabled: true - proto: manual - type: vlan -- name: ${_param:tenant_nic}.302 -+ name: ${_param:tenant_nic}.2185 - use_interfaces: - - ${_param:tenant_nic} - br-ctl: -@@ -96,7 +89,7 @@ parameters: - address: ${_param:single_address} - netmask: 255.255.255.0 - use_interfaces: -- - ${_param:mgmt_nic}.300 -+ - ${_param:tenant_nic}.2183 - br-floating: - enabled: true - type: ovs_bridge -@@ -113,7 +106,6 @@ parameters: - address: ${_param:external_address} - netmask: 255.255.255.0 - use_interfaces: -- - ${_param:external_nic} -+ - ${_param:tenant_nic} - use_ovs_ports: - - float-to-ex -- -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/control.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/control.yml -index b46e23d..040ea2c 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/control.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/control.yml -@@ -23,7 +23,7 @@ classes: - - cluster.baremetal-mcp-ocata-odl-ha.infra - parameters: - _param: -- keepalived_vip_interface: ens3 -+ keepalived_vip_interface: enp2s0 - keepalived_vip_virtual_router_id: 50 - cluster_vip_address: ${_param:openstack_control_address} - cluster_local_address: ${_param:single_address} -@@ -37,8 +37,8 @@ parameters: - linux: - network: - interface: -- ens2: ${_param:linux_dhcp_interface} -- ens3: ${_param:linux_single_interface} -+ enp1s0: ${_param:linux_dhcp_interface} -+ enp2s0: ${_param:linux_single_interface} - keystone: - server: - cacert: /etc/ssl/certs/mcp_os_cacert -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/dashboard.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/dashboard.yml -index 9748c4c..a5317b1 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/dashboard.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/dashboard.yml -@@ -7,5 +7,5 @@ parameters: - linux: - network: - interface: -- ens2: ${_param:linux_dhcp_interface} -- ens3: ${_param:linux_single_interface} -+ enp1s0: ${_param:linux_dhcp_interface} -+ enp2s0: ${_param:linux_single_interface} -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/database.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/database.yml -index 6c26d26..d74e5ad 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/database.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/database.yml -@@ -16,7 +16,7 @@ classes: - - cluster.baremetal-mcp-ocata-odl-ha - parameters: - _param: -- keepalived_vip_interface: ens3 -+ keepalived_vip_interface: enp2s0 - keepalived_vip_virtual_router_id: 80 - galera_server_cluster_name: openstack_cluster - cluster_vip_address: ${_param:openstack_database_address} -@@ -30,5 +30,5 @@ parameters: - linux: - network: - interface: -- ens2: ${_param:linux_dhcp_interface} -- ens3: ${_param:linux_single_interface} -+ enp1s0: ${_param:linux_dhcp_interface} -+ enp2s0: ${_param:linux_single_interface} -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/message_queue.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/message_queue.yml -index f5312c1..d2e6a40 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/message_queue.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/message_queue.yml -@@ -7,7 +7,7 @@ classes: - - cluster.baremetal-mcp-ocata-odl-ha - parameters: - _param: -- keepalived_vip_interface: ens3 -+ keepalived_vip_interface: enp2s0 - keepalived_vip_virtual_router_id: 90 - cluster_vip_address: ${_param:openstack_message_queue_address} - cluster_local_address: ${_param:single_address} -@@ -20,5 +20,5 @@ parameters: - linux: - network: - interface: -- ens2: ${_param:linux_dhcp_interface} -- ens3: ${_param:linux_single_interface} -+ enp1s0: ${_param:linux_dhcp_interface} -+ enp2s0: ${_param:linux_single_interface} -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/proxy.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/proxy.yml -index 4aa7bb0..118d22d 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/proxy.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/proxy.yml -@@ -17,7 +17,7 @@ classes: - # - cluster.baremetal-mcp-ocata-odl-ha.stacklight.proxy - parameters: - _param: -- keepalived_vip_interface: ens3 -+ keepalived_vip_interface: enp2s0 - keepalived_vip_virtual_router_id: 240 - nginx_proxy_ssl: - enabled: true -@@ -29,8 +29,8 @@ parameters: - linux: - network: - interface: -- ens2: ${_param:linux_dhcp_interface} -- ens3: ${_param:linux_single_interface} -+ enp1s0: ${_param:linux_dhcp_interface} -+ enp2s0: ${_param:linux_single_interface} - system: - package: - libapache2-mod-wsgi: -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/telemetry.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/telemetry.yml -index 4e90090..c08f209 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/telemetry.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/telemetry.yml -@@ -12,7 +12,7 @@ classes: - - cluster.baremetal-mcp-ocata-odl-ha.infra - parameters: - _param: -- keepalived_openstack_telemetry_vip_interface: ens3 -+ keepalived_openstack_telemetry_vip_interface: enp2s0 - keepalived_vip_virtual_router_id: 230 - cluster_vip_address: ${_param:openstack_telemetry_address} - cluster_local_address: ${_param:single_address} -@@ -25,8 +25,8 @@ parameters: - linux: - network: - interface: -- ens2: ${_param:linux_dhcp_interface} -- ens3: ${_param:linux_single_interface} -+ enp1s0: ${_param:linux_dhcp_interface} -+ enp2s0: ${_param:linux_single_interface} - mongodb: - server: - logging: -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/config.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/config.yml -index a75b41d..3979fd1 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/config.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/config.yml -@@ -32,8 +32,8 @@ parameters: - linux: - network: - interface: -- ens3: ${_param:linux_dhcp_interface} -- ens4: ${_param:linux_single_interface} -+ enp1s0: ${_param:linux_dhcp_interface} -+ enp2s0: ${_param:linux_single_interface} - salt: - master: - accept_policy: open_mode -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/kvm.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/kvm.yml -index 5c8026f..ca1b44b 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/kvm.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/kvm.yml -@@ -25,7 +25,8 @@ parameters: - cluster_node03_address: ${_param:infra_kvm_node03_address} - keepalived_vip_interface: br-ctl - keepalived_vip_virtual_router_id: 69 -- deploy_nic: enp6s0 -+ deploy_nic: eth0 -+ trunk_nic: eth1 - salt: - control: - size: #RAM 4096,8192,16384,32768,65536 -@@ -115,7 +116,7 @@ parameters: - linux: - network: - interface: -- eth3: -+ eth0: - enabled: true - type: eth - proto: manual -@@ -123,6 +124,11 @@ parameters: - netmask: 255.255.255.0 - name: ${_param:deploy_nic} - noifupdown: true -+ eth1: -+ enabled: true -+ type: eth -+ proto: manual -+ name: ${_param:trunk_nic} - br-mgmt: - enabled: true - proto: dhcp -@@ -133,13 +139,13 @@ parameters: - use_interfaces: - - ${_param:deploy_nic} - noifupdown: true -- vlan300: -+ vlan2183: - enabled: true - proto: manual - type: vlan -- name: ${_param:deploy_nic}.300 -+ name: ${_param:trunk_nic}.2183 - use_interfaces: -- - ${_param:deploy_nic} -+ - ${_param:trunk_nic} - br-ctl: - enabled: true - type: bridge -@@ -147,4 +153,4 @@ parameters: - address: ${_param:single_address} - netmask: 255.255.255.0 - use_interfaces: -- - ${_param:deploy_nic}.300 -+ - ${_param:trunk_nic}.2183 -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/maas.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/maas.yml -index d193469..73215ee 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/maas.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/maas.yml -@@ -4,10 +4,10 @@ classes: - - cluster.baremetal-mcp-ocata-ovs-ha.infra - parameters: - _param: -- dhcp_interface: ens3 -- primary_interface: ens4 -- pxe_interface: ens5 -- external_interface: ens6 -+ dhcp_interface: enp1s0 -+ primary_interface: enp2s0 -+ pxe_interface: enp3s0 -+ external_interface: enp4s0 - interface_mtu: 1500 - # MaaS has issues using MTU > 1500 for PXE interface - pxe_interface_mtu: 1500 -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/compute.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/compute.yml -index e11e35e..cea8c81 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/compute.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/compute.yml -@@ -22,9 +22,8 @@ parameters: - cluster_node03_hostname: ctl03 - cluster_node03_address: ${_param:openstack_control_node03_address} - nova_vncproxy_url: https://${_param:cluster_public_host}:6080 -- mgmt_nic: enp6s0 -- tenant_nic: enp7s0 -- external_nic: enp8s0 -+ mgmt_nic: eth0 -+ tenant_nic: eth1 - linux_system_codename: xenial - interface_mtu: 1500 - keepalived_vip_interface: br-ctl -@@ -44,12 +43,6 @@ parameters: - type: eth - proto: manual - name: ${_param:tenant_nic} -- external_nic: -- enabled: true -- name: ${_param:external_nic} -- mtu: ${_param:interface_mtu} -- proto: manual -- type: eth - br-mesh: - enabled: true - type: bridge -@@ -57,19 +50,19 @@ parameters: - netmask: 255.255.255.0 - mtu: 1500 - use_interfaces: -- - ${_param:tenant_nic}.302 -- vlan300: -+ - ${_param:tenant_nic}.2185 -+ vlan2183: - enabled: true - proto: manual - type: vlan -- name: ${_param:mgmt_nic}.300 -+ name: ${_param:tenant_nic}.2183 - use_interfaces: -- - ${_param:mgmt_nic} -- vlan302: -+ - ${_param:tenant_nic} -+ vlan2185: - enabled: true - proto: manual - type: vlan -- name: ${_param:tenant_nic}.302 -+ name: ${_param:tenant_nic}.2185 - use_interfaces: - - ${_param:tenant_nic} - br-ctl: -@@ -79,7 +72,7 @@ parameters: - address: ${_param:single_address} - netmask: 255.255.255.0 - use_interfaces: -- - ${_param:mgmt_nic}.300 -+ - ${_param:tenant_nic}.2183 - br-floating: - enabled: true - type: ovs_bridge -@@ -96,6 +89,6 @@ parameters: - address: ${_param:external_address} - netmask: 255.255.255.0 - use_interfaces: -- - ${_param:external_nic} -+ - ${_param:tenant_nic} - use_ovs_ports: - - float-to-ex -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/control.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/control.yml -index 1711ab0..0571320 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/control.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/control.yml -@@ -23,7 +23,7 @@ classes: - - cluster.baremetal-mcp-ocata-ovs-ha.infra - parameters: - _param: -- keepalived_vip_interface: ens3 -+ keepalived_vip_interface: enp2s0 - keepalived_vip_virtual_router_id: 50 - cluster_vip_address: ${_param:openstack_control_address} - cluster_local_address: ${_param:single_address} -@@ -37,8 +37,8 @@ parameters: - linux: - network: - interface: -- ens2: ${_param:linux_dhcp_interface} -- ens3: ${_param:linux_single_interface} -+ enp1s0: ${_param:linux_dhcp_interface} -+ enp2s0: ${_param:linux_single_interface} - keystone: - server: - cacert: /etc/ssl/certs/mcp_os_cacert -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/dashboard.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/dashboard.yml -index 39cc073..18f622c 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/dashboard.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/dashboard.yml -@@ -7,5 +7,5 @@ parameters: - linux: - network: - interface: -- ens2: ${_param:linux_dhcp_interface} -- ens3: ${_param:linux_single_interface} -+ enp1s0: ${_param:linux_dhcp_interface} -+ enp2s0: ${_param:linux_single_interface} -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/database.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/database.yml -index dabda49..7a6934b 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/database.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/database.yml -@@ -16,7 +16,7 @@ classes: - - cluster.baremetal-mcp-ocata-ovs-ha - parameters: - _param: -- keepalived_vip_interface: ens3 -+ keepalived_vip_interface: enp2s0 - keepalived_vip_virtual_router_id: 80 - galera_server_cluster_name: openstack_cluster - cluster_vip_address: ${_param:openstack_database_address} -@@ -30,5 +30,5 @@ parameters: - linux: - network: - interface: -- ens2: ${_param:linux_dhcp_interface} -- ens3: ${_param:linux_single_interface} -+ enp1s0: ${_param:linux_dhcp_interface} -+ enp2s0: ${_param:linux_single_interface} -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/message_queue.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/message_queue.yml -index 881644b..f510a7b 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/message_queue.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/message_queue.yml -@@ -7,7 +7,7 @@ classes: - - cluster.baremetal-mcp-ocata-ovs-ha - parameters: - _param: -- keepalived_vip_interface: ens3 -+ keepalived_vip_interface: enp2s0 - keepalived_vip_virtual_router_id: 90 - cluster_vip_address: ${_param:openstack_message_queue_address} - cluster_local_address: ${_param:single_address} -@@ -20,5 +20,5 @@ parameters: - linux: - network: - interface: -- ens2: ${_param:linux_dhcp_interface} -- ens3: ${_param:linux_single_interface} -+ enp1s0: ${_param:linux_dhcp_interface} -+ enp2s0: ${_param:linux_single_interface} -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/proxy.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/proxy.yml -index 5e9a2c5..939fd7f 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/proxy.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/proxy.yml -@@ -17,7 +17,7 @@ classes: - # - cluster.baremetal-mcp-ocata-ovs-ha.stacklight.proxy - parameters: - _param: -- keepalived_vip_interface: ens3 -+ keepalived_vip_interface: enp2s0 - keepalived_vip_virtual_router_id: 240 - nginx_proxy_ssl: - enabled: true -@@ -29,8 +29,8 @@ parameters: - linux: - network: - interface: -- ens2: ${_param:linux_dhcp_interface} -- ens3: ${_param:linux_single_interface} -+ enp1s0: ${_param:linux_dhcp_interface} -+ enp2s0: ${_param:linux_single_interface} - system: - package: - libapache2-mod-wsgi: -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/telemetry.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/telemetry.yml -index 0e3c7bd..9702576 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/telemetry.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/telemetry.yml -@@ -12,7 +12,7 @@ classes: - - cluster.baremetal-mcp-ocata-ovs-ha.infra - parameters: - _param: -- keepalived_openstack_telemetry_vip_interface: ens3 -+ keepalived_openstack_telemetry_vip_interface: enp2s0 - keepalived_vip_virtual_router_id: 230 - cluster_vip_address: ${_param:openstack_telemetry_address} - cluster_local_address: ${_param:single_address} -@@ -25,8 +25,8 @@ parameters: - linux: - network: - interface: -- ens2: ${_param:linux_dhcp_interface} -- ens3: ${_param:linux_single_interface} -+ enp1s0: ${_param:linux_dhcp_interface} -+ enp2s0: ${_param:linux_single_interface} - mongodb: - server: - logging: diff --git a/patches/opnfv-fuel/0007-classes-baremetal-arm-pod3-config-hardcode.patch b/patches/opnfv-fuel/0007-classes-baremetal-arm-pod3-config-hardcode.patch new file mode 100644 index 00000000..56de318c --- /dev/null +++ b/patches/opnfv-fuel/0007-classes-baremetal-arm-pod3-config-hardcode.patch @@ -0,0 +1,186 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: Copyright (c) 2017 Enea AB and others. +: +: All rights reserved. This program and the accompanying materials +: are made available under the terms of the Apache License, Version 2.0 +: which accompanies this distribution, and is available at +: http://www.apache.org/licenses/LICENSE-2.0 +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +From: Alexandru Avadanii +Date: Thu, 10 Aug 2017 18:32:37 +0200 +Subject: [PATCH] classes: baremetal: arm-pod3 config hardcode + +Populate MaaS configuration with node information for arm-pod3. + +FIXME: Read all this info from PDF (Pod Descriptor File) later. + +Signed-off-by: Alexandru Avadanii +--- + .../baremetal-mcp-ocata-odl-ha/infra/maas.yml | 40 +++++++++++----------- + .../baremetal-mcp-ocata-ovs-ha/infra/maas.yml | 40 +++++++++++----------- + 2 files changed, 40 insertions(+), 40 deletions(-) + +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/maas.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/maas.yml +index 5649990..e4765ca 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/maas.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/maas.yml +@@ -48,57 +48,57 @@ parameters: + machines: + kvm01: + interface: +- mac: "00:25:b5:a0:00:2a" ++ mac: "e0:ff:f7:00:08:ae" + power_parameters: +- power_address: "172.30.8.75" +- power_password: "octopus" ++ power_address: "10.0.8.3" ++ power_password: "admin" + power_type: ipmi + power_user: "admin" +- architecture: 'amd64/generic' ++ architecture: 'arm64/generic' + distro_series: xenial + hwe_kernel: hwe-16.04 + kvm02: + interface: +- mac: "00:25:b5:a0:00:3a" ++ mac: "e0:ff:f7:00:08:b1" + power_parameters: +- power_address: "172.30.8.65" +- power_password: "octopus" ++ power_address: "10.0.8.4" ++ power_password: "admin" + power_type: ipmi + power_user: "admin" +- architecture: 'amd64/generic' ++ architecture: 'arm64/generic' + distro_series: xenial + hwe_kernel: hwe-16.04 + kvm03: + interface: +- mac: "00:25:b5:a0:00:4a" ++ mac: "e0:ff:f7:00:08:bd" + power_parameters: +- power_address: "172.30.8.74" +- power_password: "octopus" ++ power_address: "10.0.8.5" ++ power_password: "admin" + power_type: ipmi + power_user: "admin" +- architecture: 'amd64/generic' ++ architecture: 'arm64/generic' + distro_series: xenial + hwe_kernel: hwe-16.04 + cmp001: + interface: +- mac: "00:25:b5:a0:00:5a" ++ mac: "e0:ff:f7:00:08:c6" + power_parameters: +- power_address: "172.30.8.73" +- power_password: "octopus" ++ power_address: "10.0.8.6" ++ power_password: "admin" + power_type: ipmi + power_user: "admin" +- architecture: 'amd64/generic' ++ architecture: 'arm64/generic' + distro_series: xenial + hwe_kernel: hwe-16.04 + cmp002: + interface: +- mac: "00:25:b5:a0:00:6a" ++ mac: "e0:ff:f7:00:08:cf" + power_parameters: +- power_address: "172.30.8.72" +- power_password: "octopus" ++ power_address: "10.0.8.7" ++ power_password: "admin" + power_type: ipmi + power_user: "admin" +- architecture: 'amd64/generic' ++ architecture: 'arm64/generic' + distro_series: xenial + hwe_kernel: hwe-16.04 + linux: +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/maas.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/maas.yml +index 73215ee..26115fe 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/maas.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/maas.yml +@@ -48,57 +48,57 @@ parameters: + machines: + kvm01: + interface: +- mac: "00:25:b5:a0:00:2a" ++ mac: "e0:ff:f7:00:08:ae" + power_parameters: +- power_address: "172.30.8.75" +- power_password: "octopus" ++ power_address: "10.0.8.3" ++ power_password: "admin" + power_type: ipmi + power_user: "admin" +- architecture: 'amd64/generic' ++ architecture: 'arm64/generic' + distro_series: xenial + hwe_kernel: hwe-16.04 + kvm02: + interface: +- mac: "00:25:b5:a0:00:3a" ++ mac: "e0:ff:f7:00:08:b1" + power_parameters: +- power_address: "172.30.8.65" +- power_password: "octopus" ++ power_address: "10.0.8.4" ++ power_password: "admin" + power_type: ipmi + power_user: "admin" +- architecture: 'amd64/generic' ++ architecture: 'arm64/generic' + distro_series: xenial + hwe_kernel: hwe-16.04 + kvm03: + interface: +- mac: "00:25:b5:a0:00:4a" ++ mac: "e0:ff:f7:00:08:bd" + power_parameters: +- power_address: "172.30.8.74" +- power_password: "octopus" ++ power_address: "10.0.8.5" ++ power_password: "admin" + power_type: ipmi + power_user: "admin" +- architecture: 'amd64/generic' ++ architecture: 'arm64/generic' + distro_series: xenial + hwe_kernel: hwe-16.04 + cmp001: + interface: +- mac: "00:25:b5:a0:00:5a" ++ mac: "e0:ff:f7:00:08:c6" + power_parameters: +- power_address: "172.30.8.73" +- power_password: "octopus" ++ power_address: "10.0.8.6" ++ power_password: "admin" + power_type: ipmi + power_user: "admin" +- architecture: 'amd64/generic' ++ architecture: 'arm64/generic' + distro_series: xenial + hwe_kernel: hwe-16.04 + cmp002: + interface: +- mac: "00:25:b5:a0:00:6a" ++ mac: "e0:ff:f7:00:08:cf" + power_parameters: +- power_address: "172.30.8.72" +- power_password: "octopus" ++ power_address: "10.0.8.7" ++ power_password: "admin" + power_type: ipmi + power_user: "admin" +- architecture: 'amd64/generic' ++ architecture: 'arm64/generic' + distro_series: xenial + hwe_kernel: hwe-16.04 + linux: diff --git a/patches/opnfv-fuel/0008-maas-Add-curtin_userdata_arm64_generic_xenial.patch b/patches/opnfv-fuel/0008-maas-Add-curtin_userdata_arm64_generic_xenial.patch deleted file mode 100644 index 8b8cfefe..00000000 --- a/patches/opnfv-fuel/0008-maas-Add-curtin_userdata_arm64_generic_xenial.patch +++ /dev/null @@ -1,112 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: All rights reserved. This program and the accompanying materials -: are made available under the terms of the Apache License, Version 2.0 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii -Date: Mon, 7 Aug 2017 19:45:01 +0200 -Subject: [PATCH] maas: Add curtin_userdata_arm64_generic_xenial - -Add AArch64 specific configuration. - -Signed-off-by: Alexandru Avadanii ---- - ...-Add-curtin_userdata_arm64_generic_xenial.patch | 76 ++++++++++++++++++++++ - mcp/patches/patches.list | 1 + - 2 files changed, 77 insertions(+) - create mode 100644 mcp/patches/0101-maas-Add-curtin_userdata_arm64_generic_xenial.patch - -diff --git a/mcp/patches/0101-maas-Add-curtin_userdata_arm64_generic_xenial.patch b/mcp/patches/0101-maas-Add-curtin_userdata_arm64_generic_xenial.patch -new file mode 100644 -index 0000000..b969e07 ---- /dev/null -+++ b/mcp/patches/0101-maas-Add-curtin_userdata_arm64_generic_xenial.patch -@@ -0,0 +1,76 @@ -+From: Alexandru Avadanii -+Date: Sat, 5 Aug 2017 02:03:01 +0200 -+Subject: [PATCH] maas: Add curtin_userdata_arm64_generic_xenial -+ -+Based on curtin_userdata_amd64_generic_xenial, add new arm64 -+specific configuration file: -+- curtin_userdata_arm64_generic_xenial -+ -+Signed-off-by: Alexandru Avadanii -+--- -+ -+diff --git a/maas/region.sls b/maas/region.sls -+--- a/maas/region.sls -++++ b/maas/region.sls -+@@ -70,6 +70,18 @@ -+ - require: -+ - pkg: maas_region_packages -+ -++/etc/maas/preseeds/curtin_userdata_arm64_generic_xenial: -++ file.managed: -++ - source: salt://maas/files/curtin_userdata_arm64_generic_xenial -++ - template: jinja -++ - user: root -++ - group: root -++ - mode: 644 -++ - context: -++ salt_master_ip: {{ region.salt_master_ip }} -++ - require: -++ - pkg: maas_region_packages -++ -+ maas_region_services: -+ service.running: -+ - enable: true -+diff --git a/maas/files/curtin_userdata_arm64_generic_xenial b/maas/files/curtin_userdata_arm64_generic_xenial -+new file mode 100644 -+--- /dev/null -++++ b/maas/files/curtin_userdata_arm64_generic_xenial -+@@ -0,0 +1,38 @@ -++{%- from "maas/map.jinja" import server with context %} -++{% raw %} -++#cloud-config -++debconf_selections: -++ maas: | -++ {{for line in str(curtin_preseed).splitlines()}} -++ {{line}} -++ {{endfor}} -++{{if third_party_drivers and driver}} -++early_commands: -++ {{py: key_string = ''.join(['\\x%x' % x for x in map(ord, driver['key_binary'])])}} -++ driver_00_get_key: /bin/echo -en '{{key_string}}' > /tmp/maas-{{driver['package']}}.gpg -++ driver_01_add_key: ["apt-key", "add", "/tmp/maas-{{driver['package']}}.gpg"] -++ driver_02_add: ["add-apt-repository", "-y", "deb {{driver['repository']}} {{node.get_distro_series()}} main"] -++ driver_03_update_install: ["sh", "-c", "apt-get update --quiet && apt-get --assume-yes install {{driver['package']}}"] -++ driver_04_load: ["sh", "-c", "depmod && modprobe {{driver['module']}}"] -++{{endif}} -++late_commands: -++ maas: [wget, '--no-proxy', {{node_disable_pxe_url|escape.json}}, '--post-data', {{node_disable_pxe_data|escape.json}}, '-O', '/dev/null'] -++ apt_00_set_repo: ["curtin", "in-target", "--", "sh", "-c", "echo 'deb [arch=arm64] http://linux.enea.com/saltstack/apt/ubuntu/16.04/arm64/latest xenial main' >> /etc/apt/sources.list"] -++ apt_01_set_gpg: ["curtin", "in-target", "--", "sh", "-c", "echo 'LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tClZlcnNpb246IEdudVBHIHYxCgptUUVOQkZhZ0Fyb0JDQURXYm9OSWp1RjZsQjFtV3YyK0VidnFZM2xLbDVtTEtocjJEblNVa0tlSFVQQnY4Z05NCnFLOFEwMEFNSXlQaXlFaGdqQStkV2l6Wis1YUJneG9pWTdvTWVMSjJYeW0zNlUvOFNZcTJCV2QzU0dDYk1Ob3oKU0pEeERVU00vSEZWczZhdEYxTTNEWTlvTjY1aFNWbnU0dXk1VHU2YXNmNms0cmhBeWswejQrcFJjUEJDdTJ2cQptbkdpM0NPTS8rOVBTaHJFS2VWT3g1VzJ2Ukp5d1VGdXE4RUR2UW5Sb0owR3ZNMjhKaUpJYW53MTdZd0lQeGhnCkJLWlZwWmphbjVYK2loVk1Yd0EyaC9HL0ZTNU9taGQ1MFJxVjZMV1NZczk0VkpKZ1lxSHg4VU1tN2l6Y3hJK1AKY3QzSWNiRDE5NWJQYkorU2J1aUZlNDVaTHNkWTFNeUdpVTJCQUJFQkFBRzBLMFZ1WldFZ1FYSnRZbUZ1WkNCRQpaWFp2Y0hNZ1ZHVmhiU0E4WVhKdFltRnVaRUJsYm1WaExtTnZiVDZKQVQ0RUV3RUNBQ2dGQWxhZ0Fyb0NHd01GCkNRUENad0FHQ3drSUJ3TUNCaFVJQWdrS0N3UVdBZ01CQWg0QkFoZUFBQW9KRU42cmtMcDVpckhSc0c4SC8yUDIKaE82akZIUFJEMXU4ajl1Zk85QXhvSW5hRUc5R2VSanV2TWMxdENVem92WHZUczEwNlRaMGFzNk1iQUoxUzZ1NQpFOFV5UTErVkdlcHZkSUpQWHgzUEN4TG1VdDZXSXFtZE9kcUZyeEljbG9oaWcva2FyZGkzTmZYMU1CdmxFVi9jCjdRNTFINDNocmxNcU1wcWdZMUJtKzUzUExDNHVqamxESkJ0Sk9FVTlka2kzMTliVW1uZytnTzlCQWxqREpGWHYKSnFZNitQL2VyN0lnQ2JSWFVYWWZ5Snpnang5SndsS2JtZFE4UW5DclpqRi9WSElXNDAvbXU1SUlKdUZ2dUN0aQp0Y29nK1NOU2xEbUNPUyt3RThDQ29qZXVKcXVwSU9jejl6eXBWR3pldXMvTjVRNUVFRmU3R1lXWVMvNU5LVWtFCjFUdXVGZVpLdTVOSkM1cmt3SVU9Cj03cDYwCi0tLS0tRU5EIFBHUCBQVUJMSUMgS0VZIEJMT0NLLS0tLS0K'|base64 -d|apt-key add -"] -++ apt_03_update: ["curtin", "in-target", "--", "apt-get", "update"] -++ salt_01_install: ["curtin", "in-target", "--", "apt-get", "-y", "install", "salt-minion"] -++{% endraw %} -++ salt_02_hostname_set: ["curtin", "in-target", "--", "echo", "{% raw %}{{node.hostname}}{% endraw %}.{{pillar.linux.system.domain}}"] -++ salt_03_hostname_get: ["curtin", "in-target", "--", "sh", "-c", "echo 'id: {% raw %}{{node.hostname}}{% endraw %}.{{pillar.linux.system.domain}}' >> /etc/salt/minion"] -++ salt_04_master: ["curtin", "in-target", "--", "sh", "-c", "echo 'master: {{ salt_master_ip }}' >> /etc/salt/minion"] -++{% raw %} -++{{if third_party_drivers and driver}} -++ driver_00_key_get: curtin in-target -- sh -c "/bin/echo -en '{{key_string}}' > /tmp/maas-{{driver['package']}}.gpg" -++ driver_02_key_add: ["curtin", "in-target", "--", "apt-key", "add", "/tmp/maas-{{driver['package']}}.gpg"] -++ driver_03_add: ["curtin", "in-target", "--", "add-apt-repository", "-y", "deb {{driver['repository']}} {{node.get_distro_series()}} main"] -++ driver_04_update_install: ["curtin", "in-target", "--", "apt-get", "update", "--quiet"] -++ driver_05_install: ["curtin", "in-target", "--", "apt-get", "-y", "install", "{{driver['package']}}"] -++ driver_06_depmod: ["curtin", "in-target", "--", "depmod"] -++ driver_07_update_initramfs: ["curtin", "in-target", "--", "update-initramfs", "-u"] -++{{endif}} -++{% endraw %} -diff --git a/mcp/patches/patches.list b/mcp/patches/patches.list -index f65daab..ed2dd4e 100644 ---- a/mcp/patches/patches.list -+++ b/mcp/patches/patches.list -@@ -7,3 +7,4 @@ - /usr/share/salt-formulas/env: 0007-linux.network.interface-noifupdown-support.patch - /usr/share/salt-formulas/env: 0008-Handle-file_recv-option.patch - /usr/share/salt-formulas/env: 0009-seedng-module-Sync-salt-version.patch -+/usr/share/salt-formulas/env: 0101-maas-Add-curtin_userdata_arm64_generic_xenial.patch diff --git a/patches/opnfv-fuel/0008-maas-boot-resources-Add-arm64-architecture.patch b/patches/opnfv-fuel/0008-maas-boot-resources-Add-arm64-architecture.patch new file mode 100644 index 00000000..1b0f1137 --- /dev/null +++ b/patches/opnfv-fuel/0008-maas-boot-resources-Add-arm64-architecture.patch @@ -0,0 +1,39 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: Copyright (c) 2017 Enea AB and others. +: +: All rights reserved. This program and the accompanying materials +: are made available under the terms of the Apache License, Version 2.0 +: which accompanies this distribution, and is available at +: http://www.apache.org/licenses/LICENSE-2.0 +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +From: Alexandru Avadanii +Date: Fri, 11 Aug 2017 00:07:29 +0200 +Subject: [PATCH] maas: boot-resources: Add arm64 architecture + +Signed-off-by: Alexandru Avadanii +--- + mcp/patches/0003-maas-region-force-artifact-download.patch | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/mcp/patches/0003-maas-region-force-artifact-download.patch b/mcp/patches/0003-maas-region-force-artifact-download.patch +index f0ce50f..9997552 100644 +--- a/mcp/patches/0003-maas-region-force-artifact-download.patch ++++ b/mcp/patches/0003-maas-region-force-artifact-download.patch +@@ -42,7 +42,7 @@ diff --git a/maas/files/maas-artifact-sync.sh b/maas/files/maas-artifact-sync.sh + new file mode 100644 + --- /dev/null + +++ b/maas/files/maas-artifact-sync.sh +-@@ -0,0 +1,21 @@ ++@@ -0,0 +1,26 @@ + +{%- from "maas/map.jinja" import region with context %} + +#!/bin/bash + +function wait_for { +@@ -64,3 +64,8 @@ new file mode 100644 + +wait_for 90 "! maas opnfv boot-resources is-importing | grep -q 'true'" + +maas opnfv rack-controllers import-boot-images || exit 3 + +wait_for 30 "test -d /var/lib/maas/boot-resources/current/ubuntu/amd64" +++maas opnfv boot-source-selection update 1 1 arches='amd64' arches='arm64' || exit 4 +++maas opnfv boot-resources import || exit 2 +++wait_for 90 "! maas opnfv boot-resources is-importing | grep -q 'true'" +++maas opnfv rack-controllers import-boot-images || exit 3 +++wait_for 30 "test -d /var/lib/maas/boot-resources/current/ubuntu/arm64" diff --git a/patches/opnfv-fuel/0009-libvirt-Use-libvirt-unix_sock_group.patch b/patches/opnfv-fuel/0009-libvirt-Use-libvirt-unix_sock_group.patch new file mode 100644 index 00000000..1d79c151 --- /dev/null +++ b/patches/opnfv-fuel/0009-libvirt-Use-libvirt-unix_sock_group.patch @@ -0,0 +1,58 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: Copyright (c) 2017 Enea AB and others. +: +: All rights reserved. This program and the accompanying materials +: are made available under the terms of the Apache License, Version 2.0 +: which accompanies this distribution, and is available at +: http://www.apache.org/licenses/LICENSE-2.0 +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +From: Alexandru Avadanii +Date: Sun, 20 Aug 2017 18:18:53 +0200 +Subject: [PATCH] libvirt: Use "libvirt" unix_sock_group + +On AArch64, libvirt 3.x is used, which uses "libvirt" by default, +so change old "libvirtd" in . + +Signed-off-by: Alexandru Avadanii +--- + ...libvirt-unix_sock_group-s-libvirtd-libvirt.patch | 21 +++++++++++++++++++++ + mcp/patches/patches.list | 1 + + 2 files changed, 22 insertions(+) + create mode 100644 mcp/patches/0102-libvirt-unix_sock_group-s-libvirtd-libvirt.patch + +diff --git a/mcp/patches/0102-libvirt-unix_sock_group-s-libvirtd-libvirt.patch b/mcp/patches/0102-libvirt-unix_sock_group-s-libvirtd-libvirt.patch +new file mode 100644 +index 0000000..003b249 +--- /dev/null ++++ b/mcp/patches/0102-libvirt-unix_sock_group-s-libvirtd-libvirt.patch +@@ -0,0 +1,21 @@ ++From: Alexandru Avadanii ++Date: Sun, 20 Aug 2017 02:03:01 +0200 ++Subject: [PATCH] libvirt: unix_sock_group: s/libvirtd/libvirt/ ++ ++On AArch64, libvirt 3.x is used, which uses "libvirt" by default. ++ ++Signed-off-by: Alexandru Avadanii ++--- ++ ++diff --git a/libvirt/files/libvirtd.conf.Debian b/libvirt/files/libvirtd.conf.Debian ++--- a/libvirt/files/libvirtd.conf.Debian +++++ b/libvirt/files/libvirtd.conf.Debian ++@@ -81,7 +81,7 @@ ++ # without becoming root. ++ # ++ # This is restricted to 'root' by default. ++-unix_sock_group = "libvirtd" +++unix_sock_group = "libvirt" ++ ++ # Set the UNIX socket permissions for the R/O socket. This is used ++ # for monitoring VM status only +diff --git a/mcp/patches/patches.list b/mcp/patches/patches.list +index ed2dd4e..46a9556 100644 +--- a/mcp/patches/patches.list ++++ b/mcp/patches/patches.list +@@ -8,3 +8,4 @@ + /usr/share/salt-formulas/env: 0008-Handle-file_recv-option.patch + /usr/share/salt-formulas/env: 0009-seedng-module-Sync-salt-version.patch + /usr/share/salt-formulas/env: 0101-maas-Add-curtin_userdata_arm64_generic_xenial.patch ++/usr/share/salt-formulas/env: 0102-libvirt-unix_sock_group-s-libvirtd-libvirt.patch diff --git a/patches/opnfv-fuel/0009-network-public-mgmt-Use-arm-pod3-POD-config.patch b/patches/opnfv-fuel/0009-network-public-mgmt-Use-arm-pod3-POD-config.patch deleted file mode 100644 index 3ae543a9..00000000 --- a/patches/opnfv-fuel/0009-network-public-mgmt-Use-arm-pod3-POD-config.patch +++ /dev/null @@ -1,316 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: All rights reserved. This program and the accompanying materials -: are made available under the terms of the Apache License, Version 2.0 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii -Date: Tue, 8 Aug 2017 03:49:53 +0200 -Subject: [PATCH] network: public, mgmt: Use arm-pod3 POD config - -Move MaaS IPs to x.y.z.2 (upstream Fuel uses x.y.z.3). - -Signed-off-by: Alexandru Avadanii ---- - ci/deploy.sh | 2 +- - mcp/config/states/maas | 2 +- - mcp/config/states/openstack_ha | 2 +- - .../baremetal-mcp-ocata-odl-ha/infra/init.yml | 22 ++++---- - .../baremetal-mcp-ocata-odl-ha/openstack/init.yml | 62 +++++++++++----------- - .../baremetal-mcp-ocata-ovs-ha/infra/init.yml | 22 ++++---- - .../baremetal-mcp-ocata-ovs-ha/openstack/init.yml | 60 ++++++++++----------- - 7 files changed, 86 insertions(+), 86 deletions(-) - -diff --git a/ci/deploy.sh b/ci/deploy.sh -index 4b64000..059ace5 100755 ---- a/ci/deploy.sh -+++ b/ci/deploy.sh -@@ -141,7 +141,7 @@ URI_REGEXP='(file|https?|ftp)://.*' - - export SSH_KEY=${SSH_KEY:-"/var/lib/opnfv/mcp.rsa"} - export SALT_MASTER=${SALT_MASTER_IP:-192.168.10.100} --export MAAS_IP=${MAAS_IP:-192.168.10.3} -+export MAAS_IP=${MAAS_IP:-192.168.10.2} - export SSH_OPTS="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${SSH_KEY}" - - # Variables below are disabled for now, to be re-introduced or removed later -diff --git a/mcp/config/states/maas b/mcp/config/states/maas -index 6c2ae04..787d713 100755 ---- a/mcp/config/states/maas -+++ b/mcp/config/states/maas -@@ -52,7 +52,7 @@ salt -C 'mas01*' state.apply linux.network.interface - salt -C 'mas01*' state.apply maas.pxe_nat - salt -C 'mas01*' state.apply maas.cluster - salt -C 'cfg01*' cmd.run \ -- "route add -net 192.168.11.0/24 gw ${MAAS_IP:-192.168.10.3}" -+ "route add -net 192.168.11.0/24 gw ${MAAS_IP:-192.168.10.2}" - - wait_for 10 "salt -C 'mas01*' state.apply maas.region" - -diff --git a/mcp/config/states/openstack_ha b/mcp/config/states/openstack_ha -index cec5895..9714c70 100755 ---- a/mcp/config/states/openstack_ha -+++ b/mcp/config/states/openstack_ha -@@ -55,5 +55,5 @@ salt -I 'ceilometer:agent' state.sls ceilometer - salt -I 'horizon:server' state.sls horizon - salt -I 'nginx:server' state.sls nginx - --salt -C 'I@nginx:server and *01*' cp.push /etc/ssl/certs/10.167.4.80-with-chain.crt upload_path='certs/os_cacert' -+salt -C 'I@nginx:server and *01*' cp.push /etc/ssl/certs/172.16.10.80-with-chain.crt upload_path='certs/os_cacert' - cd /etc/ssl/certs && ln -s /var/cache/salt/master/minions/prx01.*/files/certs/os_cacert -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml -index c5a999b..79a8e92 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml -@@ -16,19 +16,19 @@ parameters: - infra_maas_database_password: opnfv_secret - - # infra service addresses -- infra_config_address: 10.167.4.100 -+ infra_config_address: 172.16.10.100 - infra_config_deploy_address: 192.168.10.100 -- infra_maas_node01_address: 10.167.4.3 -- infra_maas_node01_deploy_address: 192.168.11.3 -- infra_maas_node01_external_address: 10.16.0.3 -- infra_compute_node01_address: 10.167.4.141 -- infra_compute_node02_address: 10.167.4.142 -- infra_compute_node03_address: 10.167.4.143 -+ infra_maas_node01_address: 172.16.10.2 -+ infra_maas_node01_deploy_address: 192.168.11.2 -+ infra_maas_node01_external_address: 10.0.8.2 -+ infra_compute_node01_address: 172.16.10.141 -+ infra_compute_node02_address: 172.16.10.142 -+ infra_compute_node03_address: 172.16.10.143 - -- infra_kvm_address: 10.167.4.140 -- infra_kvm_node01_address: 10.167.4.141 -- infra_kvm_node02_address: 10.167.4.142 -- infra_kvm_node03_address: 10.167.4.143 -+ infra_kvm_address: 172.16.10.140 -+ infra_kvm_node01_address: 172.16.10.141 -+ infra_kvm_node02_address: 172.16.10.142 -+ infra_kvm_node03_address: 172.16.10.143 - - infra_maas_node01_hostname: mas01 - infra_kvm_node01_hostname: kvm01 -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml -index e49a205..ad99447 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml -@@ -3,9 +3,9 @@ parameters: - - openstack_version: ocata - -- openstack_gateway_node01_address: 10.167.4.124 -- openstack_gateway_node02_address: 10.167.4.125 -- openstack_gateway_node03_address: 10.167.4.126 -+ openstack_gateway_node01_address: 172.16.10.124 -+ openstack_gateway_node02_address: 172.16.10.125 -+ openstack_gateway_node03_address: 172.16.10.126 - openstack_gateway_node01_tenant_address: 10.1.0.6 - openstack_gateway_node02_tenant_address: 10.1.0.7 - openstack_gateway_node03_tenant_address: 10.1.0.9 -@@ -14,21 +14,21 @@ parameters: - openstack_gateway_node03_hostname: gtw03 - - # openstack service addresses -- openstack_proxy_address: 10.167.4.80 -- openstack_proxy_node01_address: 10.167.4.81 -- openstack_proxy_node02_address: 10.167.4.82 -- openstack_control_address: 10.167.4.10 -- openstack_control_node01_address: 10.167.4.11 -- openstack_control_node02_address: 10.167.4.12 -- openstack_control_node03_address: 10.167.4.13 -- openstack_database_address: 10.167.4.50 -- openstack_database_node01_address: 10.167.4.51 -- openstack_database_node02_address: 10.167.4.52 -- openstack_database_node03_address: 10.167.4.53 -- openstack_message_queue_address: 10.167.4.40 -- openstack_message_queue_node01_address: 10.167.4.41 -- openstack_message_queue_node02_address: 10.167.4.42 -- openstack_message_queue_node03_address: 10.167.4.43 -+ openstack_proxy_address: 172.16.10.80 -+ openstack_proxy_node01_address: 172.16.10.81 -+ openstack_proxy_node02_address: 172.16.10.82 -+ openstack_control_address: 172.16.10.10 -+ openstack_control_node01_address: 172.16.10.11 -+ openstack_control_node02_address: 172.16.10.12 -+ openstack_control_node03_address: 172.16.10.13 -+ openstack_database_address: 172.16.10.50 -+ openstack_database_node01_address: 172.16.10.51 -+ openstack_database_node02_address: 172.16.10.52 -+ openstack_database_node03_address: 172.16.10.53 -+ openstack_message_queue_address: 172.16.10.40 -+ openstack_message_queue_node01_address: 172.16.10.41 -+ openstack_message_queue_node02_address: 172.16.10.42 -+ openstack_message_queue_node03_address: 172.16.10.43 - - - openstack_telemetry_hostname: mdb -@@ -36,26 +36,26 @@ parameters: - openstack_telemetry_node02_hostname: mdb02 - openstack_telemetry_node03_hostname: mdb03 - -- openstack_telemetry_address: 10.167.4.75 -- openstack_telemetry_node01_address: 10.167.4.76 -- openstack_telemetry_node02_address: 10.167.4.77 -- openstack_telemetry_node03_address: 10.167.4.78 -+ openstack_telemetry_address: 172.16.10.75 -+ openstack_telemetry_node01_address: 172.16.10.76 -+ openstack_telemetry_node02_address: 172.16.10.77 -+ openstack_telemetry_node03_address: 172.16.10.78 - - # OpenStack Compute -- openstack_compute_node01_single_address: 10.167.4.101 -- openstack_compute_node02_single_address: 10.167.4.102 -- openstack_compute_node03_single_address: 10.167.4.103 -- openstack_compute_node01_control_address: 10.167.4.101 -- openstack_compute_node02_control_address: 10.167.4.102 -- openstack_compute_node03_control_address: 10.167.4.103 -+ openstack_compute_node01_single_address: 172.16.10.101 -+ openstack_compute_node02_single_address: 172.16.10.102 -+ openstack_compute_node03_single_address: 172.16.10.103 -+ openstack_compute_node01_control_address: 172.16.10.101 -+ openstack_compute_node02_control_address: 172.16.10.102 -+ openstack_compute_node03_control_address: 172.16.10.103 - openstack_compute_node01_tenant_address: 10.1.0.101 - openstack_compute_node02_tenant_address: 10.1.0.102 - openstack_compute_node03_tenant_address: 10.1.0.103 -- openstack_compute_node01_external_address: 172.30.10.2 -- openstack_compute_node02_external_address: 172.30.10.3 -+ openstack_compute_node01_external_address: 10.0.8.101 -+ openstack_compute_node02_external_address: 10.0.8.102 - - # opendaylight options -- opendaylight_server_node01_single_address: 10.167.4.111 -+ opendaylight_server_node01_single_address: 172.16.10.111 - opendaylight_service_host: ${_param:opendaylight_server_node01_single_address} - opendaylight_server_node01_hostname: odl01 - opendaylight_router: odl-router_v2 -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/init.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/init.yml -index 23f205f..d09c643 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/init.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/init.yml -@@ -16,19 +16,19 @@ parameters: - infra_maas_database_password: opnfv_secret - - # infra service addresses -- infra_config_address: 10.167.4.100 -+ infra_config_address: 172.16.10.100 - infra_config_deploy_address: 192.168.10.100 -- infra_maas_node01_address: 10.167.4.3 -- infra_maas_node01_deploy_address: 192.168.11.3 -- infra_maas_node01_external_address: 10.16.0.3 -- infra_compute_node01_address: 10.167.4.141 -- infra_compute_node02_address: 10.167.4.142 -- infra_compute_node03_address: 10.167.4.143 -+ infra_maas_node01_address: 172.16.10.2 -+ infra_maas_node01_deploy_address: 192.168.11.2 -+ infra_maas_node01_external_address: 10.0.8.2 -+ infra_compute_node01_address: 172.16.10.141 -+ infra_compute_node02_address: 172.16.10.142 -+ infra_compute_node03_address: 172.16.10.143 - -- infra_kvm_address: 10.167.4.140 -- infra_kvm_node01_address: 10.167.4.141 -- infra_kvm_node02_address: 10.167.4.142 -- infra_kvm_node03_address: 10.167.4.143 -+ infra_kvm_address: 172.16.10.140 -+ infra_kvm_node01_address: 172.16.10.141 -+ infra_kvm_node02_address: 172.16.10.142 -+ infra_kvm_node03_address: 172.16.10.143 - - infra_maas_node01_hostname: mas01 - infra_kvm_node01_hostname: kvm01 -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/init.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/init.yml -index 9c2bc7b..90e0cf3 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/init.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/init.yml -@@ -3,9 +3,9 @@ parameters: - - openstack_version: ocata - -- openstack_gateway_node01_address: 10.167.4.124 -- openstack_gateway_node02_address: 10.167.4.125 -- openstack_gateway_node03_address: 10.167.4.126 -+ openstack_gateway_node01_address: 172.16.10.124 -+ openstack_gateway_node02_address: 172.16.10.125 -+ openstack_gateway_node03_address: 172.16.10.126 - openstack_gateway_node01_tenant_address: 10.1.0.6 - openstack_gateway_node02_tenant_address: 10.1.0.7 - openstack_gateway_node03_tenant_address: 10.1.0.9 -@@ -14,21 +14,21 @@ parameters: - openstack_gateway_node03_hostname: gtw03 - - # openstack service addresses -- openstack_proxy_address: 10.167.4.80 -- openstack_proxy_node01_address: 10.167.4.81 -- openstack_proxy_node02_address: 10.167.4.82 -- openstack_control_address: 10.167.4.10 -- openstack_control_node01_address: 10.167.4.11 -- openstack_control_node02_address: 10.167.4.12 -- openstack_control_node03_address: 10.167.4.13 -- openstack_database_address: 10.167.4.50 -- openstack_database_node01_address: 10.167.4.51 -- openstack_database_node02_address: 10.167.4.52 -- openstack_database_node03_address: 10.167.4.53 -- openstack_message_queue_address: 10.167.4.40 -- openstack_message_queue_node01_address: 10.167.4.41 -- openstack_message_queue_node02_address: 10.167.4.42 -- openstack_message_queue_node03_address: 10.167.4.43 -+ openstack_proxy_address: 172.16.10.80 -+ openstack_proxy_node01_address: 172.16.10.81 -+ openstack_proxy_node02_address: 172.16.10.82 -+ openstack_control_address: 172.16.10.10 -+ openstack_control_node01_address: 172.16.10.11 -+ openstack_control_node02_address: 172.16.10.12 -+ openstack_control_node03_address: 172.16.10.13 -+ openstack_database_address: 172.16.10.50 -+ openstack_database_node01_address: 172.16.10.51 -+ openstack_database_node02_address: 172.16.10.52 -+ openstack_database_node03_address: 172.16.10.53 -+ openstack_message_queue_address: 172.16.10.40 -+ openstack_message_queue_node01_address: 172.16.10.41 -+ openstack_message_queue_node02_address: 172.16.10.42 -+ openstack_message_queue_node03_address: 172.16.10.43 - - - openstack_telemetry_hostname: mdb -@@ -36,23 +36,23 @@ parameters: - openstack_telemetry_node02_hostname: mdb02 - openstack_telemetry_node03_hostname: mdb03 - -- openstack_telemetry_address: 10.167.4.75 -- openstack_telemetry_node01_address: 10.167.4.76 -- openstack_telemetry_node02_address: 10.167.4.77 -- openstack_telemetry_node03_address: 10.167.4.78 -+ openstack_telemetry_address: 172.16.10.75 -+ openstack_telemetry_node01_address: 172.16.10.76 -+ openstack_telemetry_node02_address: 172.16.10.77 -+ openstack_telemetry_node03_address: 172.16.10.78 - - # OpenStack Compute -- openstack_compute_node01_single_address: 10.167.4.101 -- openstack_compute_node02_single_address: 10.167.4.102 -- openstack_compute_node03_single_address: 10.167.4.103 -- openstack_compute_node01_control_address: 10.167.4.101 -- openstack_compute_node02_control_address: 10.167.4.102 -- openstack_compute_node03_control_address: 10.167.4.103 -+ openstack_compute_node01_single_address: 172.16.10.101 -+ openstack_compute_node02_single_address: 172.16.10.102 -+ openstack_compute_node03_single_address: 172.16.10.103 -+ openstack_compute_node01_control_address: 172.16.10.101 -+ openstack_compute_node02_control_address: 172.16.10.102 -+ openstack_compute_node03_control_address: 172.16.10.103 - openstack_compute_node01_tenant_address: 10.1.0.101 - openstack_compute_node02_tenant_address: 10.1.0.102 - openstack_compute_node03_tenant_address: 10.1.0.103 -- openstack_compute_node01_external_address: 172.30.10.2 -- openstack_compute_node02_external_address: 172.30.10.3 -+ openstack_compute_node01_external_address: 10.0.8.101 -+ openstack_compute_node02_external_address: 10.0.8.102 - - # openstack service hostnames - openstack_proxy_hostname: prx diff --git a/patches/opnfv-fuel/0010-classes-baremetal-arm-pod3-config-hardcode.patch b/patches/opnfv-fuel/0010-classes-baremetal-arm-pod3-config-hardcode.patch deleted file mode 100644 index 56de318c..00000000 --- a/patches/opnfv-fuel/0010-classes-baremetal-arm-pod3-config-hardcode.patch +++ /dev/null @@ -1,186 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: All rights reserved. This program and the accompanying materials -: are made available under the terms of the Apache License, Version 2.0 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii -Date: Thu, 10 Aug 2017 18:32:37 +0200 -Subject: [PATCH] classes: baremetal: arm-pod3 config hardcode - -Populate MaaS configuration with node information for arm-pod3. - -FIXME: Read all this info from PDF (Pod Descriptor File) later. - -Signed-off-by: Alexandru Avadanii ---- - .../baremetal-mcp-ocata-odl-ha/infra/maas.yml | 40 +++++++++++----------- - .../baremetal-mcp-ocata-ovs-ha/infra/maas.yml | 40 +++++++++++----------- - 2 files changed, 40 insertions(+), 40 deletions(-) - -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/maas.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/maas.yml -index 5649990..e4765ca 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/maas.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/maas.yml -@@ -48,57 +48,57 @@ parameters: - machines: - kvm01: - interface: -- mac: "00:25:b5:a0:00:2a" -+ mac: "e0:ff:f7:00:08:ae" - power_parameters: -- power_address: "172.30.8.75" -- power_password: "octopus" -+ power_address: "10.0.8.3" -+ power_password: "admin" - power_type: ipmi - power_user: "admin" -- architecture: 'amd64/generic' -+ architecture: 'arm64/generic' - distro_series: xenial - hwe_kernel: hwe-16.04 - kvm02: - interface: -- mac: "00:25:b5:a0:00:3a" -+ mac: "e0:ff:f7:00:08:b1" - power_parameters: -- power_address: "172.30.8.65" -- power_password: "octopus" -+ power_address: "10.0.8.4" -+ power_password: "admin" - power_type: ipmi - power_user: "admin" -- architecture: 'amd64/generic' -+ architecture: 'arm64/generic' - distro_series: xenial - hwe_kernel: hwe-16.04 - kvm03: - interface: -- mac: "00:25:b5:a0:00:4a" -+ mac: "e0:ff:f7:00:08:bd" - power_parameters: -- power_address: "172.30.8.74" -- power_password: "octopus" -+ power_address: "10.0.8.5" -+ power_password: "admin" - power_type: ipmi - power_user: "admin" -- architecture: 'amd64/generic' -+ architecture: 'arm64/generic' - distro_series: xenial - hwe_kernel: hwe-16.04 - cmp001: - interface: -- mac: "00:25:b5:a0:00:5a" -+ mac: "e0:ff:f7:00:08:c6" - power_parameters: -- power_address: "172.30.8.73" -- power_password: "octopus" -+ power_address: "10.0.8.6" -+ power_password: "admin" - power_type: ipmi - power_user: "admin" -- architecture: 'amd64/generic' -+ architecture: 'arm64/generic' - distro_series: xenial - hwe_kernel: hwe-16.04 - cmp002: - interface: -- mac: "00:25:b5:a0:00:6a" -+ mac: "e0:ff:f7:00:08:cf" - power_parameters: -- power_address: "172.30.8.72" -- power_password: "octopus" -+ power_address: "10.0.8.7" -+ power_password: "admin" - power_type: ipmi - power_user: "admin" -- architecture: 'amd64/generic' -+ architecture: 'arm64/generic' - distro_series: xenial - hwe_kernel: hwe-16.04 - linux: -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/maas.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/maas.yml -index 73215ee..26115fe 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/maas.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/maas.yml -@@ -48,57 +48,57 @@ parameters: - machines: - kvm01: - interface: -- mac: "00:25:b5:a0:00:2a" -+ mac: "e0:ff:f7:00:08:ae" - power_parameters: -- power_address: "172.30.8.75" -- power_password: "octopus" -+ power_address: "10.0.8.3" -+ power_password: "admin" - power_type: ipmi - power_user: "admin" -- architecture: 'amd64/generic' -+ architecture: 'arm64/generic' - distro_series: xenial - hwe_kernel: hwe-16.04 - kvm02: - interface: -- mac: "00:25:b5:a0:00:3a" -+ mac: "e0:ff:f7:00:08:b1" - power_parameters: -- power_address: "172.30.8.65" -- power_password: "octopus" -+ power_address: "10.0.8.4" -+ power_password: "admin" - power_type: ipmi - power_user: "admin" -- architecture: 'amd64/generic' -+ architecture: 'arm64/generic' - distro_series: xenial - hwe_kernel: hwe-16.04 - kvm03: - interface: -- mac: "00:25:b5:a0:00:4a" -+ mac: "e0:ff:f7:00:08:bd" - power_parameters: -- power_address: "172.30.8.74" -- power_password: "octopus" -+ power_address: "10.0.8.5" -+ power_password: "admin" - power_type: ipmi - power_user: "admin" -- architecture: 'amd64/generic' -+ architecture: 'arm64/generic' - distro_series: xenial - hwe_kernel: hwe-16.04 - cmp001: - interface: -- mac: "00:25:b5:a0:00:5a" -+ mac: "e0:ff:f7:00:08:c6" - power_parameters: -- power_address: "172.30.8.73" -- power_password: "octopus" -+ power_address: "10.0.8.6" -+ power_password: "admin" - power_type: ipmi - power_user: "admin" -- architecture: 'amd64/generic' -+ architecture: 'arm64/generic' - distro_series: xenial - hwe_kernel: hwe-16.04 - cmp002: - interface: -- mac: "00:25:b5:a0:00:6a" -+ mac: "e0:ff:f7:00:08:cf" - power_parameters: -- power_address: "172.30.8.72" -- power_password: "octopus" -+ power_address: "10.0.8.7" -+ power_password: "admin" - power_type: ipmi - power_user: "admin" -- architecture: 'amd64/generic' -+ architecture: 'arm64/generic' - distro_series: xenial - hwe_kernel: hwe-16.04 - linux: diff --git a/patches/opnfv-fuel/0010-mcp-salt-formulas-armband-Extend-libvirt_domain.patch b/patches/opnfv-fuel/0010-mcp-salt-formulas-armband-Extend-libvirt_domain.patch new file mode 100644 index 00000000..e421552c --- /dev/null +++ b/patches/opnfv-fuel/0010-mcp-salt-formulas-armband-Extend-libvirt_domain.patch @@ -0,0 +1,105 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: Copyright (c) 2017 Enea AB and others. +: +: All rights reserved. This program and the accompanying materials +: are made available under the terms of the Apache License, Version 2.0 +: which accompanies this distribution, and is available at +: http://www.apache.org/licenses/LICENSE-2.0 +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +From: Alexandru Avadanii +Date: Sun, 20 Aug 2017 22:41:26 +0200 +Subject: [PATCH] mcp: salt-formulas: armband: Extend libvirt_domain + +Add new state in armband salt formula that extends salt's virt +libvirt_domain.jinja template with support for: +- hw_firmware_type; +- virt_machine_model; +- cpu_model; + +These will later be leveraged via salt virt formula with AArch64 +specific values. + +Signed-off-by: Alexandru Avadanii +--- + mcp/config/states/maas | 2 +- + .../armband/files/libvirt_domain.jinja.diff | 46 ++++++++++++++++++++++ + .../armband/libvirt_domain_template.sls | 4 ++ + 3 files changed, 51 insertions(+), 1 deletion(-) + create mode 100644 mcp/salt-formulas/armband/files/libvirt_domain.jinja.diff + create mode 100644 mcp/salt-formulas/armband/libvirt_domain_template.sls + +diff --git a/mcp/config/states/maas b/mcp/config/states/maas +index 603b530..f6de2cb 100755 +--- a/mcp/config/states/maas ++++ b/mcp/config/states/maas +@@ -86,7 +86,7 @@ wait_for 90 "! salt 'kvm*' test.ping | tee /dev/stderr | fgrep -q 'Not connected + + salt -C '* and not cfg01* and not mas01*' state.apply linux,ntp + +-salt -C 'kvm*' state.sls armband ++salt -C 'kvm*' state.sls armband,armband.libvirt_domain_template + salt -C 'kvm*' state.sls libvirt + + salt -C '* and not cfg01* and not mas01*' state.apply salt +diff --git a/mcp/salt-formulas/armband/files/libvirt_domain.jinja.diff b/mcp/salt-formulas/armband/files/libvirt_domain.jinja.diff +new file mode 100644 +index 0000000..4e7fad5 +--- /dev/null ++++ b/mcp/salt-formulas/armband/files/libvirt_domain.jinja.diff +@@ -0,0 +1,46 @@ ++From: Alexandru Avadanii ++Date: Sun Aug 20 18:18:53 2017 +0200 ++Subject: [PATCH] libvirt_domain.jinja: Add AArch64 support ++ ++Salt virt state relies on a Jinja template to create a libvirt ++XML definition for each new VM. ++This template needs to be extended with a few specific options ++for AArch64: ++- UEFI loader support (pflash); ++- custom machine model (e.g. 'virt-2.9'), since AArch64 defaults to ++ 'integratorcp'; ++- custom cpu model; ++ ++Allow all these to be parametrized from the salt virt formula, ++which we will also adapt to allow the params to be passed via our ++reclass model. ++ ++Signed-off-by: Alexandru Avadanii ++--- ++ ++diff --git a/usr/lib/python2.7/dist-packages/salt/templates/virt/libvirt_domain.jinja b/usr/lib/python2.7/dist-packages/salt/templates/virt/libvirt_domain.jinja ++--- a/usr/lib/python2.7/dist-packages/salt/templates/virt/libvirt_domain.jinja +++++ b/usr/lib/python2.7/dist-packages/salt/templates/virt/libvirt_domain.jinja ++@@ -3,11 +3,22 @@ ++ {{ cpu }} ++ {{ mem }} ++ +++ {% if custom_virt_machine %} +++ hvm +++ {% else %} ++ hvm +++ {% endif %} +++ {% if os_loader_type == 'pflash' %} +++ {{ os_loader }} +++ {{ os_loader_nvram }} +++ {% endif %} ++ {% for dev in boot_dev %} ++ ++ {% endfor %} ++ +++ {% if cpu_mode == 'custom' %} +++ +++ {% endif %} ++ ++ {% for diskname, disk in disks.items() %} ++ +diff --git a/mcp/salt-formulas/armband/libvirt_domain_template.sls b/mcp/salt-formulas/armband/libvirt_domain_template.sls +new file mode 100644 +index 0000000..7cc8e22 +--- /dev/null ++++ b/mcp/salt-formulas/armband/libvirt_domain_template.sls +@@ -0,0 +1,4 @@ ++/usr/lib/python2.7/dist-packages/salt/templates/virt/libvirt_domain.jinja: ++ file.patch: ++ - source: salt://armband/files/libvirt_domain.jinja.diff ++ - hash: "9d02cd8aa04497c2d75c72840a5c6c41" diff --git a/patches/opnfv-fuel/0011-maas-boot-resources-Add-arm64-architecture.patch b/patches/opnfv-fuel/0011-maas-boot-resources-Add-arm64-architecture.patch deleted file mode 100644 index 1b0f1137..00000000 --- a/patches/opnfv-fuel/0011-maas-boot-resources-Add-arm64-architecture.patch +++ /dev/null @@ -1,39 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: All rights reserved. This program and the accompanying materials -: are made available under the terms of the Apache License, Version 2.0 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii -Date: Fri, 11 Aug 2017 00:07:29 +0200 -Subject: [PATCH] maas: boot-resources: Add arm64 architecture - -Signed-off-by: Alexandru Avadanii ---- - mcp/patches/0003-maas-region-force-artifact-download.patch | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/mcp/patches/0003-maas-region-force-artifact-download.patch b/mcp/patches/0003-maas-region-force-artifact-download.patch -index f0ce50f..9997552 100644 ---- a/mcp/patches/0003-maas-region-force-artifact-download.patch -+++ b/mcp/patches/0003-maas-region-force-artifact-download.patch -@@ -42,7 +42,7 @@ diff --git a/maas/files/maas-artifact-sync.sh b/maas/files/maas-artifact-sync.sh - new file mode 100644 - --- /dev/null - +++ b/maas/files/maas-artifact-sync.sh --@@ -0,0 +1,21 @@ -+@@ -0,0 +1,26 @@ - +{%- from "maas/map.jinja" import region with context %} - +#!/bin/bash - +function wait_for { -@@ -64,3 +64,8 @@ new file mode 100644 - +wait_for 90 "! maas opnfv boot-resources is-importing | grep -q 'true'" - +maas opnfv rack-controllers import-boot-images || exit 3 - +wait_for 30 "test -d /var/lib/maas/boot-resources/current/ubuntu/amd64" -++maas opnfv boot-source-selection update 1 1 arches='amd64' arches='arm64' || exit 4 -++maas opnfv boot-resources import || exit 2 -++wait_for 90 "! maas opnfv boot-resources is-importing | grep -q 'true'" -++maas opnfv rack-controllers import-boot-images || exit 3 -++wait_for 30 "test -d /var/lib/maas/boot-resources/current/ubuntu/arm64" diff --git a/patches/opnfv-fuel/0011-virtng.py-virt.sls-Extend-libvirt_domain.patch b/patches/opnfv-fuel/0011-virtng.py-virt.sls-Extend-libvirt_domain.patch new file mode 100644 index 00000000..fba8be30 --- /dev/null +++ b/patches/opnfv-fuel/0011-virtng.py-virt.sls-Extend-libvirt_domain.patch @@ -0,0 +1,263 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: Copyright (c) 2017 Enea AB and others. +: +: All rights reserved. This program and the accompanying materials +: are made available under the terms of the Apache License, Version 2.0 +: which accompanies this distribution, and is available at +: http://www.apache.org/licenses/LICENSE-2.0 +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +From: Alexandru Avadanii +Date: Mon, 21 Aug 2017 01:10:16 +0200 +Subject: [PATCH] virtng.py, virt.sls: Extend libvirt_domain + +Extend _modules/virtng.py, salt/control/virt.sls with support for: +- hw_firmware_type; +- virt_machine_model; +- cpu_model; + +This functionality relies on the corresponding changes to be +implemented in libvirt_domain.jinja template. + +These will later be leveraged via our reclass model with AArch64 +specific values. + +Signed-off-by: Alexandru Avadanii +--- + .../0103-virtng-module-Extend-libvirt_domain.patch | 54 ++++++++++++++++++++++ + ...4-salt-control-virt-Extend-libvirt_domain.patch | 51 ++++++++++++++++++++ + mcp/patches/patches.list | 2 + + .../baremetal-mcp-ocata-odl-ha/infra/kvm.yml | 18 ++++++++ + .../baremetal-mcp-ocata-ovs-ha/infra/kvm.yml | 15 ++++++ + 5 files changed, 140 insertions(+) + create mode 100644 mcp/patches/0103-virtng-module-Extend-libvirt_domain.patch + create mode 100644 mcp/patches/0104-salt-control-virt-Extend-libvirt_domain.patch + +diff --git a/mcp/patches/0103-virtng-module-Extend-libvirt_domain.patch b/mcp/patches/0103-virtng-module-Extend-libvirt_domain.patch +new file mode 100644 +index 0000000..706b67d +--- /dev/null ++++ b/mcp/patches/0103-virtng-module-Extend-libvirt_domain.patch +@@ -0,0 +1,54 @@ ++From: Alexandru Avadanii ++Date: Mon, 21 Aug 2017 02:03:01 +0200 ++Subject: [PATCH] virtng: module: Extend libvirt_domain ++ ++Extend virtng.py with support for passing down new params: ++- hw_firmware_type; ++- virt_machine_model; ++- cpu_model; ++ ++This functionality relies on the corresponding changes to be ++implemented in libvirt_domain.jinja template. ++ ++These will later be leveraged via salt virt formula with AArch64 ++specific values. ++ ++Signed-off-by: Alexandru Avadanii ++--- ++ ++diff --git a/_modules/virtng.py b/_modules/virtng.py ++--- a/_modules/virtng.py +++++ b/_modules/virtng.py ++@@ -56,6 +56,10 @@ ++ ++ VIRT_DEFAULT_HYPER = 'kvm' ++ +++DEFAULT_UEFI_LOADER_PATH = { +++ "x86_64": "/usr/share/OVMF/OVMF_CODE.fd", +++ "aarch64": "/usr/share/AAVMF/AAVMF_CODE.fd" +++} ++ ++ def __virtual__(): ++ if not HAS_ALL_IMPORTS: ++@@ -227,6 +231,21 @@ ++ # TODO: make bus and model parameterized, this works for 64-bit Linux ++ context['controller_model'] = 'lsilogic' ++ +++ # TODO: limit cpu_model, hw_firmware_type, virt_machine_type to qemu/kvm +++ # FIXME: parametrize hardcoded path for NVRAM storage +++ if 'hw_firmware_type' in kwargs and kwargs['hw_firmware_type'] == 'uefi': +++ context['os_loader_type'] = 'pflash' +++ context['os_loader'] = DEFAULT_UEFI_LOADER_PATH[os.uname()[-1]] +++ context['os_loader_nvram'] = '/var/lib/libvirt/qemu/nvram/{0}_VARS.fd'.format(name) +++ +++ if 'virt_machine_model' in kwargs: +++ context['custom_virt_machine'] = True +++ context['virt_machine_model'] = kwargs['virt_machine_model'] +++ +++ if 'cpu_model' in kwargs: +++ context['cpu_mode'] = 'custom' +++ context['cpu_model'] = kwargs['cpu_model'] +++ ++ if 'boot_dev' in kwargs: ++ context['boot_dev'] = [] ++ for dev in kwargs['boot_dev'].split(): +diff --git a/mcp/patches/0104-salt-control-virt-Extend-libvirt_domain.patch b/mcp/patches/0104-salt-control-virt-Extend-libvirt_domain.patch +new file mode 100644 +index 0000000..a9fe11b +--- /dev/null ++++ b/mcp/patches/0104-salt-control-virt-Extend-libvirt_domain.patch +@@ -0,0 +1,51 @@ ++From: Alexandru Avadanii ++Date: Mon, 21 Aug 2017 02:03:01 +0200 ++Subject: [PATCH] salt: control: virt: Extend libvirt_domain ++ ++Extend salt/control/virt.sls with support for new params: ++- hw_firmware_type; ++- virt_machine_model; ++- cpu_model; ++ ++This functionality relies on the corresponding changes to be ++implemented in libvirt_domain.jinja template, as well as in ++salt custom py module virtng.py. ++ ++These will later be leveraged via reclass model with AArch64 ++specific values. ++ ++FIXME: Move all new params to different section, as "size" is ++definitely not the best choice. ++ ++Example reclass model usage: ++salt: ++ control: ++ size: ++ openstack.example_vm_type: ++ hw_firmware_type: uefi ++ virt_machine_model: virt ++ cpu_model: host-passthrough ++ ++Signed-off-by: Alexandru Avadanii ++--- ++ ++diff --git a/salt/control/virt.sls b/salt/control/virt.sls ++--- a/salt/control/virt.sls +++++ b/salt/control/virt.sls ++@@ -44,6 +44,16 @@ ++ seed: True ++ serial_type: pty ++ console: True +++ # FIXME(armband): Move these 3 params to different section +++ {%- if size.hw_firmware_type is defined %} +++ hw_firmware_type: {{ size.hw_firmware_type }} +++ {%- endif %} +++ {%- if size.virt_machine_model is defined %} +++ virt_machine_model: {{ size.virt_machine_model }} +++ {%- endif %} +++ {%- if size.cpu_model is defined %} +++ cpu_model: {{ size.cpu_model }} +++ {%- endif %} ++ - unless: virsh list --all --name| grep -E "^{{ node_name }}.{{ cluster.domain }}$" ++ ++ #salt_control_seed_{{ cluster_name }}_{{ node_name }}: +diff --git a/mcp/patches/patches.list b/mcp/patches/patches.list +index 46a9556..f6504ab 100644 +--- a/mcp/patches/patches.list ++++ b/mcp/patches/patches.list +@@ -9,3 +9,5 @@ + /usr/share/salt-formulas/env: 0009-seedng-module-Sync-salt-version.patch + /usr/share/salt-formulas/env: 0101-maas-Add-curtin_userdata_arm64_generic_xenial.patch + /usr/share/salt-formulas/env: 0102-libvirt-unix_sock_group-s-libvirtd-libvirt.patch ++/usr/share/salt-formulas/env: 0103-virtng-module-Extend-libvirt_domain.patch ++/usr/share/salt-formulas/env: 0104-salt-control-virt-Extend-libvirt_domain.patch +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/kvm.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/kvm.yml +index 766a495..f072e0e 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/kvm.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/kvm.yml +@@ -34,26 +34,41 @@ parameters: + openstack.control: + cpu: 4 + ram: 10240 ++ hw_firmware_type: uefi ++ virt_machine_model: virt ++ cpu_model: host-passthrough + disk_profile: small + net_profile: default + openstack.database: + cpu: 4 + ram: 8192 ++ hw_firmware_type: uefi ++ virt_machine_model: virt ++ cpu_model: host-passthrough + disk_profile: large + net_profile: default + openstack.message_queue: + cpu: 4 + ram: 2048 ++ hw_firmware_type: uefi ++ virt_machine_model: virt ++ cpu_model: host-passthrough + disk_profile: small + net_profile: default + openstack.telemetry: + cpu: 2 + ram: 3072 ++ hw_firmware_type: uefi ++ virt_machine_model: virt ++ cpu_model: host-passthrough + disk_profile: xxlarge + net_profile: default + openstack.proxy: + cpu: 2 + ram: 2048 ++ hw_firmware_type: uefi ++ virt_machine_model: virt ++ cpu_model: host-passthrough + disk_profile: small + net_profile: default + # stacklight.log: +@@ -74,6 +89,9 @@ parameters: + opendaylight.server: + cpu: 4 + ram: 6144 ++ hw_firmware_type: uefi ++ virt_machine_model: virt ++ cpu_model: host-passthrough + disk_profile: small + net_profile: default + cluster: +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/kvm.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/kvm.yml +index ca1b44b..78011a9 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/kvm.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/kvm.yml +@@ -34,26 +34,41 @@ parameters: + openstack.control: + cpu: 4 + ram: 10240 ++ hw_firmware_type: uefi ++ virt_machine_model: virt ++ cpu_model: host-passthrough + disk_profile: small + net_profile: default + openstack.database: + cpu: 4 + ram: 8192 ++ hw_firmware_type: uefi ++ virt_machine_model: virt ++ cpu_model: host-passthrough + disk_profile: large + net_profile: default + openstack.message_queue: + cpu: 4 + ram: 2048 ++ hw_firmware_type: uefi ++ virt_machine_model: virt ++ cpu_model: host-passthrough + disk_profile: small + net_profile: default + openstack.telemetry: + cpu: 2 + ram: 3072 ++ hw_firmware_type: uefi ++ virt_machine_model: virt ++ cpu_model: host-passthrough + disk_profile: xxlarge + net_profile: default + openstack.proxy: + cpu: 2 + ram: 2048 ++ hw_firmware_type: uefi ++ virt_machine_model: virt ++ cpu_model: host-passthrough + disk_profile: small + net_profile: default + # stacklight.log: diff --git a/patches/opnfv-fuel/0012-libvirt-Use-libvirt-unix_sock_group.patch b/patches/opnfv-fuel/0012-libvirt-Use-libvirt-unix_sock_group.patch deleted file mode 100644 index 1d79c151..00000000 --- a/patches/opnfv-fuel/0012-libvirt-Use-libvirt-unix_sock_group.patch +++ /dev/null @@ -1,58 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: All rights reserved. This program and the accompanying materials -: are made available under the terms of the Apache License, Version 2.0 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii -Date: Sun, 20 Aug 2017 18:18:53 +0200 -Subject: [PATCH] libvirt: Use "libvirt" unix_sock_group - -On AArch64, libvirt 3.x is used, which uses "libvirt" by default, -so change old "libvirtd" in . - -Signed-off-by: Alexandru Avadanii ---- - ...libvirt-unix_sock_group-s-libvirtd-libvirt.patch | 21 +++++++++++++++++++++ - mcp/patches/patches.list | 1 + - 2 files changed, 22 insertions(+) - create mode 100644 mcp/patches/0102-libvirt-unix_sock_group-s-libvirtd-libvirt.patch - -diff --git a/mcp/patches/0102-libvirt-unix_sock_group-s-libvirtd-libvirt.patch b/mcp/patches/0102-libvirt-unix_sock_group-s-libvirtd-libvirt.patch -new file mode 100644 -index 0000000..003b249 ---- /dev/null -+++ b/mcp/patches/0102-libvirt-unix_sock_group-s-libvirtd-libvirt.patch -@@ -0,0 +1,21 @@ -+From: Alexandru Avadanii -+Date: Sun, 20 Aug 2017 02:03:01 +0200 -+Subject: [PATCH] libvirt: unix_sock_group: s/libvirtd/libvirt/ -+ -+On AArch64, libvirt 3.x is used, which uses "libvirt" by default. -+ -+Signed-off-by: Alexandru Avadanii -+--- -+ -+diff --git a/libvirt/files/libvirtd.conf.Debian b/libvirt/files/libvirtd.conf.Debian -+--- a/libvirt/files/libvirtd.conf.Debian -++++ b/libvirt/files/libvirtd.conf.Debian -+@@ -81,7 +81,7 @@ -+ # without becoming root. -+ # -+ # This is restricted to 'root' by default. -+-unix_sock_group = "libvirtd" -++unix_sock_group = "libvirt" -+ -+ # Set the UNIX socket permissions for the R/O socket. This is used -+ # for monitoring VM status only -diff --git a/mcp/patches/patches.list b/mcp/patches/patches.list -index ed2dd4e..46a9556 100644 ---- a/mcp/patches/patches.list -+++ b/mcp/patches/patches.list -@@ -8,3 +8,4 @@ - /usr/share/salt-formulas/env: 0008-Handle-file_recv-option.patch - /usr/share/salt-formulas/env: 0009-seedng-module-Sync-salt-version.patch - /usr/share/salt-formulas/env: 0101-maas-Add-curtin_userdata_arm64_generic_xenial.patch -+/usr/share/salt-formulas/env: 0102-libvirt-unix_sock_group-s-libvirtd-libvirt.patch diff --git a/patches/opnfv-fuel/0012-mcp-salt-formulas-armband-AArch64-bootstrap.patch b/patches/opnfv-fuel/0012-mcp-salt-formulas-armband-AArch64-bootstrap.patch new file mode 100644 index 00000000..ada07668 --- /dev/null +++ b/patches/opnfv-fuel/0012-mcp-salt-formulas-armband-AArch64-bootstrap.patch @@ -0,0 +1,90 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: Copyright (c) 2017 Enea AB and others. +: +: All rights reserved. This program and the accompanying materials +: are made available under the terms of the Apache License, Version 2.0 +: which accompanies this distribution, and is available at +: http://www.apache.org/licenses/LICENSE-2.0 +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +From: Alexandru Avadanii +Date: Mon, 21 Aug 2017 20:53:03 +0200 +Subject: [PATCH] mcp: salt-formulas: armband: AArch64 bootstrap + +Recent changes in salt bootstrap script from [1] whitelist a +fixed pool of known architectures. Add "arm64" to that list on the +fly, as part of `config.gather_bootstrap_script`. + +NOTE: This change will be leveraged by passing a custom DEB repo to +the bootstrap script with `-R linux.enea.com/saltstack`. + +NOTE: After running this new state, salt-minion should be restarted +to pick up the changes, so we'll run it before rebooting kvm nodes. + +[1] http://bootstrap.saltstack.com + +Signed-off-by: Alexandru Avadanii +--- + mcp/config/states/maas | 1 + + .../armband/bootstrap_script_arm64.sls | 4 +++ + mcp/salt-formulas/armband/files/cloud.py.diff | 29 ++++++++++++++++++++++ + 3 files changed, 34 insertions(+) + create mode 100644 mcp/salt-formulas/armband/bootstrap_script_arm64.sls + create mode 100644 mcp/salt-formulas/armband/files/cloud.py.diff + +diff --git a/mcp/config/states/maas b/mcp/config/states/maas +index f6de2cb..22d83be 100755 +--- a/mcp/config/states/maas ++++ b/mcp/config/states/maas +@@ -81,6 +81,7 @@ salt -C '* and not cfg01* and not mas01*' saltutil.sync_all + + salt -C 'kvm*' pkg.install bridge-utils + salt -C 'kvm*' state.apply linux.network ++salt -C 'kvm*' state.apply armband.bootstrap_script_arm64 + salt -C 'kvm*' system.reboot + wait_for 90 "! salt 'kvm*' test.ping | tee /dev/stderr | fgrep -q 'Not connected'" + +diff --git a/mcp/salt-formulas/armband/bootstrap_script_arm64.sls b/mcp/salt-formulas/armband/bootstrap_script_arm64.sls +new file mode 100644 +index 0000000..845dedd +--- /dev/null ++++ b/mcp/salt-formulas/armband/bootstrap_script_arm64.sls +@@ -0,0 +1,4 @@ ++/usr/lib/python2.7/dist-packages/salt/utils/cloud.py: ++ file.patch: ++ - source: salt://armband/files/cloud.py.diff ++ - hash: "ecd450b187156c1f6a91ea272fd668b0" +diff --git a/mcp/salt-formulas/armband/files/cloud.py.diff b/mcp/salt-formulas/armband/files/cloud.py.diff +new file mode 100644 +index 0000000..75c3281 +--- /dev/null ++++ b/mcp/salt-formulas/armband/files/cloud.py.diff +@@ -0,0 +1,29 @@ ++From: Alexandru Avadanii ++Date: Sun Aug 20 18:18:53 2017 +0200 ++Subject: [PATCH] cloud.py: Allow AArch64 arch in salt bootstrap ++ ++Recent changes in salt bootstrap script from [1] whitelist a ++fixed pool of known architectures. Add "arm64" to that list on the ++fly, as part of `config.gather_bootstrap_script`. ++ ++NOTE: This change will be leveraged by passing a custom DEB repo to ++the bootstrap script with `-R linux.enea.com/saltstack`. ++ ++[1] http://bootstrap.saltstack.com ++ ++Signed-off-by: Alexandru Avadanii ++--- ++ ++diff --git a//usr/lib/python2.7/dist-packages/salt/utils/cloud.py b//usr/lib/python2.7/dist-packages/salt/utils/cloud.py ++--- a//usr/lib/python2.7/dist-packages/salt/utils/cloud.py +++++ b//usr/lib/python2.7/dist-packages/salt/utils/cloud.py ++@@ -2772,6 +2772,9 @@ ++ if not script_content: ++ raise ValueError('No content in bootstrap script !') ++ +++ # NOTE(armband): edit bootstrap script on the fly to allow AArch64 +++ script_content = script_content.replace('"amd64")', '"amd64"|"arm64")') +++ ++ # Get the path to the built-in deploy scripts directory ++ builtin_deploy_dir = os.path.join( ++ os.path.dirname(__file__), diff --git a/patches/opnfv-fuel/0013-mcp-salt-formulas-armband-Extend-libvirt_domain.patch b/patches/opnfv-fuel/0013-mcp-salt-formulas-armband-Extend-libvirt_domain.patch deleted file mode 100644 index 96715959..00000000 --- a/patches/opnfv-fuel/0013-mcp-salt-formulas-armband-Extend-libvirt_domain.patch +++ /dev/null @@ -1,105 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: All rights reserved. This program and the accompanying materials -: are made available under the terms of the Apache License, Version 2.0 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii -Date: Sun, 20 Aug 2017 22:41:26 +0200 -Subject: [PATCH] mcp: salt-formulas: armband: Extend libvirt_domain - -Add new state in armband salt formula that extends salt's virt -libvirt_domain.jinja template with support for: -- hw_firmware_type; -- virt_machine_model; -- cpu_model; - -These will later be leveraged via salt virt formula with AArch64 -specific values. - -Signed-off-by: Alexandru Avadanii ---- - mcp/config/states/maas | 2 +- - .../armband/files/libvirt_domain.jinja.diff | 46 ++++++++++++++++++++++ - .../armband/libvirt_domain_template.sls | 4 ++ - 3 files changed, 51 insertions(+), 1 deletion(-) - create mode 100644 mcp/salt-formulas/armband/files/libvirt_domain.jinja.diff - create mode 100644 mcp/salt-formulas/armband/libvirt_domain_template.sls - -diff --git a/mcp/config/states/maas b/mcp/config/states/maas -index 787d713..633f544 100755 ---- a/mcp/config/states/maas -+++ b/mcp/config/states/maas -@@ -81,7 +81,7 @@ wait_for 90 "! salt 'kvm*' test.ping | tee /dev/stderr | fgrep -q 'Not connected - - salt -C '* and not cfg01* and not mas01*' state.apply linux,ntp - --salt -C 'kvm*' state.sls armband -+salt -C 'kvm*' state.sls armband,armband.libvirt_domain_template - salt -C 'kvm*' state.sls libvirt - - salt -C '* and not cfg01* and not mas01*' state.apply salt -diff --git a/mcp/salt-formulas/armband/files/libvirt_domain.jinja.diff b/mcp/salt-formulas/armband/files/libvirt_domain.jinja.diff -new file mode 100644 -index 0000000..4e7fad5 ---- /dev/null -+++ b/mcp/salt-formulas/armband/files/libvirt_domain.jinja.diff -@@ -0,0 +1,46 @@ -+From: Alexandru Avadanii -+Date: Sun Aug 20 18:18:53 2017 +0200 -+Subject: [PATCH] libvirt_domain.jinja: Add AArch64 support -+ -+Salt virt state relies on a Jinja template to create a libvirt -+XML definition for each new VM. -+This template needs to be extended with a few specific options -+for AArch64: -+- UEFI loader support (pflash); -+- custom machine model (e.g. 'virt-2.9'), since AArch64 defaults to -+ 'integratorcp'; -+- custom cpu model; -+ -+Allow all these to be parametrized from the salt virt formula, -+which we will also adapt to allow the params to be passed via our -+reclass model. -+ -+Signed-off-by: Alexandru Avadanii -+--- -+ -+diff --git a/usr/lib/python2.7/dist-packages/salt/templates/virt/libvirt_domain.jinja b/usr/lib/python2.7/dist-packages/salt/templates/virt/libvirt_domain.jinja -+--- a/usr/lib/python2.7/dist-packages/salt/templates/virt/libvirt_domain.jinja -++++ b/usr/lib/python2.7/dist-packages/salt/templates/virt/libvirt_domain.jinja -+@@ -3,11 +3,22 @@ -+ {{ cpu }} -+ {{ mem }} -+ -++ {% if custom_virt_machine %} -++ hvm -++ {% else %} -+ hvm -++ {% endif %} -++ {% if os_loader_type == 'pflash' %} -++ {{ os_loader }} -++ {{ os_loader_nvram }} -++ {% endif %} -+ {% for dev in boot_dev %} -+ -+ {% endfor %} -+ -++ {% if cpu_mode == 'custom' %} -++ -++ {% endif %} -+ -+ {% for diskname, disk in disks.items() %} -+ -diff --git a/mcp/salt-formulas/armband/libvirt_domain_template.sls b/mcp/salt-formulas/armband/libvirt_domain_template.sls -new file mode 100644 -index 0000000..7cc8e22 ---- /dev/null -+++ b/mcp/salt-formulas/armband/libvirt_domain_template.sls -@@ -0,0 +1,4 @@ -+/usr/lib/python2.7/dist-packages/salt/templates/virt/libvirt_domain.jinja: -+ file.patch: -+ - source: salt://armband/files/libvirt_domain.jinja.diff -+ - hash: "9d02cd8aa04497c2d75c72840a5c6c41" diff --git a/patches/opnfv-fuel/0013-seedng-module-Add-AArch64-repo.patch b/patches/opnfv-fuel/0013-seedng-module-Add-AArch64-repo.patch new file mode 100644 index 00000000..24789a07 --- /dev/null +++ b/patches/opnfv-fuel/0013-seedng-module-Add-AArch64-repo.patch @@ -0,0 +1,59 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: Copyright (c) 2017 Enea AB and others. +: +: All rights reserved. This program and the accompanying materials +: are made available under the terms of the Apache License, Version 2.0 +: which accompanies this distribution, and is available at +: http://www.apache.org/licenses/LICENSE-2.0 +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +From: Alexandru Avadanii +Date: Mon, 21 Aug 2017 20:42:00 +0200 +Subject: [PATCH] seedng: module: Add AArch64 repo + +salt custom py module seedng.py should use custom repo arg +"-R linux.enea.com/saltstack" on AArch64 nodes. + +Signed-off-by: Alexandru Avadanii +--- + .../0105-seedng-module-Add-AArch64-repo.patch | 22 ++++++++++++++++++++++ + mcp/patches/patches.list | 1 + + 2 files changed, 23 insertions(+) + create mode 100644 mcp/patches/0105-seedng-module-Add-AArch64-repo.patch + +diff --git a/mcp/patches/0105-seedng-module-Add-AArch64-repo.patch b/mcp/patches/0105-seedng-module-Add-AArch64-repo.patch +new file mode 100644 +index 0000000..d40e63b +--- /dev/null ++++ b/mcp/patches/0105-seedng-module-Add-AArch64-repo.patch +@@ -0,0 +1,22 @@ ++From: Alexandru Avadanii ++Date: Mon, 21 Aug 2017 02:03:01 +0200 ++Subject: [PATCH] seedng: module: Add AArch64 repo ++ ++salt custom py module seedng.py should use custom repo arg ++"-R linux.enea.com/saltstack" on AArch64 nodes. ++ ++Signed-off-by: Alexandru Avadanii ++--- ++ ++diff --git a/_modules/seedng.py b/_modules/seedng.py ++--- a/_modules/seedng.py +++++ b/_modules/seedng.py ++@@ -257,6 +257,7 @@ ++ or salt.syspaths.BOOTSTRAP) ++ # Exec the chroot command ++- arg = 'stable {0}'.format('.'.join(salt.version.__version__.split('.')[:2])) +++ arg = '-R linux.enea.com/saltstack ' if os.uname()[-1] == 'aarch64' else '' +++ arg += 'stable {0}'.format('.'.join(salt.version.__version__.split('.')[:2])) ++ cmd = 'if type salt-minion; then exit 0; ' ++ cmd += 'else sh {0} -c /tmp {1}; fi'.format( ++ os.path.join(tmppath, 'bootstrap-salt.sh'), arg) +diff --git a/mcp/patches/patches.list b/mcp/patches/patches.list +index f6504ab..1faa164 100644 +--- a/mcp/patches/patches.list ++++ b/mcp/patches/patches.list +@@ -11,3 +11,4 @@ + /usr/share/salt-formulas/env: 0102-libvirt-unix_sock_group-s-libvirtd-libvirt.patch + /usr/share/salt-formulas/env: 0103-virtng-module-Extend-libvirt_domain.patch + /usr/share/salt-formulas/env: 0104-salt-control-virt-Extend-libvirt_domain.patch ++/usr/share/salt-formulas/env: 0105-seedng-module-Add-AArch64-repo.patch diff --git a/patches/opnfv-fuel/0014-lib.sh-rm-Ubuntu-boot-entry-on-EFI-systems.patch b/patches/opnfv-fuel/0014-lib.sh-rm-Ubuntu-boot-entry-on-EFI-systems.patch new file mode 100644 index 00000000..aa6aa5a3 --- /dev/null +++ b/patches/opnfv-fuel/0014-lib.sh-rm-Ubuntu-boot-entry-on-EFI-systems.patch @@ -0,0 +1,60 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: Copyright (c) 2017 Enea AB and others. +: +: All rights reserved. This program and the accompanying materials +: are made available under the terms of the Apache License, Version 2.0 +: which accompanies this distribution, and is available at +: http://www.apache.org/licenses/LICENSE-2.0 +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +From: Alexandru Avadanii +Date: Thu, 24 Aug 2017 04:09:59 +0200 +Subject: [PATCH] lib.sh: rm Ubuntu boot entry on EFI systems + +On EFI-enabled systems, grub-install from grub-efi-* package +installs a boot entry named "ubuntu". + +MaaS relies on IPMI to set boot order to PXE first; however +on systems with buggy firmware or without full IPMI support, +that fails, leading to booting Ubuntu from hard disk instead. + +Work around this by clearing any previous Ubuntu boot entry +from board flash, before starting a new baremetal deploy. + +NOTE: This only runs against nodes that are online from a +previous deploy. + +Closes: ARMBAND-47 + +Signed-off-by: Alexandru Avadanii +--- + mcp/scripts/lib.sh | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh +index e123e52..2da13c0 100644 +--- a/mcp/scripts/lib.sh ++++ b/mcp/scripts/lib.sh +@@ -28,6 +28,15 @@ get_base_image() { + wget -P "${image_dir}" -N "${base_image}" + } + ++cleanup_uefi() { ++ # Clean up Ubuntu boot entry if cfg01, kvm nodes online from previous deploy ++ # shellcheck disable=SC2086 ++ ssh ${SSH_OPTS} "ubuntu@${SALT_MASTER}" "sudo salt -C 'kvm* or cmp*' cmd.run \ ++ \"which efibootmgr > /dev/null 2>&1 && \ ++ efibootmgr | grep -oP '(?<=Boot)[0-9]+(?=.*ubuntu)' | \ ++ xargs -I{} efibootmgr --delete-bootnum --bootnum {}\"" || true ++} ++ + cleanup_vms() { + # clean up existing nodes + for node in $(virsh list --name | grep -P '\w{3}\d{2}'); do +@@ -45,6 +54,7 @@ prepare_vms() { + local base_image=$2 + local image_dir=$3 + ++ cleanup_uefi + cleanup_vms + get_base_image "${base_image}" "${image_dir}" + # shellcheck disable=SC2016 diff --git a/patches/opnfv-fuel/0014-virtng.py-virt.sls-Extend-libvirt_domain.patch b/patches/opnfv-fuel/0014-virtng.py-virt.sls-Extend-libvirt_domain.patch deleted file mode 100644 index fba8be30..00000000 --- a/patches/opnfv-fuel/0014-virtng.py-virt.sls-Extend-libvirt_domain.patch +++ /dev/null @@ -1,263 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: All rights reserved. This program and the accompanying materials -: are made available under the terms of the Apache License, Version 2.0 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii -Date: Mon, 21 Aug 2017 01:10:16 +0200 -Subject: [PATCH] virtng.py, virt.sls: Extend libvirt_domain - -Extend _modules/virtng.py, salt/control/virt.sls with support for: -- hw_firmware_type; -- virt_machine_model; -- cpu_model; - -This functionality relies on the corresponding changes to be -implemented in libvirt_domain.jinja template. - -These will later be leveraged via our reclass model with AArch64 -specific values. - -Signed-off-by: Alexandru Avadanii ---- - .../0103-virtng-module-Extend-libvirt_domain.patch | 54 ++++++++++++++++++++++ - ...4-salt-control-virt-Extend-libvirt_domain.patch | 51 ++++++++++++++++++++ - mcp/patches/patches.list | 2 + - .../baremetal-mcp-ocata-odl-ha/infra/kvm.yml | 18 ++++++++ - .../baremetal-mcp-ocata-ovs-ha/infra/kvm.yml | 15 ++++++ - 5 files changed, 140 insertions(+) - create mode 100644 mcp/patches/0103-virtng-module-Extend-libvirt_domain.patch - create mode 100644 mcp/patches/0104-salt-control-virt-Extend-libvirt_domain.patch - -diff --git a/mcp/patches/0103-virtng-module-Extend-libvirt_domain.patch b/mcp/patches/0103-virtng-module-Extend-libvirt_domain.patch -new file mode 100644 -index 0000000..706b67d ---- /dev/null -+++ b/mcp/patches/0103-virtng-module-Extend-libvirt_domain.patch -@@ -0,0 +1,54 @@ -+From: Alexandru Avadanii -+Date: Mon, 21 Aug 2017 02:03:01 +0200 -+Subject: [PATCH] virtng: module: Extend libvirt_domain -+ -+Extend virtng.py with support for passing down new params: -+- hw_firmware_type; -+- virt_machine_model; -+- cpu_model; -+ -+This functionality relies on the corresponding changes to be -+implemented in libvirt_domain.jinja template. -+ -+These will later be leveraged via salt virt formula with AArch64 -+specific values. -+ -+Signed-off-by: Alexandru Avadanii -+--- -+ -+diff --git a/_modules/virtng.py b/_modules/virtng.py -+--- a/_modules/virtng.py -++++ b/_modules/virtng.py -+@@ -56,6 +56,10 @@ -+ -+ VIRT_DEFAULT_HYPER = 'kvm' -+ -++DEFAULT_UEFI_LOADER_PATH = { -++ "x86_64": "/usr/share/OVMF/OVMF_CODE.fd", -++ "aarch64": "/usr/share/AAVMF/AAVMF_CODE.fd" -++} -+ -+ def __virtual__(): -+ if not HAS_ALL_IMPORTS: -+@@ -227,6 +231,21 @@ -+ # TODO: make bus and model parameterized, this works for 64-bit Linux -+ context['controller_model'] = 'lsilogic' -+ -++ # TODO: limit cpu_model, hw_firmware_type, virt_machine_type to qemu/kvm -++ # FIXME: parametrize hardcoded path for NVRAM storage -++ if 'hw_firmware_type' in kwargs and kwargs['hw_firmware_type'] == 'uefi': -++ context['os_loader_type'] = 'pflash' -++ context['os_loader'] = DEFAULT_UEFI_LOADER_PATH[os.uname()[-1]] -++ context['os_loader_nvram'] = '/var/lib/libvirt/qemu/nvram/{0}_VARS.fd'.format(name) -++ -++ if 'virt_machine_model' in kwargs: -++ context['custom_virt_machine'] = True -++ context['virt_machine_model'] = kwargs['virt_machine_model'] -++ -++ if 'cpu_model' in kwargs: -++ context['cpu_mode'] = 'custom' -++ context['cpu_model'] = kwargs['cpu_model'] -++ -+ if 'boot_dev' in kwargs: -+ context['boot_dev'] = [] -+ for dev in kwargs['boot_dev'].split(): -diff --git a/mcp/patches/0104-salt-control-virt-Extend-libvirt_domain.patch b/mcp/patches/0104-salt-control-virt-Extend-libvirt_domain.patch -new file mode 100644 -index 0000000..a9fe11b ---- /dev/null -+++ b/mcp/patches/0104-salt-control-virt-Extend-libvirt_domain.patch -@@ -0,0 +1,51 @@ -+From: Alexandru Avadanii -+Date: Mon, 21 Aug 2017 02:03:01 +0200 -+Subject: [PATCH] salt: control: virt: Extend libvirt_domain -+ -+Extend salt/control/virt.sls with support for new params: -+- hw_firmware_type; -+- virt_machine_model; -+- cpu_model; -+ -+This functionality relies on the corresponding changes to be -+implemented in libvirt_domain.jinja template, as well as in -+salt custom py module virtng.py. -+ -+These will later be leveraged via reclass model with AArch64 -+specific values. -+ -+FIXME: Move all new params to different section, as "size" is -+definitely not the best choice. -+ -+Example reclass model usage: -+salt: -+ control: -+ size: -+ openstack.example_vm_type: -+ hw_firmware_type: uefi -+ virt_machine_model: virt -+ cpu_model: host-passthrough -+ -+Signed-off-by: Alexandru Avadanii -+--- -+ -+diff --git a/salt/control/virt.sls b/salt/control/virt.sls -+--- a/salt/control/virt.sls -++++ b/salt/control/virt.sls -+@@ -44,6 +44,16 @@ -+ seed: True -+ serial_type: pty -+ console: True -++ # FIXME(armband): Move these 3 params to different section -++ {%- if size.hw_firmware_type is defined %} -++ hw_firmware_type: {{ size.hw_firmware_type }} -++ {%- endif %} -++ {%- if size.virt_machine_model is defined %} -++ virt_machine_model: {{ size.virt_machine_model }} -++ {%- endif %} -++ {%- if size.cpu_model is defined %} -++ cpu_model: {{ size.cpu_model }} -++ {%- endif %} -+ - unless: virsh list --all --name| grep -E "^{{ node_name }}.{{ cluster.domain }}$" -+ -+ #salt_control_seed_{{ cluster_name }}_{{ node_name }}: -diff --git a/mcp/patches/patches.list b/mcp/patches/patches.list -index 46a9556..f6504ab 100644 ---- a/mcp/patches/patches.list -+++ b/mcp/patches/patches.list -@@ -9,3 +9,5 @@ - /usr/share/salt-formulas/env: 0009-seedng-module-Sync-salt-version.patch - /usr/share/salt-formulas/env: 0101-maas-Add-curtin_userdata_arm64_generic_xenial.patch - /usr/share/salt-formulas/env: 0102-libvirt-unix_sock_group-s-libvirtd-libvirt.patch -+/usr/share/salt-formulas/env: 0103-virtng-module-Extend-libvirt_domain.patch -+/usr/share/salt-formulas/env: 0104-salt-control-virt-Extend-libvirt_domain.patch -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/kvm.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/kvm.yml -index 766a495..f072e0e 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/kvm.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/kvm.yml -@@ -34,26 +34,41 @@ parameters: - openstack.control: - cpu: 4 - ram: 10240 -+ hw_firmware_type: uefi -+ virt_machine_model: virt -+ cpu_model: host-passthrough - disk_profile: small - net_profile: default - openstack.database: - cpu: 4 - ram: 8192 -+ hw_firmware_type: uefi -+ virt_machine_model: virt -+ cpu_model: host-passthrough - disk_profile: large - net_profile: default - openstack.message_queue: - cpu: 4 - ram: 2048 -+ hw_firmware_type: uefi -+ virt_machine_model: virt -+ cpu_model: host-passthrough - disk_profile: small - net_profile: default - openstack.telemetry: - cpu: 2 - ram: 3072 -+ hw_firmware_type: uefi -+ virt_machine_model: virt -+ cpu_model: host-passthrough - disk_profile: xxlarge - net_profile: default - openstack.proxy: - cpu: 2 - ram: 2048 -+ hw_firmware_type: uefi -+ virt_machine_model: virt -+ cpu_model: host-passthrough - disk_profile: small - net_profile: default - # stacklight.log: -@@ -74,6 +89,9 @@ parameters: - opendaylight.server: - cpu: 4 - ram: 6144 -+ hw_firmware_type: uefi -+ virt_machine_model: virt -+ cpu_model: host-passthrough - disk_profile: small - net_profile: default - cluster: -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/kvm.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/kvm.yml -index ca1b44b..78011a9 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/kvm.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/kvm.yml -@@ -34,26 +34,41 @@ parameters: - openstack.control: - cpu: 4 - ram: 10240 -+ hw_firmware_type: uefi -+ virt_machine_model: virt -+ cpu_model: host-passthrough - disk_profile: small - net_profile: default - openstack.database: - cpu: 4 - ram: 8192 -+ hw_firmware_type: uefi -+ virt_machine_model: virt -+ cpu_model: host-passthrough - disk_profile: large - net_profile: default - openstack.message_queue: - cpu: 4 - ram: 2048 -+ hw_firmware_type: uefi -+ virt_machine_model: virt -+ cpu_model: host-passthrough - disk_profile: small - net_profile: default - openstack.telemetry: - cpu: 2 - ram: 3072 -+ hw_firmware_type: uefi -+ virt_machine_model: virt -+ cpu_model: host-passthrough - disk_profile: xxlarge - net_profile: default - openstack.proxy: - cpu: 2 - ram: 2048 -+ hw_firmware_type: uefi -+ virt_machine_model: virt -+ cpu_model: host-passthrough - disk_profile: small - net_profile: default - # stacklight.log: diff --git a/patches/opnfv-fuel/0015-aarch64-skip-configuration-of-hugepages.patch b/patches/opnfv-fuel/0015-aarch64-skip-configuration-of-hugepages.patch new file mode 100644 index 00000000..e2677d32 --- /dev/null +++ b/patches/opnfv-fuel/0015-aarch64-skip-configuration-of-hugepages.patch @@ -0,0 +1,96 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: Copyright (c) 2017 Enea AB and others. +: +: All rights reserved. This program and the accompanying materials +: are made available under the terms of the Apache License, Version 2.0 +: which accompanies this distribution, and is available at +: http://www.apache.org/licenses/LICENSE-2.0 +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +From: Charalampos Kominos +Date: Thu, 24 Aug 2017 19:28:14 +0200 +Subject: [PATCH] aarch64: skip configuration of hugepages + +The reclass model contains instructions on how to setup nova.conf. +Those instructions need to be overwritten for ARM. + +Signed-off-by: Guillermo Herrero +Signed-off-by: Charalampos Kominos +--- + .../cluster/baremetal-mcp-ocata-odl-ha/openstack/compute.yml | 4 ++-- + .../cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml | 10 +++++----- + .../cluster/baremetal-mcp-ocata-ovs-ha/openstack/compute.yml | 4 ++-- + .../cluster/baremetal-mcp-ocata-ovs-ha/openstack/init.yml | 10 +++++----- + 4 files changed, 14 insertions(+), 14 deletions(-) + +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/compute.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/compute.yml +index 3dd94e6..cfdba30 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/compute.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/compute.yml +@@ -4,8 +4,8 @@ classes: + - system.linux.system.repo.saltstack.xenial + - system.linux.storage.loopback + - system.nova.compute.cluster +-- system.nova.compute.nfv.hugepages +-- system.nova.compute.nfv.cpu_pinning ++#- system.nova.compute.nfv.hugepages ++#- system.nova.compute.nfv.cpu_pinning + - system.neutron.gateway.opendaylight.single + - system.neutron.gateway.cluster + - system.cinder.volume.single +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml +index ad99447..ea95680 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml +@@ -100,11 +100,11 @@ parameters: + rabbitmq_secret_key: opnfv_secret + rabbitmq_admin_password: opnfv_secret + rabbitmq_openstack_password: opnfv_secret +- nova_cpu_pinning: "1,2,3,4,5,7,8,9,10,11" +- compute_hugepages_size: 1G +- compute_hugepages_count: 16 +- compute_hugepages_mount: /mnt/hugepages_1G +- compute_kernel_isolcpu: ${_param:nova_cpu_pinning} ++ #nova_cpu_pinning: "1,2,3,4,5,7,8,9,10,11" ++ #compute_hugepages_size: 1G ++ #compute_hugepages_count: 16 ++ #compute_hugepages_mount: /mnt/hugepages_1G ++ #compute_kernel_isolcpu: ${_param:nova_cpu_pinning} + glance_version: ${_param:openstack_version} + glance_service_host: ${_param:openstack_control_address} + keystone_version: ${_param:openstack_version} +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/compute.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/compute.yml +index cea8c81..3c48cff 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/compute.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/compute.yml +@@ -4,8 +4,8 @@ classes: + - system.linux.system.repo.saltstack.xenial + - system.linux.storage.loopback + - system.nova.compute.cluster +-- system.nova.compute.nfv.hugepages +-- system.nova.compute.nfv.cpu_pinning ++#- system.nova.compute.nfv.hugepages ++#- system.nova.compute.nfv.cpu_pinning + - system.neutron.gateway.cluster + - system.cinder.volume.single + - system.cinder.volume.backend.lvm +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/init.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/init.yml +index 90e0cf3..c1452b4 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/init.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/init.yml +@@ -94,11 +94,11 @@ parameters: + rabbitmq_secret_key: opnfv_secret + rabbitmq_admin_password: opnfv_secret + rabbitmq_openstack_password: opnfv_secret +- nova_cpu_pinning: "1,2,3,4,5,7,8,9,10,11" +- compute_hugepages_size: 1G +- compute_hugepages_count: 16 +- compute_hugepages_mount: /mnt/hugepages_1G +- compute_kernel_isolcpu: ${_param:nova_cpu_pinning} ++ # nova_cpu_pinning: "1,2,3,4,5,7,8,9,10,11" ++ # compute_hugepages_size: 1G ++ # compute_hugepages_count: 16 ++ # compute_hugepages_mount: /mnt/hugepages_1G ++ # compute_kernel_isolcpu: ${_param:nova_cpu_pinning} + glance_version: ${_param:openstack_version} + glance_service_host: ${_param:openstack_control_address} + keystone_version: ${_param:openstack_version} diff --git a/patches/opnfv-fuel/0015-mcp-salt-formulas-armband-AArch64-bootstrap.patch b/patches/opnfv-fuel/0015-mcp-salt-formulas-armband-AArch64-bootstrap.patch deleted file mode 100644 index b0897e7a..00000000 --- a/patches/opnfv-fuel/0015-mcp-salt-formulas-armband-AArch64-bootstrap.patch +++ /dev/null @@ -1,90 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: All rights reserved. This program and the accompanying materials -: are made available under the terms of the Apache License, Version 2.0 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii -Date: Mon, 21 Aug 2017 20:53:03 +0200 -Subject: [PATCH] mcp: salt-formulas: armband: AArch64 bootstrap - -Recent changes in salt bootstrap script from [1] whitelist a -fixed pool of known architectures. Add "arm64" to that list on the -fly, as part of `config.gather_bootstrap_script`. - -NOTE: This change will be leveraged by passing a custom DEB repo to -the bootstrap script with `-R linux.enea.com/saltstack`. - -NOTE: After running this new state, salt-minion should be restarted -to pick up the changes, so we'll run it before rebooting kvm nodes. - -[1] http://bootstrap.saltstack.com - -Signed-off-by: Alexandru Avadanii ---- - mcp/config/states/maas | 1 + - .../armband/bootstrap_script_arm64.sls | 4 +++ - mcp/salt-formulas/armband/files/cloud.py.diff | 29 ++++++++++++++++++++++ - 3 files changed, 34 insertions(+) - create mode 100644 mcp/salt-formulas/armband/bootstrap_script_arm64.sls - create mode 100644 mcp/salt-formulas/armband/files/cloud.py.diff - -diff --git a/mcp/config/states/maas b/mcp/config/states/maas -index 633f544..c54225d 100755 ---- a/mcp/config/states/maas -+++ b/mcp/config/states/maas -@@ -76,6 +76,7 @@ salt -C '* and not cfg01* and not mas01*' saltutil.sync_all - - salt -C 'kvm*' pkg.install bridge-utils - salt -C 'kvm*' state.apply linux.network -+salt -C 'kvm*' state.apply armband.bootstrap_script_arm64 - salt -C 'kvm*' system.reboot - wait_for 90 "! salt 'kvm*' test.ping | tee /dev/stderr | fgrep -q 'Not connected'" - -diff --git a/mcp/salt-formulas/armband/bootstrap_script_arm64.sls b/mcp/salt-formulas/armband/bootstrap_script_arm64.sls -new file mode 100644 -index 0000000..845dedd ---- /dev/null -+++ b/mcp/salt-formulas/armband/bootstrap_script_arm64.sls -@@ -0,0 +1,4 @@ -+/usr/lib/python2.7/dist-packages/salt/utils/cloud.py: -+ file.patch: -+ - source: salt://armband/files/cloud.py.diff -+ - hash: "ecd450b187156c1f6a91ea272fd668b0" -diff --git a/mcp/salt-formulas/armband/files/cloud.py.diff b/mcp/salt-formulas/armband/files/cloud.py.diff -new file mode 100644 -index 0000000..75c3281 ---- /dev/null -+++ b/mcp/salt-formulas/armband/files/cloud.py.diff -@@ -0,0 +1,29 @@ -+From: Alexandru Avadanii -+Date: Sun Aug 20 18:18:53 2017 +0200 -+Subject: [PATCH] cloud.py: Allow AArch64 arch in salt bootstrap -+ -+Recent changes in salt bootstrap script from [1] whitelist a -+fixed pool of known architectures. Add "arm64" to that list on the -+fly, as part of `config.gather_bootstrap_script`. -+ -+NOTE: This change will be leveraged by passing a custom DEB repo to -+the bootstrap script with `-R linux.enea.com/saltstack`. -+ -+[1] http://bootstrap.saltstack.com -+ -+Signed-off-by: Alexandru Avadanii -+--- -+ -+diff --git a//usr/lib/python2.7/dist-packages/salt/utils/cloud.py b//usr/lib/python2.7/dist-packages/salt/utils/cloud.py -+--- a//usr/lib/python2.7/dist-packages/salt/utils/cloud.py -++++ b//usr/lib/python2.7/dist-packages/salt/utils/cloud.py -+@@ -2772,6 +2772,9 @@ -+ if not script_content: -+ raise ValueError('No content in bootstrap script !') -+ -++ # NOTE(armband): edit bootstrap script on the fly to allow AArch64 -++ script_content = script_content.replace('"amd64")', '"amd64"|"arm64")') -++ -+ # Get the path to the built-in deploy scripts directory -+ builtin_deploy_dir = os.path.join( -+ os.path.dirname(__file__), diff --git a/patches/opnfv-fuel/0016-baremetal-odl-Extend-arch-list-for-UCA-repo.patch b/patches/opnfv-fuel/0016-baremetal-odl-Extend-arch-list-for-UCA-repo.patch new file mode 100644 index 00000000..8f10da2a --- /dev/null +++ b/patches/opnfv-fuel/0016-baremetal-odl-Extend-arch-list-for-UCA-repo.patch @@ -0,0 +1,32 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: Copyright (c) 2017 Enea AB and others. +: +: All rights reserved. This program and the accompanying materials +: are made available under the terms of the Apache License, Version 2.0 +: which accompanies this distribution, and is available at +: http://www.apache.org/licenses/LICENSE-2.0 +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +From: Alexandru Avadanii +Date: Wed, 30 Aug 2017 22:15:07 +0200 +Subject: [PATCH] baremetal: odl: Extend arch list for UCA repo + +JIRA: https://jira.opnfv.org/browse/ARMBAND-304 + +Signed-off-by: Alexandru Avadanii +--- + .../classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml +index ea95680..9b39962 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml +@@ -201,7 +201,7 @@ parameters: + repo: + uca: + source: "deb http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/ocata main" +- architectures: amd64 ++ architectures: amd64,arm64 + key_id: EC4926EA + key_server: keyserver.ubuntu.com + kernel: diff --git a/patches/opnfv-fuel/0016-seedng-module-Add-AArch64-repo.patch b/patches/opnfv-fuel/0016-seedng-module-Add-AArch64-repo.patch deleted file mode 100644 index 24789a07..00000000 --- a/patches/opnfv-fuel/0016-seedng-module-Add-AArch64-repo.patch +++ /dev/null @@ -1,59 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: All rights reserved. This program and the accompanying materials -: are made available under the terms of the Apache License, Version 2.0 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii -Date: Mon, 21 Aug 2017 20:42:00 +0200 -Subject: [PATCH] seedng: module: Add AArch64 repo - -salt custom py module seedng.py should use custom repo arg -"-R linux.enea.com/saltstack" on AArch64 nodes. - -Signed-off-by: Alexandru Avadanii ---- - .../0105-seedng-module-Add-AArch64-repo.patch | 22 ++++++++++++++++++++++ - mcp/patches/patches.list | 1 + - 2 files changed, 23 insertions(+) - create mode 100644 mcp/patches/0105-seedng-module-Add-AArch64-repo.patch - -diff --git a/mcp/patches/0105-seedng-module-Add-AArch64-repo.patch b/mcp/patches/0105-seedng-module-Add-AArch64-repo.patch -new file mode 100644 -index 0000000..d40e63b ---- /dev/null -+++ b/mcp/patches/0105-seedng-module-Add-AArch64-repo.patch -@@ -0,0 +1,22 @@ -+From: Alexandru Avadanii -+Date: Mon, 21 Aug 2017 02:03:01 +0200 -+Subject: [PATCH] seedng: module: Add AArch64 repo -+ -+salt custom py module seedng.py should use custom repo arg -+"-R linux.enea.com/saltstack" on AArch64 nodes. -+ -+Signed-off-by: Alexandru Avadanii -+--- -+ -+diff --git a/_modules/seedng.py b/_modules/seedng.py -+--- a/_modules/seedng.py -++++ b/_modules/seedng.py -+@@ -257,6 +257,7 @@ -+ or salt.syspaths.BOOTSTRAP) -+ # Exec the chroot command -+- arg = 'stable {0}'.format('.'.join(salt.version.__version__.split('.')[:2])) -++ arg = '-R linux.enea.com/saltstack ' if os.uname()[-1] == 'aarch64' else '' -++ arg += 'stable {0}'.format('.'.join(salt.version.__version__.split('.')[:2])) -+ cmd = 'if type salt-minion; then exit 0; ' -+ cmd += 'else sh {0} -c /tmp {1}; fi'.format( -+ os.path.join(tmppath, 'bootstrap-salt.sh'), arg) -diff --git a/mcp/patches/patches.list b/mcp/patches/patches.list -index f6504ab..1faa164 100644 ---- a/mcp/patches/patches.list -+++ b/mcp/patches/patches.list -@@ -11,3 +11,4 @@ - /usr/share/salt-formulas/env: 0102-libvirt-unix_sock_group-s-libvirtd-libvirt.patch - /usr/share/salt-formulas/env: 0103-virtng-module-Extend-libvirt_domain.patch - /usr/share/salt-formulas/env: 0104-salt-control-virt-Extend-libvirt_domain.patch -+/usr/share/salt-formulas/env: 0105-seedng-module-Add-AArch64-repo.patch diff --git a/patches/opnfv-fuel/0017-Add-opnfv-user-to-the-deployment.patch b/patches/opnfv-fuel/0017-Add-opnfv-user-to-the-deployment.patch new file mode 100644 index 00000000..b2862992 --- /dev/null +++ b/patches/opnfv-fuel/0017-Add-opnfv-user-to-the-deployment.patch @@ -0,0 +1,88 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: Copyright (c) 2017 Enea AB and others. +: +: All rights reserved. This program and the accompanying materials +: are made available under the terms of the Apache License, Version 2.0 +: which accompanies this distribution, and is available at +: http://www.apache.org/licenses/LICENSE-2.0 +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +From: Charalampos Kominos +Date: Fri, 1 Sep 2017 12:24:35 +0200 +Subject: [PATCH] Add opnfv user to the deployment + +Signed-off-by: Alexandru Avadanii +Signed-off-by: Charalampos Kominos +Signed-off-by: Guillermo Herrero +--- + mcp/config/states/maas | 2 ++ + mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/opnfv.yml | 4 ++++ + .../classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml | 1 + + .../classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/init.yml | 1 + + mcp/salt-formulas/opnfv/adduser.sls | 7 +++++++ + 5 files changed, 15 insertions(+) + create mode 100644 mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/opnfv.yml + create mode 100644 mcp/salt-formulas/opnfv/adduser.sls + +diff --git a/mcp/config/states/maas b/mcp/config/states/maas +index 22d83be..03d336b 100755 +--- a/mcp/config/states/maas ++++ b/mcp/config/states/maas +@@ -80,6 +80,7 @@ salt -C 'mas01*' pillar.item\ + salt -C '* and not cfg01* and not mas01*' saltutil.sync_all + + salt -C 'kvm*' pkg.install bridge-utils ++salt -C '*' state.apply opnfv.adduser + salt -C 'kvm*' state.apply linux.network + salt -C 'kvm*' state.apply armband.bootstrap_script_arm64 + salt -C 'kvm*' system.reboot +@@ -103,6 +104,7 @@ while [ $rc -ne 0 ]; do + rc=0 + for node in $vcp_nodes; do + salt "$node" test.ping 2>/dev/null || { rc=$?; break; }; ++ salt -C "$node" state.apply opnfv.adduser + done + sleep 5 + done +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/opnfv.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/opnfv.yml +new file mode 100644 +index 0000000..4cea805 +--- /dev/null ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/opnfv.yml +@@ -0,0 +1,4 @@ ++parameters: ++ _param: ++ opnfv_user_username: opnfv ++ opnfv_user_password: $1$5/pIEHT1$XFBhNWW4Q8gYd19hczgPF1 +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml +index 393cbb3..eb0a8bc 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml +@@ -1,4 +1,5 @@ + classes: ++- cluster.baremetal-mcp-ocata-common.opnfv + - system.linux.system.single + - cluster.baremetal-mcp-ocata-odl-ha.openstack + # - cluster.baremetal-mcp-ocata-odl-ha.stacklight +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/init.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/init.yml +index 0b8bf2f..fb2acda 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/init.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/init.yml +@@ -1,4 +1,5 @@ + classes: ++- cluster.baremetal-mcp-ocata-common.opnfv + - system.linux.system.single + - cluster.baremetal-mcp-ocata-ovs-ha.openstack + # - cluster.baremetal-mcp-ocata-ovs-ha.stacklight +diff --git a/mcp/salt-formulas/opnfv/adduser.sls b/mcp/salt-formulas/opnfv/adduser.sls +new file mode 100644 +index 0000000..78ef993 +--- /dev/null ++++ b/mcp/salt-formulas/opnfv/adduser.sls +@@ -0,0 +1,7 @@ ++add_opnfv_user: ++ user.present: ++ - name: {{ salt['pillar.get']('_param:opnfv_user_username') }} ++ - password: {{ salt['pillar.get']('_param:opnfv_user_password') }} ++ - createhome: True ++ - groups: ++ - sudo diff --git a/patches/opnfv-fuel/0017-lib.sh-rm-Ubuntu-boot-entry-on-EFI-systems.patch b/patches/opnfv-fuel/0017-lib.sh-rm-Ubuntu-boot-entry-on-EFI-systems.patch deleted file mode 100644 index 8ce12c32..00000000 --- a/patches/opnfv-fuel/0017-lib.sh-rm-Ubuntu-boot-entry-on-EFI-systems.patch +++ /dev/null @@ -1,60 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: All rights reserved. This program and the accompanying materials -: are made available under the terms of the Apache License, Version 2.0 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii -Date: Thu, 24 Aug 2017 04:09:59 +0200 -Subject: [PATCH] lib.sh: rm Ubuntu boot entry on EFI systems - -On EFI-enabled systems, grub-install from grub-efi-* package -installs a boot entry named "ubuntu". - -MaaS relies on IPMI to set boot order to PXE first; however -on systems with buggy firmware or without full IPMI support, -that fails, leading to booting Ubuntu from hard disk instead. - -Work around this by clearing any previous Ubuntu boot entry -from board flash, before starting a new baremetal deploy. - -NOTE: This only runs against nodes that are online from a -previous deploy. - -Closes: ARMBAND-47 - -Signed-off-by: Alexandru Avadanii ---- - mcp/scripts/lib.sh | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh -index 94a9bd3..f1781e8 100644 ---- a/mcp/scripts/lib.sh -+++ b/mcp/scripts/lib.sh -@@ -28,6 +28,15 @@ get_base_image() { - wget -P "${image_dir}" -N "${base_image}" - } - -+cleanup_uefi() { -+ # Clean up Ubuntu boot entry if cfg01, kvm nodes online from previous deploy -+ # shellcheck disable=SC2086 -+ ssh ${SSH_OPTS} "ubuntu@${SALT_MASTER}" "sudo salt -C 'kvm* or cmp*' cmd.run \ -+ \"which efibootmgr > /dev/null 2>&1 && \ -+ efibootmgr | grep -oP '(?<=Boot)[0-9]+(?=.*ubuntu)' | \ -+ xargs -I{} efibootmgr --delete-bootnum --bootnum {}\"" || true -+} -+ - cleanup_vms() { - # clean up existing nodes - for node in $(virsh list --name | grep -P '\w{3}\d{2}'); do -@@ -45,6 +54,7 @@ prepare_vms() { - local base_image=$2 - local image_dir=$3 - -+ cleanup_uefi - cleanup_vms - get_base_image "${base_image}" "${image_dir}" - # shellcheck disable=SC2016 diff --git a/patches/opnfv-fuel/0018-aarch64-skip-configuration-of-hugepages.patch b/patches/opnfv-fuel/0018-aarch64-skip-configuration-of-hugepages.patch deleted file mode 100644 index e2677d32..00000000 --- a/patches/opnfv-fuel/0018-aarch64-skip-configuration-of-hugepages.patch +++ /dev/null @@ -1,96 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: All rights reserved. This program and the accompanying materials -: are made available under the terms of the Apache License, Version 2.0 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Charalampos Kominos -Date: Thu, 24 Aug 2017 19:28:14 +0200 -Subject: [PATCH] aarch64: skip configuration of hugepages - -The reclass model contains instructions on how to setup nova.conf. -Those instructions need to be overwritten for ARM. - -Signed-off-by: Guillermo Herrero -Signed-off-by: Charalampos Kominos ---- - .../cluster/baremetal-mcp-ocata-odl-ha/openstack/compute.yml | 4 ++-- - .../cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml | 10 +++++----- - .../cluster/baremetal-mcp-ocata-ovs-ha/openstack/compute.yml | 4 ++-- - .../cluster/baremetal-mcp-ocata-ovs-ha/openstack/init.yml | 10 +++++----- - 4 files changed, 14 insertions(+), 14 deletions(-) - -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/compute.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/compute.yml -index 3dd94e6..cfdba30 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/compute.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/compute.yml -@@ -4,8 +4,8 @@ classes: - - system.linux.system.repo.saltstack.xenial - - system.linux.storage.loopback - - system.nova.compute.cluster --- system.nova.compute.nfv.hugepages --- system.nova.compute.nfv.cpu_pinning -+#- system.nova.compute.nfv.hugepages -+#- system.nova.compute.nfv.cpu_pinning - - system.neutron.gateway.opendaylight.single - - system.neutron.gateway.cluster - - system.cinder.volume.single -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml -index ad99447..ea95680 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml -@@ -100,11 +100,11 @@ parameters: - rabbitmq_secret_key: opnfv_secret - rabbitmq_admin_password: opnfv_secret - rabbitmq_openstack_password: opnfv_secret -- nova_cpu_pinning: "1,2,3,4,5,7,8,9,10,11" -- compute_hugepages_size: 1G -- compute_hugepages_count: 16 -- compute_hugepages_mount: /mnt/hugepages_1G -- compute_kernel_isolcpu: ${_param:nova_cpu_pinning} -+ #nova_cpu_pinning: "1,2,3,4,5,7,8,9,10,11" -+ #compute_hugepages_size: 1G -+ #compute_hugepages_count: 16 -+ #compute_hugepages_mount: /mnt/hugepages_1G -+ #compute_kernel_isolcpu: ${_param:nova_cpu_pinning} - glance_version: ${_param:openstack_version} - glance_service_host: ${_param:openstack_control_address} - keystone_version: ${_param:openstack_version} -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/compute.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/compute.yml -index cea8c81..3c48cff 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/compute.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/compute.yml -@@ -4,8 +4,8 @@ classes: - - system.linux.system.repo.saltstack.xenial - - system.linux.storage.loopback - - system.nova.compute.cluster --- system.nova.compute.nfv.hugepages --- system.nova.compute.nfv.cpu_pinning -+#- system.nova.compute.nfv.hugepages -+#- system.nova.compute.nfv.cpu_pinning - - system.neutron.gateway.cluster - - system.cinder.volume.single - - system.cinder.volume.backend.lvm -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/init.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/init.yml -index 90e0cf3..c1452b4 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/init.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/openstack/init.yml -@@ -94,11 +94,11 @@ parameters: - rabbitmq_secret_key: opnfv_secret - rabbitmq_admin_password: opnfv_secret - rabbitmq_openstack_password: opnfv_secret -- nova_cpu_pinning: "1,2,3,4,5,7,8,9,10,11" -- compute_hugepages_size: 1G -- compute_hugepages_count: 16 -- compute_hugepages_mount: /mnt/hugepages_1G -- compute_kernel_isolcpu: ${_param:nova_cpu_pinning} -+ # nova_cpu_pinning: "1,2,3,4,5,7,8,9,10,11" -+ # compute_hugepages_size: 1G -+ # compute_hugepages_count: 16 -+ # compute_hugepages_mount: /mnt/hugepages_1G -+ # compute_kernel_isolcpu: ${_param:nova_cpu_pinning} - glance_version: ${_param:openstack_version} - glance_service_host: ${_param:openstack_control_address} - keystone_version: ${_param:openstack_version} diff --git a/patches/opnfv-fuel/0019-baremetal-odl-Extend-arch-list-for-UCA-repo.patch b/patches/opnfv-fuel/0019-baremetal-odl-Extend-arch-list-for-UCA-repo.patch deleted file mode 100644 index 8f10da2a..00000000 --- a/patches/opnfv-fuel/0019-baremetal-odl-Extend-arch-list-for-UCA-repo.patch +++ /dev/null @@ -1,32 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: All rights reserved. This program and the accompanying materials -: are made available under the terms of the Apache License, Version 2.0 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii -Date: Wed, 30 Aug 2017 22:15:07 +0200 -Subject: [PATCH] baremetal: odl: Extend arch list for UCA repo - -JIRA: https://jira.opnfv.org/browse/ARMBAND-304 - -Signed-off-by: Alexandru Avadanii ---- - .../classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml -index ea95680..9b39962 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml -@@ -201,7 +201,7 @@ parameters: - repo: - uca: - source: "deb http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/ocata main" -- architectures: amd64 -+ architectures: amd64,arm64 - key_id: EC4926EA - key_server: keyserver.ubuntu.com - kernel: diff --git a/patches/opnfv-fuel/0020-Add-opnfv-user-to-the-deployment.patch b/patches/opnfv-fuel/0020-Add-opnfv-user-to-the-deployment.patch deleted file mode 100644 index f2b51d0f..00000000 --- a/patches/opnfv-fuel/0020-Add-opnfv-user-to-the-deployment.patch +++ /dev/null @@ -1,88 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: All rights reserved. This program and the accompanying materials -: are made available under the terms of the Apache License, Version 2.0 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Charalampos Kominos -Date: Fri, 1 Sep 2017 12:24:35 +0200 -Subject: [PATCH] Add opnfv user to the deployment - -Signed-off-by: Alexandru Avadanii -Signed-off-by: Charalampos Kominos -Signed-off-by: Guillermo Herrero ---- - mcp/config/states/maas | 2 ++ - mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/opnfv.yml | 4 ++++ - .../classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml | 1 + - .../classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/init.yml | 1 + - mcp/salt-formulas/opnfv/adduser.sls | 7 +++++++ - 5 files changed, 15 insertions(+) - create mode 100644 mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/opnfv.yml - create mode 100644 mcp/salt-formulas/opnfv/adduser.sls - -diff --git a/mcp/config/states/maas b/mcp/config/states/maas -index c54225d..6bd0aef 100755 ---- a/mcp/config/states/maas -+++ b/mcp/config/states/maas -@@ -75,6 +75,7 @@ salt -C 'mas01*' pillar.item\ - salt -C '* and not cfg01* and not mas01*' saltutil.sync_all - - salt -C 'kvm*' pkg.install bridge-utils -+salt -C '*' state.apply opnfv.adduser - salt -C 'kvm*' state.apply linux.network - salt -C 'kvm*' state.apply armband.bootstrap_script_arm64 - salt -C 'kvm*' system.reboot -@@ -98,6 +99,7 @@ while [ $rc -ne 0 ]; do - rc=0 - for node in $vcp_nodes; do - salt "$node" test.ping 2>/dev/null || { rc=$?; break; }; -+ salt -C "$node" state.apply opnfv.adduser - done - sleep 5 - done -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/opnfv.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/opnfv.yml -new file mode 100644 -index 0000000..4cea805 ---- /dev/null -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/opnfv.yml -@@ -0,0 +1,4 @@ -+parameters: -+ _param: -+ opnfv_user_username: opnfv -+ opnfv_user_password: $1$5/pIEHT1$XFBhNWW4Q8gYd19hczgPF1 -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml -index 79a8e92..fd615e4 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml -@@ -1,4 +1,5 @@ - classes: -+- cluster.baremetal-mcp-ocata-common.opnfv - - system.linux.system.single - - cluster.baremetal-mcp-ocata-odl-ha.openstack - # - cluster.baremetal-mcp-ocata-odl-ha.stacklight -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/init.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/init.yml -index d09c643..f7789c6 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/init.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/init.yml -@@ -1,4 +1,5 @@ - classes: -+- cluster.baremetal-mcp-ocata-common.opnfv - - system.linux.system.single - - cluster.baremetal-mcp-ocata-ovs-ha.openstack - # - cluster.baremetal-mcp-ocata-ovs-ha.stacklight -diff --git a/mcp/salt-formulas/opnfv/adduser.sls b/mcp/salt-formulas/opnfv/adduser.sls -new file mode 100644 -index 0000000..78ef993 ---- /dev/null -+++ b/mcp/salt-formulas/opnfv/adduser.sls -@@ -0,0 +1,7 @@ -+add_opnfv_user: -+ user.present: -+ - name: {{ salt['pillar.get']('_param:opnfv_user_username') }} -+ - password: {{ salt['pillar.get']('_param:opnfv_user_password') }} -+ - createhome: True -+ - groups: -+ - sudo diff --git a/upstream/fuel b/upstream/fuel index 91312836..a760c973 160000 --- a/upstream/fuel +++ b/upstream/fuel @@ -1 +1 @@ -Subproject commit 91312836e649c24d2d0268f1f5c8aa45fdd79a8d +Subproject commit a760c973e420371b07ac1739ba2d32a1df87226f -- cgit 1.2.3-korg