From 7bcfc857535346a72708b1166759e8480e676a38 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Thu, 19 Oct 2017 01:15:15 +0200 Subject: u/fuel: Bump & rebase for PDF-based network config Change-Id: If970bbc8735d38542a90b2cbdbb2523ae644a29c Signed-off-by: Alexandru Avadanii --- ...etwork-public-Use-arm-virtual2-POD-config.patch | 2 +- ...-classes-baremetal-AArch64-NIC-adaptation.patch | 116 ----------- ...-Add-curtin_userdata_arm64_generic_xenial.patch | 112 +++++++++++ ...-Add-curtin_userdata_arm64_generic_xenial.patch | 112 ----------- ...aas-boot-resources-Add-arm64-architecture.patch | 39 ++++ .../0006-libvirt-Use-libvirt-unix_sock_group.patch | 58 ++++++ ...aas-boot-resources-Add-arm64-architecture.patch | 39 ---- .../0007-libvirt-Use-libvirt-unix_sock_group.patch | 58 ------ ...lt-formulas-armband-Extend-libvirt_domain.patch | 104 ++++++++++ ...lt-formulas-armband-Extend-libvirt_domain.patch | 104 ---------- ...-virtng.py-virt.sls-Extend-libvirt_domain.patch | 223 +++++++++++++++++++++ ...p-salt-formulas-armband-AArch64-bootstrap.patch | 90 +++++++++ ...-virtng.py-virt.sls-Extend-libvirt_domain.patch | 223 --------------------- ...p-salt-formulas-armband-AArch64-bootstrap.patch | 90 --------- .../0010-seedng-module-Add-AArch64-repo.patch | 59 ++++++ ...ib.sh-rm-Ubuntu-boot-entry-on-EFI-systems.patch | 60 ++++++ .../0011-seedng-module-Add-AArch64-repo.patch | 59 ------ ...2-aarch64-skip-configuration-of-hugepages.patch | 36 ++++ ...ib.sh-rm-Ubuntu-boot-entry-on-EFI-systems.patch | 60 ------ ...3-aarch64-skip-configuration-of-hugepages.patch | 36 ---- ...tal-virtual-Extend-arch-list-for-UCA-repo.patch | 88 ++++++++ .../0014-Add-opnfv-user-to-the-deployment.patch | 67 +++++++ ...tal-virtual-Extend-arch-list-for-UCA-repo.patch | 88 -------- .../0015-Add-opnfv-user-to-the-deployment.patch | 67 ------- upstream/fuel | 2 +- 25 files changed, 938 insertions(+), 1054 deletions(-) delete mode 100644 patches/opnfv-fuel/0004-classes-baremetal-AArch64-NIC-adaptation.patch create mode 100644 patches/opnfv-fuel/0004-maas-Add-curtin_userdata_arm64_generic_xenial.patch delete mode 100644 patches/opnfv-fuel/0005-maas-Add-curtin_userdata_arm64_generic_xenial.patch create mode 100644 patches/opnfv-fuel/0005-maas-boot-resources-Add-arm64-architecture.patch create mode 100644 patches/opnfv-fuel/0006-libvirt-Use-libvirt-unix_sock_group.patch delete mode 100644 patches/opnfv-fuel/0006-maas-boot-resources-Add-arm64-architecture.patch delete mode 100644 patches/opnfv-fuel/0007-libvirt-Use-libvirt-unix_sock_group.patch create mode 100644 patches/opnfv-fuel/0007-mcp-salt-formulas-armband-Extend-libvirt_domain.patch delete mode 100644 patches/opnfv-fuel/0008-mcp-salt-formulas-armband-Extend-libvirt_domain.patch create mode 100644 patches/opnfv-fuel/0008-virtng.py-virt.sls-Extend-libvirt_domain.patch create mode 100644 patches/opnfv-fuel/0009-mcp-salt-formulas-armband-AArch64-bootstrap.patch delete mode 100644 patches/opnfv-fuel/0009-virtng.py-virt.sls-Extend-libvirt_domain.patch delete mode 100644 patches/opnfv-fuel/0010-mcp-salt-formulas-armband-AArch64-bootstrap.patch create mode 100644 patches/opnfv-fuel/0010-seedng-module-Add-AArch64-repo.patch create mode 100644 patches/opnfv-fuel/0011-lib.sh-rm-Ubuntu-boot-entry-on-EFI-systems.patch delete mode 100644 patches/opnfv-fuel/0011-seedng-module-Add-AArch64-repo.patch create mode 100644 patches/opnfv-fuel/0012-aarch64-skip-configuration-of-hugepages.patch delete mode 100644 patches/opnfv-fuel/0012-lib.sh-rm-Ubuntu-boot-entry-on-EFI-systems.patch delete mode 100644 patches/opnfv-fuel/0013-aarch64-skip-configuration-of-hugepages.patch create mode 100644 patches/opnfv-fuel/0013-baremetal-virtual-Extend-arch-list-for-UCA-repo.patch create mode 100644 patches/opnfv-fuel/0014-Add-opnfv-user-to-the-deployment.patch delete mode 100644 patches/opnfv-fuel/0014-baremetal-virtual-Extend-arch-list-for-UCA-repo.patch delete mode 100644 patches/opnfv-fuel/0015-Add-opnfv-user-to-the-deployment.patch 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 index 2ebf8ffa..1dc8f99b 100644 --- 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 @@ -84,7 +84,7 @@ index 3c3d526..e114ec2 100644 - 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 4f1c557..3784b7e 100644 +index 81f050f..b304c28 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 @@ -14,7 +14,7 @@ parameters: diff --git a/patches/opnfv-fuel/0004-classes-baremetal-AArch64-NIC-adaptation.patch b/patches/opnfv-fuel/0004-classes-baremetal-AArch64-NIC-adaptation.patch deleted file mode 100644 index c58585e0..00000000 --- a/patches/opnfv-fuel/0004-classes-baremetal-AArch64-NIC-adaptation.patch +++ /dev/null @@ -1,116 +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: Mon, 9 Oct 2017 14:28:15 +0200 -Subject: [PATCH] classes: baremetal: AArch64: NIC adaptation - -AArch64 NIC adaptation for dual NIC boards with traffic separation - -kvm nodes: added second trunk_nic - -compute nodes: removed third external_nic - -Change-Id: Iae73670c7ec6080f420cf61e5f0a79f8424665c9 -Signed-off-by: Guillermo Herrero ---- - .../cluster/baremetal-mcp-ocata-common/infra/kvm.yml | 12 +++++++++--- - .../baremetal-mcp-ocata-common/openstack_compute.yml | 15 ++++----------- - 2 files changed, 13 insertions(+), 14 deletions(-) - -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/infra/kvm.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/infra/kvm.yml -index ce81f42..b270e0f 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/infra/kvm.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/infra/kvm.yml -@@ -32,6 +32,7 @@ parameters: - keepalived_vip_interface: br-ctl - keepalived_vip_virtual_router_id: 69 - deploy_nic: ${_param:opnfv_baremetal_primary_nic} -+ trunk_nic: ${_param:opnfv_baremetal_secondary_nic} - salt: - control: - size: # RAM 4096,8192,16384,32768,65536 -@@ -144,6 +145,11 @@ parameters: - netmask: 255.255.255.0 - name: ${_param:deploy_nic} - noifupdown: true -+ trunk: -+ enabled: true -+ type: eth -+ proto: manual -+ name: ${_param:trunk_nic} - br-mgmt: - enabled: true - proto: dhcp -@@ -156,9 +162,9 @@ parameters: - enabled: true - proto: manual - type: vlan -- name: ${_param:deploy_nic}.${_param:opnfv_net_mgmt_vlan} -+ name: ${_param:trunk_nic}.${_param:opnfv_net_mgmt_vlan} - use_interfaces: -- - ${_param:deploy_nic} -+ - ${_param:trunk_nic} - br-ctl: - enabled: true - type: bridge -@@ -166,4 +172,4 @@ parameters: - address: ${_param:single_address} - netmask: 255.255.255.0 - use_interfaces: -- - ${_param:deploy_nic}.${_param:opnfv_net_mgmt_vlan} -+ - ${_param:trunk_nic}.${_param:opnfv_net_mgmt_vlan} -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/openstack_compute.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/openstack_compute.yml -index 1540133..d370496 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/openstack_compute.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/openstack_compute.yml -@@ -30,7 +30,6 @@ parameters: - cluster_node03_address: ${_param:openstack_control_node03_address} - nova_vncproxy_url: https://${_param:cluster_public_host}:6080 - mgmt_nic: ${_param:opnfv_baremetal_primary_nic} -- external_nic: ${_param:opnfv_baremetal_tertiary_nic} - interface_mtu: 1500 - keepalived_vip_interface: br-ctl - keepalived_vip_virtual_router_id: 69 -@@ -58,19 +57,13 @@ parameters: - type: eth - proto: dhcp - name: ${_param:mgmt_nic} -- external_nic: -- enabled: true -- name: ${_param:external_nic} -- mtu: ${_param:interface_mtu} -- proto: manual -- type: eth - mgmt-vlan: - enabled: true - proto: manual - type: vlan -- name: ${_param:mgmt_nic}.${_param:opnfv_net_mgmt_vlan} -+ name: ${_param:tenant_nic}.${_param:opnfv_net_mgmt_vlan} - use_interfaces: -- - ${_param:mgmt_nic} -+ - ${_param:tenant_nic} - br-ctl: - enabled: true - type: bridge -@@ -78,7 +71,7 @@ parameters: - address: ${_param:single_address} - netmask: 255.255.255.0 - use_interfaces: -- - ${_param:mgmt_nic}.${_param:opnfv_net_mgmt_vlan} -+ - ${_param:tenant_nic}.${_param:opnfv_net_mgmt_vlan} - br-floating: - enabled: true - type: ovs_bridge -@@ -95,6 +88,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/patches/opnfv-fuel/0004-maas-Add-curtin_userdata_arm64_generic_xenial.patch b/patches/opnfv-fuel/0004-maas-Add-curtin_userdata_arm64_generic_xenial.patch new file mode 100644 index 00000000..0101573e --- /dev/null +++ b/patches/opnfv-fuel/0004-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 accdb6b..88b3ffe 100644 +--- a/mcp/patches/patches.list ++++ b/mcp/patches/patches.list +@@ -15,3 +15,4 @@ + /usr/share/salt-formulas/env: 0009-seedng-module-Sync-salt-version.patch + /usr/share/salt-formulas/env: 0010-maas-region-allow-timeout-override.patch + /usr/share/salt-formulas/reclass: 0011-service.horizon.server.cluster-Default-to-v2-API.patch ++/usr/share/salt-formulas/env: 0101-maas-Add-curtin_userdata_arm64_generic_xenial.patch 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 deleted file mode 100644 index 3c5a6ea9..00000000 --- a/patches/opnfv-fuel/0005-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 744304d..9bdbff5 100644 ---- a/mcp/patches/patches.list -+++ b/mcp/patches/patches.list -@@ -14,3 +14,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: 0010-maas-region-allow-timeout-override.patch -+/usr/share/salt-formulas/env: 0101-maas-Add-curtin_userdata_arm64_generic_xenial.patch diff --git a/patches/opnfv-fuel/0005-maas-boot-resources-Add-arm64-architecture.patch b/patches/opnfv-fuel/0005-maas-boot-resources-Add-arm64-architecture.patch new file mode 100644 index 00000000..91e13434 --- /dev/null +++ b/patches/opnfv-fuel/0005-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 ecda80a..a8d27d7 100644 +--- a/mcp/patches/0003-maas-region-force-artifact-download.patch ++++ b/mcp/patches/0003-maas-region-force-artifact-download.patch +@@ -50,7 +50,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 { +@@ -72,3 +72,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/0006-libvirt-Use-libvirt-unix_sock_group.patch b/patches/opnfv-fuel/0006-libvirt-Use-libvirt-unix_sock_group.patch new file mode 100644 index 00000000..6179b911 --- /dev/null +++ b/patches/opnfv-fuel/0006-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 88b3ffe..e355700 100644 +--- a/mcp/patches/patches.list ++++ b/mcp/patches/patches.list +@@ -16,3 +16,4 @@ + /usr/share/salt-formulas/env: 0010-maas-region-allow-timeout-override.patch + /usr/share/salt-formulas/reclass: 0011-service.horizon.server.cluster-Default-to-v2-API.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/0006-maas-boot-resources-Add-arm64-architecture.patch b/patches/opnfv-fuel/0006-maas-boot-resources-Add-arm64-architecture.patch deleted file mode 100644 index 91e13434..00000000 --- a/patches/opnfv-fuel/0006-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 ecda80a..a8d27d7 100644 ---- a/mcp/patches/0003-maas-region-force-artifact-download.patch -+++ b/mcp/patches/0003-maas-region-force-artifact-download.patch -@@ -50,7 +50,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 { -@@ -72,3 +72,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/0007-libvirt-Use-libvirt-unix_sock_group.patch b/patches/opnfv-fuel/0007-libvirt-Use-libvirt-unix_sock_group.patch deleted file mode 100644 index f98185d3..00000000 --- a/patches/opnfv-fuel/0007-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 9bdbff5..093bf05 100644 ---- a/mcp/patches/patches.list -+++ b/mcp/patches/patches.list -@@ -15,3 +15,4 @@ - /usr/share/salt-formulas/env: 0009-seedng-module-Sync-salt-version.patch - /usr/share/salt-formulas/env: 0010-maas-region-allow-timeout-override.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/0007-mcp-salt-formulas-armband-Extend-libvirt_domain.patch b/patches/opnfv-fuel/0007-mcp-salt-formulas-armband-Extend-libvirt_domain.patch new file mode 100644 index 00000000..7c188244 --- /dev/null +++ b/patches/opnfv-fuel/0007-mcp-salt-formulas-armband-Extend-libvirt_domain.patch @@ -0,0 +1,104 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: 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/virtual_control_plane | 1 + + .../armband/files/libvirt_domain.jinja.diff | 46 ++++++++++++++++++++++ + .../armband/libvirt_domain_template.sls | 4 ++ + 3 files changed, 51 insertions(+) + 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/virtual_control_plane b/mcp/config/states/virtual_control_plane +index 602eab2..fe84222 100755 +--- a/mcp/config/states/virtual_control_plane ++++ b/mcp/config/states/virtual_control_plane +@@ -23,6 +23,7 @@ wait_for 90 "! salt -C 'kvm* or cmp*' test.ping | " \ + salt -C '* and not cfg01* and not mas01*' state.apply linux,ntp + + salt -C 'kvm*' state.sls armband || true ++salt -C 'kvm*' state.sls armband.libvirt_domain_template || true + wait_for 5 "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/0008-mcp-salt-formulas-armband-Extend-libvirt_domain.patch b/patches/opnfv-fuel/0008-mcp-salt-formulas-armband-Extend-libvirt_domain.patch deleted file mode 100644 index 7c188244..00000000 --- a/patches/opnfv-fuel/0008-mcp-salt-formulas-armband-Extend-libvirt_domain.patch +++ /dev/null @@ -1,104 +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/virtual_control_plane | 1 + - .../armband/files/libvirt_domain.jinja.diff | 46 ++++++++++++++++++++++ - .../armband/libvirt_domain_template.sls | 4 ++ - 3 files changed, 51 insertions(+) - 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/virtual_control_plane b/mcp/config/states/virtual_control_plane -index 602eab2..fe84222 100755 ---- a/mcp/config/states/virtual_control_plane -+++ b/mcp/config/states/virtual_control_plane -@@ -23,6 +23,7 @@ wait_for 90 "! salt -C 'kvm* or cmp*' test.ping | " \ - salt -C '* and not cfg01* and not mas01*' state.apply linux,ntp - - salt -C 'kvm*' state.sls armband || true -+salt -C 'kvm*' state.sls armband.libvirt_domain_template || true - wait_for 5 "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/0008-virtng.py-virt.sls-Extend-libvirt_domain.patch b/patches/opnfv-fuel/0008-virtng.py-virt.sls-Extend-libvirt_domain.patch new file mode 100644 index 00000000..aa0b9f97 --- /dev/null +++ b/patches/opnfv-fuel/0008-virtng.py-virt.sls-Extend-libvirt_domain.patch @@ -0,0 +1,223 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: 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-common/infra/kvm.yml | 15 ++++++ + .../baremetal-mcp-ocata-odl-ha/infra/kvm.yml | 3 ++ + 5 files changed, 125 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 e355700..b2745a1 100644 +--- a/mcp/patches/patches.list ++++ b/mcp/patches/patches.list +@@ -17,3 +17,5 @@ + /usr/share/salt-formulas/reclass: 0011-service.horizon.server.cluster-Default-to-v2-API.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-common/infra/kvm.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/infra/kvm.yml +index 757295a..fe17fa6 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/infra/kvm.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/infra/kvm.yml +@@ -42,21 +42,33 @@ parameters: + openstack.control: + cpu: 4 + ram: 12288 ++ hw_firmware_type: uefi ++ virt_machine_model: virt ++ cpu_model: host-passthrough + disk_profile: small + net_profile: default + openstack.database: + cpu: 4 + ram: 6144 ++ 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 + # stacklight.log: +@@ -77,6 +89,9 @@ parameters: + openstack.proxy: + cpu: 2 + ram: 2048 ++ 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-odl-ha/infra/kvm.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/kvm.yml +index d7bbadd..f8b9662 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 +@@ -17,6 +17,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/patches/opnfv-fuel/0009-mcp-salt-formulas-armband-AArch64-bootstrap.patch b/patches/opnfv-fuel/0009-mcp-salt-formulas-armband-AArch64-bootstrap.patch new file mode 100644 index 00000000..a9e65337 --- /dev/null +++ b/patches/opnfv-fuel/0009-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/virtual_control_plane | 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/virtual_control_plane b/mcp/config/states/virtual_control_plane +index fe84222..75386a7 100755 +--- a/mcp/config/states/virtual_control_plane ++++ b/mcp/config/states/virtual_control_plane +@@ -16,6 +16,7 @@ source "$(dirname "${BASH_SOURCE[0]}")/../../scripts/lib.sh" + salt -C 'kvm*' pkg.install bridge-utils + salt -C 'kvm*' state.apply linux.network + salt -C 'cmp*' state.apply linux.system ++salt -C 'kvm*' state.apply armband.bootstrap_script_arm64 || true + salt -C 'kvm* or cmp*' system.reboot + wait_for 90 "! salt -C 'kvm* or cmp*' test.ping | " \ + "tee /dev/stderr | grep -Fq '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/0009-virtng.py-virt.sls-Extend-libvirt_domain.patch b/patches/opnfv-fuel/0009-virtng.py-virt.sls-Extend-libvirt_domain.patch deleted file mode 100644 index 4362dd6c..00000000 --- a/patches/opnfv-fuel/0009-virtng.py-virt.sls-Extend-libvirt_domain.patch +++ /dev/null @@ -1,223 +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-common/infra/kvm.yml | 15 ++++++ - .../baremetal-mcp-ocata-odl-ha/infra/kvm.yml | 3 ++ - 5 files changed, 125 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 093bf05..7032a6d 100644 ---- a/mcp/patches/patches.list -+++ b/mcp/patches/patches.list -@@ -16,3 +16,5 @@ - /usr/share/salt-formulas/env: 0010-maas-region-allow-timeout-override.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-common/infra/kvm.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/infra/kvm.yml -index b270e0f..4bf8dec 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/infra/kvm.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/infra/kvm.yml -@@ -40,21 +40,33 @@ parameters: - openstack.control: - cpu: 4 - ram: 12288 -+ hw_firmware_type: uefi -+ virt_machine_model: virt -+ cpu_model: host-passthrough - disk_profile: small - net_profile: default - openstack.database: - cpu: 4 - ram: 6144 -+ 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 - # stacklight.log: -@@ -75,6 +87,9 @@ parameters: - openstack.proxy: - cpu: 2 - ram: 2048 -+ 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-odl-ha/infra/kvm.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/kvm.yml -index 344b190..3ac09f2 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 -@@ -17,6 +17,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/patches/opnfv-fuel/0010-mcp-salt-formulas-armband-AArch64-bootstrap.patch b/patches/opnfv-fuel/0010-mcp-salt-formulas-armband-AArch64-bootstrap.patch deleted file mode 100644 index a9e65337..00000000 --- a/patches/opnfv-fuel/0010-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/virtual_control_plane | 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/virtual_control_plane b/mcp/config/states/virtual_control_plane -index fe84222..75386a7 100755 ---- a/mcp/config/states/virtual_control_plane -+++ b/mcp/config/states/virtual_control_plane -@@ -16,6 +16,7 @@ source "$(dirname "${BASH_SOURCE[0]}")/../../scripts/lib.sh" - salt -C 'kvm*' pkg.install bridge-utils - salt -C 'kvm*' state.apply linux.network - salt -C 'cmp*' state.apply linux.system -+salt -C 'kvm*' state.apply armband.bootstrap_script_arm64 || true - salt -C 'kvm* or cmp*' system.reboot - wait_for 90 "! salt -C 'kvm* or cmp*' test.ping | " \ - "tee /dev/stderr | grep -Fq '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/0010-seedng-module-Add-AArch64-repo.patch b/patches/opnfv-fuel/0010-seedng-module-Add-AArch64-repo.patch new file mode 100644 index 00000000..12a76e9f --- /dev/null +++ b/patches/opnfv-fuel/0010-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 b2745a1..9c28735 100644 +--- a/mcp/patches/patches.list ++++ b/mcp/patches/patches.list +@@ -19,3 +19,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/0011-lib.sh-rm-Ubuntu-boot-entry-on-EFI-systems.patch b/patches/opnfv-fuel/0011-lib.sh-rm-Ubuntu-boot-entry-on-EFI-systems.patch new file mode 100644 index 00000000..faa0444c --- /dev/null +++ b/patches/opnfv-fuel/0011-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 da129a7..1fbe78b 100644 +--- a/mcp/scripts/lib.sh ++++ b/mcp/scripts/lib.sh +@@ -35,6 +35,15 @@ function get_base_image { + wget -P "${image_dir}" -N "${base_image}" + } + ++function 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 ++} ++ + function cleanup_vms { + # clean up existing nodes + for node in $(virsh list --name | grep -P '\w{3}\d{2}'); do +@@ -52,6 +61,7 @@ function 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/0011-seedng-module-Add-AArch64-repo.patch b/patches/opnfv-fuel/0011-seedng-module-Add-AArch64-repo.patch deleted file mode 100644 index a0356850..00000000 --- a/patches/opnfv-fuel/0011-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 7032a6d..875040f 100644 ---- a/mcp/patches/patches.list -+++ b/mcp/patches/patches.list -@@ -18,3 +18,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/0012-aarch64-skip-configuration-of-hugepages.patch b/patches/opnfv-fuel/0012-aarch64-skip-configuration-of-hugepages.patch new file mode 100644 index 00000000..684f45cb --- /dev/null +++ b/patches/opnfv-fuel/0012-aarch64-skip-configuration-of-hugepages.patch @@ -0,0 +1,36 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: 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 +--- + .../classes/cluster/baremetal-mcp-ocata-common/openstack_compute.yml | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/openstack_compute.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/openstack_compute.yml +index 7d3dcb0..3685836 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/openstack_compute.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/openstack_compute.yml +@@ -12,8 +12,8 @@ classes: + - system.linux.storage.loopback + - system.glusterfs.client.cluster + - 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/patches/opnfv-fuel/0012-lib.sh-rm-Ubuntu-boot-entry-on-EFI-systems.patch b/patches/opnfv-fuel/0012-lib.sh-rm-Ubuntu-boot-entry-on-EFI-systems.patch deleted file mode 100644 index faa0444c..00000000 --- a/patches/opnfv-fuel/0012-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 da129a7..1fbe78b 100644 ---- a/mcp/scripts/lib.sh -+++ b/mcp/scripts/lib.sh -@@ -35,6 +35,15 @@ function get_base_image { - wget -P "${image_dir}" -N "${base_image}" - } - -+function 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 -+} -+ - function cleanup_vms { - # clean up existing nodes - for node in $(virsh list --name | grep -P '\w{3}\d{2}'); do -@@ -52,6 +61,7 @@ function 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/0013-aarch64-skip-configuration-of-hugepages.patch b/patches/opnfv-fuel/0013-aarch64-skip-configuration-of-hugepages.patch deleted file mode 100644 index af9c1175..00000000 --- a/patches/opnfv-fuel/0013-aarch64-skip-configuration-of-hugepages.patch +++ /dev/null @@ -1,36 +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 ---- - .../classes/cluster/baremetal-mcp-ocata-common/openstack_compute.yml | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/openstack_compute.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/openstack_compute.yml -index d370496..bddb1ee 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/openstack_compute.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/openstack_compute.yml -@@ -12,8 +12,8 @@ classes: - - system.linux.storage.loopback - - system.glusterfs.client.cluster - - 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/patches/opnfv-fuel/0013-baremetal-virtual-Extend-arch-list-for-UCA-repo.patch b/patches/opnfv-fuel/0013-baremetal-virtual-Extend-arch-list-for-UCA-repo.patch new file mode 100644 index 00000000..15c1c19f --- /dev/null +++ b/patches/opnfv-fuel/0013-baremetal-virtual-Extend-arch-list-for-UCA-repo.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: Alexandru Avadanii +Date: Wed, 30 Aug 2017 22:15:07 +0200 +Subject: [PATCH] baremetal, virtual: 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 +- + .../cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/compute.yml | 2 +- + .../classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/init.yml | 2 +- + .../classes/cluster/virtual-mcp-ocata-common/openstack_compute.yml | 2 +- + .../classes/cluster/virtual-mcp-ocata-odl-router/openstack/init.yml | 2 +- + 5 files changed, 5 insertions(+), 5 deletions(-) + +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 9a04c84..80e5bb7 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 +@@ -27,7 +27,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/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/compute.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/compute.yml +index aa6b4e3..5b6752e 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/compute.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/compute.yml +@@ -25,7 +25,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 + network: +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/init.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/init.yml +index 5e855ac..2392cf0 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/init.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/init.yml +@@ -27,7 +27,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/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_compute.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_compute.yml +index 4a48b36..1e84493 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 +@@ -64,7 +64,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/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/openstack/init.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/openstack/init.yml +index 5be63e5..1cfd5a3 100644 +--- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/openstack/init.yml ++++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/openstack/init.yml +@@ -17,7 +17,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 + network: diff --git a/patches/opnfv-fuel/0014-Add-opnfv-user-to-the-deployment.patch b/patches/opnfv-fuel/0014-Add-opnfv-user-to-the-deployment.patch new file mode 100644 index 00000000..52d2b4d9 --- /dev/null +++ b/patches/opnfv-fuel/0014-Add-opnfv-user-to-the-deployment.patch @@ -0,0 +1,67 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: 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/virtual_control_plane | 2 ++ + mcp/reclass/classes/cluster/all-mcp-ocata-common/opnfv/init.yml | 4 ++++ + mcp/salt-formulas/opnfv/adduser.sls | 7 +++++++ + 3 files changed, 13 insertions(+) + create mode 100644 mcp/salt-formulas/opnfv/adduser.sls + +diff --git a/mcp/config/states/virtual_control_plane b/mcp/config/states/virtual_control_plane +index 75386a7..083dd32 100755 +--- a/mcp/config/states/virtual_control_plane ++++ b/mcp/config/states/virtual_control_plane +@@ -14,6 +14,7 @@ source "$(dirname "${BASH_SOURCE[0]}")/../../scripts/lib.sh" + + # KVM, compute node prereqs (libvirt first), VCP deployment + salt -C 'kvm*' pkg.install bridge-utils ++salt -C '*' state.apply opnfv.adduser + salt -C 'kvm*' state.apply linux.network + salt -C 'cmp*' state.apply linux.system + salt -C 'kvm*' state.apply armband.bootstrap_script_arm64 || true +@@ -41,6 +42,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/all-mcp-ocata-common/opnfv/init.yml b/mcp/reclass/classes/cluster/all-mcp-ocata-common/opnfv/init.yml +index aa780e6..e4069c0 100644 +--- a/mcp/reclass/classes/cluster/all-mcp-ocata-common/opnfv/init.yml ++++ b/mcp/reclass/classes/cluster/all-mcp-ocata-common/opnfv/init.yml +@@ -9,3 +9,7 @@ + classes: + - cluster.all-mcp-ocata-common.opnfv.runtime + - cluster.all-mcp-ocata-common.opnfv.pod_config ++parameters: ++ _param: ++ opnfv_user_username: opnfv ++ opnfv_user_password: $1$5/pIEHT1$XFBhNWW4Q8gYd19hczgPF1 +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/0014-baremetal-virtual-Extend-arch-list-for-UCA-repo.patch b/patches/opnfv-fuel/0014-baremetal-virtual-Extend-arch-list-for-UCA-repo.patch deleted file mode 100644 index 15c1c19f..00000000 --- a/patches/opnfv-fuel/0014-baremetal-virtual-Extend-arch-list-for-UCA-repo.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: Alexandru Avadanii -Date: Wed, 30 Aug 2017 22:15:07 +0200 -Subject: [PATCH] baremetal, virtual: 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 +- - .../cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/compute.yml | 2 +- - .../classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/init.yml | 2 +- - .../classes/cluster/virtual-mcp-ocata-common/openstack_compute.yml | 2 +- - .../classes/cluster/virtual-mcp-ocata-odl-router/openstack/init.yml | 2 +- - 5 files changed, 5 insertions(+), 5 deletions(-) - -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 9a04c84..80e5bb7 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 -@@ -27,7 +27,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/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/compute.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/compute.yml -index aa6b4e3..5b6752e 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/compute.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/compute.yml -@@ -25,7 +25,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 - network: -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/init.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/init.yml -index 5e855ac..2392cf0 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/init.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/init.yml -@@ -27,7 +27,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/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_compute.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_compute.yml -index 4a48b36..1e84493 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 -@@ -64,7 +64,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/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/openstack/init.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/openstack/init.yml -index 5be63e5..1cfd5a3 100644 ---- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/openstack/init.yml -+++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/openstack/init.yml -@@ -17,7 +17,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 - network: diff --git a/patches/opnfv-fuel/0015-Add-opnfv-user-to-the-deployment.patch b/patches/opnfv-fuel/0015-Add-opnfv-user-to-the-deployment.patch deleted file mode 100644 index 52d2b4d9..00000000 --- a/patches/opnfv-fuel/0015-Add-opnfv-user-to-the-deployment.patch +++ /dev/null @@ -1,67 +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/virtual_control_plane | 2 ++ - mcp/reclass/classes/cluster/all-mcp-ocata-common/opnfv/init.yml | 4 ++++ - mcp/salt-formulas/opnfv/adduser.sls | 7 +++++++ - 3 files changed, 13 insertions(+) - create mode 100644 mcp/salt-formulas/opnfv/adduser.sls - -diff --git a/mcp/config/states/virtual_control_plane b/mcp/config/states/virtual_control_plane -index 75386a7..083dd32 100755 ---- a/mcp/config/states/virtual_control_plane -+++ b/mcp/config/states/virtual_control_plane -@@ -14,6 +14,7 @@ source "$(dirname "${BASH_SOURCE[0]}")/../../scripts/lib.sh" - - # KVM, compute node prereqs (libvirt first), VCP deployment - salt -C 'kvm*' pkg.install bridge-utils -+salt -C '*' state.apply opnfv.adduser - salt -C 'kvm*' state.apply linux.network - salt -C 'cmp*' state.apply linux.system - salt -C 'kvm*' state.apply armband.bootstrap_script_arm64 || true -@@ -41,6 +42,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/all-mcp-ocata-common/opnfv/init.yml b/mcp/reclass/classes/cluster/all-mcp-ocata-common/opnfv/init.yml -index aa780e6..e4069c0 100644 ---- a/mcp/reclass/classes/cluster/all-mcp-ocata-common/opnfv/init.yml -+++ b/mcp/reclass/classes/cluster/all-mcp-ocata-common/opnfv/init.yml -@@ -9,3 +9,7 @@ - classes: - - cluster.all-mcp-ocata-common.opnfv.runtime - - cluster.all-mcp-ocata-common.opnfv.pod_config -+parameters: -+ _param: -+ opnfv_user_username: opnfv -+ opnfv_user_password: $1$5/pIEHT1$XFBhNWW4Q8gYd19hczgPF1 -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 92530f89..51f374b0 160000 --- a/upstream/fuel +++ b/upstream/fuel @@ -1 +1 @@ -Subproject commit 92530f89c061b0070766e431f839feb368e2e4ac +Subproject commit 51f374b055999fbc121b624424c21ee45d061538 -- cgit 1.2.3-korg