From 42f8585ebb8fffad19a89314659ab9129176c3e9 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Sat, 1 Oct 2016 13:18:11 +0200 Subject: build: Rework patch mechanism for Fuel submodules While refactoring the patching mechanism, take care of: - Sync submodule handling with Fuel@OPFNV; - build: Investigate/prepare for moving patches to Fuel@OPNFV; - build: Investigate divergent fuel-mirror; - ISO build: cacheid for Fuel comps should not depend on Armband git commit; CHANGE: Rename/shuffle patches while grouping them in "features", preparing for upstreaming them to Fuel@OPNFV and beyond. CHANGE: Allow linking patches for better representing the dependency between one patch and different features. e.g. 0001-Add-arch-to-nailgun-release-and-target-image.patch: - part of `multiarch-fuel`, because it extends Fuel; - part of `direct-kernel-boot`, as arch is required for that; - part of `cross-bootstrap`, target image is arch-dependent; NOTE: Patch links are not staged to Fuel@OPNFV, they only serve as markers that a specific patch is part of a feature. CHANGE: Kill all Fuel component submodules, now handled in Fuel@OPNFV: - fuel-agent - fuel-astute - fuel-library - fuel-mirror - fuel-nailgun-agent - fuel-web CHANGE: Move armband-fuel-config.mk to armband git root. FIXME: m1.micro-Increase-profile-RAM-size-to-128MB.patch is NOT part of `cross-bootstrap` feature, but patch context says so ... FIXME: 0001-Add-arm64-deb-repositories-setup.patch is broken at `make patches-export` by removing spaces at EOL. v2 -> v3: * Phony patch support (links to show a patch belongs to a feature); * Updated README.md v3 -> v7: * Re-export Fuel submodules & plugins patches (update patch context); * Update Cavium mail addresses (s/caviumnetworks.com/cavium.com/); * Ignore submodule changes; * Add armband git repo info to gitinfo_fuel.txt at build time; Implements: ARMBAND-136 Closes-bug: ARMBAND-95 Closes-bug: ARMBAND-93 Closes-bug: ARMBAND-92 Change-Id: I1a236d9f43b2e6dca22055911f696b43c22b5973 Signed-off-by: Alexandru Avadanii --- ...1-Use-qemu-debootstrap-for-image-creation.patch | 154 --------- .../0002-Add-FLASH_KERNEL_SKIP-true.patch | 21 -- .../0003-Fix-qemu-user-static-replacement.patch | 55 --- ...common-cross-debootstrap-newaliases-issue.patch | 101 ------ .../fuel-agent/0005-Add-esp-partition-flag.patch | 48 --- .../fuel-agent/0007-Add-fs-for-efi-partition.patch | 66 ---- ...XME-Add-force-yes-to-apt-get-dist-upgrade.patch | 31 -- ...date-bootstrap-target-build-time-estimate.patch | 33 -- ...nel-flavor-linux-image-generic-lts-xenial.patch | 28 -- ...1-Use-qemu-debootstrap-for-image-creation.patch | 157 +++++++++ .../0002-Add-FLASH_KERNEL_SKIP-true.patch | 21 ++ .../0003-Fix-qemu-user-static-replacement.patch | 55 +++ ...common-cross-debootstrap-newaliases-issue.patch | 102 ++++++ ...XME-Add-force-yes-to-apt-get-dist-upgrade.patch | 31 ++ ...date-bootstrap-target-build-time-estimate.patch | 33 ++ ...nel-flavor-linux-image-generic-lts-xenial.patch | 28 ++ .../0001-Add-esp-partition-flag.patch | 48 +++ .../0002-Add-fs-for-efi-partition.patch | 66 ++++ .../0001-Erase-EFI-boot-entry-on-EFI-systems.patch | 43 --- .../0001-Erase-EFI-boot-entry-on-EFI-systems.patch | 43 +++ ...dd-arm64-templates-to-cobbler-and-nailgun.patch | 284 --------------- ...eph-Fix-obsolete-XFS-mount-param-delaylog.patch | 48 +++ .../0002-Add-arm64-for-auxiliary-repos.patch | 36 -- ...er-Fix-libvirt-bin-group-name-for-armband.patch | 46 +++ .../0003-Make-qemu-kvm-architecture-aware.patch | 27 -- ...te-Fix-virtlogd-not-started-after-install.patch | 33 ++ ...4-Make-TestVM-creation-architecture-aware.patch | 138 -------- .../0005-Disable-usb-tablet-for-aarch64.patch | 20 -- ...oad_cirros-Add-direct-kernel-boot-support.patch | 117 ------- ...0007-Install-vgabios-and-link-for-aarch64.patch | 30 -- ...te-vga-console-defaults-for-armv7-aarch64.patch | 98 ------ ...0009-nova-AArch64-enable-hugepage-support.patch | 93 ----- ...ix-inject-for-direct-boot-with-part-table.patch | 90 ----- ...eph-Fix-obsolete-XFS-mount-param-delaylog.patch | 46 --- ...er-Fix-libvirt-bin-group-name-for-armband.patch | 45 --- ...llow-configuring-MySQL-WSREP-SST-provider.patch | 58 ---- ...bler-grub-aarch64-to-cobbler-dependencies.patch | 35 -- ....ip_nonlocal_bind-1-for-vrouter-namespace.patch | 54 --- ...te-Fix-virtlogd-not-started-after-install.patch | 33 -- ...ys-wait-for-MySQL-sync-on-service-refresh.patch | 60 ---- ...-MySQL-logging-dir-permissions-for-syslog.patch | 90 ----- ...ova-config-Disable-usb-tablet-for-aarch64.patch | 23 ++ ...0002-Install-vgabios-and-link-for-aarch64.patch | 33 ++ ...te-vga-console-defaults-for-armv7-aarch64.patch | 104 ++++++ ...0004-nova-AArch64-enable-hugepage-support.patch | 93 +++++ ...oad_cirros-Add-direct-kernel-boot-support.patch | 118 +++++++ ...ix-inject-for-direct-boot-with-part-table.patch | 92 +++++ ...dd-arm64-templates-to-cobbler-and-nailgun.patch | 284 +++++++++++++++ ...bler-grub-aarch64-to-cobbler-dependencies.patch | 35 ++ .../0001-Make-qemu-kvm-architecture-aware.patch | 29 ++ ...2-Make-TestVM-creation-architecture-aware.patch | 137 ++++++++ .../0001-Add-arm64-for-auxiliary-repos.patch | 36 ++ ...llow-configuring-MySQL-WSREP-SST-provider.patch | 60 ++++ ...4.ip_nonlocal_bind-1-for-vrouter-namespac.patch | 54 +++ ...ys-wait-for-MySQL-sync-on-service-refresh.patch | 60 ++++ ...-MySQL-logging-dir-permissions-for-syslog.patch | 90 +++++ ...Set-mos-ubuntu-base-URL-to-linux.enea.com.patch | 4 +- ...flavor-Add-linux-image-generic-lts-xenial.patch | 26 -- ...flavor-Add-linux-image-generic-lts-xenial.patch | 26 ++ ...L-leveldb-leveldbjni-Enable-arm64-support.patch | 16 +- .../0002-opnfv-quagga-Build-for-UBUNTU_ARCH.patch | 16 +- ...E-ODL-wget-no-check-certificate-for-cache.patch | 8 +- ...anup-Use-dget-instead-of-wget-dpkg-source.patch | 48 +++ .../0002-Cleanup-Drop-git-dependency.patch | 99 ++++++ ...anup-Use-dget-instead-of-wget-dpkg-source.patch | 48 --- .../0003-Cleanup-Drop-git-dependency.patch | 99 ------ .../fuel-plugin-ovs/0003-build-apt-force-yes.patch | 87 +++++ .../fuel-plugin-ovs/0004-build-apt-force-yes.patch | 87 ----- ...re_build_hook-Introduce-USE_DOCKER-option.patch | 77 +++++ ...-install-pre_build_hook-Prepare-multiarch.patch | 381 +++++++++++++++++++++ ...re_build_hook-Introduce-USE_DOCKER-option.patch | 77 ----- .../0006-AArch64-Add-native-build-support.patch | 150 ++++++++ ...-install-pre_build_hook-Prepare-multiarch.patch | 381 --------------------- .../0007-AArch64-Add-native-build-support.patch | 150 -------- ...Add-support-for-downloading-prebuilt-DEBs.patch | 139 ++++++++ ...Add-support-for-downloading-prebuilt-DEBs.patch | 139 -------- ...008-build-docker-Use-host-s-network-stack.patch | 30 ++ ...-build-prebuilt-DEBs-src-bin-ver-mismatch.patch | 72 ++++ ...009-build-docker-Use-host-s-network-stack.patch | 30 -- ...-build-prebuilt-DEBs-src-bin-ver-mismatch.patch | 72 ---- ...un-Add-AArch64-Openstack-Mitaka-release-s.patch | 4 +- ...-arch-to-nailgun-release-and-target-image.patch | 76 ++-- .../0004-direct-kernel-boot-for-cirros.patch | 137 -------- ...ME-Disable-amd64-Mitaka-on-Ubuntu-for-now.patch | 34 -- ...configuration-item-for-WSREP-SST-provider.patch | 45 --- ...nel-flavor-linux-image-generic-lts-xenial.patch | 39 --- ...-arch-to-nailgun-release-and-target-image.patch | 1 + ...-arch-to-nailgun-release-and-target-image.patch | 1 + .../0001-direct-kernel-boot-for-cirros.patch | 137 ++++++++ ...nel-flavor-linux-image-generic-lts-xenial.patch | 39 +++ ...-arch-to-nailgun-release-and-target-image.patch | 1 + ...un-Add-AArch64-Openstack-Mitaka-release-s.patch | 1 + ...ME-Disable-amd64-Mitaka-on-Ubuntu-for-now.patch | 34 ++ ...configuration-item-for-WSREP-SST-provider.patch | 45 +++ ...ild-Use-OPNFV_GIT_SHA-for-ISO-preparer-ID.patch | 76 ++++ .../0001-build-Add-ARMBAND_BASE-support.patch | 70 ++++ ...nel-flavor-linux-image-generic-lts-xenial.patch | 51 --- ...deploy-EFI-Skip-re-ordering-boot-via-IPMI.patch | 31 -- .../0002-Fuel-VM-for-the-Enea-Armband-lab.patch | 107 ++++++ ...ea_base-replace-grub-pc-by-grub-efi-arm64.patch | 22 ++ .../0004-Fuel-VM-for-the-Enea-Armband-lab.patch | 111 ------ ...ost-scripts-Allow-SSH-on-non-admin-ifaces.patch | 47 +++ ....py-add-a-time-stamp-to-the-new-ISO-image.patch | 39 +++ ...006-build-docker-Use-host-s-network-stack.patch | 28 ++ .../0006-deploy.sh-no-need-to-set-umask-0000.patch | 38 -- .../opnfv-fuel/0007-Remove-check-for-root.patch | 85 ----- ...ploy-Fix-add-bootstrap-DEA-override-delay.patch | 32 ++ ...ea_base-replace-grub-pc-by-grub-efi-arm64.patch | 22 -- ...ost-scripts-Allow-SSH-on-non-admin-ifaces.patch | 47 --- ...Makefile-Overrideable-product-commit-hash.patch | 35 -- .../0020-Add-arm64-deb-repositories-setup.patch | 166 --------- .../0021-Build-bootstrap-image-for-arm64.patch | 27 -- ...bootstrap-Use-public-Ubuntu-ports-mirrors.patch | 46 --- ...date-bootstrap-target-build-time-estimate.patch | 38 -- .../0028-bootstrap-Add-lshw-package.patch | 29 -- ....py-add-a-time-stamp-to-the-new-ISO-image.patch | 39 --- ...ipts-Enable-systemd-binfmt-for-first-boot.patch | 93 ----- ...-Increase-max-shell-command-timeout-to-2h.patch | 49 --- ...tstrap-Use-gzip-instead-of-xz-compression.patch | 52 --- ...ilgun-Increase-target-image-build-timeout.patch | 36 -- ....micro-Increase-profile-RAM-size-to-128MB.patch | 38 -- ...ploy-Fix-add-bootstrap-DEA-override-delay.patch | 32 -- ...port-dpkg-checkbuilddeps-to-mk-build-deps.patch | 58 ---- .../0043-build-Add-armband.mk-config.patch | 143 -------- ...ild-Use-OPNFV_GIT_SHA-for-ISO-preparer-ID.patch | 48 --- ...fpb-Support-multiple-versions-of-packages.patch | 48 --- ...et-check-add-support-for-faulty-operstate.patch | 63 ---- ...055-build-docker-Use-host-s-network-stack.patch | 28 -- .../0001-bootstrap-Add-lshw-package.patch | 30 ++ ...et-check-add-support-for-faulty-operstate.patch | 63 ++++ ...date-bootstrap-target-build-time-estimate.patch | 39 +++ .../0002-Build-bootstrap-image-for-arm64.patch | 31 ++ ...bootstrap-Use-public-Ubuntu-ports-mirrors.patch | 48 +++ ...ipts-Enable-systemd-binfmt-for-first-boot.patch | 94 +++++ ...-Increase-max-shell-command-timeout-to-2h.patch | 49 +++ ...tstrap-Use-gzip-instead-of-xz-compression.patch | 52 +++ ...ilgun-Increase-target-image-build-timeout.patch | 36 ++ ....micro-Increase-profile-RAM-size-to-128MB.patch | 38 ++ ...nel-flavor-linux-image-generic-lts-xenial.patch | 52 +++ ...deploy-EFI-Skip-re-ordering-boot-via-IPMI.patch | 31 ++ .../0001-Add-arm64-deb-repositories-setup.patch | 166 +++++++++ ...fpb-Support-multiple-versions-of-packages.patch | 50 +++ ...oy.sh-Remove-check-for-root-rm-umask-0000.patch | 106 ++++++ ...port-dpkg-checkbuilddeps-to-mk-build-deps.patch | 58 ++++ ...d-vsperf-make-qemu-system-name-arch-indep.patch | 6 +- ...-u-build_base_machine-Arch-indep-libdir-s.patch | 12 +- 146 files changed, 4762 insertions(+), 4822 deletions(-) delete mode 100644 patches/fuel-agent/0001-Use-qemu-debootstrap-for-image-creation.patch delete mode 100644 patches/fuel-agent/0002-Add-FLASH_KERNEL_SKIP-true.patch delete mode 100644 patches/fuel-agent/0003-Fix-qemu-user-static-replacement.patch delete mode 100644 patches/fuel-agent/0004-Prevent-common-cross-debootstrap-newaliases-issue.patch delete mode 100644 patches/fuel-agent/0005-Add-esp-partition-flag.patch delete mode 100644 patches/fuel-agent/0007-Add-fs-for-efi-partition.patch delete mode 100644 patches/fuel-agent/0009-FIXME-Add-force-yes-to-apt-get-dist-upgrade.patch delete mode 100644 patches/fuel-agent/0010-UX-Update-bootstrap-target-build-time-estimate.patch delete mode 100644 patches/fuel-agent/0011-kernel-flavor-linux-image-generic-lts-xenial.patch create mode 100644 patches/fuel-agent/cross-bootstrap/0001-Use-qemu-debootstrap-for-image-creation.patch create mode 100644 patches/fuel-agent/cross-bootstrap/0002-Add-FLASH_KERNEL_SKIP-true.patch create mode 100644 patches/fuel-agent/cross-bootstrap/0003-Fix-qemu-user-static-replacement.patch create mode 100644 patches/fuel-agent/cross-bootstrap/0004-Prevent-common-cross-debootstrap-newaliases-issue.patch create mode 100644 patches/fuel-agent/cross-bootstrap/0005-FIXME-Add-force-yes-to-apt-get-dist-upgrade.patch create mode 100644 patches/fuel-agent/cross-bootstrap/0006-UX-Update-bootstrap-target-build-time-estimate.patch create mode 100644 patches/fuel-agent/kernel-bump/0001-kernel-flavor-linux-image-generic-lts-xenial.patch create mode 100644 patches/fuel-agent/multiarch-efi/0001-Add-esp-partition-flag.patch create mode 100644 patches/fuel-agent/multiarch-efi/0002-Add-fs-for-efi-partition.patch delete mode 100644 patches/fuel-astute/0001-Erase-EFI-boot-entry-on-EFI-systems.patch create mode 100644 patches/fuel-astute/multiarch-efi/0001-Erase-EFI-boot-entry-on-EFI-systems.patch delete mode 100644 patches/fuel-library/0001-Add-arm64-templates-to-cobbler-and-nailgun.patch create mode 100644 patches/fuel-library/0001-ceph-Fix-obsolete-XFS-mount-param-delaylog.patch delete mode 100644 patches/fuel-library/0002-Add-arm64-for-auxiliary-repos.patch create mode 100644 patches/fuel-library/0002-ceilometer-Fix-libvirt-bin-group-name-for-armband.patch delete mode 100644 patches/fuel-library/0003-Make-qemu-kvm-architecture-aware.patch create mode 100644 patches/fuel-library/0003-compute-Fix-virtlogd-not-started-after-install.patch delete mode 100644 patches/fuel-library/0004-Make-TestVM-creation-architecture-aware.patch delete mode 100644 patches/fuel-library/0005-Disable-usb-tablet-for-aarch64.patch delete mode 100644 patches/fuel-library/0006-upload_cirros-Add-direct-kernel-boot-support.patch delete mode 100644 patches/fuel-library/0007-Install-vgabios-and-link-for-aarch64.patch delete mode 100644 patches/fuel-library/0008-nova-Update-vga-console-defaults-for-armv7-aarch64.patch delete mode 100644 patches/fuel-library/0009-nova-AArch64-enable-hugepage-support.patch delete mode 100644 patches/fuel-library/0010-nova-Fix-inject-for-direct-boot-with-part-table.patch delete mode 100644 patches/fuel-library/0011-ceph-Fix-obsolete-XFS-mount-param-delaylog.patch delete mode 100644 patches/fuel-library/0012-ceilometer-Fix-libvirt-bin-group-name-for-armband.patch delete mode 100644 patches/fuel-library/0013-Allow-configuring-MySQL-WSREP-SST-provider.patch delete mode 100644 patches/fuel-library/0014-Add-cobbler-grub-aarch64-to-cobbler-dependencies.patch delete mode 100644 patches/fuel-library/0015-Set-net.ipv4.ip_nonlocal_bind-1-for-vrouter-namespace.patch delete mode 100644 patches/fuel-library/0016-compute-Fix-virtlogd-not-started-after-install.patch delete mode 100644 patches/fuel-library/0017-Always-wait-for-MySQL-sync-on-service-refresh.patch delete mode 100644 patches/fuel-library/0018-Fix-MySQL-logging-dir-permissions-for-syslog.patch create mode 100644 patches/fuel-library/arm64-bug-fixes/0001-nova-config-Disable-usb-tablet-for-aarch64.patch create mode 100644 patches/fuel-library/arm64-bug-fixes/0002-Install-vgabios-and-link-for-aarch64.patch create mode 100644 patches/fuel-library/arm64-bug-fixes/0003-nova-Update-vga-console-defaults-for-armv7-aarch64.patch create mode 100644 patches/fuel-library/arm64-bug-fixes/0004-nova-AArch64-enable-hugepage-support.patch create mode 100644 patches/fuel-library/direct-kernel-boot/0001-upload_cirros-Add-direct-kernel-boot-support.patch create mode 100644 patches/fuel-library/direct-kernel-boot/0002-nova-Fix-inject-for-direct-boot-with-part-table.patch create mode 100644 patches/fuel-library/multiarch-efi/0001-Add-arm64-templates-to-cobbler-and-nailgun.patch create mode 100644 patches/fuel-library/multiarch-efi/0002-Add-cobbler-grub-aarch64-to-cobbler-dependencies.patch create mode 100644 patches/fuel-library/multiarch-fuel/0001-Make-qemu-kvm-architecture-aware.patch create mode 100644 patches/fuel-library/multiarch-fuel/0002-Make-TestVM-creation-architecture-aware.patch create mode 100644 patches/fuel-library/multiarch-mirrors/0001-Add-arm64-for-auxiliary-repos.patch create mode 100644 patches/fuel-library/mysql-sst-provider/0001-Allow-configuring-MySQL-WSREP-SST-provider.patch create mode 100644 patches/fuel-library/upstream-backports/0001-Set-net.ipv4.ip_nonlocal_bind-1-for-vrouter-namespac.patch create mode 100644 patches/fuel-library/upstream-backports/0002-Always-wait-for-MySQL-sync-on-service-refresh.patch create mode 100644 patches/fuel-library/upstream-backports/0003-Fix-MySQL-logging-dir-permissions-for-syslog.patch delete mode 100644 patches/fuel-mirror/0003-kernel-flavor-Add-linux-image-generic-lts-xenial.patch create mode 100644 patches/fuel-mirror/kernel-bump/0001-kernel-flavor-Add-linux-image-generic-lts-xenial.patch create mode 100644 patches/fuel-plugin-ovs/0001-Cleanup-Use-dget-instead-of-wget-dpkg-source.patch create mode 100644 patches/fuel-plugin-ovs/0002-Cleanup-Drop-git-dependency.patch delete mode 100644 patches/fuel-plugin-ovs/0002-Cleanup-Use-dget-instead-of-wget-dpkg-source.patch delete mode 100644 patches/fuel-plugin-ovs/0003-Cleanup-Drop-git-dependency.patch create mode 100644 patches/fuel-plugin-ovs/0003-build-apt-force-yes.patch delete mode 100644 patches/fuel-plugin-ovs/0004-build-apt-force-yes.patch create mode 100644 patches/fuel-plugin-ovs/0004-pre_build_hook-Introduce-USE_DOCKER-option.patch create mode 100644 patches/fuel-plugin-ovs/0005-build-install-pre_build_hook-Prepare-multiarch.patch delete mode 100644 patches/fuel-plugin-ovs/0005-pre_build_hook-Introduce-USE_DOCKER-option.patch create mode 100644 patches/fuel-plugin-ovs/0006-AArch64-Add-native-build-support.patch delete mode 100644 patches/fuel-plugin-ovs/0006-build-install-pre_build_hook-Prepare-multiarch.patch delete mode 100644 patches/fuel-plugin-ovs/0007-AArch64-Add-native-build-support.patch create mode 100644 patches/fuel-plugin-ovs/0007-AArch64-Add-support-for-downloading-prebuilt-DEBs.patch delete mode 100644 patches/fuel-plugin-ovs/0008-AArch64-Add-support-for-downloading-prebuilt-DEBs.patch create mode 100644 patches/fuel-plugin-ovs/0008-build-docker-Use-host-s-network-stack.patch create mode 100644 patches/fuel-plugin-ovs/0009-HACK-build-prebuilt-DEBs-src-bin-ver-mismatch.patch delete mode 100644 patches/fuel-plugin-ovs/0009-build-docker-Use-host-s-network-stack.patch delete mode 100644 patches/fuel-plugin-ovs/0010-HACK-build-prebuilt-DEBs-src-bin-ver-mismatch.patch delete mode 100644 patches/fuel-web/0004-direct-kernel-boot-for-cirros.patch delete mode 100644 patches/fuel-web/0005-FIXME-Disable-amd64-Mitaka-on-Ubuntu-for-now.patch delete mode 100644 patches/fuel-web/0006-Add-configuration-item-for-WSREP-SST-provider.patch delete mode 100644 patches/fuel-web/0007-kernel-flavor-linux-image-generic-lts-xenial.patch create mode 120000 patches/fuel-web/cross-bootstrap/0000-Add-arch-to-nailgun-release-and-target-image.patch create mode 120000 patches/fuel-web/direct-kernel-boot/0000-Add-arch-to-nailgun-release-and-target-image.patch create mode 100644 patches/fuel-web/direct-kernel-boot/0001-direct-kernel-boot-for-cirros.patch create mode 100644 patches/fuel-web/kernel-bump/0001-kernel-flavor-linux-image-generic-lts-xenial.patch create mode 120000 patches/fuel-web/multiarch-fuel/0000-Add-arch-to-nailgun-release-and-target-image.patch create mode 120000 patches/fuel-web/multiarch-fuel/0000-nailgun-Add-AArch64-Openstack-Mitaka-release-s.patch create mode 100644 patches/fuel-web/multiarch-fuel/0001-FIXME-Disable-amd64-Mitaka-on-Ubuntu-for-now.patch create mode 100644 patches/fuel-web/mysql-sst-provider/0001-Add-configuration-item-for-WSREP-SST-provider.patch create mode 100644 patches/opnfv-fuel/0000-build-Use-OPNFV_GIT_SHA-for-ISO-preparer-ID.patch create mode 100644 patches/opnfv-fuel/0001-build-Add-ARMBAND_BASE-support.patch delete mode 100644 patches/opnfv-fuel/0001-kernel-flavor-linux-image-generic-lts-xenial.patch delete mode 100644 patches/opnfv-fuel/0002-FIXME-deploy-EFI-Skip-re-ordering-boot-via-IPMI.patch create mode 100644 patches/opnfv-fuel/0002-Fuel-VM-for-the-Enea-Armband-lab.patch create mode 100644 patches/opnfv-fuel/0003-dea_base-replace-grub-pc-by-grub-efi-arm64.patch delete mode 100644 patches/opnfv-fuel/0004-Fuel-VM-for-the-Enea-Armband-lab.patch create mode 100644 patches/opnfv-fuel/0004-post-scripts-Allow-SSH-on-non-admin-ifaces.patch create mode 100644 patches/opnfv-fuel/0005-deploy.py-add-a-time-stamp-to-the-new-ISO-image.patch create mode 100644 patches/opnfv-fuel/0006-build-docker-Use-host-s-network-stack.patch delete mode 100644 patches/opnfv-fuel/0006-deploy.sh-no-need-to-set-umask-0000.patch delete mode 100644 patches/opnfv-fuel/0007-Remove-check-for-root.patch create mode 100644 patches/opnfv-fuel/0007-deploy-Fix-add-bootstrap-DEA-override-delay.patch delete mode 100644 patches/opnfv-fuel/0009-dea_base-replace-grub-pc-by-grub-efi-arm64.patch delete mode 100644 patches/opnfv-fuel/0010-post-scripts-Allow-SSH-on-non-admin-ifaces.patch delete mode 100644 patches/opnfv-fuel/0015-build-Makefile-Overrideable-product-commit-hash.patch delete mode 100644 patches/opnfv-fuel/0020-Add-arm64-deb-repositories-setup.patch delete mode 100644 patches/opnfv-fuel/0021-Build-bootstrap-image-for-arm64.patch delete mode 100644 patches/opnfv-fuel/0022-bootstrap-Use-public-Ubuntu-ports-mirrors.patch delete mode 100644 patches/opnfv-fuel/0027-UX-Update-bootstrap-target-build-time-estimate.patch delete mode 100644 patches/opnfv-fuel/0028-bootstrap-Add-lshw-package.patch delete mode 100644 patches/opnfv-fuel/0030-deploy.py-add-a-time-stamp-to-the-new-ISO-image.patch delete mode 100644 patches/opnfv-fuel/0031-post-scripts-Enable-systemd-binfmt-for-first-boot.patch delete mode 100644 patches/opnfv-fuel/0032-mcagent-Increase-max-shell-command-timeout-to-2h.patch delete mode 100644 patches/opnfv-fuel/0033-bootstrap-Use-gzip-instead-of-xz-compression.patch delete mode 100644 patches/opnfv-fuel/0034-Nailgun-Increase-target-image-build-timeout.patch delete mode 100644 patches/opnfv-fuel/0035-m1.micro-Increase-profile-RAM-size-to-128MB.patch delete mode 100644 patches/opnfv-fuel/0039-deploy-Fix-add-bootstrap-DEA-override-delay.patch delete mode 100644 patches/opnfv-fuel/0040-Backport-dpkg-checkbuilddeps-to-mk-build-deps.patch delete mode 100644 patches/opnfv-fuel/0043-build-Add-armband.mk-config.patch delete mode 100644 patches/opnfv-fuel/0046-build-Use-OPNFV_GIT_SHA-for-ISO-preparer-ID.patch delete mode 100644 patches/opnfv-fuel/0048-fpb-Support-multiple-versions-of-packages.patch delete mode 100644 patches/opnfv-fuel/0054-net-check-add-support-for-faulty-operstate.patch delete mode 100644 patches/opnfv-fuel/0055-build-docker-Use-host-s-network-stack.patch create mode 100644 patches/opnfv-fuel/arm64-bug-fixes/0001-bootstrap-Add-lshw-package.patch create mode 100644 patches/opnfv-fuel/arm64-bug-fixes/0002-net-check-add-support-for-faulty-operstate.patch create mode 100644 patches/opnfv-fuel/cross-bootstrap/0001-UX-Update-bootstrap-target-build-time-estimate.patch create mode 100644 patches/opnfv-fuel/cross-bootstrap/0002-Build-bootstrap-image-for-arm64.patch create mode 100644 patches/opnfv-fuel/cross-bootstrap/0003-bootstrap-Use-public-Ubuntu-ports-mirrors.patch create mode 100644 patches/opnfv-fuel/cross-bootstrap/0004-post-scripts-Enable-systemd-binfmt-for-first-boot.patch create mode 100644 patches/opnfv-fuel/cross-bootstrap/0005-mcagent-Increase-max-shell-command-timeout-to-2h.patch create mode 100644 patches/opnfv-fuel/cross-bootstrap/0006-bootstrap-Use-gzip-instead-of-xz-compression.patch create mode 100644 patches/opnfv-fuel/cross-bootstrap/0007-Nailgun-Increase-target-image-build-timeout.patch create mode 100644 patches/opnfv-fuel/cross-bootstrap/0008-m1.micro-Increase-profile-RAM-size-to-128MB.patch create mode 100644 patches/opnfv-fuel/kernel-bump/0001-kernel-flavor-linux-image-generic-lts-xenial.patch create mode 100644 patches/opnfv-fuel/multiarch-efi/0001-FIXME-deploy-EFI-Skip-re-ordering-boot-via-IPMI.patch create mode 100644 patches/opnfv-fuel/multiarch-mirrors/0001-Add-arm64-deb-repositories-setup.patch create mode 100644 patches/opnfv-fuel/multiarch-plugins/0001-fpb-Support-multiple-versions-of-packages.patch create mode 100644 patches/opnfv-fuel/upstream-backports/0001-deploy.sh-Remove-check-for-root-rm-umask-0000.patch create mode 100644 patches/opnfv-fuel/upstream-backports/0002-Backport-dpkg-checkbuilddeps-to-mk-build-deps.patch (limited to 'patches') diff --git a/patches/fuel-agent/0001-Use-qemu-debootstrap-for-image-creation.patch b/patches/fuel-agent/0001-Use-qemu-debootstrap-for-image-creation.patch deleted file mode 100644 index 6f28d8a3..00000000 --- a/patches/fuel-agent/0001-Use-qemu-debootstrap-for-image-creation.patch +++ /dev/null @@ -1,154 +0,0 @@ -From: Stanislaw Kardach -Date: Thu, 25 Feb 2016 13:38:14 +0100 -Subject: [PATCH] Use qemu-debootstrap for image creation - -This commit adds qemu-debootstrap support and a command line argument -`target_arch` which can be used for choosing the architecture to build -the image for. The architecture detection from environment settings is -not yet implemented. ---- - .../fuel_bootstrap_cli/fuel_bootstrap/commands/build.py | 8 ++++++++ - .../fuel_bootstrap/utils/bootstrap_image.py | 3 ++- - debian/control | 2 ++ - fuel_agent/manager.py | 13 ++++++++++++- - fuel_agent/tests/test_build_utils.py | 4 ++-- - fuel_agent/utils/build.py | 2 +- - specs/fuel-agent.spec | 2 ++ - 7 files changed, 29 insertions(+), 5 deletions(-) - -diff --git a/contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/commands/build.py b/contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/commands/build.py -index ca2d3e1..b0d410d 100644 ---- a/contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/commands/build.py -+++ b/contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/commands/build.py -@@ -166,4 +166,12 @@ class BuildCommand(command.Command): - ) -+ parser.add_argument( -+ '--target_arch', -+ type=str, -+ choices=['arm64', 'amd64'], -+ help="Choose the target architecture for which image is built", -+ default="amd64" -+ ) -+ - return parser - - def take_action(self, parsed_args): -diff --git a/contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/utils/bootstrap_image.py b/contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/utils/bootstrap_image.py -index 0219961..6e60fb8 100644 ---- a/contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/utils/bootstrap_image.py -+++ b/contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/utils/bootstrap_image.py -@@ -172,7 +172,8 @@ def make_bootstrap(data): - - LOG.info("Try to build image with data:\n%s", yaml.safe_dump(bootdata)) - -- opts = ['--data_driver', 'bootstrap_build_image'] -+ opts = ['--data_driver', 'bootstrap_build_image', -+ '--target_arch', data['target_arch']] - if data.get('image_build_dir'): - opts.extend(['--image_build_dir', data['image_build_dir']]) - -diff --git a/debian/control b/debian/control -index 0a6f947..189dc00 100644 ---- a/debian/control -+++ b/debian/control -@@ -36,6 +36,8 @@ Pre-Depends: dpkg (>= 1.15.6~) - Depends: bzip2, - cloud-utils, - debootstrap, -+ qemu-user-static, -+ binfmt-support, - dmidecode, - ethtool, - gdisk, -diff --git a/fuel_agent/manager.py b/fuel_agent/manager.py -index 15cc5d8..f613aef 100644 ---- a/fuel_agent/manager.py -+++ b/fuel_agent/manager.py -@@ -18,5 +18,6 @@ import shutil - - from oslo_config import cfg -+from oslo_config import types - import six - import yaml - -@@ -33,6 +34,8 @@ from fuel_agent.utils import md as mu - from fuel_agent.utils import partition as pu - from fuel_agent.utils import utils - -+ArchType = types.String(choices=['amd64', 'arm64']) -+ - opts = [ - cfg.StrOpt( - 'nc_template_path', -@@ -153,6 +156,13 @@ cli_opts = [ - default='/tmp', - help='Directory where the image is supposed to be built', - ), -+ cfg.Opt( -+ 'target_arch', -+ default='amd64', -+ type=ArchType, -+ help='Architecture for which image will be built using ' -+ 'debootstrap', -+ ), - ] - - CONF = cfg.CONF -@@ -551,7 +561,8 @@ class Manager(object): - LOG.debug('Preventing services from being get started') - bu.suppress_services_start(chroot) - LOG.debug('Installing base operating system using debootstrap') -- bu.run_debootstrap(uri=uri, suite=suite, chroot=chroot, -+ bu.run_debootstrap(uri=uri, suite=suite, arch=CONF.target_arch, -+ chroot=chroot, - attempts=CONF.fetch_packages_attempts, - proxies=proxies.proxies, - direct_repo_addr=proxies.direct_repo_addr_list) -diff --git a/fuel_agent/tests/test_build_utils.py b/fuel_agent/tests/test_build_utils.py -index 82c3462..ac5ae82 100644 ---- a/fuel_agent/tests/test_build_utils.py -+++ b/fuel_agent/tests/test_build_utils.py -@@ -42,7 +42,7 @@ class BuildUtilsTestCase(unittest2.TestCase): - def test_run_debootstrap(self, mock_exec, mock_environ): - bu.run_debootstrap('uri', 'suite', 'chroot', 'arch', attempts=2) - mock_exec.assert_called_once_with( -- 'debootstrap', '--include={0}' -+ 'qemu-debootstrap', '--include={0}' - .format(','.join(bu.ADDITIONAL_DEBOOTSTRAP_PACKAGES)), - '--verbose', '--no-check-gpg', '--arch=arch', - 'suite', 'chroot', 'uri', attempts=2, env_variables={}) -@@ -53,7 +53,7 @@ class BuildUtilsTestCase(unittest2.TestCase): - bu.run_debootstrap('uri', 'suite', 'chroot', 'arch', eatmydata=True, - attempts=2) - mock_exec.assert_called_once_with( -- 'debootstrap', '--include={0}' -+ 'qemu-debootstrap', '--include={0}' - .format(','.join(bu.ADDITIONAL_DEBOOTSTRAP_PACKAGES)), - '--verbose', '--no-check-gpg', '--arch=arch', - '--include=eatmydata', 'suite', -diff --git a/fuel_agent/utils/build.py b/fuel_agent/utils/build.py -index 7247965..af41b2b 100644 ---- a/fuel_agent/utils/build.py -+++ b/fuel_agent/utils/build.py -@@ -80,7 +80,7 @@ def run_debootstrap(uri, suite, chroot, arch='amd64', eatmydata=False, - env_vars['no_proxy'] = ','.join(direct_repo_addr) - LOG.debug('Setting no_proxy for: {0}'.format(env_vars['no_proxy'])) - -- cmds = ['debootstrap', -+ cmds = ['qemu-debootstrap', - '--include={0}'.format(",".join(ADDITIONAL_DEBOOTSTRAP_PACKAGES)), - '--verbose', '--no-check-gpg', - '--arch={0}'.format(arch)] -diff --git a/specs/fuel-agent.spec b/specs/fuel-agent.spec -index 5c37600..a43f693 100644 ---- a/specs/fuel-agent.spec -+++ b/specs/fuel-agent.spec -@@ -50,6 +50,8 @@ Requires: xfsprogs - Requires: pciutils - Requires: ethtool - Requires: debootstrap -+Requires: dpkg -+Requires: qemu-user-static - Requires: xz - Requires: coreutils - Requires: psmisc diff --git a/patches/fuel-agent/0002-Add-FLASH_KERNEL_SKIP-true.patch b/patches/fuel-agent/0002-Add-FLASH_KERNEL_SKIP-true.patch deleted file mode 100644 index 0c2f2ac9..00000000 --- a/patches/fuel-agent/0002-Add-FLASH_KERNEL_SKIP-true.patch +++ /dev/null @@ -1,21 +0,0 @@ -From: Alexandru Avadanii -Date: Thu, 25 Feb 2016 16:01:18 +0100 -Subject: [PATCH] Add FLASH_KERNEL_SKIP=true. - -FIXME: Add nice description of the issue at hand. ---- - fuel_agent/utils/build.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/fuel_agent/utils/build.py b/fuel_agent/utils/build.py -index af41b2b..6f31732 100644 ---- a/fuel_agent/utils/build.py -+++ b/fuel_agent/utils/build.py -@@ -97,6 +97,7 @@ def set_apt_get_env(): - # NOTE(agordeev): disable any confirmations/questions from apt-get side - os.environ['DEBIAN_FRONTEND'] = 'noninteractive' - os.environ['DEBCONF_NONINTERACTIVE_SEEN'] = 'true' -+ os.environ['FLASH_KERNEL_SKIP'] = 'true' - os.environ['LC_ALL'] = os.environ['LANG'] = os.environ['LANGUAGE'] = 'C' - - diff --git a/patches/fuel-agent/0003-Fix-qemu-user-static-replacement.patch b/patches/fuel-agent/0003-Fix-qemu-user-static-replacement.patch deleted file mode 100644 index a4f65d68..00000000 --- a/patches/fuel-agent/0003-Fix-qemu-user-static-replacement.patch +++ /dev/null @@ -1,55 +0,0 @@ -From: Stanislaw Kardach -Date: Sun, 6 Mar 2016 16:09:39 +0100 -Subject: [PATCH] Fix qemu-user-static replacement - ---- - fuel_agent/manager.py | 6 ++++++ - fuel_agent/utils/build.py | 18 ++++++++++++++++++ - 2 files changed, 24 insertions(+) - -diff --git a/fuel_agent/manager.py b/fuel_agent/manager.py -index f613aef..6322a10 100644 ---- a/fuel_agent/manager.py -+++ b/fuel_agent/manager.py -@@ -587,6 +587,12 @@ class Manager(object): - fu.mount_bind(chroot, '/proc') - bu.populate_basic_dev(chroot) - -+ # we need to make sure that qemu-{target_arch}-static binary is -+ # not replaced inside chroot because we're possibly using it -+ # through qemu-debootstrap -+ LOG.debug('Preventing qemu-user-static replacement inside chroot') -+ bu.prevent_qemu_replacement(chroot, CONF.target_arch) -+ - def destroy_chroot(self, chroot): - # Umount chroot tree and remove images tmp files - if not bu.stop_chrooted_processes(chroot, signal=signal.SIGTERM): -diff --git a/fuel_agent/utils/build.py b/fuel_agent/utils/build.py -index 6f31732..abd762e 100644 ---- a/fuel_agent/utils/build.py -+++ b/fuel_agent/utils/build.py -@@ -312,6 +312,24 @@ def populate_basic_dev(chroot): - utils.execute('chroot', chroot, - 'ln', '-s', '/proc/self/fd', '/dev/fd') - -+def prevent_qemu_replacement(chroot, arch): -+ """Prevents qemu-user-static replacement inside chroot. -+ -+ Use dpkg-divert to prevent replacing qemu-user-static binary inside -+ chroot which is necessary for host-side qemu-debootstrap to work -+ properly.""" -+ if arch == 'arm64': -+ qemu = 'qemu-aarch64-static' -+ elif arch == 'amd64': -+ qemu = 'qemu-x86_64-static' -+ utils.execute('chroot', chroot, -+ 'dpkg-divert', '--divert', '/usr/bin/%s.orig' % qemu, -+ '/usr/bin/%s' % qemu) -+ utils.execute('chroot', chroot, -+ 'dpkg-divert', '--divert', '/usr/sbin/update-binfmts.orig', -+ '--rename', '/usr/sbin/update-binfmts') -+ utils.execute('chroot', chroot, 'ln', '-sf', '/bin/true', -+ '/usr/sbin/update-binfmts') - - def create_sparse_tmp_file(dir, suffix, size=8192): - """Creates sparse file. diff --git a/patches/fuel-agent/0004-Prevent-common-cross-debootstrap-newaliases-issue.patch b/patches/fuel-agent/0004-Prevent-common-cross-debootstrap-newaliases-issue.patch deleted file mode 100644 index 37017e1a..00000000 --- a/patches/fuel-agent/0004-Prevent-common-cross-debootstrap-newaliases-issue.patch +++ /dev/null @@ -1,101 +0,0 @@ -From: Alexandru Avadanii -Date: Tue, 8 Mar 2016 00:44:05 +0100 -Subject: [PATCH] Prevent common cross-debootstrap newaliases issue. - -While building target images for a different arch (using qemu-user-static), -the following issue prevents the succesful image build: -newaliases: fatal: inet_addr_local[getifaddrs]: -getifaddrs: Address family not supported by protocol - -For more information, see [1]. - -[1] https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1531299 ---- - fuel_agent/manager.py | 14 ++++++++++++++ - fuel_agent/utils/build.py | 24 ++++++++++++++++++++++++ - 2 files changed, 38 insertions(+) - -diff --git a/fuel_agent/manager.py b/fuel_agent/manager.py -index 6322a10..843c40b 100644 ---- a/fuel_agent/manager.py -+++ b/fuel_agent/manager.py -@@ -836,10 +836,15 @@ class Manager(object): - direct_repo_addrs=driver_os.proxies.direct_repo_addr_list) - self._update_metadata_with_repos( - metadata, driver_os.repos) -+ # Prevent common cross-debootstraping problem w/ newaliases & qemu -+ # inet_addr_local[getifaddrs]: getifaddrs: Address family not supp -+ LOG.debug('Preventing newaliases from running inside chroot') -+ bu.prevent_qemu_newaliases(chroot) - LOG.debug('Installing packages using apt-get: %s', - ' '.join(packages)) - # disable hosts/resolv files - bu.propagate_host_resolv_conf(chroot) -+ - if hasattr(bs_scheme, 'certs') and bs_scheme.certs: - bu.copy_update_certs(bs_scheme.certs, chroot) - bu.run_apt_get(chroot, packages=packages, -@@ -873,5 +878,6 @@ class Manager(object): - # restore disabled hosts/resolv files - bu.restore_resolv_conf(chroot) -+ bu.restore_newaliases(chroot) - metadata['all_packages'] = bu.get_installed_packages(chroot) - # We need to recompress initramfs with new compression: - bu.recompress_initramfs( -@@ -964,6 +970,11 @@ class Manager(object): - self._update_metadata_with_repos( - metadata, driver_os.repos) - -+ # Prevent common cross-debootstraping problem w/ newaliases & qemu -+ # inet_addr_local[getifaddrs]: getifaddrs: Address family not supp -+ LOG.debug('Preventing newaliases from running inside chroot') -+ bu.prevent_qemu_newaliases(chroot) -+ - LOG.debug('Installing packages using apt-get: %s', - ' '.join(packages)) - bu.run_apt_get(chroot, packages=packages, -@@ -974,6 +985,9 @@ class Manager(object): - allow_unsigned_file=CONF.allow_unsigned_file, - force_ipv4_file=CONF.force_ipv4_file) - -+ LOG.debug('Restoring newaliases command inside chroot') -+ bu.restore_newaliases(chroot) -+ - LOG.debug('Making sure there are no running processes ' - 'inside chroot before trying to umount chroot') - if not bu.stop_chrooted_processes(chroot, signal=signal.SIGTERM): -diff --git a/fuel_agent/utils/build.py b/fuel_agent/utils/build.py -index abd762e..e11ceba 100644 ---- a/fuel_agent/utils/build.py -+++ b/fuel_agent/utils/build.py -@@ -331,6 +331,30 @@ def prevent_qemu_replacement(chroot, arch): - utils.execute('chroot', chroot, 'ln', '-sf', '/bin/true', - '/usr/sbin/update-binfmts') - -+def prevent_qemu_newaliases(chroot): -+ """Prevents running newaliases under qemu-user-static inside chroot. -+ -+ Use dpkg-divert to prevent running newaliases binary through qemu inside -+ chroot which is necessary to avoid a dpkg --configure error: -+ inet_addr_local[getifaddrs]: getifaddrs: Address family not supported ... -+ """ -+ utils.execute('chroot', chroot, -+ 'dpkg-divert', '--local', '--rename', '--add', -+ '/usr/bin/newaliases') -+ utils.execute('chroot', chroot, 'ln', '-sf', '/bin/true', -+ '/usr/bin/newaliases') -+ -+def restore_newaliases(chroot): -+ """Restores newaliases inside chroot after previous dpkg-divert. -+ -+ opposite to prevent_qemu_newaliases -+ """ -+ utils.execute('chroot', chroot, -+ 'rm', '-f', '/usr/bin/newaliases') -+ utils.execute('chroot', chroot, -+ 'dpkg-divert', '--local', '--rename', '--remove', -+ '/usr/bin/newaliases') -+ - def create_sparse_tmp_file(dir, suffix, size=8192): - """Creates sparse file. - diff --git a/patches/fuel-agent/0005-Add-esp-partition-flag.patch b/patches/fuel-agent/0005-Add-esp-partition-flag.patch deleted file mode 100644 index 2ecec416..00000000 --- a/patches/fuel-agent/0005-Add-esp-partition-flag.patch +++ /dev/null @@ -1,48 +0,0 @@ -From: Alexandru Avadanii -Date: Tue, 8 Mar 2016 16:29:39 +0100 -Subject: [PATCH] Add partition flag. - -Parted flag (see [1]) will mark EFI system partition, allowing us -to properly format and mount it during do_partitioning deployment phase. - -[1] https://www.gnu.org/software/parted/manual/html_node/set.html ---- - fuel_agent/drivers/nailgun.py | 2 +- - fuel_agent/utils/partition.py | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/fuel_agent/drivers/nailgun.py b/fuel_agent/drivers/nailgun.py -index c2fef69..0ae81f9 100644 ---- a/fuel_agent/drivers/nailgun.py -+++ b/fuel_agent/drivers/nailgun.py -@@ -324,7 +324,7 @@ class Nailgun(BaseDataDriver): - # uefi partition (for future use) - LOG.debug('Adding UEFI partition on disk %s: size=200' % - disk['name']) -- parted.add_partition(size=200) -+ parted.add_partition(size=200, flags=['esp']) - - LOG.debug('Looping over all volumes on disk %s' % disk['name']) - for volume in disk['volumes']: -diff --git a/fuel_agent/utils/partition.py b/fuel_agent/utils/partition.py -index acdd0b3..86349d2 100644 ---- a/fuel_agent/utils/partition.py -+++ b/fuel_agent/utils/partition.py -@@ -93,7 +93,7 @@ def set_partition_flag(dev, num, flag, state='on'): - :param dev: A device file, e.g. /dev/sda. - :param num: Partition number - :param flag: Flag name. Must be one of 'bios_grub', 'legacy_boot', -- 'boot', 'raid', 'lvm' -+ 'boot', 'raid', 'lvm', 'esp' - :param state: Desiable flag state. 'on' or 'off'. Default is 'on'. - - :returns: None -@@ -103,7 +103,7 @@ def set_partition_flag(dev, num, flag, state='on'): - # parted supports more flags but we are interested in - # setting only this subset of them. - # not all of these flags are compatible with one another. -- if flag not in ('bios_grub', 'legacy_boot', 'boot', 'raid', 'lvm'): -+ if flag not in ('bios_grub', 'legacy_boot', 'boot', 'raid', 'lvm', 'esp'): - raise errors.WrongPartitionSchemeError( - 'Unsupported partition flag: %s' % flag) - if state not in ('on', 'off'): diff --git a/patches/fuel-agent/0007-Add-fs-for-efi-partition.patch b/patches/fuel-agent/0007-Add-fs-for-efi-partition.patch deleted file mode 100644 index 0fb94215..00000000 --- a/patches/fuel-agent/0007-Add-fs-for-efi-partition.patch +++ /dev/null @@ -1,66 +0,0 @@ -From: Stanislaw Kardach -Date: Tue, 8 Mar 2016 21:08:55 +0100 -Subject: [PATCH] Add fs for efi partition - ---- - debian/control | 1 + - fuel_agent/drivers/nailgun.py | 13 ++++++++++--- - specs/fuel-agent.spec | 1 + - 3 files changed, 12 insertions(+), 3 deletions(-) - -diff --git a/debian/control b/debian/control -index 189dc00..acfda35 100644 ---- a/debian/control -+++ b/debian/control -@@ -39,6 +39,7 @@ Depends: bzip2, - qemu-user-static, - binfmt-support, - dmidecode, -+ dosfstools, - ethtool, - gdisk, - genisoimage, -diff --git a/fuel_agent/drivers/nailgun.py b/fuel_agent/drivers/nailgun.py -index bc532b4..f092865 100644 ---- a/fuel_agent/drivers/nailgun.py -+++ b/fuel_agent/drivers/nailgun.py -@@ -81,6 +81,9 @@ class Nailgun(BaseDataDriver): - # was already allocated on first matching volume - # or not - self._boot_partition_done = False -+ # this var states whether ESP partition was already -+ # allocated on the first matching volume or not -+ self._esp_partition_done = False - # this var is used as a flag that /boot fs - # has already been added. we need this to - # get rid of md over all disks for /boot partition. -@@ -321,10 +324,14 @@ class Nailgun(BaseDataDriver): - LOG.debug('Adding bios_grub partition on disk %s: size=24' % - disk['name']) - parted.add_partition(size=24, flags=['bios_grub']) -- # uefi partition (for future use) -- LOG.debug('Adding UEFI partition on disk %s: size=200' % -+ # uefi partition - added only once. -+ if self._is_boot_disk(disk) and not self._esp_partition_done: -+ LOG.debug('Adding UEFI partition on disk %s: size=200' % - disk['name']) -- parted.add_partition(size=200, flags=['esp']) -+ prt = parted.add_partition(size=200, flags=['esp']) -+ partition_scheme.add_fs(device=prt.name, mount='/boot/efi', -+ fs_type='vfat') -+ self._esp_partition_done = True - - LOG.debug('Looping over all volumes on disk %s' % disk['name']) - for volume in disk['volumes']: -diff --git a/specs/fuel-agent.spec b/specs/fuel-agent.spec -index a43f693..c2b9b51 100644 ---- a/specs/fuel-agent.spec -+++ b/specs/fuel-agent.spec -@@ -50,6 +50,7 @@ Requires: xfsprogs - Requires: pciutils - Requires: ethtool - Requires: debootstrap -+Requires: dosfstools - Requires: dpkg - Requires: qemu-user-static - Requires: xz diff --git a/patches/fuel-agent/0009-FIXME-Add-force-yes-to-apt-get-dist-upgrade.patch b/patches/fuel-agent/0009-FIXME-Add-force-yes-to-apt-get-dist-upgrade.patch deleted file mode 100644 index 90428c57..00000000 --- a/patches/fuel-agent/0009-FIXME-Add-force-yes-to-apt-get-dist-upgrade.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: Alexandru Avadanii -Date: Fri, 8 Apr 2016 15:28:43 +0200 -Subject: [PATCH] FIXME: Add --force-yes to apt-get dist-upgrade. - -arm64 udev in Ubuntu Trusty is broken, so we had to provide our own -patched udev package in armband MOS repos. - -Due to dpkg version comparison algorithm, our MOS version of udev -is considered a downgrade, which requires --force-yes for -apt-get dist-upgrade to work and pick up this version, otherwise -bootstrap/target image build would fail with apt-get error code 100. - -This change can be dropped later, if other packages do not manifest -the same behavior. ---- - fuel_agent/utils/build.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/fuel_agent/utils/build.py b/fuel_agent/utils/build.py -index e11ceba..8cca26d 100644 ---- a/fuel_agent/utils/build.py -+++ b/fuel_agent/utils/build.py -@@ -111,7 +111,7 @@ def run_apt_get(chroot, packages, eatmydata=False, attempts=10): - time in X times. - """ - for action in ('update', 'dist-upgrade'): -- cmds = ['chroot', chroot, 'apt-get', '-y', action] -+ cmds = ['chroot', chroot, 'apt-get', '-y', '--force-yes', action] - stdout, stderr = utils.execute(*cmds, attempts=attempts) - LOG.debug('Running apt-get %s completed.\nstdout: %s\nstderr: %s', - action, stdout, stderr) diff --git a/patches/fuel-agent/0010-UX-Update-bootstrap-target-build-time-estimate.patch b/patches/fuel-agent/0010-UX-Update-bootstrap-target-build-time-estimate.patch deleted file mode 100644 index d8a7588f..00000000 --- a/patches/fuel-agent/0010-UX-Update-bootstrap-target-build-time-estimate.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: Alexandru Avadanii -Date: Mon, 9 May 2016 17:08:06 +0200 -Subject: [PATCH] UX: Update bootstrap/target build time estimate. - -While building for a different architecture (e.g. AArch64 on x86_64), -the bootstrap/target image build may take longer, due to latency -introduced by using qemu-user-static. - -Signed-off-by: Alexandru Avadanii ---- - .../fuel_bootstrap_cli/fuel_bootstrap/utils/bootstrap_image.py | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/utils/bootstrap_image.py b/contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/utils/bootstrap_image.py -index 6e60fb8..95bc08a 100644 ---- a/contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/utils/bootstrap_image.py -+++ b/contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/utils/bootstrap_image.py -@@ -180,9 +180,12 @@ def make_bootstrap(data): - OSLO_CONF = cfg.CONF - OSLO_CONF(opts, project='fuel-agent') - mngr = manager.Manager(bootdata) -- LOG.info("Build process is in progress. Usually it takes 15-20 minutes." -- " It depends on your internet connection and hardware" -- " performance.") -+ LOG.info("Build process is in progress. Usually it takes 15-20 minutes for" -+ " a native build (x86_64) and/or 30-45 minutes for each" -+ " cross-build (e.g. AArch64)." -+ " It depends on your internet connection, hardware performance" -+ " and selected bootstrap architecture(s)." -+ " This ISO supports AArch64 only.") - mngr.do_mkbootstrap() - - return bootdata['bootstrap']['uuid'], bootdata['output'] diff --git a/patches/fuel-agent/0011-kernel-flavor-linux-image-generic-lts-xenial.patch b/patches/fuel-agent/0011-kernel-flavor-linux-image-generic-lts-xenial.patch deleted file mode 100644 index c94bc4aa..00000000 --- a/patches/fuel-agent/0011-kernel-flavor-linux-image-generic-lts-xenial.patch +++ /dev/null @@ -1,28 +0,0 @@ -From: Alexandru Avadanii -Date: Thu, 4 Aug 2016 12:44:53 +0200 -Subject: [PATCH] kernel-flavor: linux-image-generic-lts-xenial - -Ubuntu arm64: switch from using kernel 4.2 for Trusty -(linux-image-generic-lts-trusty) to kernel 4.4 backported from Xenial -(linux-image-generic-lts-xenial). - -Signed-off-by: Alexandru Avadanii ---- - fuel_agent/drivers/nailgun.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/fuel_agent/drivers/nailgun.py b/fuel_agent/drivers/nailgun.py -index 5ff1cf6..1463f22 100644 ---- a/fuel_agent/drivers/nailgun.py -+++ b/fuel_agent/drivers/nailgun.py -@@ -734,8 +734,8 @@ class NailgunBuildImage(BaseDataDriver): - "i40e-dkms", - "linux-firmware", - "linux-firmware-nonfree", -- "linux-headers-generic-lts-trusty", -- "linux-image-generic-lts-trusty", -+ "linux-headers-generic-lts-xenial", -+ "linux-image-generic-lts-xenial", - "lvm2", - "mcollective", - "mdadm", diff --git a/patches/fuel-agent/cross-bootstrap/0001-Use-qemu-debootstrap-for-image-creation.patch b/patches/fuel-agent/cross-bootstrap/0001-Use-qemu-debootstrap-for-image-creation.patch new file mode 100644 index 00000000..54e8027e --- /dev/null +++ b/patches/fuel-agent/cross-bootstrap/0001-Use-qemu-debootstrap-for-image-creation.patch @@ -0,0 +1,157 @@ +From: Stanislaw Kardach +Date: Thu, 25 Feb 2016 13:38:14 +0100 +Subject: [PATCH] Use qemu-debootstrap for image creation + +This commit adds qemu-debootstrap support and a command line argument +`target_arch` which can be used for choosing the architecture to build +the image for. The architecture detection from environment settings is +not yet implemented. +--- + .../fuel_bootstrap_cli/fuel_bootstrap/commands/build.py | 8 ++++++++ + .../fuel_bootstrap/utils/bootstrap_image.py | 3 ++- + debian/control | 2 ++ + fuel_agent/manager.py | 13 ++++++++++++- + fuel_agent/tests/test_build_utils.py | 4 ++-- + fuel_agent/utils/build.py | 2 +- + specs/fuel-agent.spec | 2 ++ + 7 files changed, 29 insertions(+), 5 deletions(-) + +diff --git a/contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/commands/build.py b/contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/commands/build.py +index b4e9a05..a22d319 100644 +--- a/contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/commands/build.py ++++ b/contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/commands/build.py +@@ -171,6 +171,14 @@ class BuildCommand(command.Command): + " by ssh still rejected by default! This password actual" + " only for tty login!"), + ) ++ parser.add_argument( ++ '--target_arch', ++ type=str, ++ choices=['arm64', 'amd64'], ++ help="Choose the target architecture for which image is built", ++ default="amd64" ++ ) ++ + return parser + + def take_action(self, parsed_args): +diff --git a/contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/utils/bootstrap_image.py b/contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/utils/bootstrap_image.py +index c09d421..a535075 100644 +--- a/contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/utils/bootstrap_image.py ++++ b/contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/utils/bootstrap_image.py +@@ -161,7 +161,8 @@ def make_bootstrap(data): + + LOG.info("Try to build image with data:\n%s", yaml.safe_dump(bootdata)) + +- opts = ['--data_driver', 'bootstrap_build_image'] ++ opts = ['--data_driver', 'bootstrap_build_image', ++ '--target_arch', data['target_arch']] + if data.get('image_build_dir'): + opts.extend(['--image_build_dir', data['image_build_dir']]) + +diff --git a/debian/control b/debian/control +index d24450c..e843980 100644 +--- a/debian/control ++++ b/debian/control +@@ -37,6 +37,8 @@ Pre-Depends: dpkg (>= 1.15.6~) + Depends: bzip2, + cloud-utils, + debootstrap, ++ qemu-user-static, ++ binfmt-support, + dmidecode, + ethtool, + gdisk, +diff --git a/fuel_agent/manager.py b/fuel_agent/manager.py +index df54f65..ba1ab78 100644 +--- a/fuel_agent/manager.py ++++ b/fuel_agent/manager.py +@@ -19,6 +19,7 @@ import signal + import tempfile + + from oslo_config import cfg ++from oslo_config import types + import six + import yaml + +@@ -34,6 +35,8 @@ from fuel_agent.utils import md as mu + from fuel_agent.utils import partition as pu + from fuel_agent.utils import utils + ++ArchType = types.String(choices=['amd64', 'arm64']) ++ + opts = [ + cfg.StrOpt( + 'nc_template_path', +@@ -192,6 +195,13 @@ cli_opts = [ + default='/tmp', + help='Directory where the image is supposed to be built', + ), ++ cfg.Opt( ++ 'target_arch', ++ default='amd64', ++ type=ArchType, ++ help='Architecture for which image will be built using ' ++ 'debootstrap', ++ ), + ] + + CONF = cfg.CONF +@@ -724,7 +734,8 @@ class Manager(object): + LOG.debug('Preventing services from being get started') + bu.suppress_services_start(chroot) + LOG.debug('Installing base operating system using debootstrap') +- bu.run_debootstrap(uri=uri, suite=suite, chroot=chroot, ++ bu.run_debootstrap(uri=uri, suite=suite, arch=CONF.target_arch, ++ chroot=chroot, + attempts=CONF.fetch_packages_attempts, + proxies=proxies.proxies, + direct_repo_addr=proxies.direct_repo_addr_list) +diff --git a/fuel_agent/tests/test_build_utils.py b/fuel_agent/tests/test_build_utils.py +index 54f79f9..0ec466f 100644 +--- a/fuel_agent/tests/test_build_utils.py ++++ b/fuel_agent/tests/test_build_utils.py +@@ -43,7 +43,7 @@ class BuildUtilsTestCase(unittest2.TestCase): + def test_run_debootstrap(self, mock_exec, mock_environ): + bu.run_debootstrap('uri', 'suite', 'chroot', 'arch', attempts=2) + mock_exec.assert_called_once_with( +- 'debootstrap', '--include={0}' ++ 'qemu-debootstrap', '--include={0}' + .format(','.join(bu.ADDITIONAL_DEBOOTSTRAP_PACKAGES)), + '--verbose', '--no-check-gpg', '--arch=arch', + 'suite', 'chroot', 'uri', attempts=2, env_variables={}) +@@ -54,7 +54,7 @@ class BuildUtilsTestCase(unittest2.TestCase): + bu.run_debootstrap('uri', 'suite', 'chroot', 'arch', eatmydata=True, + attempts=2) + mock_exec.assert_called_once_with( +- 'debootstrap', '--include={0}' ++ 'qemu-debootstrap', '--include={0}' + .format(','.join(bu.ADDITIONAL_DEBOOTSTRAP_PACKAGES)), + '--verbose', '--no-check-gpg', '--arch=arch', + '--include=eatmydata', 'suite', +diff --git a/fuel_agent/utils/build.py b/fuel_agent/utils/build.py +index b1ecc0f..2950ad8 100644 +--- a/fuel_agent/utils/build.py ++++ b/fuel_agent/utils/build.py +@@ -76,7 +76,7 @@ def run_debootstrap(uri, suite, chroot, arch='amd64', eatmydata=False, + env_vars['no_proxy'] = ','.join(direct_repo_addr) + LOG.debug('Setting no_proxy for: {0}'.format(env_vars['no_proxy'])) + +- cmds = ['debootstrap', ++ cmds = ['qemu-debootstrap', + '--include={0}'.format(",".join(ADDITIONAL_DEBOOTSTRAP_PACKAGES)), + '--verbose', '--no-check-gpg', + '--arch={0}'.format(arch)] +diff --git a/specs/fuel-agent.spec b/specs/fuel-agent.spec +index 72cd6a1..18af4b9 100644 +--- a/specs/fuel-agent.spec ++++ b/specs/fuel-agent.spec +@@ -50,6 +50,8 @@ Requires: xfsprogs + Requires: pciutils + Requires: ethtool + Requires: debootstrap ++Requires: dpkg ++Requires: qemu-user-static + Requires: xz + Requires: coreutils + Requires: psmisc diff --git a/patches/fuel-agent/cross-bootstrap/0002-Add-FLASH_KERNEL_SKIP-true.patch b/patches/fuel-agent/cross-bootstrap/0002-Add-FLASH_KERNEL_SKIP-true.patch new file mode 100644 index 00000000..91483ac1 --- /dev/null +++ b/patches/fuel-agent/cross-bootstrap/0002-Add-FLASH_KERNEL_SKIP-true.patch @@ -0,0 +1,21 @@ +From: Alexandru Avadanii +Date: Thu, 25 Feb 2016 16:01:18 +0100 +Subject: [PATCH] Add FLASH_KERNEL_SKIP=true. + +FIXME: Add nice description of the issue at hand. +--- + fuel_agent/utils/build.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/fuel_agent/utils/build.py b/fuel_agent/utils/build.py +index 2950ad8..74cbfd8 100644 +--- a/fuel_agent/utils/build.py ++++ b/fuel_agent/utils/build.py +@@ -93,6 +93,7 @@ def set_apt_get_env(): + # NOTE(agordeev): disable any confirmations/questions from apt-get side + os.environ['DEBIAN_FRONTEND'] = 'noninteractive' + os.environ['DEBCONF_NONINTERACTIVE_SEEN'] = 'true' ++ os.environ['FLASH_KERNEL_SKIP'] = 'true' + os.environ['LC_ALL'] = os.environ['LANG'] = os.environ['LANGUAGE'] = 'C' + + diff --git a/patches/fuel-agent/cross-bootstrap/0003-Fix-qemu-user-static-replacement.patch b/patches/fuel-agent/cross-bootstrap/0003-Fix-qemu-user-static-replacement.patch new file mode 100644 index 00000000..3c849591 --- /dev/null +++ b/patches/fuel-agent/cross-bootstrap/0003-Fix-qemu-user-static-replacement.patch @@ -0,0 +1,55 @@ +From: Stanislaw Kardach +Date: Sun, 6 Mar 2016 16:09:39 +0100 +Subject: [PATCH] Fix qemu-user-static replacement + +--- + fuel_agent/manager.py | 6 ++++++ + fuel_agent/utils/build.py | 18 ++++++++++++++++++ + 2 files changed, 24 insertions(+) + +diff --git a/fuel_agent/manager.py b/fuel_agent/manager.py +index ba1ab78..637c99a 100644 +--- a/fuel_agent/manager.py ++++ b/fuel_agent/manager.py +@@ -760,6 +760,12 @@ class Manager(object): + fu.mount_bind(chroot, '/proc') + bu.populate_basic_dev(chroot) + ++ # we need to make sure that qemu-{target_arch}-static binary is ++ # not replaced inside chroot because we're possibly using it ++ # through qemu-debootstrap ++ LOG.debug('Preventing qemu-user-static replacement inside chroot') ++ bu.prevent_qemu_replacement(chroot, CONF.target_arch) ++ + def destroy_chroot(self, chroot): + # Umount chroot tree and remove images tmp files + if not bu.stop_chrooted_processes(chroot, signal=signal.SIGTERM): +diff --git a/fuel_agent/utils/build.py b/fuel_agent/utils/build.py +index 74cbfd8..1bc0a5f 100644 +--- a/fuel_agent/utils/build.py ++++ b/fuel_agent/utils/build.py +@@ -320,6 +320,24 @@ def populate_basic_dev(chroot): + utils.execute('chroot', chroot, + 'ln', '-s', '/proc/self/fd', '/dev/fd') + ++def prevent_qemu_replacement(chroot, arch): ++ """Prevents qemu-user-static replacement inside chroot. ++ ++ Use dpkg-divert to prevent replacing qemu-user-static binary inside ++ chroot which is necessary for host-side qemu-debootstrap to work ++ properly.""" ++ if arch == 'arm64': ++ qemu = 'qemu-aarch64-static' ++ elif arch == 'amd64': ++ qemu = 'qemu-x86_64-static' ++ utils.execute('chroot', chroot, ++ 'dpkg-divert', '--divert', '/usr/bin/%s.orig' % qemu, ++ '/usr/bin/%s' % qemu) ++ utils.execute('chroot', chroot, ++ 'dpkg-divert', '--divert', '/usr/sbin/update-binfmts.orig', ++ '--rename', '/usr/sbin/update-binfmts') ++ utils.execute('chroot', chroot, 'ln', '-sf', '/bin/true', ++ '/usr/sbin/update-binfmts') + + def create_sparse_tmp_file(dir, suffix, size=8192): + """Creates sparse file. diff --git a/patches/fuel-agent/cross-bootstrap/0004-Prevent-common-cross-debootstrap-newaliases-issue.patch b/patches/fuel-agent/cross-bootstrap/0004-Prevent-common-cross-debootstrap-newaliases-issue.patch new file mode 100644 index 00000000..75602951 --- /dev/null +++ b/patches/fuel-agent/cross-bootstrap/0004-Prevent-common-cross-debootstrap-newaliases-issue.patch @@ -0,0 +1,102 @@ +From: Alexandru Avadanii +Date: Tue, 8 Mar 2016 00:44:05 +0100 +Subject: [PATCH] Prevent common cross-debootstrap newaliases issue. + +While building target images for a different arch (using qemu-user-static), +the following issue prevents the succesful image build: +newaliases: fatal: inet_addr_local[getifaddrs]: +getifaddrs: Address family not supported by protocol + +For more information, see [1]. + +[1] https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1531299 +--- + fuel_agent/manager.py | 14 ++++++++++++++ + fuel_agent/utils/build.py | 24 ++++++++++++++++++++++++ + 2 files changed, 38 insertions(+) + +diff --git a/fuel_agent/manager.py b/fuel_agent/manager.py +index 637c99a..86f76b9 100644 +--- a/fuel_agent/manager.py ++++ b/fuel_agent/manager.py +@@ -1037,10 +1037,15 @@ class Manager(object): + direct_repo_addrs=driver_os.proxies.direct_repo_addr_list) + self._update_metadata_with_repos( + metadata, driver_os.repos) ++ # Prevent common cross-debootstraping problem w/ newaliases & qemu ++ # inet_addr_local[getifaddrs]: getifaddrs: Address family not supp ++ LOG.debug('Preventing newaliases from running inside chroot') ++ bu.prevent_qemu_newaliases(chroot) + LOG.debug('Installing packages using apt-get: %s', + ' '.join(packages)) + # disable hosts/resolv files + bu.propagate_host_resolv_conf(chroot) ++ + if hasattr(bs_scheme, 'certs') and bs_scheme.certs: + bu.copy_update_certs(bs_scheme.certs, chroot) + bu.run_apt_get(chroot, packages=packages, +@@ -1084,6 +1089,7 @@ class Manager(object): + add_multipath_conf=False) + # restore disabled hosts/resolv files + bu.restore_resolv_conf(chroot) ++ bu.restore_newaliases(chroot) + metadata['all_packages'] = bu.get_installed_packages(chroot) + # We need to recompress initramfs with new compression: + bu.recompress_initramfs( +@@ -1175,6 +1181,11 @@ class Manager(object): + self._update_metadata_with_repos( + metadata, driver_os.repos) + ++ # Prevent common cross-debootstraping problem w/ newaliases & qemu ++ # inet_addr_local[getifaddrs]: getifaddrs: Address family not supp ++ LOG.debug('Preventing newaliases from running inside chroot') ++ bu.prevent_qemu_newaliases(chroot) ++ + LOG.debug('Installing packages using apt-get: %s', + ' '.join(packages)) + bu.run_apt_get(chroot, packages=packages, +@@ -1187,6 +1198,9 @@ class Manager(object): + allow_unsigned_file=CONF.allow_unsigned_file, + force_ipv4_file=CONF.force_ipv4_file) + ++ LOG.debug('Restoring newaliases command inside chroot') ++ bu.restore_newaliases(chroot) ++ + LOG.debug('Making sure there are no running processes ' + 'inside chroot before trying to umount chroot') + if not bu.stop_chrooted_processes(chroot, signal=signal.SIGTERM): +diff --git a/fuel_agent/utils/build.py b/fuel_agent/utils/build.py +index 1bc0a5f..5761cc5 100644 +--- a/fuel_agent/utils/build.py ++++ b/fuel_agent/utils/build.py +@@ -339,6 +339,30 @@ def prevent_qemu_replacement(chroot, arch): + utils.execute('chroot', chroot, 'ln', '-sf', '/bin/true', + '/usr/sbin/update-binfmts') + ++def prevent_qemu_newaliases(chroot): ++ """Prevents running newaliases under qemu-user-static inside chroot. ++ ++ Use dpkg-divert to prevent running newaliases binary through qemu inside ++ chroot which is necessary to avoid a dpkg --configure error: ++ inet_addr_local[getifaddrs]: getifaddrs: Address family not supported ... ++ """ ++ utils.execute('chroot', chroot, ++ 'dpkg-divert', '--local', '--rename', '--add', ++ '/usr/bin/newaliases') ++ utils.execute('chroot', chroot, 'ln', '-sf', '/bin/true', ++ '/usr/bin/newaliases') ++ ++def restore_newaliases(chroot): ++ """Restores newaliases inside chroot after previous dpkg-divert. ++ ++ opposite to prevent_qemu_newaliases ++ """ ++ utils.execute('chroot', chroot, ++ 'rm', '-f', '/usr/bin/newaliases') ++ utils.execute('chroot', chroot, ++ 'dpkg-divert', '--local', '--rename', '--remove', ++ '/usr/bin/newaliases') ++ + def create_sparse_tmp_file(dir, suffix, size=8192): + """Creates sparse file. + diff --git a/patches/fuel-agent/cross-bootstrap/0005-FIXME-Add-force-yes-to-apt-get-dist-upgrade.patch b/patches/fuel-agent/cross-bootstrap/0005-FIXME-Add-force-yes-to-apt-get-dist-upgrade.patch new file mode 100644 index 00000000..654ddeab --- /dev/null +++ b/patches/fuel-agent/cross-bootstrap/0005-FIXME-Add-force-yes-to-apt-get-dist-upgrade.patch @@ -0,0 +1,31 @@ +From: Alexandru Avadanii +Date: Fri, 8 Apr 2016 15:28:43 +0200 +Subject: [PATCH] FIXME: Add --force-yes to apt-get dist-upgrade. + +arm64 udev in Ubuntu Trusty is broken, so we had to provide our own +patched udev package in armband MOS repos. + +Due to dpkg version comparison algorithm, our MOS version of udev +is considered a downgrade, which requires --force-yes for +apt-get dist-upgrade to work and pick up this version, otherwise +bootstrap/target image build would fail with apt-get error code 100. + +This change can be dropped later, if other packages do not manifest +the same behavior. +--- + fuel_agent/utils/build.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fuel_agent/utils/build.py b/fuel_agent/utils/build.py +index 5761cc5..5557810 100644 +--- a/fuel_agent/utils/build.py ++++ b/fuel_agent/utils/build.py +@@ -107,7 +107,7 @@ def run_apt_get(chroot, packages, eatmydata=False, attempts=10): + time in X times. + """ + for action in ('update', 'dist-upgrade'): +- cmds = ['chroot', chroot, 'apt-get', '-y', action] ++ cmds = ['chroot', chroot, 'apt-get', '-y', '--force-yes', action] + stdout, stderr = utils.execute(*cmds, attempts=attempts) + LOG.debug('Running apt-get %s completed.\nstdout: %s\nstderr: %s', + action, stdout, stderr) diff --git a/patches/fuel-agent/cross-bootstrap/0006-UX-Update-bootstrap-target-build-time-estimate.patch b/patches/fuel-agent/cross-bootstrap/0006-UX-Update-bootstrap-target-build-time-estimate.patch new file mode 100644 index 00000000..3c68e5ad --- /dev/null +++ b/patches/fuel-agent/cross-bootstrap/0006-UX-Update-bootstrap-target-build-time-estimate.patch @@ -0,0 +1,33 @@ +From: Alexandru Avadanii +Date: Mon, 9 May 2016 17:08:06 +0200 +Subject: [PATCH] UX: Update bootstrap/target build time estimate. + +While building for a different architecture (e.g. AArch64 on x86_64), +the bootstrap/target image build may take longer, due to latency +introduced by using qemu-user-static. + +Signed-off-by: Alexandru Avadanii +--- + .../fuel_bootstrap_cli/fuel_bootstrap/utils/bootstrap_image.py | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/utils/bootstrap_image.py b/contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/utils/bootstrap_image.py +index a535075..c7d67e9 100644 +--- a/contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/utils/bootstrap_image.py ++++ b/contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/utils/bootstrap_image.py +@@ -169,9 +169,12 @@ def make_bootstrap(data): + OSLO_CONF = cfg.CONF + OSLO_CONF(opts, project='fuel-agent') + mngr = manager.Manager(bootdata) +- LOG.info("Build process is in progress. Usually it takes 15-20 minutes." +- " It depends on your internet connection and hardware" +- " performance.") ++ LOG.info("Build process is in progress. Usually it takes 15-20 minutes for" ++ " a native build (x86_64) and/or 30-45 minutes for each" ++ " cross-build (e.g. AArch64)." ++ " It depends on your internet connection, hardware performance" ++ " and selected bootstrap architecture(s)." ++ " This ISO supports AArch64 only.") + mngr.do_mkbootstrap() + + return bootdata['bootstrap']['uuid'], bootdata['output'] diff --git a/patches/fuel-agent/kernel-bump/0001-kernel-flavor-linux-image-generic-lts-xenial.patch b/patches/fuel-agent/kernel-bump/0001-kernel-flavor-linux-image-generic-lts-xenial.patch new file mode 100644 index 00000000..7c29c5c5 --- /dev/null +++ b/patches/fuel-agent/kernel-bump/0001-kernel-flavor-linux-image-generic-lts-xenial.patch @@ -0,0 +1,28 @@ +From: Alexandru Avadanii +Date: Thu, 4 Aug 2016 12:44:53 +0200 +Subject: [PATCH] kernel-flavor: linux-image-generic-lts-xenial + +Ubuntu arm64: switch from using kernel 4.2 for Trusty +(linux-image-generic-lts-trusty) to kernel 4.4 backported from Xenial +(linux-image-generic-lts-xenial). + +Signed-off-by: Alexandru Avadanii +--- + fuel_agent/drivers/nailgun.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/fuel_agent/drivers/nailgun.py b/fuel_agent/drivers/nailgun.py +index f70d165..ef0e79a 100644 +--- a/fuel_agent/drivers/nailgun.py ++++ b/fuel_agent/drivers/nailgun.py +@@ -727,8 +727,8 @@ class NailgunBuildImage(BaseDataDriver): + "i40e-dkms", + "linux-firmware", + "linux-firmware-nonfree", +- "linux-headers-generic-lts-trusty", +- "linux-image-generic-lts-trusty", ++ "linux-headers-generic-lts-xenial", ++ "linux-image-generic-lts-xenial", + "lvm2", + "mcollective", + "mdadm", diff --git a/patches/fuel-agent/multiarch-efi/0001-Add-esp-partition-flag.patch b/patches/fuel-agent/multiarch-efi/0001-Add-esp-partition-flag.patch new file mode 100644 index 00000000..1b067b10 --- /dev/null +++ b/patches/fuel-agent/multiarch-efi/0001-Add-esp-partition-flag.patch @@ -0,0 +1,48 @@ +From: Alexandru Avadanii +Date: Tue, 8 Mar 2016 16:29:39 +0100 +Subject: [PATCH] Add partition flag. + +Parted flag (see [1]) will mark EFI system partition, allowing us +to properly format and mount it during do_partitioning deployment phase. + +[1] https://www.gnu.org/software/parted/manual/html_node/set.html +--- + fuel_agent/drivers/nailgun.py | 2 +- + fuel_agent/utils/partition.py | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/fuel_agent/drivers/nailgun.py b/fuel_agent/drivers/nailgun.py +index ef0e79a..94280e8 100644 +--- a/fuel_agent/drivers/nailgun.py ++++ b/fuel_agent/drivers/nailgun.py +@@ -354,7 +354,7 @@ class Nailgun(BaseDataDriver): + # uefi partition (for future use) + LOG.debug('Adding UEFI partition on disk %s: size=200' % + disk['name']) +- parted.add_partition(size=200) ++ parted.add_partition(size=200, flags=['esp']) + + LOG.debug('Looping over all volumes on disk %s' % disk['name']) + for volume in disk['volumes']: +diff --git a/fuel_agent/utils/partition.py b/fuel_agent/utils/partition.py +index f7126b1..b811511 100644 +--- a/fuel_agent/utils/partition.py ++++ b/fuel_agent/utils/partition.py +@@ -94,7 +94,7 @@ def set_partition_flag(dev, num, flag, state='on'): + :param dev: A device file, e.g. /dev/sda. + :param num: Partition number + :param flag: Flag name. Must be one of 'bios_grub', 'legacy_boot', +- 'boot', 'raid', 'lvm' ++ 'boot', 'raid', 'lvm', 'esp' + :param state: Desiable flag state. 'on' or 'off'. Default is 'on'. + + :returns: None +@@ -104,7 +104,7 @@ def set_partition_flag(dev, num, flag, state='on'): + # parted supports more flags but we are interested in + # setting only this subset of them. + # not all of these flags are compatible with one another. +- if flag not in ('bios_grub', 'legacy_boot', 'boot', 'raid', 'lvm'): ++ if flag not in ('bios_grub', 'legacy_boot', 'boot', 'raid', 'lvm', 'esp'): + raise errors.WrongPartitionSchemeError( + 'Unsupported partition flag: %s' % flag) + if state not in ('on', 'off'): diff --git a/patches/fuel-agent/multiarch-efi/0002-Add-fs-for-efi-partition.patch b/patches/fuel-agent/multiarch-efi/0002-Add-fs-for-efi-partition.patch new file mode 100644 index 00000000..c18c7093 --- /dev/null +++ b/patches/fuel-agent/multiarch-efi/0002-Add-fs-for-efi-partition.patch @@ -0,0 +1,66 @@ +From: Stanislaw Kardach +Date: Tue, 8 Mar 2016 21:08:55 +0100 +Subject: [PATCH] Add fs for efi partition + +--- + debian/control | 1 + + fuel_agent/drivers/nailgun.py | 13 ++++++++++--- + specs/fuel-agent.spec | 1 + + 3 files changed, 12 insertions(+), 3 deletions(-) + +diff --git a/debian/control b/debian/control +index e843980..c763ab9 100644 +--- a/debian/control ++++ b/debian/control +@@ -40,6 +40,7 @@ Depends: bzip2, + qemu-user-static, + binfmt-support, + dmidecode, ++ dosfstools, + ethtool, + gdisk, + genisoimage, +diff --git a/fuel_agent/drivers/nailgun.py b/fuel_agent/drivers/nailgun.py +index 94280e8..1463f22 100644 +--- a/fuel_agent/drivers/nailgun.py ++++ b/fuel_agent/drivers/nailgun.py +@@ -82,6 +82,9 @@ class Nailgun(BaseDataDriver): + # was already allocated on first matching volume + # or not + self._boot_partition_done = False ++ # this var states whether ESP partition was already ++ # allocated on the first matching volume or not ++ self._esp_partition_done = False + # this var is used as a flag that /boot fs + # has already been added. we need this to + # get rid of md over all disks for /boot partition. +@@ -351,10 +354,14 @@ class Nailgun(BaseDataDriver): + LOG.debug('Adding bios_grub partition on disk %s: size=24' % + disk['name']) + parted.add_partition(size=24, flags=['bios_grub']) +- # uefi partition (for future use) +- LOG.debug('Adding UEFI partition on disk %s: size=200' % ++ # uefi partition - added only once. ++ if self._is_boot_disk(disk) and not self._esp_partition_done: ++ LOG.debug('Adding UEFI partition on disk %s: size=200' % + disk['name']) +- parted.add_partition(size=200, flags=['esp']) ++ prt = parted.add_partition(size=200, flags=['esp']) ++ partition_scheme.add_fs(device=prt.name, mount='/boot/efi', ++ fs_type='vfat') ++ self._esp_partition_done = True + + LOG.debug('Looping over all volumes on disk %s' % disk['name']) + for volume in disk['volumes']: +diff --git a/specs/fuel-agent.spec b/specs/fuel-agent.spec +index 18af4b9..8604e57 100644 +--- a/specs/fuel-agent.spec ++++ b/specs/fuel-agent.spec +@@ -50,6 +50,7 @@ Requires: xfsprogs + Requires: pciutils + Requires: ethtool + Requires: debootstrap ++Requires: dosfstools + Requires: dpkg + Requires: qemu-user-static + Requires: xz diff --git a/patches/fuel-astute/0001-Erase-EFI-boot-entry-on-EFI-systems.patch b/patches/fuel-astute/0001-Erase-EFI-boot-entry-on-EFI-systems.patch deleted file mode 100644 index 905834df..00000000 --- a/patches/fuel-astute/0001-Erase-EFI-boot-entry-on-EFI-systems.patch +++ /dev/null @@ -1,43 +0,0 @@ -From: Alexandru Avadanii -Date: Mon, 18 Jul 2016 16:02:20 +0200 -Subject: [PATCH] Erase EFI boot entry on EFI systems. - -On EFI-enabled systemd, grub-install from grub-efi-* package -installs a boot entry named "ubuntu". - -Since this boot entry is saved in board flash memory, erasing -the MBR bootloader code and/or partition signature will not -clear the ubuntu boot entry, leaving it pointing to a loader -on the ESP (EFI System Partition) that will try to load the -kernel/initrd from an erased partition. - -In Fuel 8.0, the whole disk was erased, so the ubuntu EFI boot -entry was skipped due to missing ESP, while for Fuel 9.0 and -above we have to explicitly remove it to keep the system in a -sane state. - -Note: efibootmgr is installed automatically on EFI systems -as a dependency of grub-efi-*. - -Closes: ARMBAND-47 - -Signed-off-by: Alexandru Avadanii ---- - mcagents/erase_node.rb | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/mcagents/erase_node.rb b/mcagents/erase_node.rb -index 3eb98e8..3bac36f 100644 ---- a/mcagents/erase_node.rb -+++ b/mcagents/erase_node.rb -@@ -112,6 +112,10 @@ module MCollective - File.open('/proc/sys/kernel/panic','w') {|file| file.write("10\n")} - - begin -+ # clear out EFI boot entry on EFI-enabled systems -+ system("(which efibootmgr > /dev/null 2>&1 && efibootmgr | "\ -+ "grep -oP '(?<=Boot)[0-9]+(?=.*ubuntu)' | "\ -+ "xargs -I{} efibootmgr --delete-bootnum --bootnum {}) || true") - get_devices(type='all').each do |dev| - debug_msg("erasing bootstrap code area in MBR of #{dev[:name]}") - # clear out the boot code in MBR diff --git a/patches/fuel-astute/multiarch-efi/0001-Erase-EFI-boot-entry-on-EFI-systems.patch b/patches/fuel-astute/multiarch-efi/0001-Erase-EFI-boot-entry-on-EFI-systems.patch new file mode 100644 index 00000000..fa8a83a7 --- /dev/null +++ b/patches/fuel-astute/multiarch-efi/0001-Erase-EFI-boot-entry-on-EFI-systems.patch @@ -0,0 +1,43 @@ +From: Alexandru Avadanii +Date: Mon, 18 Jul 2016 16:02:20 +0200 +Subject: [PATCH] Erase EFI boot entry on EFI systems. + +On EFI-enabled systemd, grub-install from grub-efi-* package +installs a boot entry named "ubuntu". + +Since this boot entry is saved in board flash memory, erasing +the MBR bootloader code and/or partition signature will not +clear the ubuntu boot entry, leaving it pointing to a loader +on the ESP (EFI System Partition) that will try to load the +kernel/initrd from an erased partition. + +In Fuel 8.0, the whole disk was erased, so the ubuntu EFI boot +entry was skipped due to missing ESP, while for Fuel 9.0 and +above we have to explicitly remove it to keep the system in a +sane state. + +Note: efibootmgr is installed automatically on EFI systems +as a dependency of grub-efi-*. + +Closes: ARMBAND-47 + +Signed-off-by: Alexandru Avadanii +--- + mcagents/erase_node.rb | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/mcagents/erase_node.rb b/mcagents/erase_node.rb +index 3eb98e8..3bac36f 100644 +--- a/mcagents/erase_node.rb ++++ b/mcagents/erase_node.rb +@@ -112,6 +112,10 @@ module MCollective + File.open('/proc/sys/kernel/panic','w') {|file| file.write("10\n")} + + begin ++ # clear out EFI boot entry on EFI-enabled systems ++ system("(which efibootmgr > /dev/null 2>&1 && efibootmgr | "\ ++ "grep -oP '(?<=Boot)[0-9]+(?=.*ubuntu)' | "\ ++ "xargs -I{} efibootmgr --delete-bootnum --bootnum {}) || true") + get_devices(type='all').each do |dev| + debug_msg("erasing bootstrap code area in MBR of #{dev[:name]}") + # clear out the boot code in MBR diff --git a/patches/fuel-library/0001-Add-arm64-templates-to-cobbler-and-nailgun.patch b/patches/fuel-library/0001-Add-arm64-templates-to-cobbler-and-nailgun.patch deleted file mode 100644 index 963356b2..00000000 --- a/patches/fuel-library/0001-Add-arm64-templates-to-cobbler-and-nailgun.patch +++ /dev/null @@ -1,284 +0,0 @@ -From: Stanislaw Kardach -Date: Sun, 21 Feb 2016 16:29:52 +0100 -Subject: [PATCH] Add arm64 templates to cobbler and nailgun - -Add grub template import to cobbler server manifest - -Add arm64 templates to cobbler and nailgun - -[Matei Valeanu] Add grub template to cobbler for MAC-files -Limitation: grub2 needs to be installed directly on the -root (/) of a device or partition, as the MAC-files will -search for /grub/grub.cfg on the available partitions - -Signed-off-by: Stanislaw Kardach -Signed-off-by: Matei Valeanu ---- - deployment/puppet/cobbler/manifests/server.pp | 36 ++++++++++++++++++++++ - .../puppet/cobbler/templates/dnsmasq.template.erb | 2 ++ - .../cobbler/templates/efidefault.template.erb | 5 +++ - .../cobbler/templates/grublocal.template.erb | 2 ++ - .../cobbler/templates/grubprofile.template.erb | 12 ++++++++ - .../cobbler/templates/grubsystem.template.erb | 16 ++++++++++ - .../templates/preseed/ubuntu-1404.preseed.erb | 2 ++ - deployment/puppet/fuel/manifests/auxiliaryrepos.pp | 12 +++++--- - deployment/puppet/fuel/manifests/cobbler.pp | 36 +++++++++++++++++----- - .../puppet/fuel/manifests/cobbler/preseed.pp | 13 ++++++++ - 10 files changed, 125 insertions(+), 11 deletions(-) - create mode 100644 deployment/puppet/cobbler/templates/efidefault.template.erb - create mode 100644 deployment/puppet/cobbler/templates/grublocal.template.erb - create mode 100644 deployment/puppet/cobbler/templates/grubprofile.template.erb - create mode 100644 deployment/puppet/cobbler/templates/grubsystem.template.erb - create mode 100644 deployment/puppet/fuel/manifests/cobbler/preseed.pp - -diff --git a/deployment/puppet/cobbler/manifests/server.pp b/deployment/puppet/cobbler/manifests/server.pp -index 891dff7..52936d5 100644 ---- a/deployment/puppet/cobbler/manifests/server.pp -+++ b/deployment/puppet/cobbler/manifests/server.pp -@@ -297,6 +297,42 @@ class cobbler::server ( - notify => [Service[$cobbler_service], Exec['cobbler_sync']], - } - -+ file { '/etc/cobbler/pxe/efidefault.template': -+ content => template('cobbler/efidefault.template.erb'), -+ owner => 'root', -+ group => 'root', -+ mode => '0644', -+ require => Package[$cobbler::packages::cobbler_package], -+ notify => [Service[$cobbler_service], Exec['cobbler_sync']], -+ } -+ -+ file { '/etc/cobbler/pxe/grubprofile.template': -+ content => template('cobbler/grubprofile.template.erb'), -+ owner => 'root', -+ group => 'root', -+ mode => '0644', -+ require => Package[$cobbler::packages::cobbler_package], -+ notify => [Service[$cobbler_service], Exec['cobbler_sync']], -+ } -+ -+ file { '/etc/cobbler/pxe/grubsystem.template': -+ content => template('cobbler/grubsystem.template.erb'), -+ owner => 'root', -+ group => 'root', -+ mode => '0644', -+ require => Package[$cobbler::packages::cobbler_package], -+ notify => [Service[$cobbler_service], Exec['cobbler_sync']], -+ } -+ -+ file { '/etc/cobbler/pxe/grublocal.template': -+ content => template('cobbler/grublocal.template.erb'), -+ owner => 'root', -+ group => 'root', -+ mode => '0644', -+ require => Package[$cobbler::packages::cobbler_package], -+ notify => [Service[$cobbler_service], Exec['cobbler_sync']], -+ } -+ - exec { '/var/lib/tftpboot/chain.c32': - command => 'cp /usr/share/syslinux/chain.c32 /var/lib/tftpboot/chain.c32', - unless => 'test -e /var/lib/tftpboot/chain.c32', -diff --git a/deployment/puppet/cobbler/templates/dnsmasq.template.erb b/deployment/puppet/cobbler/templates/dnsmasq.template.erb -index d70f8de..98278e9 100644 ---- a/deployment/puppet/cobbler/templates/dnsmasq.template.erb -+++ b/deployment/puppet/cobbler/templates/dnsmasq.template.erb -@@ -41,5 +41,7 @@ dhcp-no-override - # by assigning IPs one by one instead of using hash algorithm. - dhcp-sequential-ip - -+dhcp-match=set:arm64,93,11 -+dhcp-boot=net:arm64,grub/grub-aarch64.efi,boothost,<%= @next_server %> - dhcp-option=6,<%= @name_server %> - $insert_cobbler_system_definitions -diff --git a/deployment/puppet/cobbler/templates/efidefault.template.erb b/deployment/puppet/cobbler/templates/efidefault.template.erb -new file mode 100644 -index 0000000..af09eb8 ---- /dev/null -+++ b/deployment/puppet/cobbler/templates/efidefault.template.erb -@@ -0,0 +1,5 @@ -+set default=1 -+set timeout=5 -+tr -s ipxe_mac ':' '-' $net_default_mac -+ -+$grub_menu_items -diff --git a/deployment/puppet/cobbler/templates/grublocal.template.erb b/deployment/puppet/cobbler/templates/grublocal.template.erb -new file mode 100644 -index 0000000..e16c27d ---- /dev/null -+++ b/deployment/puppet/cobbler/templates/grublocal.template.erb -@@ -0,0 +1,2 @@ -+search --file --no-floppy --set grub_install_device /grub/grub.cfg -+configfile ($grub_install_device)/grub/grub.cfg -diff --git a/deployment/puppet/cobbler/templates/grubprofile.template.erb b/deployment/puppet/cobbler/templates/grubprofile.template.erb -new file mode 100644 -index 0000000..eb7557c ---- /dev/null -+++ b/deployment/puppet/cobbler/templates/grubprofile.template.erb -@@ -0,0 +1,12 @@ -+menuentry '$profile_name' { -+ echo 'Network status:' -+ net_ls_cards -+ net_ls_addr -+ net_ls_routes -+ -+ echo 'Loading Linux ...' -+ linux (tftp)$kernel_path $kernel_options BOOTIF=01-$ipxe_mac -+ echo 'Loading initial ramdisk ...' -+ initrd (tftp)$initrd_path -+ echo 'Booting bootstrap image ...' -+} -diff --git a/deployment/puppet/cobbler/templates/grubsystem.template.erb b/deployment/puppet/cobbler/templates/grubsystem.template.erb -new file mode 100644 -index 0000000..9a191bc ---- /dev/null -+++ b/deployment/puppet/cobbler/templates/grubsystem.template.erb -@@ -0,0 +1,16 @@ -+set default=1 -+set timeout=5 -+tr -s ipxe_mac ':' '-' $net_default_mac -+ -+menuentry '$profile_name' { -+ echo 'Network status:' -+ net_ls_cards -+ net_ls_addr -+ net_ls_routes -+ -+ echo 'Loading Linux ...' -+ linux (tftp)$kernel_path $kernel_options BOOTIF=01-$ipxe_mac -+ echo 'Loading initial ramdisk ...' -+ initrd (tftp)$initrd_path -+ echo 'Booting bootstrap image ...' -+} -diff --git a/deployment/puppet/cobbler/templates/preseed/ubuntu-1404.preseed.erb b/deployment/puppet/cobbler/templates/preseed/ubuntu-1404.preseed.erb -index 6762153..25f8067 100644 ---- a/deployment/puppet/cobbler/templates/preseed/ubuntu-1404.preseed.erb -+++ b/deployment/puppet/cobbler/templates/preseed/ubuntu-1404.preseed.erb -@@ -66,9 +66,11 @@ d-i apt-setup/mirror/error select Retry - # Use network mirror - d-i apt-setup/use_mirror boolean true - -+<% if @arch == 'amd64' %> - # Select architecture to amd64. That's very important to dpkg, since - # by default we have both amd64 and i386. - d-i apt-setup/multiarch string amd64 -+<% end %> - - # You can choose to install restricted and universe software, or to install - # software from the backports repository. -diff --git a/deployment/puppet/fuel/manifests/auxiliaryrepos.pp b/deployment/puppet/fuel/manifests/auxiliaryrepos.pp -index 493ffc6..909fc92 100644 ---- a/deployment/puppet/fuel/manifests/auxiliaryrepos.pp -+++ b/deployment/puppet/fuel/manifests/auxiliaryrepos.pp -@@ -53,17 +53,21 @@ class fuel::auxiliaryrepos( - - exec { 'create_ubuntu_repo_dirs': - path => '/bin:/sbin:/usr/bin:/usr/sbin', -- command => "bash -c \"mkdir -p ${ubuntu_dir}/pool/{main,restricted} ${ubuntu_dir}/dists/auxiliary/{main,restricted}/binary-amd64/\"", -+ command => "bash -c \"mkdir -p ${ubuntu_dir}/pool/{main,restricted} ${ubuntu_dir}/dists/auxiliary/{main,restricted}/binary-{amd64,arm64}/\"", - unless => "test -d ${ubuntu_dir}/pool && \ - test -d ${ubuntu_dir}/dists/auxiliary/main/binary-amd64 && \ -- test -d ${ubuntu_dir}/dists/auxiliary/restricted/binary-amd64", -+ test -d ${ubuntu_dir}/dists/auxiliary/restricted/binary-amd64 && \ -+ test -d ${ubuntu_dir}/dists/auxiliary/main/binary-arm64 && \ -+ test -d ${ubuntu_dir}/dists/auxiliary/restricted/binary-arm64", - } - - exec { 'create_ubuntu_repo_Packages': - path => '/bin:/sbin:/usr/bin:/usr/sbin', -- command => "bash -c \"touch ${ubuntu_dir}/dists/auxiliary/{main,restricted}/binary-amd64/Packages\"", -+ command => "bash -c \"touch ${ubuntu_dir}/dists/auxiliary/{main,restricted}/binary-{amd64,arm64}/Packages\"", - unless => "test -f ${ubuntu_dir}/dists/auxiliary/main/binary-amd64/Packages && \ -- test -f ${ubuntu_dir}/dists/auxiliary/restricted/binary-amd64/Packages", -+ test -f ${ubuntu_dir}/dists/auxiliary/restricted/binary-amd64/Packages && \ -+ test -f ${ubuntu_dir}/dists/auxiliary/main/binary-arm64/Packages && \ -+ test -f ${ubuntu_dir}/dists/auxiliary/restricted/binary-arm64/Packages", - } - - file { $release_files: -diff --git a/deployment/puppet/fuel/manifests/cobbler.pp b/deployment/puppet/fuel/manifests/cobbler.pp -index b403733..c89027d 100644 ---- a/deployment/puppet/fuel/manifests/cobbler.pp -+++ b/deployment/puppet/fuel/manifests/cobbler.pp -@@ -114,12 +114,9 @@ class fuel::cobbler( - require => Class['::cobbler::server'], - } - -- file { '/var/lib/cobbler/kickstarts/ubuntu-amd64.preseed': -- content => template('cobbler/preseed/ubuntu-1404.preseed.erb'), -- owner => 'root', -- group => 'root', -- mode => '0644', -- require => Class['::cobbler::server'], -+ fuel::cobbler::preseed { 'ubuntu_1404_x86_64.preseed': -+ path =>'/var/lib/cobbler/kickstarts/ubuntu-amd64.preseed', -+ arch => "amd64", - } -> - - cobbler_distro { 'ubuntu_1404_x86_64': -@@ -132,6 +129,21 @@ class fuel::cobbler( - require => Class['::cobbler::server'], - } - -+ fuel::cobbler::preseed { 'ubuntu_1404_arm64.preseed': -+ path => '/var/lib/cobbler/kickstarts/ubuntu-arm64.preseed', -+ arch => "arm64", -+ } -> -+ -+ cobbler_distro { 'ubuntu_1404_arm64': -+ kernel => "${repo_root}/ubuntu/x86_64/images/linux", -+ initrd => "${repo_root}/ubuntu/x86_64/images/initrd.gz", -+ arch => 'x86_64', # Makes Cobbler choose PXE -+ breed => 'ubuntu', -+ osversion => 'trusty', -+ ksmeta => '', -+ require => Class['::cobbler::server'], -+ } -+ - cobbler_profile { 'centos-x86_64': - kickstart => '/var/lib/cobbler/kickstarts/centos-x86_64.ks', - kopts => 'biosdevname=0 sshd=1 dhcptimeout=120', -@@ -152,6 +164,16 @@ class fuel::cobbler( - require => Cobbler_distro['ubuntu_1404_x86_64'], - } - -+ cobbler_profile { 'ubuntu_1404_arm64': -+ kickstart => '/var/lib/cobbler/kickstarts/ubuntu-arm64.preseed', -+ kopts => 'console=ttyAMA0,115200 console=ttyS0,115200 net.ifnames=0 biosdevname=0 netcfg/choose_interface=eth0 netcfg/dhcp_timeout=120 netcfg/link_detection_timeout=20', -+ distro => 'ubuntu_1404_arm64', -+ ksmeta => '', -+ menu => false, -+ server => $real_server, -+ require => Cobbler_distro['ubuntu_1404_arm64'], -+ } -+ - cobbler_distro { 'ubuntu_bootstrap': - kernel => "${bootstrap_path}/vmlinuz", - initrd => "${bootstrap_path}/initrd.img", -@@ -166,7 +188,7 @@ class fuel::cobbler( - distro => 'ubuntu_bootstrap', - menu => true, - kickstart => '', -- kopts => extend_kopts($bootstrap_meta['extend_kopts'], "console=ttyS0,9600 console=tty0 panic=60 ethdevice-timeout=${bootstrap_ethdevice_timeout} boot=live toram components fetch=http://${server}:8080/bootstraps/active_bootstrap/root.squashfs biosdevname=0 url=${nailgun_api_url} mco_user=${mco_user} mco_pass=${mco_pass} ip=frommedia"), -+ kopts => extend_kopts($bootstrap_meta['extend_kopts'], "console=ttyAMA0,115200 console=ttyS0,115200 panic=60 ethdevice-timeout=${bootstrap_ethdevice_timeout} boot=live toram components fetch=http://${server}:8080/bootstraps/active_bootstrap/root.squashfs biosdevname=0 url=${nailgun_api_url} mco_user=${mco_user} mco_pass=${mco_pass} ip=frommedia"), - ksmeta => '', - server => $real_server, - require => Cobbler_distro['ubuntu_bootstrap'], -diff --git a/deployment/puppet/fuel/manifests/cobbler/preseed.pp b/deployment/puppet/fuel/manifests/cobbler/preseed.pp -new file mode 100644 -index 0000000..7e1bee9 ---- /dev/null -+++ b/deployment/puppet/fuel/manifests/cobbler/preseed.pp -@@ -0,0 +1,13 @@ -+define fuel::cobbler::preseed( -+ $path, -+ $arch = "amd64", -+) { -+ -+ file { $path: -+ content => template('cobbler/preseed/ubuntu-1404.preseed.erb'), -+ owner => 'root', -+ group => 'root', -+ mode => '0644', -+ require => Class['::cobbler::server'], -+ } -+} diff --git a/patches/fuel-library/0001-ceph-Fix-obsolete-XFS-mount-param-delaylog.patch b/patches/fuel-library/0001-ceph-Fix-obsolete-XFS-mount-param-delaylog.patch new file mode 100644 index 00000000..facde8f2 --- /dev/null +++ b/patches/fuel-library/0001-ceph-Fix-obsolete-XFS-mount-param-delaylog.patch @@ -0,0 +1,48 @@ +From: Alexandru Avadanii +Date: Sun, 27 Mar 2016 20:32:50 +0200 +Subject: [PATCH] ceph: Fix obsolete XFS mount param "delaylog". + +According to [1], "delaylog" mount arg is now enforced by default, +and passing it will lead to mount failure. + +Trim "delaylog" from default list of xfs mount args and leave it up to +ceph-osd.pp to add this obsoleted arg only for targets running a kernel +older than 4.0. + +[1] https://www.kernel.org/doc/Documentation/filesystems/xfs.txt +--- + deployment/puppet/osnailyfacter/manifests/ceph/ceph_osd.pp | 7 +++++++ + deployment/puppet/osnailyfacter/manifests/globals/globals.pp | 2 +- + 2 files changed, 8 insertions(+), 1 deletion(-) + +diff --git a/deployment/puppet/osnailyfacter/manifests/ceph/ceph_osd.pp b/deployment/puppet/osnailyfacter/manifests/ceph/ceph_osd.pp +index 2480f18..0957010 100644 +--- a/deployment/puppet/osnailyfacter/manifests/ceph/ceph_osd.pp ++++ b/deployment/puppet/osnailyfacter/manifests/ceph/ceph_osd.pp +@@ -35,6 +35,13 @@ class osnailyfacter::ceph::ceph_osd { + } + + if $ceph_tuning_settings_hash != {} { ++ if versioncmp($::kernelmajversion, '4.0') < 0 { ++ # FIXME(armband): XFS mount opt delaylog is deprecated in kernels >=4.0. ++ $ceph_tuning_settings_hash['osd_mount_options_xfs'] = join([ ++ $ceph_tuning_settings_hash['osd_mount_options_xfs'], ++ 'delaylog' ++ ], ',') ++ } + ceph_conf { + 'global/debug_default' : value => $debug; + 'global/max_open_files' : value => $ceph_tuning_settings_hash['max_open_files']; +diff --git a/deployment/puppet/osnailyfacter/manifests/globals/globals.pp b/deployment/puppet/osnailyfacter/manifests/globals/globals.pp +index 854d297..7345d66 100644 +--- a/deployment/puppet/osnailyfacter/manifests/globals/globals.pp ++++ b/deployment/puppet/osnailyfacter/manifests/globals/globals.pp +@@ -148,7 +148,7 @@ class osnailyfacter::globals::globals { + $ceph_tuning_settings = { + 'max_open_files' => pick($storage_tuning_settings['max_open_files'], '131072'), + 'osd_mkfs_type' => pick($storage_tuning_settings['osd_mkfs_type'], 'xfs'), +- 'osd_mount_options_xfs' => pick($storage_tuning_settings['osd_mount_options_xfs'], 'rw,relatime,inode64,logbsize=256k,delaylog,allocsize=4M'), ++ 'osd_mount_options_xfs' => pick($storage_tuning_settings['osd_mount_options_xfs'], 'rw,relatime,inode64,logbsize=256k,allocsize=4M'), + 'osd_op_threads' => pick($storage_tuning_settings['osd_op_threads'], '20'), + 'filestore_queue_max_ops' => pick($storage_tuning_settings['filestore_queue_max_ops'], '500'), + 'filestore_queue_committing_max_ops' => pick($storage_tuning_settings['filestore_queue_committing_max_ops'], '5000'), diff --git a/patches/fuel-library/0002-Add-arm64-for-auxiliary-repos.patch b/patches/fuel-library/0002-Add-arm64-for-auxiliary-repos.patch deleted file mode 100644 index 2edabc66..00000000 --- a/patches/fuel-library/0002-Add-arm64-for-auxiliary-repos.patch +++ /dev/null @@ -1,36 +0,0 @@ -From: Stanislaw Kardach -Date: Wed, 24 Feb 2016 20:05:25 +0100 -Subject: [PATCH] Add arm64 for auxiliary repos - ---- - deployment/puppet/fuel/files/Release-auxiliary | 2 +- - deployment/puppet/fuel/manifests/auxiliaryrepos.pp | 4 +++- - 2 files changed, 4 insertions(+), 2 deletions(-) - -diff --git a/deployment/puppet/fuel/files/Release-auxiliary b/deployment/puppet/fuel/files/Release-auxiliary -index 2d5ce58..03f84b8 100644 ---- a/deployment/puppet/fuel/files/Release-auxiliary -+++ b/deployment/puppet/fuel/files/Release-auxiliary -@@ -3,6 +3,6 @@ Label: auxiliary - Suite: auxiliary - Codename: auxiliary - Date: Mon, 15 Apr 2015 00:00:01 UTC --Architectures: amd64 -+Architectures: amd64 arm64 - Components: main restricted - Description: Auxiliary -diff --git a/deployment/puppet/fuel/manifests/auxiliaryrepos.pp b/deployment/puppet/fuel/manifests/auxiliaryrepos.pp -index 720943d..91adb3e 100644 ---- a/deployment/puppet/fuel/manifests/auxiliaryrepos.pp -+++ b/deployment/puppet/fuel/manifests/auxiliaryrepos.pp -@@ -40,7 +40,9 @@ class nailgun::auxiliaryrepos( - $release_files = [ - "${ubuntu_dir}/dists/auxiliary/Release", - "${ubuntu_dir}/dists/auxiliary/main/binary-amd64/Release", -- "${ubuntu_dir}/dists/auxiliary/restricted/binary-amd64/Release"] -+ "${ubuntu_dir}/dists/auxiliary/restricted/binary-amd64/Release", -+ "${ubuntu_dir}/dists/auxiliary/main/binary-arm64/Release", -+ "${ubuntu_dir}/dists/auxiliary/restricted/binary-arm64/Release"] - - Exec['create_ubuntu_repo_dirs'] -> - Exec['create_ubuntu_repo_Packages'] -> diff --git a/patches/fuel-library/0002-ceilometer-Fix-libvirt-bin-group-name-for-armband.patch b/patches/fuel-library/0002-ceilometer-Fix-libvirt-bin-group-name-for-armband.patch new file mode 100644 index 00000000..17700a9a --- /dev/null +++ b/patches/fuel-library/0002-ceilometer-Fix-libvirt-bin-group-name-for-armband.patch @@ -0,0 +1,46 @@ +From: Alexandru Avadanii +Date: Mon, 18 Apr 2016 18:44:27 +0200 +Subject: [PATCH] ceilometer: Fix libvirt-bin group name for armband. + +Upstream mirrors use a custom version of libvirt, ported from +Debian, while keeping the Ubuntu ceilometer package, leading to a +libvirt group name mismatch between the two. + +Fuel-library hardcodes a deb-version test for libvirt-bin, which +enforces the use of "libvirt" instead of "libvirtd" for 1.2.9 or +newer libvirt-bin [1]. + +Armband brings its own 1.3.2 libvirt-bin package, which respects +Ubuntu standard group naming ("libvirtd"), but since 1.3.2 > 1.2.9, +the old group name ("libvirt") is still used. + +This patch extends the version checking introduced in [1]: + - libvirt-bin 1.3.2 or newer will use "libvirtd" naming; + - libvirt-bin 1.2.9 ... <1.3.2 will use "libvirt". + +[1] https://review.openstack.org/#/c/200602/8/deployment/puppet/ + openstack/manifests/ceilometer.pp +--- + deployment/puppet/openstack_tasks/manifests/ceilometer/compute.pp | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/deployment/puppet/openstack_tasks/manifests/ceilometer/compute.pp b/deployment/puppet/openstack_tasks/manifests/ceilometer/compute.pp +index af4f0e5..e8dbfcf 100644 +--- a/deployment/puppet/openstack_tasks/manifests/ceilometer/compute.pp ++++ b/deployment/puppet/openstack_tasks/manifests/ceilometer/compute.pp +@@ -93,8 +93,14 @@ class openstack_tasks::ceilometer::compute { + } + + if $::operatingsystem == 'Ubuntu' and $::ceilometer::params::libvirt_group { ++ # Armband libvirt-bin deb package (1.3.2 version) creates 'libvirtd' group on Ubuntu ++ if (versioncmp($::libvirt_package_version, '1.3.2') >= 0) { ++ User<| name == 'ceilometer' |> { ++ groups => ['nova', 'libvirtd'], ++ } ++ } + # Our libvirt-bin deb package (1.2.9 version) creates 'libvirt' group on Ubuntu +- if (versioncmp($::libvirt_package_version, '1.2.9') >= 0) { ++ elsif (versioncmp($::libvirt_package_version, '1.2.9') >= 0) { + User<| name == 'ceilometer' |> { + groups => ['nova', 'libvirt'], + } diff --git a/patches/fuel-library/0003-Make-qemu-kvm-architecture-aware.patch b/patches/fuel-library/0003-Make-qemu-kvm-architecture-aware.patch deleted file mode 100644 index 25ec082e..00000000 --- a/patches/fuel-library/0003-Make-qemu-kvm-architecture-aware.patch +++ /dev/null @@ -1,27 +0,0 @@ -From: Stanislaw Kardach -Date: Wed, 24 Feb 2016 20:07:06 +0100 -Subject: [PATCH] Make qemu-kvm architecture aware - ---- - deployment/puppet/openstack_tasks/manifests/roles/compute.pp | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp -index b2339bc..ca1b2c4 100644 ---- a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp -+++ b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp -@@ -169,7 +169,12 @@ class openstack_tasks::compute ( - # From legacy libvirt.pp -+ # Guard against some exotic distros with their `uname -m` -+ $arch = $::architecture ? { -+ /(arm64|aarch64)/ => 'aarch64', -+ default => 'x86_64', -+ } - exec { 'symlink-qemu-kvm': -- command => '/bin/ln -sf /usr/libexec/qemu-kvm /usr/bin/qemu-system-x86_64', -- creates => '/usr/bin/qemu-system-x86_64', -+ command => "/bin/ln -sf /usr/libexec/qemu-kvm /usr/bin/qemu-system-${arch}", -+ creates => "/usr/bin/qemu-system-${arch}", - } - - package { 'avahi': diff --git a/patches/fuel-library/0003-compute-Fix-virtlogd-not-started-after-install.patch b/patches/fuel-library/0003-compute-Fix-virtlogd-not-started-after-install.patch new file mode 100644 index 00000000..a9a49331 --- /dev/null +++ b/patches/fuel-library/0003-compute-Fix-virtlogd-not-started-after-install.patch @@ -0,0 +1,33 @@ +From: Alexandru Avadanii +Date: Fri, 15 Jul 2016 17:22:44 +0200 +Subject: [PATCH] compute: Fix virtlogd not started after install + +libvirt >= 1.3.0 installs additional services, including virtlogd, +which need to be started explicitly after install, as the Ubuntu UCA +package is currently broken. + +Fuel code already carries a fix for this, but only for UCA libvirt. +Refactor the condition for the existing fix to check package version +instead of origin. + +Closes-bug: https://jira.opnfv.org/browse/ARMBAND-37 + +Signed-off-by: Alexandru Avadanii +--- + deployment/puppet/openstack_tasks/manifests/roles/compute.pp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp +index 164bd70..211fefa 100644 +--- a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp ++++ b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp +@@ -337,7 +337,8 @@ class openstack_tasks::roles::compute { + + # TODO(aschultz): work around until https://review.openstack.org/#/c/306677/ + # lands. +- if $::os_package_type == 'ubuntu' { ++ # Armband: also apply for our libvirt-bin deb package (>=1.3.0 version) ++ if (versioncmp($::libvirt_package_version, '1.3.0') >= 0) { + ensure_resource('service', ['virtlogd','virtlockd'], { + ensure => running, + enable => true, diff --git a/patches/fuel-library/0004-Make-TestVM-creation-architecture-aware.patch b/patches/fuel-library/0004-Make-TestVM-creation-architecture-aware.patch deleted file mode 100644 index 417727ec..00000000 --- a/patches/fuel-library/0004-Make-TestVM-creation-architecture-aware.patch +++ /dev/null @@ -1,138 +0,0 @@ -From ec3299c72eae195106092a646409564b5b3eb560 Mon Sep 17 00:00:00 2001 -From: Stanislaw Kardach -Date: Wed, 24 Feb 2016 20:08:24 +0100 -Subject: [PATCH 10/20] Make TestVM creation architecture aware - -This depends on cirros-testvm package to contain both amd64 and arm64 -images. ---- - deployment/puppet/openstack/manifests/img/cirros.pp | 8 ++++++-- - .../osnailyfacter/manifests/generate_vms/vm_config.pp | 11 +++++++++++ - deployment/puppet/osnailyfacter/templates/vm_libvirt.erb | 15 ++++++++++++++- - files/fuel-migrate/fuel-migrate | 5 ++++- - 4 files changed, 35 insertions(+), 4 deletions(-) - -diff --git a/deployment/puppet/openstack/manifests/img/cirros.pp b/deployment/puppet/openstack/manifests/img/cirros.pp -index 84e202e..cff06e0 100644 ---- a/deployment/puppet/openstack/manifests/img/cirros.pp -+++ b/deployment/puppet/openstack/manifests/img/cirros.pp -@@ -9,6 +9,10 @@ class openstack::img::cirros ( - $img_name = 'cirros', - $os_name = 'cirros', - ) { -+ $arch = $::architecture ? { -+ /(arm64|aarch64)/ => 'aarch64', -+ default => 'x86_64', -+ } - - package { 'cirros-testvm': - ensure => "present" -@@ -17,14 +21,14 @@ class openstack::img::cirros ( - case $::osfamily { - 'RedHat': { - exec { 'upload-img': -- command => "/usr/bin/glance -N ${os_auth_url} -T ${os_tenant_name} -I ${os_username} -K ${os_password} add name=${img_name} is_public=${public} container_format=${container_format} disk_format=${disk_format} distro=${os_name} < /opt/vm/cirros-x86_64-disk.img", -+ command => "/usr/bin/glance -N ${os_auth_url} -T ${os_tenant_name} -I ${os_username} -K ${os_password} add name=${img_name} is_public=${public} container_format=${container_format} disk_format=${disk_format} distro=${os_name} < /opt/vm/cirros-${arch}-disk.img", - unless => "/usr/bin/glance -N ${os_auth_url} -T ${os_tenant_name} -I ${os_username} -K ${os_password} index && (/usr/bin/glance -N ${os_auth_url} -T ${os_tenant_name} -I ${os_username} -K ${os_password} index | grep ${img_name})", - - } - } - 'Debian': { - exec { 'upload-img': -- command => "/usr/bin/glance -N ${os_auth_url} -T ${os_tenant_name} -I ${os_username} -K ${os_password} add name=${img_name} is_public=${public} container_format=${container_format} disk_format=${disk_format} distro=${os_name} < /usr/share/cirros-testvm/cirros-x86_64-disk.img", -+ command => "/usr/bin/glance -N ${os_auth_url} -T ${os_tenant_name} -I ${os_username} -K ${os_password} add name=${img_name} is_public=${public} container_format=${container_format} disk_format=${disk_format} distro=${os_name} < /usr/share/cirros-testvm/cirros-${arch}-disk.img", - unless => "/usr/bin/glance -N ${os_auth_url} -T ${os_tenant_name} -I ${os_username} -K ${os_password} index && (/usr/bin/glance -N ${os_auth_url} -T ${os_tenant_name} -I ${os_username} -K ${os_password} index | grep ${img_name})", - - } -diff --git a/deployment/puppet/osnailyfacter/manifests/generate_vms/vm_config.pp b/deployment/puppet/osnailyfacter/manifests/generate_vms/vm_config.pp -index 70fef32..dfefcbe 100644 ---- a/deployment/puppet/osnailyfacter/manifests/generate_vms/vm_config.pp -+++ b/deployment/puppet/osnailyfacter/manifests/generate_vms/vm_config.pp -@@ -4,6 +4,17 @@ define osnailyfacter::generate_vms::vm_config( - $details = $name - $id = $details['id'] - -+ case $::architecture { -+ 'arm64', 'aarch64': { -+ $machine_arch = 'aarch64' -+ $machine_type = 'virt' -+ } -+ default: { -+ $machine_arch = 'x86_64' -+ $machine_type = 'pc-i440fx-trusty' -+ } -+ } -+ - file { "${template_dir}/template_${id}_vm.xml": - owner => 'root', - group => 'root', -diff --git a/deployment/puppet/osnailyfacter/templates/vm_libvirt.erb b/deployment/puppet/osnailyfacter/templates/vm_libvirt.erb -index ae2ba5b..64e716d 100644 ---- a/deployment/puppet/osnailyfacter/templates/vm_libvirt.erb -+++ b/deployment/puppet/osnailyfacter/templates/vm_libvirt.erb -@@ -3,14 +3,23 @@ - <%= @details['mem'] %> - <%= @details['cpu'] %> - -- hvm -+ hvm -+ <% if == 'aarch64' %> -+ /var/lib/nova/<%= @details['id'] %>_vm.kernel -+ /var/lib/nova/<%= @details['id'] %>_vm.initramfs -+ root=/dev/vda1 rw rootwait console=tty0 console=ttyS0 console=ttyAMA0 -+ <% else %> - - -+ <% end %> - - - - - -+ <% if $machine_arch == 'aarch64' %> -+ -+ <% end %> - - - destroy -@@ -57,7 +66,11 @@ - - - - - -diff --git a/files/fuel-migrate/fuel-migrate b/files/fuel-migrate/fuel-migrate -index a215e0a..7d5b6cd 100755 ---- a/files/fuel-migrate/fuel-migrate -+++ b/files/fuel-migrate/fuel-migrate -@@ -176,6 +176,8 @@ create_vm(){ - exit 1 - fi - fi -+ # figure out atchitecture of the destination -+ arch="$(virsh -c "${dkvm_uri}" nodeinfo | awk '/CPU model:/ { print $3}')" - # create disk - ssh "${dkvm_ip}" qemu-img create -f raw "${dkvm_folder}/${fvm_name}.img" "${fvm_disk_size}" - # make template for virsh -@@ -185,13 +187,14 @@ create_vm(){ - ${fvm_ram} - ${fvm_cpu} - -- hvm -+ hvm - - - - - - -+ ${arch/aarch64/} - - - destroy diff --git a/patches/fuel-library/0005-Disable-usb-tablet-for-aarch64.patch b/patches/fuel-library/0005-Disable-usb-tablet-for-aarch64.patch deleted file mode 100644 index 1109656c..00000000 --- a/patches/fuel-library/0005-Disable-usb-tablet-for-aarch64.patch +++ /dev/null @@ -1,20 +0,0 @@ -From: Stanislaw Kardach -Date: Tue, 15 Mar 2016 11:33:52 +0100 -Subject: [PATCH] nova config: Disable usb tablet for aarch64 - ---- - deployment/puppet/openstack_tasks/manifests/roles/compute.pp | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp -index ca1b2c4..c0349dc 100644 ---- a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp -+++ b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp -@@ -316,3 +316,7 @@ class openstack::compute ( - nova_config { -+ 'libvirt/use_usb_tablet': value => $::architecture ? { -+ /(arm64|aarch64)/ => false, -+ default => true, -+ }; - 'libvirt/live_migration_flag': value => 'VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_PERSIST_DEST'; - 'libvirt/block_migration_flag': value => 'VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_NON_SHARED_INC'; diff --git a/patches/fuel-library/0006-upload_cirros-Add-direct-kernel-boot-support.patch b/patches/fuel-library/0006-upload_cirros-Add-direct-kernel-boot-support.patch deleted file mode 100644 index ab4100c6..00000000 --- a/patches/fuel-library/0006-upload_cirros-Add-direct-kernel-boot-support.patch +++ /dev/null @@ -1,117 +0,0 @@ -From: Stanislaw Kardach -Date: Tue, 15 Mar 2016 15:01:34 +0100 -Subject: [PATCH] upload_cirros: Add direct kernel boot support. - -AArch64 currently only supports direct kernel boot, so add the -functionality of uploading and connecting kernel and initramfs -images (disk formats `AKI` and `ARI`). - -Signed-off-by: Stanislaw Kardach ---- - .../osnailyfacter/modular/astute/upload_cirros.rb | 52 +++++++++++++++++++++- - 1 file changed, 50 insertions(+), 2 deletions(-) - -diff --git a/deployment/puppet/osnailyfacter/modular/astute/upload_cirros.rb b/deployment/puppet/osnailyfacter/modular/astute/upload_cirros.rb -index f0441b0..a619f3f 100755 ---- a/deployment/puppet/osnailyfacter/modular/astute/upload_cirros.rb -+++ b/deployment/puppet/osnailyfacter/modular/astute/upload_cirros.rb -@@ -52,11 +52,11 @@ def image_list - stdout = `glance --verbose image-list` - return_code = $?.exitstatus -- images = [] -+ images = Hash[] - stdout.split("\n").each do |line| - fields = line.split('|').map { |f| f.chomp.strip } - next if fields[1] == 'ID' - next unless fields[2] -- images << {fields[2] => fields[6]} -+ images[fields[2]] = { :id => fields[1], :status => fields[6] } - end - {:images => images, :exit_code => return_code} - end -@@ -78,6 +78,16 @@ EOF - [ stdout, return_code ] - end - -+# Calls glance update-image with a given property and value -+# Supported properties: 'kernel-id', 'ramdisk-id' -+def update_image(image_id, property, value) -+ command = "/usr/bin/openstack image set --#{property}=#{value} #{image_id}" -+ puts command -+ stdout = `#{command}` -+ return_code = $?.exitstatus -+ [ stdout, return_code ] -+end -+ - # check if Glance is online - # waited until the glance is started because when vCenter used as a glance - # backend launch may takes up to 1 minute. -@@ -133,7 +142,7 @@ end - # return true if image has been uploaded and active - def check_image(image) - list_of_images = image_list -- if list_of_images[:exit_code] == 0 && list_of_images[:images].include?(image['img_name'] => "active") -+ if list_of_images[:exit_code] == 0 && list_of_images[:images].select { |k,v| k == image['img_name'] and v[:status] == "active" }.count > 0 - return true - end - return false -@@ -142,7 +151,7 @@ end - # the first one - def cleanup_image(image) - list_of_images = image_list -- unless list_of_images[:images].select { |img_hash| img_hash.key?(image['img_name']) }.empty? -+ unless list_of_images[:images].select { |img_hash, v| img_hash == image['img_name'] }.count == 0 - delete_image(image['img_name']) - end - end -@@ -157,6 +166,41 @@ def delete_image(image_name) - [ stdout, return_code ] - end - -+# For each disk image try to find a kernel and initramfs images and -+# attach then to it via kernel_id and ramdisk_id glance properties. -+def connect_dependant_images(images) -+ # for each image -+ # get image id from glance -+ img_list = image_list -+ return_code = img_list[:exit_code] -+ if return_code == 0 -+ images.each do |image| -+ img_list[:images].each do |k,v| -+ if k == image['img_name'] -+ image['id'] = v[:id] -+ end -+ end -+ end -+ # for each image that is not in [aki, ari] -+ images.each do |image| -+ next if ['aki', 'ari'].include?(image['disk_format']) -+ images.each do |i| -+ # find aki/ari image whose name starts with this image's name -+ if i['img_name'].start_with?(image['img_name']) -+ ret = 0 -+ if i['disk_format'] == 'aki' -+ _, ret = update_image(image['id'], 'kernel-id', i['id']) -+ elsif i['disk_format'] == 'ari' -+ _, ret = update_image(image['id'], 'ramdisk-id', i['id']) -+ end -+ return_code += ret -+ end -+ end -+ end -+ end -+ return return_code -+end -+ - ######################## - - wait_for_glance -@@ -180,6 +226,8 @@ if errors > 0 - cleanup_image(image) - end - exit 1 -+elsif connect_dependant_images(test_vm_images) > 0 -+ exit 2 - end - - exit 0 diff --git a/patches/fuel-library/0007-Install-vgabios-and-link-for-aarch64.patch b/patches/fuel-library/0007-Install-vgabios-and-link-for-aarch64.patch deleted file mode 100644 index 04e2abf6..00000000 --- a/patches/fuel-library/0007-Install-vgabios-and-link-for-aarch64.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: Alexandru Avadanii -Date: Tue, 15 Mar 2016 11:33:52 +0100 -Subject: [PATCH] Install vgabios (and link) for aarch64 - -vgabios is needed for standard VGA mode in AArch64 VMs, so -install it by default on AArch64 and create missing link -in to . - -Signed-off-by: Alexandru Avadanii -Signed-off-by: Stanislaw Kardach ---- - deployment/puppet/openstack_tasks/manifests/roles/compute.pp | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp -index ca1b2c4..c0349dc 100644 ---- a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp -+++ b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp -@@ -364,3 +368,11 @@ class openstack::compute ( - libvirt_service_name => $::nova::params::libvirt_service_name, -+ } -> -+ package { 'vgabios': -+ ensure => present; -+ } -> -+ file { '/usr/share/qemu/vgabios-stdvga.bin': -+ ensure => link, -+ target => '/usr/share/vgabios/vgabios.bin', -+ replace => false, - } - diff --git a/patches/fuel-library/0008-nova-Update-vga-console-defaults-for-armv7-aarch64.patch b/patches/fuel-library/0008-nova-Update-vga-console-defaults-for-armv7-aarch64.patch deleted file mode 100644 index c289bd8d..00000000 --- a/patches/fuel-library/0008-nova-Update-vga-console-defaults-for-armv7-aarch64.patch +++ /dev/null @@ -1,98 +0,0 @@ -From: Stanislaw Kardach -Date: Tue, 22 Mar 2016 12:05:09 +0100 -Subject: [PATCH] nova: Update vga, console defaults for armv7, aarch64 - -Nova hardcodes default options for both video=cirrus and console. -armv7 and aarch64 VMs require video=vga, and since most applications -use PL011 serial driver for guests, adding console=ttyAMA0 is also -a nice UX addition. ---- - .../openstack/files/nova-libvirt-vga-console.patch | 39 ++++++++++++++++++++++ - deployment/puppet/openstack_tasks/manifests/roles/compute.pp | 19 +++++++++++ - 2 files changed, 58 insertions(+) - create mode 100644 deployment/puppet/openstack/files/nova-libvirt-vga-console.patch - -diff --git a/deployment/puppet/openstack/files/nova-libvirt-vga-console.patch b/deployment/puppet/openstack/files/nova-libvirt-vga-console.patch -new file mode 100644 -index 0000000..c5f8e5a ---- /dev/null -+++ b/deployment/puppet/openstack/files/nova-libvirt-vga-console.patch -@@ -0,0 +1,40 @@ -+From: Stanislaw Kardach -+Date: Tue, 22 Mar 2016 12:05:09 +0100 -+Subject: [PATCH] Update vga, console defaults for armv7 and aarch64 -+ -+Nova hardcodes default options for both video=cirrus and console. -+armv7 and aarch64 VMs require video=vga, and since most applications -+use PL011 serial driver for guests, adding console=ttyAMA0 is also -+a nice UX addition. -+ -+Signed-off-by: Stanislaw Kardach -+Signed-off-by: Alexandru Avadanii -+--- -+ -+diff --git a/virt/libvirt/driver.py b/virt/libvirt/driver.py -+index 920a283..751b140 100644 -+--- a/virt/libvirt/driver.py -++++ b/virt/libvirt/driver.py -+@@ -3834,7 +3834,11 @@ -+ if virt_type == "xen": -+ guest.os_cmdline = "ro root=%s" % root_device_name -+ else: -++ guestarch = libvirt_utils.get_arch(image_meta) -+ guest.os_cmdline = ("root=%s %s" % (root_device_name, CONSOLE)) -++ if guestarch in (arch.ARMV7, arch.AARCH64): -++ # NOTE(armband): ARM v7/v8 use PL011 drv, add ttyAMA0 console -++ guest.os_cmdline += " console=ttyAMA0" -+ if virt_type == "qemu": -+ guest.os_cmdline += " no_timer_check" -+ if instance.ramdisk_id: -+@@ -3972,7 +3972,9 @@ class LibvirtDriver(driver.ComputeDriver): -+ video.type = 'xen' -+ elif CONF.libvirt.virt_type == 'parallels': -+ video.type = 'vga' -+- elif guestarch in (arch.PPC, arch.PPC64, arch.PPC64LE): -++ elif guestarch in (arch.ARMV7, arch.AARCH64, -++ arch.PPC, arch.PPC64, arch.PPC64LE): -++ # NOTE(armband): Added ARM v7/v8, same as on PPC. -+ # NOTE(ldbragst): PowerKVM doesn't support 'cirrus' be default -+ # so use 'vga' instead when running on Power hardware. -+ video.type = 'vga' -diff --git a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp -index c0349dc..46b1801 100644 ---- a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp -+++ b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp -@@ -157,4 +157,10 @@ class openstack::compute ( - - include ::nova::params -+ -+ if ! defined(Package['patch']) { -+ package { 'patch': -+ ensure => 'present', -+ } -+ } - - case $::osfamily { -@@ -250,3 +256,4 @@ class openstack::compute ( - - $notify_on_state_change = 'vm_and_task_state' -+ $nova_path = '/usr/lib/python2.7/dist-packages/nova' - -@@ -273,5 +280,17 @@ class openstack::compute ( - memcached_servers => $memcached_addresses, - cinder_catalog_info => pick($nova_hash_real['cinder_catalog_info'], 'volumev2:cinderv2:internalURL'), - rabbit_heartbeat_timeout_threshold => $::os_service_default, -+ } -> -+ # FIXME(armband): Workaround for missing arm defaults in nova libvirt driver -+ file { "${nova_path}/libvirt-vga-console.patch": -+ ensure => "file", -+ source => "puppet:///modules/openstack/nova-libvirt-vga-console.patch", -+ } -> -+ exec { 'nova libvirt driver patch arm defaults': -+ path => ['/usr/bin'], -+ command => "patch -p1 < ${nova_path}/libvirt-vga-console.patch", -+ unless => "patch -p1 -R -N --dry-run < ${nova_path}/libvirt-vga-console.patch", -+ cwd => $nova_path, -+ require => [Package['patch']], - } - diff --git a/patches/fuel-library/0009-nova-AArch64-enable-hugepage-support.patch b/patches/fuel-library/0009-nova-AArch64-enable-hugepage-support.patch deleted file mode 100644 index 16e06ba8..00000000 --- a/patches/fuel-library/0009-nova-AArch64-enable-hugepage-support.patch +++ /dev/null @@ -1,93 +0,0 @@ -From: Alexandru Avadanii -Date: Fri, 16 Sep 2016 21:31:56 +0200 -Subject: [PATCH] nova: AArch64: enable hugepage support - -This patch adds AArch64 to the hardcoded lists of valid -architectures for hugepage support. - -Closes-bug: ARMBAND-90 - -Signed-off-by: Veena Lingadahalli -Signed-off-by: Alexandru Avadanii ---- - .../nova-AArch64-enable-hugepage-support.patch | 47 ++++++++++++++++++++++ - .../openstack_tasks/manifests/roles/compute.pp | 12 ++++++ - 2 files changed, 59 insertions(+) - create mode 100644 deployment/puppet/openstack/files/nova-AArch64-enable-hugepage-support.patch - -diff --git a/deployment/puppet/openstack/files/nova-AArch64-enable-hugepage-support.patch b/deployment/puppet/openstack/files/nova-AArch64-enable-hugepage-support.patch -new file mode 100644 -index 0000000..847cab6 ---- /dev/null -+++ b/deployment/puppet/openstack/files/nova-AArch64-enable-hugepage-support.patch -@@ -0,0 +1,47 @@ -+From: Veena Lingadahalli -+Date: Fri Sep 16 17:52:02 CEST 2016 -+Subject: [PATCH] nova: AArch64: enable hugepage support -+ -+This patch adds AArch64 to the hardcoded lists of valid -+architectures for hugepage support. -+ -+Signed-off-by: Veena Lingadahalli -+Acked-by: Alexandru Avadanii -+--- -+ -+diff --git a/compute/arch.py a/compute/arch.py -+index 265f853..6a4b4a3 100644 -+--- a/compute/arch.py -++++ a/compute/arch.py -+@@ -156,6 +156,9 @@ def canonicalize(name): -+ if newname == "amd64": -+ newname = X86_64 -+ -++ if newname == "aarch64": -++ newname = AARCH64 -++ -+ if not is_valid(newname): -+ raise exception.InvalidArchitectureName(arch=name) -+ -+diff --git a/virt/libvirt/driver.py a/virt/libvirt/driver.py -+index bac17cf..0e0bcae 100644 -+--- a/virt/libvirt/driver.py -++++ a/virt/libvirt/driver.py -+@@ -5206,7 +5206,7 @@ class LibvirtDriver(driver.ComputeDriver): -+ self._bad_libvirt_numa_version_warn = True -+ return False -+ -+- support_matrix = {(arch.I686, arch.X86_64): MIN_LIBVIRT_NUMA_VERSION, -++ support_matrix = {(arch.I686, arch.X86_64, arch.AARCH64): MIN_LIBVIRT_NUMA_VERSION, -+ (arch.PPC64, -+ arch.PPC64LE): MIN_LIBVIRT_NUMA_VERSION_PPC} -+ caps = self._host.get_capabilities() -+@@ -5222,7 +5222,7 @@ class LibvirtDriver(driver.ComputeDriver): -+ def _has_hugepage_support(self): -+ # This means that the host can support multiple values for the size -+ # field in LibvirtConfigGuestMemoryBackingPage -+- supported_archs = [arch.I686, arch.X86_64] -++ supported_archs = [arch.I686, arch.X86_64, arch.AARCH64] -+ caps = self._host.get_capabilities() -+ return ((caps.host.cpu.arch in supported_archs) and -+ self._host.has_min_version(MIN_LIBVIRT_HUGEPAGE_VERSION, -diff --git a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp -index 3647f9b..c53409c 100644 ---- a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp -+++ b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp -@@ -347,6 +347,18 @@ class openstack_tasks::roles::compute { - unless => "patch -p1 -R -N --dry-run < ${nova_path}/libvirt-vga-console.patch", - cwd => $nova_path, - require => [Package['patch']], -+ } -> -+ # FIXME(armband): Add AArch64 to arch list for nova hugepage support -+ file { "${nova_path}/nova-AArch64-enable-hugepage-support.patch": -+ ensure => "file", -+ source => "puppet:///modules/openstack/nova-AArch64-enable-hugepage-support.patch", -+ } -> -+ exec { 'nova AArch64 enable hugepage support': -+ path => ['/usr/bin'], -+ command => "patch -p1 < ${nova_path}/nova-AArch64-enable-hugepage-support.patch", -+ unless => "patch -p1 -R -N --dry-run < ${nova_path}/nova-AArch64-enable-hugepage-support.patch", -+ cwd => $nova_path, -+ require => [Package['patch']], - } - - class { '::nova::availability_zone': diff --git a/patches/fuel-library/0010-nova-Fix-inject-for-direct-boot-with-part-table.patch b/patches/fuel-library/0010-nova-Fix-inject-for-direct-boot-with-part-table.patch deleted file mode 100644 index 372386a3..00000000 --- a/patches/fuel-library/0010-nova-Fix-inject-for-direct-boot-with-part-table.patch +++ /dev/null @@ -1,90 +0,0 @@ -From: Alexandru Avadanii -Date: Fri, 25 Mar 2016 16:12:08 +0100 -Subject: [PATCH] nova: Fix inject for direct boot with part table. - -See [1] for full bug description. -For now, we detect direct kernel boot with a partition table inside -disk image by passing target_partition when root kernel arg points -to a partition (instead of the whole disk). - -[1] https://bugs.launchpad.net/nova/+bug/1290455 - -Signed-off-by: Alexandru Avadanii -Signed-off-by: Stanislaw Kardach ---- - .../openstack/files/nova-libvirt-inject.patch | 44 ++++++++++++++++++++++ - deployment/puppet/openstack_tasks/manifests/roles/compute.pp | 12 ++++++ - 2 files changed, 56 insertions(+) - create mode 100644 deployment/puppet/openstack/files/nova-libvirt-inject.patch - -diff --git a/deployment/puppet/openstack/files/nova-libvirt-inject.patch b/deployment/puppet/openstack/files/nova-libvirt-inject.patch -new file mode 100644 -index 0000000..9cbfe5f ---- /dev/null -+++ b/deployment/puppet/openstack/files/nova-libvirt-inject.patch -@@ -0,0 +1,44 @@ -+From: Alexandru Avadanii -+Date: Tue, 22 Mar 2016 12:05:09 +0100 -+Subject: [PATCH] Fix inject for direct boot with partition table -+ -+See [1] for full bug description. -+For now, we detect direct kernel boot with a partition table inside -+disk image by passing target_partition when root kernel arg points -+to a partition (instead of the whole disk). -+ -+[1] https://bugs.launchpad.net/nova/+bug/1290455 -+ -+Signed-off-by: Alexandru Avadanii -+Signed-off-by: Stanislaw Kardach -+--- -+ -+diff --git a/virt/libvirt/driver.py b/virt/libvirt/driver.py -+index 920a283..751b140 100644 -+--- a/virt/libvirt/driver.py -++++ b/virt/libvirt/driver.py -+@@ -34,6 +34,7 @@ -+ import mmap -+ import operator -+ import os -++import re -+ import shutil -+ import tempfile -+ import time -+@@ -2820,7 +2821,15 @@ -+ """ -+ # Handles the partition need to be used. -+ target_partition = None -+- if not instance.kernel_id: -++ image_meta = objects.ImageMeta.from_instance(instance) -++ # FIXME(armband): https://bugs.launchpad.net/nova/+bug/1290455 -++ # Support direct kernel boot with a partition table inside disk image: -++ # pass target_partition when root kernel arg points to a partition -++ # (instead of the whole disk). -++ has_partition_table = re.search("root=/dev/.d.([1-9]+)", -++ str(image_meta.properties.get("os_command_line"))) -++ -++ if not instance.kernel_id or has_partition_table: -+ target_partition = CONF.libvirt.inject_partition -+ if target_partition == 0: -+ target_partition = None -diff --git a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp -index 46b1801..d42d6a1 100644 ---- a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp -+++ b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp -@@ -281,4 +281,16 @@ class openstack::compute ( - } -> -+ # FIXME(armband): Fix inject for part image direct boot (bug LP #1469308) -+ file { "${nova_path}/libvirt-inject.patch": -+ ensure => "file", -+ source => "puppet:///modules/openstack/nova-libvirt-inject.patch", -+ } -> -+ exec { 'nova libvirt driver patch partitioned injection': -+ path => ['/usr/bin'], -+ command => "patch -p1 < ${nova_path}/libvirt-inject.patch", -+ unless => "patch -p1 -R -N --dry-run < ${nova_path}/libvirt-inject.patch", -+ cwd => $nova_path, -+ require => [Package['patch']], -+ } -> - # FIXME(armband): Workaround for missing arm defaults in nova libvirt driver - file { "${nova_path}/libvirt-vga-console.patch": - ensure => "file", diff --git a/patches/fuel-library/0011-ceph-Fix-obsolete-XFS-mount-param-delaylog.patch b/patches/fuel-library/0011-ceph-Fix-obsolete-XFS-mount-param-delaylog.patch deleted file mode 100644 index 0ddad114..00000000 --- a/patches/fuel-library/0011-ceph-Fix-obsolete-XFS-mount-param-delaylog.patch +++ /dev/null @@ -1,46 +0,0 @@ -From: Alexandru Avadanii -Date: Sun, 27 Mar 2016 20:32:50 +0200 -Subject: [PATCH] ceph: Fix obsolete XFS mount param "delaylog". - -According to [1], "delaylog" mount arg is now enforced by default, -and passing it will lead to mount failure. - -Trim "delaylog" from default list of xfs mount args and leave it up to -ceph-osd.pp to add this obsoleted arg only for targets running a kernel -older than 4.0. - -[1] https://www.kernel.org/doc/Documentation/filesystems/xfs.txt ---- - deployment/puppet/osnailyfacter/manifests/ceph/ceph_osd.pp | 7 +++++++ - deployment/puppet/osnailyfacter/manifests/globals/globals.pp | 2 +- - 2 files changed, 8 insertions(+), 1 deletion(-) - -diff --git a/deployment/puppet/osnailyfacter/manifests/ceph/ceph_osd.pp b/deployment/puppet/osnailyfacter/manifests/ceph/ceph_osd.pp -index f7da80e..22aab33 100644 ---- a/deployment/puppet/osnailyfacter/manifests/ceph/ceph_osd.pp -+++ b/deployment/puppet/osnailyfacter/manifests/ceph/ceph_osd.pp -@@ -50,4 +50,11 @@ class {'ceph': - } - - if $ceph_tuning_settings_hash != {} { -+ if versioncmp($::kernelmajversion, '4.0') < 0 { -+ # FIXME(armband): XFS mount opt delaylog is deprecated in kernels >=4.0. -+ $ceph_tuning_settings_hash['osd_mount_options_xfs'] = join([ -+ $ceph_tuning_settings_hash['osd_mount_options_xfs'], -+ 'delaylog' -+ ], ',') -+ } - ceph_conf { -diff --git a/deployment/puppet/osnailyfacter/manifests/globals/globals.pp b/deployment/puppet/osnailyfacter/modular/globals/globals.pp -index 268a5b1..69aed7b 100644 ---- a/deployment/puppet/osnailyfacter/manifests/globals/globals.pp -+++ b/deployment/puppet/osnailyfacter/manifests/globals/globals.pp -@@ -123,7 +123,7 @@ if ($storage_hash['volumes_ceph'] or $storage_hash['images_ceph'] or $storage_ha - $ceph_tuning_settings = { - 'max_open_files' => pick($storage_tuning_settings['max_open_files'], '131072'), - 'osd_mkfs_type' => pick($storage_tuning_settings['osd_mkfs_type'], 'xfs'), -- 'osd_mount_options_xfs' => pick($storage_tuning_settings['osd_mount_options_xfs'], 'rw,relatime,inode64,logbsize=256k,delaylog,allocsize=4M'), -+ 'osd_mount_options_xfs' => pick($storage_tuning_settings['osd_mount_options_xfs'], 'rw,relatime,inode64,logbsize=256k,allocsize=4M'), - 'osd_op_threads' => pick($storage_tuning_settings['osd_op_threads'], '20'), - 'filestore_queue_max_ops' => pick($storage_tuning_settings['filestore_queue_max_ops'], '500'), - 'filestore_queue_committing_max_ops' => pick($storage_tuning_settings['filestore_queue_committing_max_ops'], '5000'), diff --git a/patches/fuel-library/0012-ceilometer-Fix-libvirt-bin-group-name-for-armband.patch b/patches/fuel-library/0012-ceilometer-Fix-libvirt-bin-group-name-for-armband.patch deleted file mode 100644 index 36353a89..00000000 --- a/patches/fuel-library/0012-ceilometer-Fix-libvirt-bin-group-name-for-armband.patch +++ /dev/null @@ -1,45 +0,0 @@ -From: Alexandru Avadanii -Date: Mon, 18 Apr 2016 18:44:27 +0200 -Subject: [PATCH] ceilometer: Fix libvirt-bin group name for armband. - -Upstream mirrors use a custom version of libvirt, ported from -Debian, while keeping the Ubuntu ceilometer package, leading to a -libvirt group name mismatch between the two. - -Fuel-library hardcodes a deb-version test for libvirt-bin, which -enforces the use of "libvirt" instead of "libvirtd" for 1.2.9 or -newer libvirt-bin [1]. - -Armband brings its own 1.3.2 libvirt-bin package, which respects -Ubuntu standard group naming ("libvirtd"), but since 1.3.2 > 1.2.9, -the old group name ("libvirt") is still used. - -This patch extends the version checking introduced in [1]: - - libvirt-bin 1.3.2 or newer will use "libvirtd" naming; - - libvirt-bin 1.2.9 ... <1.3.2 will use "libvirt". - -[1] https://review.openstack.org/#/c/200602/8/deployment/puppet/ - openstack/manifests/ceilometer.pp ---- - deployment/puppet/openstack_tasks/manifests/ceilometer/compute.pp | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/deployment/puppet/openstack_tasks/manifests/ceilometer/compute.pp b/deployment/puppet/openstack_tasks/manifests/ceilometer/compute.pp -index 8311731..1d7af2b 100644 ---- a/deployment/puppet/openstack_tasks/manifests/ceilometer/compute.pp -+++ b/deployment/puppet/openstack_tasks/manifests/ceilometer/compute.pp -@@ -195,7 +195,13 @@ class openstack::ceilometer ( - - if $::operatingsystem == 'Ubuntu' and $::ceilometer::params::libvirt_group { -+ # Armband libvirt-bin deb package (1.3.2 version) creates 'libvirtd' group on Ubuntu -+ if (versioncmp($::libvirt_package_version, '1.3.2') >= 0) { -+ User<| name == 'ceilometer' |> { -+ groups => ['nova', 'libvirtd'], -+ } -+ } - # Our libvirt-bin deb package (1.2.9 version) creates 'libvirt' group on Ubuntu -- if (versioncmp($::libvirt_package_version, '1.2.9') >= 0) { -+ elsif (versioncmp($::libvirt_package_version, '1.2.9') >= 0) { - User<| name == 'ceilometer' |> { - groups => ['nova', 'libvirt'], - } diff --git a/patches/fuel-library/0013-Allow-configuring-MySQL-WSREP-SST-provider.patch b/patches/fuel-library/0013-Allow-configuring-MySQL-WSREP-SST-provider.patch deleted file mode 100644 index 6d9bc8c7..00000000 --- a/patches/fuel-library/0013-Allow-configuring-MySQL-WSREP-SST-provider.patch +++ /dev/null @@ -1,58 +0,0 @@ -From: Stanislaw Kardach -Date: Wed, 20 Apr 2016 14:54:42 -0700 -Subject: [PATCH] Allow configuring MySQL WSREP SST provider - -On some arm64 platforms xtrabackup is broken due to an outdated -MySQL/InnoDB code that it uses which is missing. To work around that -this patch allows choosing which WSREP SST provider to use. Aside of -already supported `xtrabackup-v2` and `mysqldump`, the `rsync` method -has been added as it is comparable to xtrabackup in terms of speed (or -is faster), has been validated to work on arm64 platforms where -xtrabackup is broken and it doesn't rely on db mechanisms to perform the -state transfer. - -This patch is tied to a patch in fuel-web that introduces configuration -options for WSREP SST provider and in case nothing is specified, it -will choose `xtrabackup-v2`. - -Signed-off-by: Stanislaw Kardach ---- - deployment/puppet/osnailyfacter/manifests/database/database.pp | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/deployment/puppet/osnailyfacter/manifests/database/database.pp b/deployment/puppet/osnailyfacter/manifests/database/database.pp -index 1755c34..0cfbc8c 100644 ---- a/deployment/puppet/osnailyfacter/manifests/database/database.pp -+++ b/deployment/puppet/osnailyfacter/manifests/database/database.pp -@@ -8,4 +8,5 @@ class osnailyfacter::database::database { - $use_syslog = hiera('use_syslog', true) - $primary_controller = hiera('primary_controller') - $mysql_hash = hiera_hash('mysql', {}) -+ $wsrep_hash = hiera_hash('mysql_wsrep', {}) - $debug = pick($mysql_hash['debug'], hiera('debug', false)) -@@ -22,6 +23,7 @@ class osnailyfacter::database::database { - - $mysql_root_password = $mysql_hash['root_password'] - $enabled = pick($mysql_hash['enabled'], true) -+ $wsrep_sst_method = pick($wsrep_hash['wsrep_method'], 'xtrabackup-v2') - - $galera_node_address = get_network_role_property('mgmt/database', 'ipaddr') - $galera_nodes = values(get_node_to_ipaddr_map_by_network_role(hiera_hash('database_nodes'), 'mgmt/database')) -@@ -216,7 +218,7 @@ class osnailyfacter::database::database { - 'wsrep_cluster_name' => $galera_cluster_name, - 'wsrep_provider_options' => $wsrep_provider_options, - 'wsrep_slave_threads' => $wsrep_slave_threads, -- 'wsrep_sst_method' => 'xtrabackup-v2', -+ 'wsrep_sst_method' => $wsrep_sst_method, - #TODO (sgolovatiuk): fix this, should be a specific user not root - 'wsrep_sst_auth' => "\"root:${mysql_root_password}\"", - 'wsrep_node_address' => $galera_node_address, -@@ -269,7 +271,7 @@ class osnailyfacter::database::database { - wsrep_group_comm_port => $wsrep_group_comm_port, - bind_address => $galera_node_address, - local_ip => $galera_node_address, -- wsrep_sst_method => 'xtrabackup-v2', -+ wsrep_sst_method => $wsrep_sst_method, - override_options => $override_options, - } - diff --git a/patches/fuel-library/0014-Add-cobbler-grub-aarch64-to-cobbler-dependencies.patch b/patches/fuel-library/0014-Add-cobbler-grub-aarch64-to-cobbler-dependencies.patch deleted file mode 100644 index 14d06ef5..00000000 --- a/patches/fuel-library/0014-Add-cobbler-grub-aarch64-to-cobbler-dependencies.patch +++ /dev/null @@ -1,35 +0,0 @@ -From: Alexandru Avadanii -Date: Fri, 13 May 2016 23:06:28 +0200 -Subject: [PATCH] Add cobbler-grub-aarch64 to cobbler dependencies. - -The aarch64 grub EFI loader, packaged as an RPM and previously -installed in the nailgun docker container in /var/lib/cobbler, -is now added as a cobbler dependency in puppet and installed -on the Fuel master node. - -[Alexandru.Avadanii@enea.com] -Reworked based on Florin's work for the docker container. - -Signed-off-by: Florin Dumitrascu -Signed-off-by: Alexandru Avadanii ---- - deployment/puppet/cobbler/manifests/packages.pp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/deployment/puppet/cobbler/manifests/packages.pp b/deployment/puppet/cobbler/manifests/packages.pp -index 267c18c..9782c4c 100644 ---- a/deployment/puppet/cobbler/manifests/packages.pp -+++ b/deployment/puppet/cobbler/manifests/packages.pp -@@ -25,10 +25,10 @@ class cobbler::packages { - $pexpect_package = 'pexpect' - case $::operatingsystemrelease { - /6.+/: { -- $cobbler_additional_packages = ['xinetd', 'tftp-server', 'syslinux', 'wget', 'python-ipaddr','fence-agents', 'bind-utils'] -+ $cobbler_additional_packages = ['xinetd', 'tftp-server', 'syslinux', 'wget', 'python-ipaddr','fence-agents', 'bind-utils', 'cobbler-grub-aarch64'] - } - /7.+/: { -- $cobbler_additional_packages = ['xinetd', 'tftp-server', 'syslinux', 'wget', 'python-ipaddr','fence-agents-all', 'bind-utils'] -+ $cobbler_additional_packages = ['xinetd', 'tftp-server', 'syslinux', 'wget', 'python-ipaddr','fence-agents-all', 'bind-utils', 'cobbler-grub-aarch64'] - } - } - } diff --git a/patches/fuel-library/0015-Set-net.ipv4.ip_nonlocal_bind-1-for-vrouter-namespace.patch b/patches/fuel-library/0015-Set-net.ipv4.ip_nonlocal_bind-1-for-vrouter-namespace.patch deleted file mode 100644 index 86318bb0..00000000 --- a/patches/fuel-library/0015-Set-net.ipv4.ip_nonlocal_bind-1-for-vrouter-namespace.patch +++ /dev/null @@ -1,54 +0,0 @@ -From: Bartosz Kupidura -Date: Mon, 27 Jun 2016 13:12:29 +0200 -Subject: [PATCH] Set net.ipv4.ip_nonlocal_bind=1 for vrouter namespace - -Change-Id: I123af7e3b53f9a53fcd9d2818640c0bd4699e024 -Closes-Bug: #1595957 -(cherry picked from commit 244456a3b77074a6cd85fa9d33ebb03ac25decf8) ---- - files/fuel-ha-utils/ocf/ns_dns | 3 ++- - files/fuel-ha-utils/ocf/ns_vrouter | 3 ++- - 2 files changed, 4 insertions(+), 2 deletions(-) - -diff --git a/files/fuel-ha-utils/ocf/ns_dns b/files/fuel-ha-utils/ocf/ns_dns -index cdd814c..49cbd17 100644 ---- a/files/fuel-ha-utils/ocf/ns_dns -+++ b/files/fuel-ha-utils/ocf/ns_dns -@@ -140,7 +140,7 @@ exit $OCF_SUCCESS - - check_ns() { - local ns=`ip netns list | grep "$OCF_RESKEY_ns"` -- [ $ns != $OCF_RESKEY_ns ] && return $OCF_ERR_GENERIC -+ [ "$ns" != $OCF_RESKEY_ns ] && return $OCF_ERR_GENERIC - return $OCF_SUCCESS - } - -@@ -150,6 +150,7 @@ get_ns() { - - ocf_run ip netns add $OCF_RESKEY_ns - rc=$? -+ ocf_run $RUN_IN_NS /sbin/sysctl -w net.ipv4.ip_nonlocal_bind=1 - ocf_run $RUN_IN_NS ip link set up dev lo - - return $rc -diff --git a/files/fuel-ha-utils/ocf/ns_vrouter b/files/fuel-ha-utils/ocf/ns_vrouter -index a65e9cf..5cc6c98 100644 ---- a/files/fuel-ha-utils/ocf/ns_vrouter -+++ b/files/fuel-ha-utils/ocf/ns_vrouter -@@ -186,7 +186,7 @@ check_ns() { - local LH="${LL} check_ns():" - local ns=`ip netns list | grep "$OCF_RESKEY_ns"` - ocf_log debug "${LH} recieved netns list: ${ns}" -- [[ $ns != $OCF_RESKEY_ns ]] && return $OCF_ERR_GENERIC -+ [[ "$ns" != $OCF_RESKEY_ns ]] && return $OCF_ERR_GENERIC - return $OCF_SUCCESS - } - -@@ -197,6 +197,7 @@ get_ns() { - - ocf_run ip netns add $OCF_RESKEY_ns - rc=$? -+ ocf_run $RUN_IN_NS /sbin/sysctl -w net.ipv4.ip_nonlocal_bind=1 - ocf_run $RUN_IN_NS ip link set up dev lo - ocf_log debug "${LH} added netns ${OCF_RESKEY_ns} and set up lo" - diff --git a/patches/fuel-library/0016-compute-Fix-virtlogd-not-started-after-install.patch b/patches/fuel-library/0016-compute-Fix-virtlogd-not-started-after-install.patch deleted file mode 100644 index 752ef6f8..00000000 --- a/patches/fuel-library/0016-compute-Fix-virtlogd-not-started-after-install.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: Alexandru Avadanii -Date: Fri, 15 Jul 2016 17:22:44 +0200 -Subject: [PATCH] compute: Fix virtlogd not started after install - -libvirt >= 1.3.0 installs additional services, including virtlogd, -which need to be started explicitly after install, as the Ubuntu UCA -package is currently broken. - -Fuel code already carries a fix for this, but only for UCA libvirt. -Refactor the condition for the existing fix to check package version -instead of origin. - -Closes-bug: https://jira.opnfv.org/browse/ARMBAND-37 - -Signed-off-by: Alexandru Avadanii ---- - deployment/puppet/openstack_tasks/manifests/roles/compute.pp | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp -index 33e851f..3647f9b 100644 ---- a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp -+++ b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp -@@ -373,7 +373,8 @@ class openstack_tasks::roles::compute { - - # TODO(aschultz): work around until https://review.openstack.org/#/c/306677/ - # lands. -- if $::os_package_type == 'ubuntu' { -+ # Armband: also apply for our libvirt-bin deb package (>=1.3.0 version) -+ if (versioncmp($::libvirt_package_version, '1.3.0') >= 0) { - ensure_resource('service', ['virtlogd','virtlockd'], { - ensure => running, - enable => true, diff --git a/patches/fuel-library/0017-Always-wait-for-MySQL-sync-on-service-refresh.patch b/patches/fuel-library/0017-Always-wait-for-MySQL-sync-on-service-refresh.patch deleted file mode 100644 index e0704110..00000000 --- a/patches/fuel-library/0017-Always-wait-for-MySQL-sync-on-service-refresh.patch +++ /dev/null @@ -1,60 +0,0 @@ -From: dmburmistrov -Date: Thu, 18 Aug 2016 21:30:26 +0300 -Subject: Always wait for MySQL sync on service refresh - -Always trigger Exec['wait-for-sync'] on -MySQL service refresh. - -Closes-bug: #1614647 - -Change-Id: I82ec0d46eff217daedc1bd07c67069498c515c44 ---- - deployment/puppet/cluster/manifests/mysql.pp | 6 +++--- - deployment/puppet/cluster/spec/classes/cluster_mysql_spec.rb | 6 +++++- - 2 files changed, 8 insertions(+), 4 deletions(-) - -diff --git a/deployment/puppet/cluster/manifests/mysql.pp b/deployment/puppet/cluster/manifests/mysql.pp -index 0b766c5..055b931 100644 ---- a/deployment/puppet/cluster/manifests/mysql.pp -+++ b/deployment/puppet/cluster/manifests/mysql.pp -@@ -111,7 +111,7 @@ class cluster::mysql ( - require => Package['mysql-server'], - } ~> - -- exec { 'wait-initial-sync': -+ exec { 'wait-for-sync': - path => '/bin:/sbin:/usr/bin:/usr/sbin', - command => "mysql ${user_password_string} -Nbe \"show status like 'wsrep_local_state_comment'\" | grep -q -e Synced && sleep 10", - try_sleep => 10, -@@ -126,7 +126,7 @@ class cluster::mysql ( - } - - Exec['create-init-file'] -> -- Service<| title == $service_name |> -> -- Exec['wait-initial-sync'] -> -+ Service<| title == $service_name |> ~> -+ Exec['wait-for-sync'] -> - Exec['rm-init-file'] - } -diff --git a/deployment/puppet/cluster/spec/classes/cluster_mysql_spec.rb b/deployment/puppet/cluster/spec/classes/cluster_mysql_spec.rb -index be00056..e4d62c4 100644 ---- a/deployment/puppet/cluster/spec/classes/cluster_mysql_spec.rb -+++ b/deployment/puppet/cluster/spec/classes/cluster_mysql_spec.rb -@@ -39,12 +39,16 @@ describe 'cluster::mysql' do - /'username'@'localhost' IDENTIFIED BY 'password'/ - ) - should contain_exec('create-init-file').that_comes_before('Service[mysqld]') -- should contain_exec('create-init-file').that_notifies('Exec[wait-initial-sync]') -+ should contain_exec('create-init-file').that_notifies('Exec[wait-for-sync]') - end - - it 'creates exec to remove init-file' do - should contain_exec('rm-init-file') - end -+ -+ it 'creates exec to wait initial database sync' do -+ should contain_exec('wait-for-sync').that_subscribes_to('Service[mysqld]') -+ end - end - - end diff --git a/patches/fuel-library/0018-Fix-MySQL-logging-dir-permissions-for-syslog.patch b/patches/fuel-library/0018-Fix-MySQL-logging-dir-permissions-for-syslog.patch deleted file mode 100644 index da6acac8..00000000 --- a/patches/fuel-library/0018-Fix-MySQL-logging-dir-permissions-for-syslog.patch +++ /dev/null @@ -1,90 +0,0 @@ -From: Maksim Malchuk -Date: Wed, 24 Aug 2016 00:15:02 +0300 -Subject: Fix MySQL logging dir permissions for syslog - -This change fixes permissions for MySQL logging directory to enable -syslogd create and write logs files into it. - -Closes-Bug: #1615680 -Change-Id: Id29aead6619ea8ed68811d0fd80895ee79f51687 -Signed-off-by: Maksim Malchuk -(cherry picked from commit 9c978278811eeebfb11ab4d2b42ebabe00c132c2) ---- - deployment/puppet/cluster/manifests/mysql.pp | 14 +++++++++++--- - .../puppet/cluster/spec/classes/cluster_mysql_spec.rb | 11 ++++++++++- - tests/noop/spec/hosts/database/database_spec.rb | 9 +++++++++ - 3 files changed, 30 insertions(+), 4 deletions(-) - -diff --git a/deployment/puppet/cluster/manifests/mysql.pp b/deployment/puppet/cluster/manifests/mysql.pp -index f483cf6..7bc8874 100644 ---- a/deployment/puppet/cluster/manifests/mysql.pp -+++ b/deployment/puppet/cluster/manifests/mysql.pp -@@ -118,8 +118,16 @@ class cluster::mysql ( - onlyif => 'test -f /tmp/wsrep-init-file', - } - -+ file { 'fix-log-dir': -+ ensure => directory, -+ path => '/var/log/mysql', -+ mode => '0770', -+ require => Package['mysql-server'], -+ } -+ - Exec['create-init-file'] -> -- Service<| title == $service_name |> ~> -- Exec['wait-for-sync'] -> -- Exec['rm-init-file'] -+ File['fix-log-dir'] -> -+ Service<| title == $service_name |> ~> -+ Exec['wait-for-sync'] -> -+ Exec['rm-init-file'] - } -diff --git a/deployment/puppet/cluster/spec/classes/cluster_mysql_spec.rb b/deployment/puppet/cluster/spec/classes/cluster_mysql_spec.rb -index 72c8c2f..ad3fc1b 100644 ---- a/deployment/puppet/cluster/spec/classes/cluster_mysql_spec.rb -+++ b/deployment/puppet/cluster/spec/classes/cluster_mysql_spec.rb -@@ -33,7 +33,7 @@ describe 'cluster::mysql' do - should contain_exec('create-init-file').with_command( - /'username'@'localhost' IDENTIFIED BY 'password'/ - ) -- should contain_exec('create-init-file').that_comes_before('Service[mysqld]') -+ should contain_exec('create-init-file').that_comes_before('File[fix-log-dir]') - should contain_exec('create-init-file').that_notifies('Exec[wait-for-sync]') - end - -@@ -41,6 +41,15 @@ describe 'cluster::mysql' do - should contain_exec('rm-init-file') - end - -+ it 'should have correct permissions for logging directory' do -+ should contain_file('fix-log-dir').with( -+ :ensure => 'directory', -+ :path => '/var/log/mysql', -+ :mode => '0770', -+ ).that_requires('Package[mysql-server]') -+ should contain_file('fix-log-dir').that_comes_before('Service[mysqld]') -+ end -+ - it 'creates exec to wait initial database sync' do - should contain_exec('wait-for-sync').that_subscribes_to('Service[mysqld]') - end -diff --git a/tests/noop/spec/hosts/database/database_spec.rb b/tests/noop/spec/hosts/database/database_spec.rb -index d4ad8d0..2c4c5c5 100644 ---- a/tests/noop/spec/hosts/database/database_spec.rb -+++ b/tests/noop/spec/hosts/database/database_spec.rb -@@ -261,6 +261,15 @@ describe manifest do - ) - end - -+ it 'should have correct permissions for logging directory' do -+ should contain_file('fix-log-dir').with( -+ :ensure => 'directory', -+ :path => '/var/log/mysql', -+ :mode => '0770', -+ ).that_requires('Package[mysql-server]') -+ should contain_file('fix-log-dir').that_comes_before('Service[mysqld]') -+ end -+ - it 'should configure galera grants service and proper flow' do - if primary_controller - should contain_class('cluster::galera_grants').with( diff --git a/patches/fuel-library/arm64-bug-fixes/0001-nova-config-Disable-usb-tablet-for-aarch64.patch b/patches/fuel-library/arm64-bug-fixes/0001-nova-config-Disable-usb-tablet-for-aarch64.patch new file mode 100644 index 00000000..f4e19229 --- /dev/null +++ b/patches/fuel-library/arm64-bug-fixes/0001-nova-config-Disable-usb-tablet-for-aarch64.patch @@ -0,0 +1,23 @@ +From: Stanislaw Kardach +Date: Tue, 15 Mar 2016 11:33:52 +0100 +Subject: [PATCH] nova config: Disable usb tablet for aarch64 + +--- + deployment/puppet/openstack_tasks/manifests/roles/compute.pp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp +index 211fefa..4240126 100644 +--- a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp ++++ b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp +@@ -379,6 +379,10 @@ class openstack_tasks::roles::compute { + } + + nova_config { ++ 'libvirt/use_usb_tablet': value => $::architecture ? { ++ /(arm64|aarch64)/ => false, ++ default => true, ++ }; + 'libvirt/live_migration_flag': value => 'VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_PERSIST_DEST'; + 'libvirt/block_migration_flag': value => 'VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_NON_SHARED_INC'; + 'DEFAULT/connection_type': value => 'libvirt'; diff --git a/patches/fuel-library/arm64-bug-fixes/0002-Install-vgabios-and-link-for-aarch64.patch b/patches/fuel-library/arm64-bug-fixes/0002-Install-vgabios-and-link-for-aarch64.patch new file mode 100644 index 00000000..da152ead --- /dev/null +++ b/patches/fuel-library/arm64-bug-fixes/0002-Install-vgabios-and-link-for-aarch64.patch @@ -0,0 +1,33 @@ +From: Alexandru Avadanii +Date: Tue, 15 Mar 2016 11:33:52 +0100 +Subject: [PATCH] Install vgabios (and link) for aarch64 + +vgabios is needed for standard VGA mode in AArch64 VMs, so +install it by default on AArch64 and create missing link +in to . + +Signed-off-by: Alexandru Avadanii +Signed-off-by: Stanislaw Kardach +--- + deployment/puppet/openstack_tasks/manifests/roles/compute.pp | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp +index 4240126..b18fa7b 100644 +--- a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp ++++ b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp +@@ -409,6 +409,14 @@ class openstack_tasks::roles::compute { + vncserver_listen => '0.0.0.0', + remove_unused_original_minimum_age_seconds => pick($nova_hash_real['remove_unused_original_minimum_age_seconds'], '86400'), + libvirt_service_name => $::nova::params::libvirt_service_name, ++ } -> ++ package { 'vgabios': ++ ensure => present; ++ } -> ++ file { '/usr/share/qemu/vgabios-stdvga.bin': ++ ensure => link, ++ target => '/usr/share/vgabios/vgabios.bin', ++ replace => false, + } + + class { '::nova::migration::libvirt': diff --git a/patches/fuel-library/arm64-bug-fixes/0003-nova-Update-vga-console-defaults-for-armv7-aarch64.patch b/patches/fuel-library/arm64-bug-fixes/0003-nova-Update-vga-console-defaults-for-armv7-aarch64.patch new file mode 100644 index 00000000..9e9c3d53 --- /dev/null +++ b/patches/fuel-library/arm64-bug-fixes/0003-nova-Update-vga-console-defaults-for-armv7-aarch64.patch @@ -0,0 +1,104 @@ +From: Stanislaw Kardach +Date: Tue, 22 Mar 2016 12:05:09 +0100 +Subject: [PATCH] nova: Update vga, console defaults for armv7, aarch64 + +Nova hardcodes default options for both video=cirrus and console. +armv7 and aarch64 VMs require video=vga, and since most applications +use PL011 serial driver for guests, adding console=ttyAMA0 is also +a nice UX addition. +--- + .../openstack/files/nova-libvirt-vga-console.patch | 40 ++++++++++++++++++++++ + .../openstack_tasks/manifests/roles/compute.pp | 19 ++++++++++ + 2 files changed, 59 insertions(+) + create mode 100644 deployment/puppet/openstack/files/nova-libvirt-vga-console.patch + +diff --git a/deployment/puppet/openstack/files/nova-libvirt-vga-console.patch b/deployment/puppet/openstack/files/nova-libvirt-vga-console.patch +new file mode 100644 +index 0000000..3594276 +--- /dev/null ++++ b/deployment/puppet/openstack/files/nova-libvirt-vga-console.patch +@@ -0,0 +1,40 @@ ++From: Stanislaw Kardach ++Date: Tue, 22 Mar 2016 12:05:09 +0100 ++Subject: [PATCH] Update vga, console defaults for armv7 and aarch64 ++ ++Nova hardcodes default options for both video=cirrus and console. ++armv7 and aarch64 VMs require video=vga, and since most applications ++use PL011 serial driver for guests, adding console=ttyAMA0 is also ++a nice UX addition. ++ ++Signed-off-by: Stanislaw Kardach ++Signed-off-by: Alexandru Avadanii ++--- ++ ++diff --git a/virt/libvirt/driver.py b/virt/libvirt/driver.py ++index 920a283..751b140 100644 ++--- a/virt/libvirt/driver.py +++++ b/virt/libvirt/driver.py ++@@ -3834,7 +3834,11 @@ ++ if virt_type == "xen": ++ guest.os_cmdline = "ro root=%s" % root_device_name ++ else: +++ guestarch = libvirt_utils.get_arch(image_meta) ++ guest.os_cmdline = ("root=%s %s" % (root_device_name, CONSOLE)) +++ if guestarch in (arch.ARMV7, arch.AARCH64): +++ # NOTE(armband): ARM v7/v8 use PL011 drv, add ttyAMA0 console +++ guest.os_cmdline += " console=ttyAMA0" ++ if virt_type == "qemu": ++ guest.os_cmdline += " no_timer_check" ++ if instance.ramdisk_id: ++@@ -3972,7 +3972,9 @@ class LibvirtDriver(driver.ComputeDriver): ++ video.type = 'xen' ++ elif CONF.libvirt.virt_type == 'parallels': ++ video.type = 'vga' ++- elif guestarch in (arch.PPC, arch.PPC64, arch.PPC64LE): +++ elif guestarch in (arch.ARMV7, arch.AARCH64, +++ arch.PPC, arch.PPC64, arch.PPC64LE): +++ # NOTE(armband): Added ARM v7/v8, same as on PPC. ++ # NOTE(ldbragst): PowerKVM doesn't support 'cirrus' be default ++ # so use 'vga' instead when running on Power hardware. ++ video.type = 'vga' +diff --git a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp +index b18fa7b..2f0f2a8 100644 +--- a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp ++++ b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp +@@ -158,6 +158,12 @@ class openstack_tasks::roles::compute { + + include ::nova::params + ++ if ! defined(Package['patch']) { ++ package { 'patch': ++ ensure => 'present', ++ } ++ } ++ + case $::osfamily { + 'RedHat': { + # From legacy libvirt.pp +@@ -290,6 +296,7 @@ class openstack_tasks::roles::compute { + } + + $notify_on_state_change = 'vm_and_task_state' ++ $nova_path = '/usr/lib/python2.7/dist-packages/nova' + + class { '::nova': + rpc_backend => $rpc_backend_real, +@@ -311,6 +318,18 @@ class openstack_tasks::roles::compute { + memcached_servers => $memcached_addresses, + cinder_catalog_info => pick($nova_hash_real['cinder_catalog_info'], 'volumev2:cinderv2:internalURL'), + rabbit_heartbeat_timeout_threshold => $::os_service_default, ++ } -> ++ # FIXME(armband): Workaround for missing arm defaults in nova libvirt driver ++ file { "${nova_path}/libvirt-vga-console.patch": ++ ensure => "file", ++ source => "puppet:///modules/openstack/nova-libvirt-vga-console.patch", ++ } -> ++ exec { 'nova libvirt driver patch arm defaults': ++ path => ['/usr/bin'], ++ command => "patch -p1 < ${nova_path}/libvirt-vga-console.patch", ++ unless => "patch -p1 -R -N --dry-run < ${nova_path}/libvirt-vga-console.patch", ++ cwd => $nova_path, ++ require => [Package['patch']], + } + + class { '::nova::availability_zone': diff --git a/patches/fuel-library/arm64-bug-fixes/0004-nova-AArch64-enable-hugepage-support.patch b/patches/fuel-library/arm64-bug-fixes/0004-nova-AArch64-enable-hugepage-support.patch new file mode 100644 index 00000000..ab0fb664 --- /dev/null +++ b/patches/fuel-library/arm64-bug-fixes/0004-nova-AArch64-enable-hugepage-support.patch @@ -0,0 +1,93 @@ +From: Alexandru Avadanii +Date: Fri, 16 Sep 2016 21:31:56 +0200 +Subject: [PATCH] nova: AArch64: enable hugepage support + +This patch adds AArch64 to the hardcoded lists of valid +architectures for hugepage support. + +Closes-bug: ARMBAND-90 + +Signed-off-by: Veena Lingadahalli +Signed-off-by: Alexandru Avadanii +--- + .../nova-AArch64-enable-hugepage-support.patch | 47 ++++++++++++++++++++++ + .../openstack_tasks/manifests/roles/compute.pp | 12 ++++++ + 2 files changed, 59 insertions(+) + create mode 100644 deployment/puppet/openstack/files/nova-AArch64-enable-hugepage-support.patch + +diff --git a/deployment/puppet/openstack/files/nova-AArch64-enable-hugepage-support.patch b/deployment/puppet/openstack/files/nova-AArch64-enable-hugepage-support.patch +new file mode 100644 +index 0000000..72d6bfc +--- /dev/null ++++ b/deployment/puppet/openstack/files/nova-AArch64-enable-hugepage-support.patch +@@ -0,0 +1,47 @@ ++From: Veena Lingadahalli ++Date: Fri Sep 16 17:52:02 CEST 2016 ++Subject: [PATCH] nova: AArch64: enable hugepage support ++ ++This patch adds AArch64 to the hardcoded lists of valid ++architectures for hugepage support. ++ ++Signed-off-by: Veena Lingadahalli ++Acked-by: Alexandru Avadanii ++--- ++ ++diff --git a/compute/arch.py a/compute/arch.py ++index 265f853..6a4b4a3 100644 ++--- a/compute/arch.py +++++ a/compute/arch.py ++@@ -156,6 +156,9 @@ def canonicalize(name): ++ if newname == "amd64": ++ newname = X86_64 ++ +++ if newname == "aarch64": +++ newname = AARCH64 +++ ++ if not is_valid(newname): ++ raise exception.InvalidArchitectureName(arch=name) ++ ++diff --git a/virt/libvirt/driver.py a/virt/libvirt/driver.py ++index bac17cf..0e0bcae 100644 ++--- a/virt/libvirt/driver.py +++++ a/virt/libvirt/driver.py ++@@ -5206,7 +5206,7 @@ class LibvirtDriver(driver.ComputeDriver): ++ self._bad_libvirt_numa_version_warn = True ++ return False ++ ++- support_matrix = {(arch.I686, arch.X86_64): MIN_LIBVIRT_NUMA_VERSION, +++ support_matrix = {(arch.I686, arch.X86_64, arch.AARCH64): MIN_LIBVIRT_NUMA_VERSION, ++ (arch.PPC64, ++ arch.PPC64LE): MIN_LIBVIRT_NUMA_VERSION_PPC} ++ caps = self._host.get_capabilities() ++@@ -5222,7 +5222,7 @@ class LibvirtDriver(driver.ComputeDriver): ++ def _has_hugepage_support(self): ++ # This means that the host can support multiple values for the size ++ # field in LibvirtConfigGuestMemoryBackingPage ++- supported_archs = [arch.I686, arch.X86_64] +++ supported_archs = [arch.I686, arch.X86_64, arch.AARCH64] ++ caps = self._host.get_capabilities() ++ return ((caps.host.cpu.arch in supported_archs) and ++ self._host.has_min_version(MIN_LIBVIRT_HUGEPAGE_VERSION, +diff --git a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp +index 2f0f2a8..dc61033 100644 +--- a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp ++++ b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp +@@ -330,6 +330,18 @@ class openstack_tasks::roles::compute { + unless => "patch -p1 -R -N --dry-run < ${nova_path}/libvirt-vga-console.patch", + cwd => $nova_path, + require => [Package['patch']], ++ } -> ++ # FIXME(armband): Add AArch64 to arch list for nova hugepage support ++ file { "${nova_path}/nova-AArch64-enable-hugepage-support.patch": ++ ensure => "file", ++ source => "puppet:///modules/openstack/nova-AArch64-enable-hugepage-support.patch", ++ } -> ++ exec { 'nova AArch64 enable hugepage support': ++ path => ['/usr/bin'], ++ command => "patch -p1 < ${nova_path}/nova-AArch64-enable-hugepage-support.patch", ++ unless => "patch -p1 -R -N --dry-run < ${nova_path}/nova-AArch64-enable-hugepage-support.patch", ++ cwd => $nova_path, ++ require => [Package['patch']], + } + + class { '::nova::availability_zone': diff --git a/patches/fuel-library/direct-kernel-boot/0001-upload_cirros-Add-direct-kernel-boot-support.patch b/patches/fuel-library/direct-kernel-boot/0001-upload_cirros-Add-direct-kernel-boot-support.patch new file mode 100644 index 00000000..f3eb0748 --- /dev/null +++ b/patches/fuel-library/direct-kernel-boot/0001-upload_cirros-Add-direct-kernel-boot-support.patch @@ -0,0 +1,118 @@ +From: Stanislaw Kardach +Date: Tue, 15 Mar 2016 15:01:34 +0100 +Subject: [PATCH] upload_cirros: Add direct kernel boot support. + +AArch64 currently only supports direct kernel boot, so add the +functionality of uploading and connecting kernel and initramfs +images (disk formats `AKI` and `ARI`). + +Signed-off-by: Stanislaw Kardach +--- + .../osnailyfacter/modular/astute/upload_cirros.rb | 55 ++++++++++++++++++++-- + 1 file changed, 51 insertions(+), 4 deletions(-) + +diff --git a/deployment/puppet/osnailyfacter/modular/astute/upload_cirros.rb b/deployment/puppet/osnailyfacter/modular/astute/upload_cirros.rb +index f0441b0..371d051 100755 +--- a/deployment/puppet/osnailyfacter/modular/astute/upload_cirros.rb ++++ b/deployment/puppet/osnailyfacter/modular/astute/upload_cirros.rb +@@ -51,12 +51,12 @@ end + def image_list + stdout = `glance --verbose image-list` + return_code = $?.exitstatus +- images = [] ++ images = Hash[] + stdout.split("\n").each do |line| + fields = line.split('|').map { |f| f.chomp.strip } + next if fields[1] == 'ID' + next unless fields[2] +- images << {fields[2] => fields[6]} ++ images[fields[2]] = { :id => fields[1], :status => fields[6] } + end + {:images => images, :exit_code => return_code} + end +@@ -78,6 +78,16 @@ EOF + [ stdout, return_code ] + end + ++# Calls glance update-image with a given property and value ++# Supported properties: 'kernel-id', 'ramdisk-id' ++def update_image(image_id, property, value) ++ command = "/usr/bin/openstack image set --#{property}=#{value} #{image_id}" ++ puts command ++ stdout = `#{command}` ++ return_code = $?.exitstatus ++ [ stdout, return_code ] ++end ++ + # check if Glance is online + # waited until the glance is started because when vCenter used as a glance + # backend launch may takes up to 1 minute. +@@ -133,7 +143,7 @@ end + # return true if image has been uploaded and active + def check_image(image) + list_of_images = image_list +- if list_of_images[:exit_code] == 0 && list_of_images[:images].include?(image['img_name'] => "active") ++ if list_of_images[:exit_code] == 0 && list_of_images[:images].select { |k,v| k == image['img_name'] and v[:status] == "active" }.count > 0 + return true + end + return false +@@ -144,7 +154,7 @@ end + # the first one + def cleanup_image(image) + list_of_images = image_list +- unless list_of_images[:images].select { |img_hash| img_hash.key?(image['img_name']) }.empty? ++ unless list_of_images[:images].select { |img_hash, v| img_hash == image['img_name'] }.count == 0 + delete_image(image['img_name']) + end + end +@@ -157,6 +167,41 @@ def delete_image(image_name) + [ stdout, return_code ] + end + ++# For each disk image try to find a kernel and initramfs images and ++# attach then to it via kernel_id and ramdisk_id glance properties. ++def connect_dependant_images(images) ++ # for each image ++ # get image id from glance ++ img_list = image_list ++ return_code = img_list[:exit_code] ++ if return_code == 0 ++ images.each do |image| ++ img_list[:images].each do |k,v| ++ if k == image['img_name'] ++ image['id'] = v[:id] ++ end ++ end ++ end ++ # for each image that is not in [aki, ari] ++ images.each do |image| ++ next if ['aki', 'ari'].include?(image['disk_format']) ++ images.each do |i| ++ # find aki/ari image whose name starts with this image's name ++ if i['img_name'].start_with?(image['img_name']) ++ ret = 0 ++ if i['disk_format'] == 'aki' ++ _, ret = update_image(image['id'], 'kernel-id', i['id']) ++ elsif i['disk_format'] == 'ari' ++ _, ret = update_image(image['id'], 'ramdisk-id', i['id']) ++ end ++ return_code += ret ++ end ++ end ++ end ++ end ++ return return_code ++end ++ + ######################## + + wait_for_glance +@@ -180,6 +225,8 @@ if errors > 0 + cleanup_image(image) + end + exit 1 ++elsif connect_dependant_images(test_vm_images) > 0 ++ exit 2 + end + + exit 0 diff --git a/patches/fuel-library/direct-kernel-boot/0002-nova-Fix-inject-for-direct-boot-with-part-table.patch b/patches/fuel-library/direct-kernel-boot/0002-nova-Fix-inject-for-direct-boot-with-part-table.patch new file mode 100644 index 00000000..7cc743af --- /dev/null +++ b/patches/fuel-library/direct-kernel-boot/0002-nova-Fix-inject-for-direct-boot-with-part-table.patch @@ -0,0 +1,92 @@ +From: Alexandru Avadanii +Date: Fri, 25 Mar 2016 16:12:08 +0100 +Subject: [PATCH] nova: Fix inject for direct boot with part table. + +See [1] for full bug description. +For now, we detect direct kernel boot with a partition table inside +disk image by passing target_partition when root kernel arg points +to a partition (instead of the whole disk). + +[1] https://bugs.launchpad.net/nova/+bug/1290455 + +Signed-off-by: Alexandru Avadanii +Signed-off-by: Stanislaw Kardach +--- + .../openstack/files/nova-libvirt-inject.patch | 44 ++++++++++++++++++++++ + .../openstack_tasks/manifests/roles/compute.pp | 12 ++++++ + 2 files changed, 56 insertions(+) + create mode 100644 deployment/puppet/openstack/files/nova-libvirt-inject.patch + +diff --git a/deployment/puppet/openstack/files/nova-libvirt-inject.patch b/deployment/puppet/openstack/files/nova-libvirt-inject.patch +new file mode 100644 +index 0000000..b86927e +--- /dev/null ++++ b/deployment/puppet/openstack/files/nova-libvirt-inject.patch +@@ -0,0 +1,44 @@ ++From: Alexandru Avadanii ++Date: Tue, 22 Mar 2016 12:05:09 +0100 ++Subject: [PATCH] Fix inject for direct boot with partition table ++ ++See [1] for full bug description. ++For now, we detect direct kernel boot with a partition table inside ++disk image by passing target_partition when root kernel arg points ++to a partition (instead of the whole disk). ++ ++[1] https://bugs.launchpad.net/nova/+bug/1290455 ++ ++Signed-off-by: Alexandru Avadanii ++Signed-off-by: Stanislaw Kardach ++--- ++ ++diff --git a/virt/libvirt/driver.py b/virt/libvirt/driver.py ++index 920a283..751b140 100644 ++--- a/virt/libvirt/driver.py +++++ b/virt/libvirt/driver.py ++@@ -34,6 +34,7 @@ ++ import mmap ++ import operator ++ import os +++import re ++ import shutil ++ import tempfile ++ import time ++@@ -2820,7 +2821,15 @@ ++ """ ++ # Handles the partition need to be used. ++ target_partition = None ++- if not instance.kernel_id: +++ image_meta = objects.ImageMeta.from_instance(instance) +++ # FIXME(armband): https://bugs.launchpad.net/nova/+bug/1290455 +++ # Support direct kernel boot with a partition table inside disk image: +++ # pass target_partition when root kernel arg points to a partition +++ # (instead of the whole disk). +++ has_partition_table = re.search("root=/dev/.d.([1-9]+)", +++ str(image_meta.properties.get("os_command_line"))) +++ +++ if not instance.kernel_id or has_partition_table: ++ target_partition = CONF.libvirt.inject_partition ++ if target_partition == 0: ++ target_partition = None +diff --git a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp +index dc61033..3fcfb51 100644 +--- a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp ++++ b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp +@@ -319,6 +319,18 @@ class openstack_tasks::roles::compute { + cinder_catalog_info => pick($nova_hash_real['cinder_catalog_info'], 'volumev2:cinderv2:internalURL'), + rabbit_heartbeat_timeout_threshold => $::os_service_default, + } -> ++ # FIXME(armband): Fix inject for part image direct boot (bug LP #1469308) ++ file { "${nova_path}/libvirt-inject.patch": ++ ensure => "file", ++ source => "puppet:///modules/openstack/nova-libvirt-inject.patch", ++ } -> ++ exec { 'nova libvirt driver patch partitioned injection': ++ path => ['/usr/bin'], ++ command => "patch -p1 < ${nova_path}/libvirt-inject.patch", ++ unless => "patch -p1 -R -N --dry-run < ${nova_path}/libvirt-inject.patch", ++ cwd => $nova_path, ++ require => [Package['patch']], ++ } -> + # FIXME(armband): Workaround for missing arm defaults in nova libvirt driver + file { "${nova_path}/libvirt-vga-console.patch": + ensure => "file", diff --git a/patches/fuel-library/multiarch-efi/0001-Add-arm64-templates-to-cobbler-and-nailgun.patch b/patches/fuel-library/multiarch-efi/0001-Add-arm64-templates-to-cobbler-and-nailgun.patch new file mode 100644 index 00000000..262bd994 --- /dev/null +++ b/patches/fuel-library/multiarch-efi/0001-Add-arm64-templates-to-cobbler-and-nailgun.patch @@ -0,0 +1,284 @@ +From: Stanislaw Kardach +Date: Sun, 21 Feb 2016 16:29:52 +0100 +Subject: [PATCH] Add arm64 templates to cobbler and nailgun + +Add grub template import to cobbler server manifest + +Add arm64 templates to cobbler and nailgun + +[Matei Valeanu] Add grub template to cobbler for MAC-files +Limitation: grub2 needs to be installed directly on the +root (/) of a device or partition, as the MAC-files will +search for /grub/grub.cfg on the available partitions + +Signed-off-by: Stanislaw Kardach +Signed-off-by: Matei Valeanu +--- + deployment/puppet/cobbler/manifests/server.pp | 36 ++++++++++++++++++++++ + .../puppet/cobbler/templates/dnsmasq.template.erb | 2 ++ + .../cobbler/templates/efidefault.template.erb | 5 +++ + .../cobbler/templates/grublocal.template.erb | 2 ++ + .../cobbler/templates/grubprofile.template.erb | 12 ++++++++ + .../cobbler/templates/grubsystem.template.erb | 16 ++++++++++ + .../templates/preseed/ubuntu-1404.preseed.erb | 2 ++ + deployment/puppet/fuel/manifests/auxiliaryrepos.pp | 12 +++++--- + deployment/puppet/fuel/manifests/cobbler.pp | 36 +++++++++++++++++----- + .../puppet/fuel/manifests/cobbler/preseed.pp | 13 ++++++++ + 10 files changed, 125 insertions(+), 11 deletions(-) + create mode 100644 deployment/puppet/cobbler/templates/efidefault.template.erb + create mode 100644 deployment/puppet/cobbler/templates/grublocal.template.erb + create mode 100644 deployment/puppet/cobbler/templates/grubprofile.template.erb + create mode 100644 deployment/puppet/cobbler/templates/grubsystem.template.erb + create mode 100644 deployment/puppet/fuel/manifests/cobbler/preseed.pp + +diff --git a/deployment/puppet/cobbler/manifests/server.pp b/deployment/puppet/cobbler/manifests/server.pp +index 891dff7..52936d5 100644 +--- a/deployment/puppet/cobbler/manifests/server.pp ++++ b/deployment/puppet/cobbler/manifests/server.pp +@@ -297,6 +297,42 @@ class cobbler::server ( + notify => [Service[$cobbler_service], Exec['cobbler_sync']], + } + ++ file { '/etc/cobbler/pxe/efidefault.template': ++ content => template('cobbler/efidefault.template.erb'), ++ owner => 'root', ++ group => 'root', ++ mode => '0644', ++ require => Package[$cobbler::packages::cobbler_package], ++ notify => [Service[$cobbler_service], Exec['cobbler_sync']], ++ } ++ ++ file { '/etc/cobbler/pxe/grubprofile.template': ++ content => template('cobbler/grubprofile.template.erb'), ++ owner => 'root', ++ group => 'root', ++ mode => '0644', ++ require => Package[$cobbler::packages::cobbler_package], ++ notify => [Service[$cobbler_service], Exec['cobbler_sync']], ++ } ++ ++ file { '/etc/cobbler/pxe/grubsystem.template': ++ content => template('cobbler/grubsystem.template.erb'), ++ owner => 'root', ++ group => 'root', ++ mode => '0644', ++ require => Package[$cobbler::packages::cobbler_package], ++ notify => [Service[$cobbler_service], Exec['cobbler_sync']], ++ } ++ ++ file { '/etc/cobbler/pxe/grublocal.template': ++ content => template('cobbler/grublocal.template.erb'), ++ owner => 'root', ++ group => 'root', ++ mode => '0644', ++ require => Package[$cobbler::packages::cobbler_package], ++ notify => [Service[$cobbler_service], Exec['cobbler_sync']], ++ } ++ + exec { '/var/lib/tftpboot/chain.c32': + command => 'cp /usr/share/syslinux/chain.c32 /var/lib/tftpboot/chain.c32', + unless => 'test -e /var/lib/tftpboot/chain.c32', +diff --git a/deployment/puppet/cobbler/templates/dnsmasq.template.erb b/deployment/puppet/cobbler/templates/dnsmasq.template.erb +index d70f8de..98278e9 100644 +--- a/deployment/puppet/cobbler/templates/dnsmasq.template.erb ++++ b/deployment/puppet/cobbler/templates/dnsmasq.template.erb +@@ -41,5 +41,7 @@ dhcp-no-override + # by assigning IPs one by one instead of using hash algorithm. + dhcp-sequential-ip + ++dhcp-match=set:arm64,93,11 ++dhcp-boot=net:arm64,grub/grub-aarch64.efi,boothost,<%= @next_server %> + dhcp-option=6,<%= @name_server %> + $insert_cobbler_system_definitions +diff --git a/deployment/puppet/cobbler/templates/efidefault.template.erb b/deployment/puppet/cobbler/templates/efidefault.template.erb +new file mode 100644 +index 0000000..af09eb8 +--- /dev/null ++++ b/deployment/puppet/cobbler/templates/efidefault.template.erb +@@ -0,0 +1,5 @@ ++set default=1 ++set timeout=5 ++tr -s ipxe_mac ':' '-' $net_default_mac ++ ++$grub_menu_items +diff --git a/deployment/puppet/cobbler/templates/grublocal.template.erb b/deployment/puppet/cobbler/templates/grublocal.template.erb +new file mode 100644 +index 0000000..e16c27d +--- /dev/null ++++ b/deployment/puppet/cobbler/templates/grublocal.template.erb +@@ -0,0 +1,2 @@ ++search --file --no-floppy --set grub_install_device /grub/grub.cfg ++configfile ($grub_install_device)/grub/grub.cfg +diff --git a/deployment/puppet/cobbler/templates/grubprofile.template.erb b/deployment/puppet/cobbler/templates/grubprofile.template.erb +new file mode 100644 +index 0000000..eb7557c +--- /dev/null ++++ b/deployment/puppet/cobbler/templates/grubprofile.template.erb +@@ -0,0 +1,12 @@ ++menuentry '$profile_name' { ++ echo 'Network status:' ++ net_ls_cards ++ net_ls_addr ++ net_ls_routes ++ ++ echo 'Loading Linux ...' ++ linux (tftp)$kernel_path $kernel_options BOOTIF=01-$ipxe_mac ++ echo 'Loading initial ramdisk ...' ++ initrd (tftp)$initrd_path ++ echo 'Booting bootstrap image ...' ++} +diff --git a/deployment/puppet/cobbler/templates/grubsystem.template.erb b/deployment/puppet/cobbler/templates/grubsystem.template.erb +new file mode 100644 +index 0000000..9a191bc +--- /dev/null ++++ b/deployment/puppet/cobbler/templates/grubsystem.template.erb +@@ -0,0 +1,16 @@ ++set default=1 ++set timeout=5 ++tr -s ipxe_mac ':' '-' $net_default_mac ++ ++menuentry '$profile_name' { ++ echo 'Network status:' ++ net_ls_cards ++ net_ls_addr ++ net_ls_routes ++ ++ echo 'Loading Linux ...' ++ linux (tftp)$kernel_path $kernel_options BOOTIF=01-$ipxe_mac ++ echo 'Loading initial ramdisk ...' ++ initrd (tftp)$initrd_path ++ echo 'Booting bootstrap image ...' ++} +diff --git a/deployment/puppet/cobbler/templates/preseed/ubuntu-1404.preseed.erb b/deployment/puppet/cobbler/templates/preseed/ubuntu-1404.preseed.erb +index 6762153..25f8067 100644 +--- a/deployment/puppet/cobbler/templates/preseed/ubuntu-1404.preseed.erb ++++ b/deployment/puppet/cobbler/templates/preseed/ubuntu-1404.preseed.erb +@@ -66,9 +66,11 @@ d-i apt-setup/mirror/error select Retry + # Use network mirror + d-i apt-setup/use_mirror boolean true + ++<% if @arch == 'amd64' %> + # Select architecture to amd64. That's very important to dpkg, since + # by default we have both amd64 and i386. + d-i apt-setup/multiarch string amd64 ++<% end %> + + # You can choose to install restricted and universe software, or to install + # software from the backports repository. +diff --git a/deployment/puppet/fuel/manifests/auxiliaryrepos.pp b/deployment/puppet/fuel/manifests/auxiliaryrepos.pp +index 493ffc6..909fc92 100644 +--- a/deployment/puppet/fuel/manifests/auxiliaryrepos.pp ++++ b/deployment/puppet/fuel/manifests/auxiliaryrepos.pp +@@ -53,17 +53,21 @@ class fuel::auxiliaryrepos( + + exec { 'create_ubuntu_repo_dirs': + path => '/bin:/sbin:/usr/bin:/usr/sbin', +- command => "bash -c \"mkdir -p ${ubuntu_dir}/pool/{main,restricted} ${ubuntu_dir}/dists/auxiliary/{main,restricted}/binary-amd64/\"", ++ command => "bash -c \"mkdir -p ${ubuntu_dir}/pool/{main,restricted} ${ubuntu_dir}/dists/auxiliary/{main,restricted}/binary-{amd64,arm64}/\"", + unless => "test -d ${ubuntu_dir}/pool && \ + test -d ${ubuntu_dir}/dists/auxiliary/main/binary-amd64 && \ +- test -d ${ubuntu_dir}/dists/auxiliary/restricted/binary-amd64", ++ test -d ${ubuntu_dir}/dists/auxiliary/restricted/binary-amd64 && \ ++ test -d ${ubuntu_dir}/dists/auxiliary/main/binary-arm64 && \ ++ test -d ${ubuntu_dir}/dists/auxiliary/restricted/binary-arm64", + } + + exec { 'create_ubuntu_repo_Packages': + path => '/bin:/sbin:/usr/bin:/usr/sbin', +- command => "bash -c \"touch ${ubuntu_dir}/dists/auxiliary/{main,restricted}/binary-amd64/Packages\"", ++ command => "bash -c \"touch ${ubuntu_dir}/dists/auxiliary/{main,restricted}/binary-{amd64,arm64}/Packages\"", + unless => "test -f ${ubuntu_dir}/dists/auxiliary/main/binary-amd64/Packages && \ +- test -f ${ubuntu_dir}/dists/auxiliary/restricted/binary-amd64/Packages", ++ test -f ${ubuntu_dir}/dists/auxiliary/restricted/binary-amd64/Packages && \ ++ test -f ${ubuntu_dir}/dists/auxiliary/main/binary-arm64/Packages && \ ++ test -f ${ubuntu_dir}/dists/auxiliary/restricted/binary-arm64/Packages", + } + + file { $release_files: +diff --git a/deployment/puppet/fuel/manifests/cobbler.pp b/deployment/puppet/fuel/manifests/cobbler.pp +index b403733..c89027d 100644 +--- a/deployment/puppet/fuel/manifests/cobbler.pp ++++ b/deployment/puppet/fuel/manifests/cobbler.pp +@@ -114,12 +114,9 @@ class fuel::cobbler( + require => Class['::cobbler::server'], + } + +- file { '/var/lib/cobbler/kickstarts/ubuntu-amd64.preseed': +- content => template('cobbler/preseed/ubuntu-1404.preseed.erb'), +- owner => 'root', +- group => 'root', +- mode => '0644', +- require => Class['::cobbler::server'], ++ fuel::cobbler::preseed { 'ubuntu_1404_x86_64.preseed': ++ path =>'/var/lib/cobbler/kickstarts/ubuntu-amd64.preseed', ++ arch => "amd64", + } -> + + cobbler_distro { 'ubuntu_1404_x86_64': +@@ -132,6 +129,21 @@ class fuel::cobbler( + require => Class['::cobbler::server'], + } + ++ fuel::cobbler::preseed { 'ubuntu_1404_arm64.preseed': ++ path => '/var/lib/cobbler/kickstarts/ubuntu-arm64.preseed', ++ arch => "arm64", ++ } -> ++ ++ cobbler_distro { 'ubuntu_1404_arm64': ++ kernel => "${repo_root}/ubuntu/x86_64/images/linux", ++ initrd => "${repo_root}/ubuntu/x86_64/images/initrd.gz", ++ arch => 'x86_64', # Makes Cobbler choose PXE ++ breed => 'ubuntu', ++ osversion => 'trusty', ++ ksmeta => '', ++ require => Class['::cobbler::server'], ++ } ++ + cobbler_profile { 'centos-x86_64': + kickstart => '/var/lib/cobbler/kickstarts/centos-x86_64.ks', + kopts => 'biosdevname=0 sshd=1 dhcptimeout=120', +@@ -152,6 +164,16 @@ class fuel::cobbler( + require => Cobbler_distro['ubuntu_1404_x86_64'], + } + ++ cobbler_profile { 'ubuntu_1404_arm64': ++ kickstart => '/var/lib/cobbler/kickstarts/ubuntu-arm64.preseed', ++ kopts => 'console=ttyAMA0,115200 console=ttyS0,115200 net.ifnames=0 biosdevname=0 netcfg/choose_interface=eth0 netcfg/dhcp_timeout=120 netcfg/link_detection_timeout=20', ++ distro => 'ubuntu_1404_arm64', ++ ksmeta => '', ++ menu => false, ++ server => $real_server, ++ require => Cobbler_distro['ubuntu_1404_arm64'], ++ } ++ + cobbler_distro { 'ubuntu_bootstrap': + kernel => "${bootstrap_path}/vmlinuz", + initrd => "${bootstrap_path}/initrd.img", +@@ -166,7 +188,7 @@ class fuel::cobbler( + distro => 'ubuntu_bootstrap', + menu => true, + kickstart => '', +- kopts => extend_kopts($bootstrap_meta['extend_kopts'], "console=ttyS0,9600 console=tty0 panic=60 ethdevice-timeout=${bootstrap_ethdevice_timeout} boot=live toram components fetch=http://${server}:8080/bootstraps/active_bootstrap/root.squashfs biosdevname=0 url=${nailgun_api_url} mco_user=${mco_user} mco_pass=${mco_pass} ip=frommedia"), ++ kopts => extend_kopts($bootstrap_meta['extend_kopts'], "console=ttyAMA0,115200 console=ttyS0,115200 panic=60 ethdevice-timeout=${bootstrap_ethdevice_timeout} boot=live toram components fetch=http://${server}:8080/bootstraps/active_bootstrap/root.squashfs biosdevname=0 url=${nailgun_api_url} mco_user=${mco_user} mco_pass=${mco_pass} ip=frommedia"), + ksmeta => '', + server => $real_server, + require => Cobbler_distro['ubuntu_bootstrap'], +diff --git a/deployment/puppet/fuel/manifests/cobbler/preseed.pp b/deployment/puppet/fuel/manifests/cobbler/preseed.pp +new file mode 100644 +index 0000000..7e1bee9 +--- /dev/null ++++ b/deployment/puppet/fuel/manifests/cobbler/preseed.pp +@@ -0,0 +1,13 @@ ++define fuel::cobbler::preseed( ++ $path, ++ $arch = "amd64", ++) { ++ ++ file { $path: ++ content => template('cobbler/preseed/ubuntu-1404.preseed.erb'), ++ owner => 'root', ++ group => 'root', ++ mode => '0644', ++ require => Class['::cobbler::server'], ++ } ++} diff --git a/patches/fuel-library/multiarch-efi/0002-Add-cobbler-grub-aarch64-to-cobbler-dependencies.patch b/patches/fuel-library/multiarch-efi/0002-Add-cobbler-grub-aarch64-to-cobbler-dependencies.patch new file mode 100644 index 00000000..14d06ef5 --- /dev/null +++ b/patches/fuel-library/multiarch-efi/0002-Add-cobbler-grub-aarch64-to-cobbler-dependencies.patch @@ -0,0 +1,35 @@ +From: Alexandru Avadanii +Date: Fri, 13 May 2016 23:06:28 +0200 +Subject: [PATCH] Add cobbler-grub-aarch64 to cobbler dependencies. + +The aarch64 grub EFI loader, packaged as an RPM and previously +installed in the nailgun docker container in /var/lib/cobbler, +is now added as a cobbler dependency in puppet and installed +on the Fuel master node. + +[Alexandru.Avadanii@enea.com] +Reworked based on Florin's work for the docker container. + +Signed-off-by: Florin Dumitrascu +Signed-off-by: Alexandru Avadanii +--- + deployment/puppet/cobbler/manifests/packages.pp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/deployment/puppet/cobbler/manifests/packages.pp b/deployment/puppet/cobbler/manifests/packages.pp +index 267c18c..9782c4c 100644 +--- a/deployment/puppet/cobbler/manifests/packages.pp ++++ b/deployment/puppet/cobbler/manifests/packages.pp +@@ -25,10 +25,10 @@ class cobbler::packages { + $pexpect_package = 'pexpect' + case $::operatingsystemrelease { + /6.+/: { +- $cobbler_additional_packages = ['xinetd', 'tftp-server', 'syslinux', 'wget', 'python-ipaddr','fence-agents', 'bind-utils'] ++ $cobbler_additional_packages = ['xinetd', 'tftp-server', 'syslinux', 'wget', 'python-ipaddr','fence-agents', 'bind-utils', 'cobbler-grub-aarch64'] + } + /7.+/: { +- $cobbler_additional_packages = ['xinetd', 'tftp-server', 'syslinux', 'wget', 'python-ipaddr','fence-agents-all', 'bind-utils'] ++ $cobbler_additional_packages = ['xinetd', 'tftp-server', 'syslinux', 'wget', 'python-ipaddr','fence-agents-all', 'bind-utils', 'cobbler-grub-aarch64'] + } + } + } diff --git a/patches/fuel-library/multiarch-fuel/0001-Make-qemu-kvm-architecture-aware.patch b/patches/fuel-library/multiarch-fuel/0001-Make-qemu-kvm-architecture-aware.patch new file mode 100644 index 00000000..ef1b8554 --- /dev/null +++ b/patches/fuel-library/multiarch-fuel/0001-Make-qemu-kvm-architecture-aware.patch @@ -0,0 +1,29 @@ +From: Stanislaw Kardach +Date: Wed, 24 Feb 2016 20:07:06 +0100 +Subject: [PATCH] Make qemu-kvm architecture aware + +--- + deployment/puppet/openstack_tasks/manifests/roles/compute.pp | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp +index 3fcfb51..c53409c 100644 +--- a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp ++++ b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp +@@ -167,9 +167,14 @@ class openstack_tasks::roles::compute { + case $::osfamily { + 'RedHat': { + # From legacy libvirt.pp ++ # Guard against some exotic distros with their `uname -m` ++ $arch = $::architecture ? { ++ /(arm64|aarch64)/ => 'aarch64', ++ default => 'x86_64', ++ } + exec { 'symlink-qemu-kvm': +- command => '/bin/ln -sf /usr/libexec/qemu-kvm /usr/bin/qemu-system-x86_64', +- creates => '/usr/bin/qemu-system-x86_64', ++ command => "/bin/ln -sf /usr/libexec/qemu-kvm /usr/bin/qemu-system-${arch}", ++ creates => "/usr/bin/qemu-system-${arch}", + } + + package { 'avahi': diff --git a/patches/fuel-library/multiarch-fuel/0002-Make-TestVM-creation-architecture-aware.patch b/patches/fuel-library/multiarch-fuel/0002-Make-TestVM-creation-architecture-aware.patch new file mode 100644 index 00000000..325b51d4 --- /dev/null +++ b/patches/fuel-library/multiarch-fuel/0002-Make-TestVM-creation-architecture-aware.patch @@ -0,0 +1,137 @@ +From: Stanislaw Kardach +Date: Wed, 24 Feb 2016 20:08:24 +0100 +Subject: [PATCH] Make TestVM creation architecture aware + +This depends on cirros-testvm package to contain both amd64 and arm64 +images. +--- + deployment/puppet/openstack/manifests/img/cirros.pp | 8 ++++++-- + .../osnailyfacter/manifests/generate_vms/vm_config.pp | 11 +++++++++++ + deployment/puppet/osnailyfacter/templates/vm_libvirt.erb | 15 ++++++++++++++- + files/fuel-migrate/fuel-migrate | 5 ++++- + 4 files changed, 35 insertions(+), 4 deletions(-) + +diff --git a/deployment/puppet/openstack/manifests/img/cirros.pp b/deployment/puppet/openstack/manifests/img/cirros.pp +index 84e202e..cff06e0 100644 +--- a/deployment/puppet/openstack/manifests/img/cirros.pp ++++ b/deployment/puppet/openstack/manifests/img/cirros.pp +@@ -9,6 +9,10 @@ class openstack::img::cirros ( + $img_name = 'cirros', + $os_name = 'cirros', + ) { ++ $arch = $::architecture ? { ++ /(arm64|aarch64)/ => 'aarch64', ++ default => 'x86_64', ++ } + + package { 'cirros-testvm': + ensure => "present" +@@ -17,14 +21,14 @@ class openstack::img::cirros ( + case $::osfamily { + 'RedHat': { + exec { 'upload-img': +- command => "/usr/bin/glance -N ${os_auth_url} -T ${os_tenant_name} -I ${os_username} -K ${os_password} add name=${img_name} is_public=${public} container_format=${container_format} disk_format=${disk_format} distro=${os_name} < /opt/vm/cirros-x86_64-disk.img", ++ command => "/usr/bin/glance -N ${os_auth_url} -T ${os_tenant_name} -I ${os_username} -K ${os_password} add name=${img_name} is_public=${public} container_format=${container_format} disk_format=${disk_format} distro=${os_name} < /opt/vm/cirros-${arch}-disk.img", + unless => "/usr/bin/glance -N ${os_auth_url} -T ${os_tenant_name} -I ${os_username} -K ${os_password} index && (/usr/bin/glance -N ${os_auth_url} -T ${os_tenant_name} -I ${os_username} -K ${os_password} index | grep ${img_name})", + + } + } + 'Debian': { + exec { 'upload-img': +- command => "/usr/bin/glance -N ${os_auth_url} -T ${os_tenant_name} -I ${os_username} -K ${os_password} add name=${img_name} is_public=${public} container_format=${container_format} disk_format=${disk_format} distro=${os_name} < /usr/share/cirros-testvm/cirros-x86_64-disk.img", ++ command => "/usr/bin/glance -N ${os_auth_url} -T ${os_tenant_name} -I ${os_username} -K ${os_password} add name=${img_name} is_public=${public} container_format=${container_format} disk_format=${disk_format} distro=${os_name} < /usr/share/cirros-testvm/cirros-${arch}-disk.img", + unless => "/usr/bin/glance -N ${os_auth_url} -T ${os_tenant_name} -I ${os_username} -K ${os_password} index && (/usr/bin/glance -N ${os_auth_url} -T ${os_tenant_name} -I ${os_username} -K ${os_password} index | grep ${img_name})", + + } +diff --git a/deployment/puppet/osnailyfacter/manifests/generate_vms/vm_config.pp b/deployment/puppet/osnailyfacter/manifests/generate_vms/vm_config.pp +index 70fef32..dfefcbe 100644 +--- a/deployment/puppet/osnailyfacter/manifests/generate_vms/vm_config.pp ++++ b/deployment/puppet/osnailyfacter/manifests/generate_vms/vm_config.pp +@@ -4,6 +4,17 @@ define osnailyfacter::generate_vms::vm_config( + $details = $name + $id = $details['id'] + ++ case $::architecture { ++ 'arm64', 'aarch64': { ++ $machine_arch = 'aarch64' ++ $machine_type = 'virt' ++ } ++ default: { ++ $machine_arch = 'x86_64' ++ $machine_type = 'pc-i440fx-trusty' ++ } ++ } ++ + file { "${template_dir}/template_${id}_vm.xml": + owner => 'root', + group => 'root', +diff --git a/deployment/puppet/osnailyfacter/templates/vm_libvirt.erb b/deployment/puppet/osnailyfacter/templates/vm_libvirt.erb +index ae2ba5b..64e716d 100644 +--- a/deployment/puppet/osnailyfacter/templates/vm_libvirt.erb ++++ b/deployment/puppet/osnailyfacter/templates/vm_libvirt.erb +@@ -3,14 +3,23 @@ + <%= @details['mem'] %> + <%= @details['cpu'] %> + +- hvm ++ hvm ++ <% if == 'aarch64' %> ++ /var/lib/nova/<%= @details['id'] %>_vm.kernel ++ /var/lib/nova/<%= @details['id'] %>_vm.initramfs ++ root=/dev/vda1 rw rootwait console=tty0 console=ttyS0 console=ttyAMA0 ++ <% else %> + + ++ <% end %> + + + + + ++ <% if $machine_arch == 'aarch64' %> ++ ++ <% end %> + + + destroy +@@ -57,7 +66,11 @@ + + + + + +diff --git a/files/fuel-migrate/fuel-migrate b/files/fuel-migrate/fuel-migrate +index a215e0a..7d5b6cd 100755 +--- a/files/fuel-migrate/fuel-migrate ++++ b/files/fuel-migrate/fuel-migrate +@@ -176,6 +176,8 @@ create_vm(){ + exit 1 + fi + fi ++ # figure out atchitecture of the destination ++ arch="$(virsh -c "${dkvm_uri}" nodeinfo | awk '/CPU model:/ { print $3}')" + # create disk + ssh "${dkvm_ip}" qemu-img create -f raw "${dkvm_folder}/${fvm_name}.img" "${fvm_disk_size}" + # make template for virsh +@@ -185,13 +187,14 @@ create_vm(){ + ${fvm_ram} + ${fvm_cpu} + +- hvm ++ hvm + + + + + + ++ ${arch/aarch64/} + + + destroy diff --git a/patches/fuel-library/multiarch-mirrors/0001-Add-arm64-for-auxiliary-repos.patch b/patches/fuel-library/multiarch-mirrors/0001-Add-arm64-for-auxiliary-repos.patch new file mode 100644 index 00000000..6d8b0248 --- /dev/null +++ b/patches/fuel-library/multiarch-mirrors/0001-Add-arm64-for-auxiliary-repos.patch @@ -0,0 +1,36 @@ +From: Stanislaw Kardach +Date: Wed, 24 Feb 2016 20:05:25 +0100 +Subject: [PATCH] Add arm64 for auxiliary repos + +--- + deployment/puppet/fuel/files/Release-auxiliary | 2 +- + deployment/puppet/fuel/manifests/auxiliaryrepos.pp | 4 +++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/deployment/puppet/fuel/files/Release-auxiliary b/deployment/puppet/fuel/files/Release-auxiliary +index 2d5ce58..03f84b8 100644 +--- a/deployment/puppet/fuel/files/Release-auxiliary ++++ b/deployment/puppet/fuel/files/Release-auxiliary +@@ -3,6 +3,6 @@ Label: auxiliary + Suite: auxiliary + Codename: auxiliary + Date: Mon, 15 Apr 2015 00:00:01 UTC +-Architectures: amd64 ++Architectures: amd64 arm64 + Components: main restricted + Description: Auxiliary +diff --git a/deployment/puppet/fuel/manifests/auxiliaryrepos.pp b/deployment/puppet/fuel/manifests/auxiliaryrepos.pp +index 909fc92..4ec5d05 100644 +--- a/deployment/puppet/fuel/manifests/auxiliaryrepos.pp ++++ b/deployment/puppet/fuel/manifests/auxiliaryrepos.pp +@@ -45,7 +45,9 @@ class fuel::auxiliaryrepos( + $release_files = [ + "${ubuntu_dir}/dists/auxiliary/Release", + "${ubuntu_dir}/dists/auxiliary/main/binary-amd64/Release", +- "${ubuntu_dir}/dists/auxiliary/restricted/binary-amd64/Release"] ++ "${ubuntu_dir}/dists/auxiliary/restricted/binary-amd64/Release", ++ "${ubuntu_dir}/dists/auxiliary/main/binary-arm64/Release", ++ "${ubuntu_dir}/dists/auxiliary/restricted/binary-arm64/Release"] + + Exec['create_ubuntu_repo_dirs'] -> + Exec['create_ubuntu_repo_Packages'] -> diff --git a/patches/fuel-library/mysql-sst-provider/0001-Allow-configuring-MySQL-WSREP-SST-provider.patch b/patches/fuel-library/mysql-sst-provider/0001-Allow-configuring-MySQL-WSREP-SST-provider.patch new file mode 100644 index 00000000..632aa8f3 --- /dev/null +++ b/patches/fuel-library/mysql-sst-provider/0001-Allow-configuring-MySQL-WSREP-SST-provider.patch @@ -0,0 +1,60 @@ +From: Stanislaw Kardach +Date: Wed, 20 Apr 2016 14:54:42 -0700 +Subject: [PATCH] Allow configuring MySQL WSREP SST provider + +On some arm64 platforms xtrabackup is broken due to an outdated +MySQL/InnoDB code that it uses which is missing. To work around that +this patch allows choosing which WSREP SST provider to use. Aside of +already supported `xtrabackup-v2` and `mysqldump`, the `rsync` method +has been added as it is comparable to xtrabackup in terms of speed (or +is faster), has been validated to work on arm64 platforms where +xtrabackup is broken and it doesn't rely on db mechanisms to perform the +state transfer. + +This patch is tied to a patch in fuel-web that introduces configuration +options for WSREP SST provider and in case nothing is specified, it +will choose `xtrabackup-v2`. + +Signed-off-by: Stanislaw Kardach +--- + deployment/puppet/osnailyfacter/manifests/database/database.pp | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/deployment/puppet/osnailyfacter/manifests/database/database.pp b/deployment/puppet/osnailyfacter/manifests/database/database.pp +index e741ff8..be19eb5 100644 +--- a/deployment/puppet/osnailyfacter/manifests/database/database.pp ++++ b/deployment/puppet/osnailyfacter/manifests/database/database.pp +@@ -8,6 +8,7 @@ class osnailyfacter::database::database { + $use_syslog = hiera('use_syslog', true) + $primary_controller = hiera('primary_controller') + $mysql_hash = hiera_hash('mysql', {}) ++ $wsrep_hash = hiera_hash('mysql_wsrep', {}) + $debug = pick($mysql_hash['debug'], hiera('debug', false)) + + $mgmt_iface = get_network_role_property('mgmt/database', 'interface') +@@ -17,6 +18,7 @@ class osnailyfacter::database::database { + + $mysql_root_password = $mysql_hash['root_password'] + $enabled = pick($mysql_hash['enabled'], true) ++ $wsrep_sst_method = pick($wsrep_hash['wsrep_method'], 'xtrabackup-v2') + + $galera_node_address = get_network_role_property('mgmt/database', 'ipaddr') + $galera_nodes = values(get_node_to_ipaddr_map_by_network_role(hiera_hash('database_nodes'), 'mgmt/database')) +@@ -211,7 +213,7 @@ class osnailyfacter::database::database { + 'wsrep_cluster_name' => $galera_cluster_name, + 'wsrep_provider_options' => $wsrep_provider_options, + 'wsrep_slave_threads' => $wsrep_slave_threads, +- 'wsrep_sst_method' => 'xtrabackup-v2', ++ 'wsrep_sst_method' => $wsrep_sst_method, + #TODO (sgolovatiuk): fix this, should be a specific user not root + 'wsrep_sst_auth' => "\"root:${mysql_root_password}\"", + 'wsrep_node_address' => $galera_node_address, +@@ -264,7 +266,7 @@ class osnailyfacter::database::database { + wsrep_group_comm_port => $wsrep_group_comm_port, + bind_address => $galera_node_address, + local_ip => $galera_node_address, +- wsrep_sst_method => 'xtrabackup-v2', ++ wsrep_sst_method => $wsrep_sst_method, + override_options => $override_options, + } + diff --git a/patches/fuel-library/upstream-backports/0001-Set-net.ipv4.ip_nonlocal_bind-1-for-vrouter-namespac.patch b/patches/fuel-library/upstream-backports/0001-Set-net.ipv4.ip_nonlocal_bind-1-for-vrouter-namespac.patch new file mode 100644 index 00000000..281ef231 --- /dev/null +++ b/patches/fuel-library/upstream-backports/0001-Set-net.ipv4.ip_nonlocal_bind-1-for-vrouter-namespac.patch @@ -0,0 +1,54 @@ +From: Bartosz Kupidura +Date: Mon, 27 Jun 2016 13:12:29 +0200 +Subject: [PATCH] Set net.ipv4.ip_nonlocal_bind=1 for vrouter namespace + +Change-Id: I123af7e3b53f9a53fcd9d2818640c0bd4699e024 +Closes-Bug: #1595957 +(cherry picked from commit 244456a3b77074a6cd85fa9d33ebb03ac25decf8) +--- + files/fuel-ha-utils/ocf/ns_dns | 3 ++- + files/fuel-ha-utils/ocf/ns_vrouter | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/files/fuel-ha-utils/ocf/ns_dns b/files/fuel-ha-utils/ocf/ns_dns +index cdd814c..49cbd17 100644 +--- a/files/fuel-ha-utils/ocf/ns_dns ++++ b/files/fuel-ha-utils/ocf/ns_dns +@@ -140,7 +140,7 @@ exit $OCF_SUCCESS + + check_ns() { + local ns=`ip netns list | grep "$OCF_RESKEY_ns"` +- [ $ns != $OCF_RESKEY_ns ] && return $OCF_ERR_GENERIC ++ [ "$ns" != $OCF_RESKEY_ns ] && return $OCF_ERR_GENERIC + return $OCF_SUCCESS + } + +@@ -150,6 +150,7 @@ get_ns() { + + ocf_run ip netns add $OCF_RESKEY_ns + rc=$? ++ ocf_run $RUN_IN_NS /sbin/sysctl -w net.ipv4.ip_nonlocal_bind=1 + ocf_run $RUN_IN_NS ip link set up dev lo + + return $rc +diff --git a/files/fuel-ha-utils/ocf/ns_vrouter b/files/fuel-ha-utils/ocf/ns_vrouter +index a65e9cf..5cc6c98 100644 +--- a/files/fuel-ha-utils/ocf/ns_vrouter ++++ b/files/fuel-ha-utils/ocf/ns_vrouter +@@ -186,7 +186,7 @@ check_ns() { + local LH="${LL} check_ns():" + local ns=`ip netns list | grep "$OCF_RESKEY_ns"` + ocf_log debug "${LH} recieved netns list: ${ns}" +- [[ $ns != $OCF_RESKEY_ns ]] && return $OCF_ERR_GENERIC ++ [[ "$ns" != $OCF_RESKEY_ns ]] && return $OCF_ERR_GENERIC + return $OCF_SUCCESS + } + +@@ -197,6 +197,7 @@ get_ns() { + + ocf_run ip netns add $OCF_RESKEY_ns + rc=$? ++ ocf_run $RUN_IN_NS /sbin/sysctl -w net.ipv4.ip_nonlocal_bind=1 + ocf_run $RUN_IN_NS ip link set up dev lo + ocf_log debug "${LH} added netns ${OCF_RESKEY_ns} and set up lo" + diff --git a/patches/fuel-library/upstream-backports/0002-Always-wait-for-MySQL-sync-on-service-refresh.patch b/patches/fuel-library/upstream-backports/0002-Always-wait-for-MySQL-sync-on-service-refresh.patch new file mode 100644 index 00000000..d7fac948 --- /dev/null +++ b/patches/fuel-library/upstream-backports/0002-Always-wait-for-MySQL-sync-on-service-refresh.patch @@ -0,0 +1,60 @@ +From: dmburmistrov +Date: Thu, 18 Aug 2016 21:30:26 +0300 +Subject: [PATCH] Always wait for MySQL sync on service refresh + +Always trigger Exec['wait-for-sync'] on +MySQL service refresh. + +Closes-bug: #1614647 + +Change-Id: I82ec0d46eff217daedc1bd07c67069498c515c44 +--- + deployment/puppet/cluster/manifests/mysql.pp | 6 +++--- + deployment/puppet/cluster/spec/classes/cluster_mysql_spec.rb | 6 +++++- + 2 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/deployment/puppet/cluster/manifests/mysql.pp b/deployment/puppet/cluster/manifests/mysql.pp +index c36b65d..f483cf6 100644 +--- a/deployment/puppet/cluster/manifests/mysql.pp ++++ b/deployment/puppet/cluster/manifests/mysql.pp +@@ -104,7 +104,7 @@ class cluster::mysql ( + require => Package['mysql-server'], + } ~> + +- exec { 'wait-initial-sync': ++ exec { 'wait-for-sync': + path => '/bin:/sbin:/usr/bin:/usr/sbin', + command => "mysql ${user_password_string} -Nbe \"show status like 'wsrep_local_state_comment'\" | grep -q -e Synced && sleep 10", + try_sleep => 10, +@@ -119,7 +119,7 @@ class cluster::mysql ( + } + + Exec['create-init-file'] -> +- Service<| title == $service_name |> -> +- Exec['wait-initial-sync'] -> ++ Service<| title == $service_name |> ~> ++ Exec['wait-for-sync'] -> + Exec['rm-init-file'] + } +diff --git a/deployment/puppet/cluster/spec/classes/cluster_mysql_spec.rb b/deployment/puppet/cluster/spec/classes/cluster_mysql_spec.rb +index cf2c719..72c8c2f 100644 +--- a/deployment/puppet/cluster/spec/classes/cluster_mysql_spec.rb ++++ b/deployment/puppet/cluster/spec/classes/cluster_mysql_spec.rb +@@ -34,12 +34,16 @@ describe 'cluster::mysql' do + /'username'@'localhost' IDENTIFIED BY 'password'/ + ) + should contain_exec('create-init-file').that_comes_before('Service[mysqld]') +- should contain_exec('create-init-file').that_notifies('Exec[wait-initial-sync]') ++ should contain_exec('create-init-file').that_notifies('Exec[wait-for-sync]') + end + + it 'creates exec to remove init-file' do + should contain_exec('rm-init-file') + end ++ ++ it 'creates exec to wait initial database sync' do ++ should contain_exec('wait-for-sync').that_subscribes_to('Service[mysqld]') ++ end + end + + end diff --git a/patches/fuel-library/upstream-backports/0003-Fix-MySQL-logging-dir-permissions-for-syslog.patch b/patches/fuel-library/upstream-backports/0003-Fix-MySQL-logging-dir-permissions-for-syslog.patch new file mode 100644 index 00000000..7dfede1b --- /dev/null +++ b/patches/fuel-library/upstream-backports/0003-Fix-MySQL-logging-dir-permissions-for-syslog.patch @@ -0,0 +1,90 @@ +From: Maksim Malchuk +Date: Wed, 24 Aug 2016 00:15:02 +0300 +Subject: [PATCH] Fix MySQL logging dir permissions for syslog + +This change fixes permissions for MySQL logging directory to enable +syslogd create and write logs files into it. + +Closes-Bug: #1615680 +Change-Id: Id29aead6619ea8ed68811d0fd80895ee79f51687 +Signed-off-by: Maksim Malchuk +(cherry picked from commit 9c978278811eeebfb11ab4d2b42ebabe00c132c2) +--- + deployment/puppet/cluster/manifests/mysql.pp | 14 +++++++++++--- + .../puppet/cluster/spec/classes/cluster_mysql_spec.rb | 11 ++++++++++- + tests/noop/spec/hosts/database/database_spec.rb | 9 +++++++++ + 3 files changed, 30 insertions(+), 4 deletions(-) + +diff --git a/deployment/puppet/cluster/manifests/mysql.pp b/deployment/puppet/cluster/manifests/mysql.pp +index f483cf6..7bc8874 100644 +--- a/deployment/puppet/cluster/manifests/mysql.pp ++++ b/deployment/puppet/cluster/manifests/mysql.pp +@@ -118,8 +118,16 @@ class cluster::mysql ( + onlyif => 'test -f /tmp/wsrep-init-file', + } + ++ file { 'fix-log-dir': ++ ensure => directory, ++ path => '/var/log/mysql', ++ mode => '0770', ++ require => Package['mysql-server'], ++ } ++ + Exec['create-init-file'] -> +- Service<| title == $service_name |> ~> +- Exec['wait-for-sync'] -> +- Exec['rm-init-file'] ++ File['fix-log-dir'] -> ++ Service<| title == $service_name |> ~> ++ Exec['wait-for-sync'] -> ++ Exec['rm-init-file'] + } +diff --git a/deployment/puppet/cluster/spec/classes/cluster_mysql_spec.rb b/deployment/puppet/cluster/spec/classes/cluster_mysql_spec.rb +index 72c8c2f..ad3fc1b 100644 +--- a/deployment/puppet/cluster/spec/classes/cluster_mysql_spec.rb ++++ b/deployment/puppet/cluster/spec/classes/cluster_mysql_spec.rb +@@ -33,7 +33,7 @@ describe 'cluster::mysql' do + should contain_exec('create-init-file').with_command( + /'username'@'localhost' IDENTIFIED BY 'password'/ + ) +- should contain_exec('create-init-file').that_comes_before('Service[mysqld]') ++ should contain_exec('create-init-file').that_comes_before('File[fix-log-dir]') + should contain_exec('create-init-file').that_notifies('Exec[wait-for-sync]') + end + +@@ -41,6 +41,15 @@ describe 'cluster::mysql' do + should contain_exec('rm-init-file') + end + ++ it 'should have correct permissions for logging directory' do ++ should contain_file('fix-log-dir').with( ++ :ensure => 'directory', ++ :path => '/var/log/mysql', ++ :mode => '0770', ++ ).that_requires('Package[mysql-server]') ++ should contain_file('fix-log-dir').that_comes_before('Service[mysqld]') ++ end ++ + it 'creates exec to wait initial database sync' do + should contain_exec('wait-for-sync').that_subscribes_to('Service[mysqld]') + end +diff --git a/tests/noop/spec/hosts/database/database_spec.rb b/tests/noop/spec/hosts/database/database_spec.rb +index d4ad8d0..2c4c5c5 100644 +--- a/tests/noop/spec/hosts/database/database_spec.rb ++++ b/tests/noop/spec/hosts/database/database_spec.rb +@@ -261,6 +261,15 @@ describe manifest do + ) + end + ++ it 'should have correct permissions for logging directory' do ++ should contain_file('fix-log-dir').with( ++ :ensure => 'directory', ++ :path => '/var/log/mysql', ++ :mode => '0770', ++ ).that_requires('Package[mysql-server]') ++ should contain_file('fix-log-dir').that_comes_before('Service[mysqld]') ++ end ++ + it 'should configure galera grants service and proper flow' do + if primary_controller + should contain_class('cluster::galera_grants').with( diff --git a/patches/fuel-mirror/0001-Set-mos-ubuntu-base-URL-to-linux.enea.com.patch b/patches/fuel-mirror/0001-Set-mos-ubuntu-base-URL-to-linux.enea.com.patch index a12c4143..9d45cda1 100644 --- a/patches/fuel-mirror/0001-Set-mos-ubuntu-base-URL-to-linux.enea.com.patch +++ b/patches/fuel-mirror/0001-Set-mos-ubuntu-base-URL-to-linux.enea.com.patch @@ -8,7 +8,7 @@ Contents of amd64 mos-ubuntu repos should be in sync with arm64. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/fuel_mirror/data/ubuntu.yaml b/contrib/fuel_mirror/data/ubuntu.yaml -index 5ce288e..7bc0c4b 100644 +index ac62455..cd86ec9 100644 --- a/contrib/fuel_mirror/data/ubuntu.yaml +++ b/contrib/fuel_mirror/data/ubuntu.yaml @@ -1,6 +1,6 @@ @@ -16,6 +16,6 @@ index 5ce288e..7bc0c4b 100644 ubuntu_baseurl: &ubuntu_baseurl http://archive.ubuntu.com/ubuntu -mos_baseurl: &mos_baseurl http://mirror.fuel-infra.org/mos-repos/ubuntu/$mos_version +mos_baseurl: &mos_baseurl http://linux.enea.com/mos-repos/ubuntu/$mos_version - + fuel_release_match: version: $openstack_version diff --git a/patches/fuel-mirror/0003-kernel-flavor-Add-linux-image-generic-lts-xenial.patch b/patches/fuel-mirror/0003-kernel-flavor-Add-linux-image-generic-lts-xenial.patch deleted file mode 100644 index 6be21dac..00000000 --- a/patches/fuel-mirror/0003-kernel-flavor-Add-linux-image-generic-lts-xenial.patch +++ /dev/null @@ -1,26 +0,0 @@ -From: Alexandru Avadanii -Date: Wed, 13 Jul 2016 21:33:04 +0200 -Subject: [PATCH] kernel-flavor: Add linux-image-generic-lts-xenial - -Ubuntu arm64: While keeping kernel 4.2 for Trusty -(linux-image-generic-lts-trusty), add 4.4 backported from Xenial -(linux-image-generic-lts-xenial) to local mirror in Armband ISO. - -Signed-off-by: Alexandru Avadanii ---- - contrib/fuel_mirror/data/ubuntu.yaml | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/contrib/fuel_mirror/data/ubuntu.yaml b/contrib/fuel_mirror/data/ubuntu.yaml -index 2ec4f1d..b8c0ae4 100644 ---- a/contrib/fuel_mirror/data/ubuntu.yaml -+++ b/contrib/fuel_mirror/data/ubuntu.yaml -@@ -98,6 +98,8 @@ packages: &packages - - "linux-firmware-nonfree" - - "linux-headers-generic-lts-trusty" - - "linux-image-generic-lts-trusty" -+ - "linux-headers-generic-lts-xenial" -+ - "linux-image-generic-lts-xenial" - - "live-boot" - - "livecd-rootfs" - - "lshw" diff --git a/patches/fuel-mirror/kernel-bump/0001-kernel-flavor-Add-linux-image-generic-lts-xenial.patch b/patches/fuel-mirror/kernel-bump/0001-kernel-flavor-Add-linux-image-generic-lts-xenial.patch new file mode 100644 index 00000000..35f356d6 --- /dev/null +++ b/patches/fuel-mirror/kernel-bump/0001-kernel-flavor-Add-linux-image-generic-lts-xenial.patch @@ -0,0 +1,26 @@ +From: Alexandru Avadanii +Date: Wed, 13 Jul 2016 21:33:04 +0200 +Subject: [PATCH] kernel-flavor: Add linux-image-generic-lts-xenial + +Ubuntu arm64: While keeping kernel 4.2 for Trusty +(linux-image-generic-lts-trusty), add 4.4 backported from Xenial +(linux-image-generic-lts-xenial) to local mirror in Armband ISO. + +Signed-off-by: Alexandru Avadanii +--- + contrib/fuel_mirror/data/ubuntu.yaml | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/contrib/fuel_mirror/data/ubuntu.yaml b/contrib/fuel_mirror/data/ubuntu.yaml +index 2ec4f1d..6805847 100644 +--- a/contrib/fuel_mirror/data/ubuntu.yaml ++++ b/contrib/fuel_mirror/data/ubuntu.yaml +@@ -100,6 +100,8 @@ packages: &packages + - "linux-firmware-nonfree" + - "linux-headers-generic-lts-trusty" + - "linux-image-generic-lts-trusty" ++ - "linux-headers-generic-lts-xenial" ++ - "linux-image-generic-lts-xenial" + - "live-boot" + - "livecd-rootfs" + - "lshw" diff --git a/patches/fuel-plugin-opendaylight/0001-ODL-leveldb-leveldbjni-Enable-arm64-support.patch b/patches/fuel-plugin-opendaylight/0001-ODL-leveldb-leveldbjni-Enable-arm64-support.patch index d8fe07da..f1a1d412 100644 --- a/patches/fuel-plugin-opendaylight/0001-ODL-leveldb-leveldbjni-Enable-arm64-support.patch +++ b/patches/fuel-plugin-opendaylight/0001-ODL-leveldb-leveldbjni-Enable-arm64-support.patch @@ -104,10 +104,10 @@ index 0000000..08a528b + + diff --git a/deployment_scripts/puppet/modules/opendaylight/manifests/init.pp b/deployment_scripts/puppet/modules/opendaylight/manifests/init.pp -index a322f70..f71bfc8 100644 +index 69cc23a..791ceba 100644 --- a/deployment_scripts/puppet/modules/opendaylight/manifests/init.pp +++ b/deployment_scripts/puppet/modules/opendaylight/manifests/init.pp -@@ -10,4 +10,12 @@ class opendaylight { +@@ -9,4 +9,12 @@ class opendaylight { $odl_mgmt_ips = values($odl_mgmt_ips_hash) $odl_nodes_names = keys($odl_mgmt_ips_hash) $node_internal_address = $odl_mgmt_ips_hash["node-${node_uid}"] @@ -121,13 +121,13 @@ index a322f70..f71bfc8 100644 + } } diff --git a/deployment_scripts/puppet/modules/opendaylight/manifests/install.pp b/deployment_scripts/puppet/modules/opendaylight/manifests/install.pp -index 924a840..d55a311 100644 +index 1962609..ca98532 100644 --- a/deployment_scripts/puppet/modules/opendaylight/manifests/install.pp +++ b/deployment_scripts/puppet/modules/opendaylight/manifests/install.pp @@ -17,6 +17,12 @@ class opendaylight::install ( ensure => installed, } - + + if ($::osfamily == 'Debian' and $::opendaylight::arch == 'arm64') { + class { 'opendaylight::leveldbjni': + require => Package[$odl_package], @@ -138,9 +138,9 @@ index 924a840..d55a311 100644 class { 'opendaylight::quagga': before => Service['opendaylight'] @@ -35,7 +41,8 @@ class opendaylight::install ( - + debug("Set odl rest api port to ${rest_port}") - + - file { "${conf_dir}/jetty.xml": + file { 'jetty.xml': + path => "${conf_dir}/jetty.xml", @@ -313,10 +313,10 @@ index 0000000..5125fc7 + } +} diff --git a/deployment_tasks.yaml b/deployment_tasks.yaml -index 3706678..841bfee 100644 +index 20bd24f..e324ff5 100644 --- a/deployment_tasks.yaml +++ b/deployment_tasks.yaml -@@ -17,7 +17,7 @@ +@@ -20,7 +20,7 @@ parameters: puppet_manifest: puppet/manifests/odl-install.pp puppet_modules: puppet/modules:/etc/puppet/modules diff --git a/patches/fuel-plugin-opendaylight/0002-opnfv-quagga-Build-for-UBUNTU_ARCH.patch b/patches/fuel-plugin-opendaylight/0002-opnfv-quagga-Build-for-UBUNTU_ARCH.patch index a44222ab..e6e7716f 100644 --- a/patches/fuel-plugin-opendaylight/0002-opnfv-quagga-Build-for-UBUNTU_ARCH.patch +++ b/patches/fuel-plugin-opendaylight/0002-opnfv-quagga-Build-for-UBUNTU_ARCH.patch @@ -30,21 +30,21 @@ branch "stable/colorado", including prebuilt binaries (DEBs) for: Signed-off-by: Alexandru Avadanii --- - pre_build_hook | 16 ++++++++++++++-- - 1 file changed, 14 insertions(+), 2 deletions(-) + pre_build_hook | 15 +++++++++++++-- + 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pre_build_hook b/pre_build_hook -index f973826..953e66c 100755 +index 0296821..a6d55e9 100755 --- a/pre_build_hook +++ b/pre_build_hook -@@ -41,9 +41,17 @@ NETWORKING_ODL_BRANCH=${NETWORKING_ODL_BRANCH:-stable/mitaka} +@@ -53,9 +53,17 @@ NETWORKING_ODL_BRANCH=${NETWORKING_ODL_BRANCH:-stable/mitaka} OPNFV_QUAGGE_PACKAGING_REPO=${OPNFV_QUAGGE_PACKAGING_REPO:-https://github.com/nikolas-hermanns/opnfv-quagga-packaging} OPNFV_QUAGGE_PACKAGING_BRANCH=stable/colorado - + -# For which systems odl package should be build +# For which systems odl package should be built BUILD_FOR=${BUILD_FOR:-ubuntu} - + +# For which architecture(s) package should be built +# Only applicable when "BUILD_FOR=ubuntu" +# ODL itself is mostly arch-indep, but its deps are not @@ -56,7 +56,7 @@ index f973826..953e66c 100755 DIR="$(dirname `readlink -f $0`)" TMP_DIR="${DIR}/tmp" MODULES="${DIR}/deployment_scripts/puppet/modules" -@@ -74,7 +82,10 @@ function add_opnfv_quagga { +@@ -86,7 +94,10 @@ function add_opnfv_quagga { sudo apt-get -y install `cat requirements.txt` make -j6 fi @@ -67,4 +67,4 @@ index f973826..953e66c 100755 + done popd popd - + diff --git a/patches/fuel-plugin-opendaylight/0003-FIXME-ODL-wget-no-check-certificate-for-cache.patch b/patches/fuel-plugin-opendaylight/0003-FIXME-ODL-wget-no-check-certificate-for-cache.patch index b57de503..8b2d1a38 100644 --- a/patches/fuel-plugin-opendaylight/0003-FIXME-ODL-wget-no-check-certificate-for-cache.patch +++ b/patches/fuel-plugin-opendaylight/0003-FIXME-ODL-wget-no-check-certificate-for-cache.patch @@ -28,15 +28,15 @@ Signed-off-by: Alexandru Avadanii 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pre_build_hook b/pre_build_hook -index 4785917..c3dd664 100755 +index a6d55e9..21e7a99 100755 --- a/pre_build_hook +++ b/pre_build_hook -@@ -64,7 +64,7 @@ function cleanup { +@@ -76,7 +76,7 @@ function cleanup { } - + function download { - wget "$1" -qO $2 + wget --no-check-certificate "$1" -qO $2 } - + function unpack { diff --git a/patches/fuel-plugin-ovs/0001-Cleanup-Use-dget-instead-of-wget-dpkg-source.patch b/patches/fuel-plugin-ovs/0001-Cleanup-Use-dget-instead-of-wget-dpkg-source.patch new file mode 100644 index 00000000..4c2283f4 --- /dev/null +++ b/patches/fuel-plugin-ovs/0001-Cleanup-Use-dget-instead-of-wget-dpkg-source.patch @@ -0,0 +1,48 @@ +From: Alexandru Avadanii +Date: Fri, 24 Jun 2016 16:51:41 +0200 +Subject: [PATCH] Cleanup: Use dget instead of wget+dpkg-source. + +We already install devscripts, which provides dget. + +See [1] for using `dget -x -u` to accelerate/simplify code dev. + +FIXME: Remove `-u` when we add Ubuntu signing keys to builder +docker keyring. + +[1] https://debian-administration.org/article/ + 504/Downloading_Debian_source_packages_easily + +Change-Id: Ifbcac2a14c7b34216894adb7c5c4e921bf556e33 +Signed-off-by: Alexandru Avadanii +--- + ovs_build/build-ovs-nsh-dpdk.sh | 10 ++-------- + 1 file changed, 2 insertions(+), 8 deletions(-) + +diff --git a/ovs_build/build-ovs-nsh-dpdk.sh b/ovs_build/build-ovs-nsh-dpdk.sh +index 1b42df1..3d7edea 100755 +--- a/ovs_build/build-ovs-nsh-dpdk.sh ++++ b/ovs_build/build-ovs-nsh-dpdk.sh +@@ -17,10 +17,7 @@ sudo apt-get -y install devscripts dpkg-dev git wget + rm -rf ${BUILD_HOME}; mkdir -p ${BUILD_HOME} + + cd ${BUILD_HOME} +-wget -c https://launchpad.net/ubuntu/+archive/primary/+files/dpdk_2.2.0-0ubuntu8.dsc +-wget -c https://launchpad.net/ubuntu/+archive/primary/+files/dpdk_2.2.0.orig.tar.gz +-wget -c https://launchpad.net/ubuntu/+archive/primary/+files/dpdk_2.2.0-0ubuntu8.debian.tar.xz +-dpkg-source -x dpdk_2.2.0-0ubuntu8.dsc ++dget -x -u https://launchpad.net/ubuntu/+archive/primary/+files/dpdk_2.2.0-0ubuntu8.dsc + + # copy from debian/control + sudo apt-get install -y debhelper \ +@@ -49,10 +46,7 @@ cd ${BUILD_HOME}; sudo dpkg -i *.deb + apt-get download libxenstore3.0 + + cd ${BUILD_HOME} +-wget -c https://launchpad.net/ubuntu/+archive/primary/+files/openvswitch-dpdk_2.4.0.orig.tar.gz +-wget -c https://launchpad.net/ubuntu/+archive/primary/+files/openvswitch-dpdk_2.4.0-0ubuntu1.dsc +-wget -c https://launchpad.net/ubuntu/+archive/primary/+files/openvswitch-dpdk_2.4.0-0ubuntu1.debian.tar.xz +-dpkg-source -x openvswitch-dpdk_2.4.0-0ubuntu1.dsc ++dget -x -u https://launchpad.net/ubuntu/+archive/primary/+files/openvswitch-dpdk_2.4.0-0ubuntu1.dsc + + # copy from debian/control + sudo apt-get install -y autoconf \ diff --git a/patches/fuel-plugin-ovs/0002-Cleanup-Drop-git-dependency.patch b/patches/fuel-plugin-ovs/0002-Cleanup-Drop-git-dependency.patch new file mode 100644 index 00000000..22aa570e --- /dev/null +++ b/patches/fuel-plugin-ovs/0002-Cleanup-Drop-git-dependency.patch @@ -0,0 +1,99 @@ +From: Alexandru Avadanii +Date: Sat, 3 Sep 2016 20:42:06 +0200 +Subject: [PATCH] Cleanup: Drop git dependency + +We only use git to fetch upstream contents, this can be achieved +with a simple wget. + +Change-Id: I07f681e44253cc1f390943eb121a694bf2c9d95f +Signed-off-by: Alexandru Avadanii +--- + ovs_build/build-ovs-dpdk.sh | 10 +++++----- + ovs_build/build-ovs-nsh-dpdk.sh | 12 ++++++------ + 2 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/ovs_build/build-ovs-dpdk.sh b/ovs_build/build-ovs-dpdk.sh +index aeb5eb7..01ba032 100755 +--- a/ovs_build/build-ovs-dpdk.sh ++++ b/ovs_build/build-ovs-dpdk.sh +@@ -3,14 +3,14 @@ + set -eux + + OVS_COMMIT=9f4ecd654dbcb88b15a424445184591fc887537e +-URL_OVS=https://github.com/openvswitch/ovs.git ++URL_OVS_ARCHIVE=https://github.com/openvswitch/ovs/archive + BUILD_DEB=${BUILD_DEB:-/deb} + BUILD_SRC="$(dirname `readlink -f $0`)" + BUILD_DEST=${BUILD_DEST:-/tmp/ovs-dpdk} + + export DEB_BUILD_OPTIONS='parallel=8 nocheck' + +-sudo apt-get -y install devscripts dpkg-dev git wget ++sudo apt-get -y install devscripts dpkg-dev wget + + rm -rf ${BUILD_DEST}; mkdir -p ${BUILD_DEST} + +@@ -62,9 +62,9 @@ sudo apt-get install -y autoconf \ + python-zopeinterface \ + python-six + +-git clone https://github.com/openvswitch/ovs.git +-cd ovs; git checkout ${OVS_COMMIT}; rm -rf .git +-cd ${BUILD_DEST}; cp -r ovs ovs-dpdk ++wget -c ${URL_OVS_ARCHIVE}/${OVS_COMMIT}.tar.gz ++tar xzf ${OVS_COMMIT}.tar.gz; mv ovs-${OVS_COMMIT} ovs ++cp -r ovs ovs-dpdk + + cd ovs-dpdk + cp -r ${BUILD_SRC}/openvswitch-dpdk_2.5.90/debian . +diff --git a/ovs_build/build-ovs-nsh-dpdk.sh b/ovs_build/build-ovs-nsh-dpdk.sh +index 3d7edea..25e4b6c 100755 +--- a/ovs_build/build-ovs-nsh-dpdk.sh ++++ b/ovs_build/build-ovs-nsh-dpdk.sh +@@ -3,7 +3,7 @@ + set -eux + + OVS_COMMIT=7d433ae57ebb90cd68e8fa948a096f619ac4e2d8 +-URL_OVS=https://github.com/openvswitch/ovs.git ++URL_OVS_ARCHIVE=https://github.com/openvswitch/ovs/archive + OVS_VER=${OVS_VER:-2.5.90} + BUILD_HOME=$HOME/nsh + BUILD_DEST=${BUILD_DEST:-/deb} +@@ -12,7 +12,7 @@ DIR="$(dirname `readlink -f $0`)" + export DEB_BUILD_OPTIONS='parallel=8 nocheck' + + sudo apt-get build-dep openvswitch -y +-sudo apt-get -y install devscripts dpkg-dev git wget ++sudo apt-get -y install devscripts dpkg-dev wget + + rm -rf ${BUILD_HOME}; mkdir -p ${BUILD_HOME} + +@@ -35,7 +35,7 @@ sudo apt-get install -y debhelper \ + texlive-fonts-recommended \ + texlive-latex-extra + +-cd dpdk-2.2.0; rm -rf debian/patches/; ++cd dpdk-2.2.0; rm -rf debian/patches/ + cat << EOF > debian/changelog + dpdk (2.2.0-1) unstable; urgency=low + * DPDK 2.2.0 +@@ -68,8 +68,8 @@ sudo apt-get install -y autoconf \ + python-zopeinterface \ + python-six + +-git clone https://github.com/openvswitch/ovs.git +-cd ovs; git checkout ${OVS_COMMIT} ++wget -c ${URL_OVS_ARCHIVE}/${OVS_COMMIT}.tar.gz ++tar xzf ${OVS_COMMIT}.tar.gz; mv ovs-${OVS_COMMIT} ovs + PATCHES=$(cd ${DIR}/patches; echo *patch) + for patch in ${PATCHES} + do +@@ -82,7 +82,7 @@ cd ../openvswitch-dpdk-${OVS_VER} + sed -i "s/include\/rte_config.h/include\/dpdk\/rte_config.h/" acinclude.m4 + sed -i 's/DPDK_INCLUDE=.*/DPDK_INCLUDE=$RTE_SDK\/include\/dpdk/' acinclude.m4 + autoreconf --install +-rm -rf debian/patches/ .git; ++rm -rf debian/patches/ + cat << EOF > debian/changelog + openvswitch-dpdk (${OVS_VER}-1.nsh) unstable; urgency=low + * Support NSH diff --git a/patches/fuel-plugin-ovs/0002-Cleanup-Use-dget-instead-of-wget-dpkg-source.patch b/patches/fuel-plugin-ovs/0002-Cleanup-Use-dget-instead-of-wget-dpkg-source.patch deleted file mode 100644 index e9b90be7..00000000 --- a/patches/fuel-plugin-ovs/0002-Cleanup-Use-dget-instead-of-wget-dpkg-source.patch +++ /dev/null @@ -1,48 +0,0 @@ -From: Alexandru Avadanii -Date: Fri, 24 Jun 2016 16:51:41 +0200 -Subject: [PATCH] Cleanup: Use dget instead of wget+dpkg-source. - -We already install devscripts, which provides dget. - -See [1] for using `dget -x -u` to accelerate/simplify code dev. - -FIXME: Remove `-u` when we add Ubuntu signing keys to builder -docker keyring. - -[1] https://debian-administration.org/article/ - 504/Downloading_Debian_source_packages_easily - -Change-Id: Ifbcac2a14c7b34216894adb7c5c4e921bf556e33 -Signed-off-by: Alexandru Avadanii ---- - ovs_build/build-ovs-nsh-dpdk.sh | 10 ++-------- - 1 file changed, 2 insertions(+), 8 deletions(-) - -diff --git a/ovs_build/build-ovs-nsh-dpdk.sh b/ovs_build/build-ovs-nsh-dpdk.sh -index 1b42df1..3d7edea 100755 ---- a/ovs_build/build-ovs-nsh-dpdk.sh -+++ b/ovs_build/build-ovs-nsh-dpdk.sh -@@ -17,10 +17,7 @@ sudo apt-get -y install devscripts dpkg-dev git wget - rm -rf ${BUILD_HOME}; mkdir -p ${BUILD_HOME} - - cd ${BUILD_HOME} --wget -c https://launchpad.net/ubuntu/+archive/primary/+files/dpdk_2.2.0-0ubuntu8.dsc --wget -c https://launchpad.net/ubuntu/+archive/primary/+files/dpdk_2.2.0.orig.tar.gz --wget -c https://launchpad.net/ubuntu/+archive/primary/+files/dpdk_2.2.0-0ubuntu8.debian.tar.xz --dpkg-source -x dpdk_2.2.0-0ubuntu8.dsc -+dget -x -u https://launchpad.net/ubuntu/+archive/primary/+files/dpdk_2.2.0-0ubuntu8.dsc - - # copy from debian/control - sudo apt-get install -y debhelper \ -@@ -49,10 +46,7 @@ cd ${BUILD_HOME}; sudo dpkg -i *.deb - apt-get download libxenstore3.0 - - cd ${BUILD_HOME} --wget -c https://launchpad.net/ubuntu/+archive/primary/+files/openvswitch-dpdk_2.4.0.orig.tar.gz --wget -c https://launchpad.net/ubuntu/+archive/primary/+files/openvswitch-dpdk_2.4.0-0ubuntu1.dsc --wget -c https://launchpad.net/ubuntu/+archive/primary/+files/openvswitch-dpdk_2.4.0-0ubuntu1.debian.tar.xz --dpkg-source -x openvswitch-dpdk_2.4.0-0ubuntu1.dsc -+dget -x -u https://launchpad.net/ubuntu/+archive/primary/+files/openvswitch-dpdk_2.4.0-0ubuntu1.dsc - - # copy from debian/control - sudo apt-get install -y autoconf \ diff --git a/patches/fuel-plugin-ovs/0003-Cleanup-Drop-git-dependency.patch b/patches/fuel-plugin-ovs/0003-Cleanup-Drop-git-dependency.patch deleted file mode 100644 index 89cab56a..00000000 --- a/patches/fuel-plugin-ovs/0003-Cleanup-Drop-git-dependency.patch +++ /dev/null @@ -1,99 +0,0 @@ -From: Alexandru Avadanii -Date: Sat, 3 Sep 2016 20:42:06 +0200 -Subject: [PATCH] Cleanup: Drop git dependency - -We only use git to fetch upstream contents, this can be achieved -with a simple wget. - -Change-Id: I07f681e44253cc1f390943eb121a694bf2c9d95f -Signed-off-by: Alexandru Avadanii ---- - ovs_build/build-ovs-dpdk.sh | 10 +++++----- - ovs_build/build-ovs-nsh-dpdk.sh | 12 ++++++------ - 2 files changed, 11 insertions(+), 11 deletions(-) - -diff --git a/ovs_build/build-ovs-dpdk.sh b/ovs_build/build-ovs-dpdk.sh -index aeb5eb7..9e92014 100755 ---- a/ovs_build/build-ovs-dpdk.sh -+++ b/ovs_build/build-ovs-dpdk.sh -@@ -3,14 +3,14 @@ - set -eux - - OVS_COMMIT=9f4ecd654dbcb88b15a424445184591fc887537e --URL_OVS=https://github.com/openvswitch/ovs.git -+URL_OVS_ARCHIVE=https://github.com/openvswitch/ovs/archive - BUILD_DEB=${BUILD_DEB:-/deb} - BUILD_SRC="$(dirname `readlink -f $0`)" - BUILD_DEST=${BUILD_DEST:-/tmp/ovs-dpdk} - - export DEB_BUILD_OPTIONS='parallel=8 nocheck' - --sudo apt-get -y install devscripts dpkg-dev git wget -+sudo apt-get -y install devscripts dpkg-dev wget - - rm -rf ${BUILD_DEST}; mkdir -p ${BUILD_DEST} - -@@ -62,9 +62,9 @@ sudo apt-get install -y autoconf \ - python-zopeinterface \ - python-six - --git clone https://github.com/openvswitch/ovs.git --cd ovs; git checkout ${OVS_COMMIT}; rm -rf .git --cd ${BUILD_DEST}; cp -r ovs ovs-dpdk -+wget -c ${URL_OVS_ARCHIVE}/${OVS_COMMIT}.tar.gz -+tar xzf ${OVS_COMMIT}.tar.gz; mv ovs-${OVS_COMMIT} ovs -+cp -r ovs ovs-dpdk - - cd ovs-dpdk - cp -r ${BUILD_SRC}/openvswitch-dpdk_2.5.90/debian . -diff --git a/ovs_build/build-ovs-nsh-dpdk.sh b/ovs_build/build-ovs-nsh-dpdk.sh -index 3d7edea..ec5eef4 100755 ---- a/ovs_build/build-ovs-nsh-dpdk.sh -+++ b/ovs_build/build-ovs-nsh-dpdk.sh -@@ -3,7 +3,7 @@ - set -eux - - OVS_COMMIT=7d433ae57ebb90cd68e8fa948a096f619ac4e2d8 --URL_OVS=https://github.com/openvswitch/ovs.git -+URL_OVS_ARCHIVE=https://github.com/openvswitch/ovs/archive - OVS_VER=${OVS_VER:-2.5.90} - BUILD_HOME=$HOME/nsh - BUILD_DEST=${BUILD_DEST:-/deb} -@@ -12,7 +12,7 @@ DIR="$(dirname `readlink -f $0`)" - export DEB_BUILD_OPTIONS='parallel=8 nocheck' - - sudo apt-get build-dep openvswitch -y --sudo apt-get -y install devscripts dpkg-dev git wget -+sudo apt-get -y install devscripts dpkg-dev wget - - rm -rf ${BUILD_HOME}; mkdir -p ${BUILD_HOME} - -@@ -35,7 +35,7 @@ sudo apt-get install -y debhelper \ - texlive-fonts-recommended \ - texlive-latex-extra - --cd dpdk-2.2.0; rm -rf debian/patches/; -+cd dpdk-2.2.0; rm -rf debian/patches/ - cat << EOF > debian/changelog - dpdk (2.2.0-1) unstable; urgency=low - * DPDK 2.2.0 -@@ -68,8 +68,8 @@ sudo apt-get install -y autoconf \ - python-zopeinterface \ - python-six - --git clone https://github.com/openvswitch/ovs.git --cd ovs; git checkout ${OVS_COMMIT} -+wget -c ${URL_OVS_ARCHIVE}/${OVS_COMMIT}.tar.gz -+tar xzf ${OVS_COMMIT}.tar.gz; mv ovs-${OVS_COMMIT} ovs - PATCHES=$(cd ${DIR}/patches; echo *patch) - for patch in ${PATCHES} - do -@@ -82,7 +82,7 @@ cd ../openvswitch-dpdk-${OVS_VER} - sed -i "s/include\/rte_config.h/include\/dpdk\/rte_config.h/" acinclude.m4 - sed -i 's/DPDK_INCLUDE=.*/DPDK_INCLUDE=$RTE_SDK\/include\/dpdk/' acinclude.m4 - autoreconf --install --rm -rf debian/patches/ .git; -+rm -rf debian/patches/ - cat << EOF > debian/changelog - openvswitch-dpdk (${OVS_VER}-1.nsh) unstable; urgency=low - * Support NSH diff --git a/patches/fuel-plugin-ovs/0003-build-apt-force-yes.patch b/patches/fuel-plugin-ovs/0003-build-apt-force-yes.patch new file mode 100644 index 00000000..9ec04cd2 --- /dev/null +++ b/patches/fuel-plugin-ovs/0003-build-apt-force-yes.patch @@ -0,0 +1,87 @@ +From: Alexandru Avadanii +Date: Sat, 3 Sep 2016 20:52:05 +0200 +Subject: [PATCH] build: apt: --force-yes. + +For arm64 builds, some packages are fetched from linux.enea.com, +leading to package version being reported as "older", although in +fact it is newer (dpkg version comparison is not that great with +suffixes). Also, since we don't explicitly add the GPG key of +the linux.enea.com repo yet, apt is complaining about unverified +package sources. + +Bypass the above by using "--force-yes", next to "-y". + +Change-Id: I4899fe62aaad9a13f8b2f9ffbdf2f3631ecba164 +Signed-off-by: Alexandru Avadanii +--- + ovs_build/build-ovs-dpdk.sh | 8 ++++---- + ovs_build/build-ovs-nsh-dpdk.sh | 8 ++++---- + 2 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/ovs_build/build-ovs-dpdk.sh b/ovs_build/build-ovs-dpdk.sh +index 01ba032..dd9c6ff 100755 +--- a/ovs_build/build-ovs-dpdk.sh ++++ b/ovs_build/build-ovs-dpdk.sh +@@ -10,7 +10,7 @@ BUILD_DEST=${BUILD_DEST:-/tmp/ovs-dpdk} + + export DEB_BUILD_OPTIONS='parallel=8 nocheck' + +-sudo apt-get -y install devscripts dpkg-dev wget ++sudo apt-get -y --force-yes install devscripts dpkg-dev wget + + rm -rf ${BUILD_DEST}; mkdir -p ${BUILD_DEST} + +@@ -21,7 +21,7 @@ cd dpdk-16.07 + cp -r ${BUILD_SRC}/dpdk_16.07/debian . + + # copy from debian/control +-sudo apt-get install -y debhelper \ ++sudo apt-get install -y --force-yes debhelper \ + dh-python \ + dh-systemd \ + doxygen \ +@@ -41,9 +41,9 @@ cd ${BUILD_DEST} + sudo dpkg -i *.deb + apt-get download libxenstore3.0 + +-sudo apt-get build-dep openvswitch -y ++sudo apt-get build-dep openvswitch -y --force-yes + # copy from debian/control +-sudo apt-get install -y autoconf \ ++sudo apt-get install -y --force-yes autoconf \ + automake \ + bzip2 \ + debhelper \ +diff --git a/ovs_build/build-ovs-nsh-dpdk.sh b/ovs_build/build-ovs-nsh-dpdk.sh +index 25e4b6c..3751c02 100755 +--- a/ovs_build/build-ovs-nsh-dpdk.sh ++++ b/ovs_build/build-ovs-nsh-dpdk.sh +@@ -11,8 +11,8 @@ DIR="$(dirname `readlink -f $0`)" + + export DEB_BUILD_OPTIONS='parallel=8 nocheck' + +-sudo apt-get build-dep openvswitch -y +-sudo apt-get -y install devscripts dpkg-dev wget ++sudo apt-get build-dep openvswitch -y --force-yes ++sudo apt-get -y --force-yes install devscripts dpkg-dev wget + + rm -rf ${BUILD_HOME}; mkdir -p ${BUILD_HOME} + +@@ -20,7 +20,7 @@ cd ${BUILD_HOME} + dget -x -u https://launchpad.net/ubuntu/+archive/primary/+files/dpdk_2.2.0-0ubuntu8.dsc + + # copy from debian/control +-sudo apt-get install -y debhelper \ ++sudo apt-get install -y --force-yes debhelper \ + dh-python \ + dh-systemd \ + doxygen \ +@@ -49,7 +49,7 @@ cd ${BUILD_HOME} + dget -x -u https://launchpad.net/ubuntu/+archive/primary/+files/openvswitch-dpdk_2.4.0-0ubuntu1.dsc + + # copy from debian/control +-sudo apt-get install -y autoconf \ ++sudo apt-get install -y --force-yes autoconf \ + automake \ + bzip2 \ + debhelper \ diff --git a/patches/fuel-plugin-ovs/0004-build-apt-force-yes.patch b/patches/fuel-plugin-ovs/0004-build-apt-force-yes.patch deleted file mode 100644 index 5b5712d0..00000000 --- a/patches/fuel-plugin-ovs/0004-build-apt-force-yes.patch +++ /dev/null @@ -1,87 +0,0 @@ -From: Alexandru Avadanii -Date: Sat, 3 Sep 2016 20:52:05 +0200 -Subject: [PATCH] build: apt: --force-yes. - -For arm64 builds, some packages are fetched from linux.enea.com, -leading to package version being reported as "older", although in -fact it is newer (dpkg version comparison is not that great with -suffixes). Also, since we don't explicitly add the GPG key of -the linux.enea.com repo yet, apt is complaining about unverified -package sources. - -Bypass the above by using "--force-yes", next to "-y". - -Change-Id: I4899fe62aaad9a13f8b2f9ffbdf2f3631ecba164 -Signed-off-by: Alexandru Avadanii ---- - ovs_build/build-ovs-dpdk.sh | 8 ++++---- - ovs_build/build-ovs-nsh-dpdk.sh | 8 ++++---- - 2 files changed, 8 insertions(+), 8 deletions(-) - -diff --git a/ovs_build/build-ovs-dpdk.sh b/ovs_build/build-ovs-dpdk.sh -index 9e92014..75904f2 100755 ---- a/ovs_build/build-ovs-dpdk.sh -+++ b/ovs_build/build-ovs-dpdk.sh -@@ -10,7 +10,7 @@ BUILD_DEST=${BUILD_DEST:-/tmp/ovs-dpdk} - - export DEB_BUILD_OPTIONS='parallel=8 nocheck' - --sudo apt-get -y install devscripts dpkg-dev wget -+sudo apt-get -y --force-yes install devscripts dpkg-dev wget - - rm -rf ${BUILD_DEST}; mkdir -p ${BUILD_DEST} - -@@ -21,7 +21,7 @@ cd dpdk-16.07 - cp -r ${BUILD_SRC}/dpdk_16.07/debian . - - # copy from debian/control --sudo apt-get install -y debhelper \ -+sudo apt-get install -y --force-yes debhelper \ - dh-python \ - dh-systemd \ - doxygen \ -@@ -41,9 +41,9 @@ cd ${BUILD_DEST} - sudo dpkg -i *.deb - apt-get download libxenstore3.0 - --sudo apt-get build-dep openvswitch -y -+sudo apt-get build-dep openvswitch -y --force-yes - # copy from debian/control --sudo apt-get install -y autoconf \ -+sudo apt-get install -y --force-yes autoconf \ - automake \ - bzip2 \ - debhelper \ -diff --git a/ovs_build/build-ovs-nsh-dpdk.sh b/ovs_build/build-ovs-nsh-dpdk.sh -index ec5eef4..3b84f4c 100755 ---- a/ovs_build/build-ovs-nsh-dpdk.sh -+++ b/ovs_build/build-ovs-nsh-dpdk.sh -@@ -11,8 +11,8 @@ DIR="$(dirname `readlink -f $0`)" - - export DEB_BUILD_OPTIONS='parallel=8 nocheck' - --sudo apt-get build-dep openvswitch -y --sudo apt-get -y install devscripts dpkg-dev wget -+sudo apt-get build-dep openvswitch -y --force-yes -+sudo apt-get -y --force-yes install devscripts dpkg-dev wget - - rm -rf ${BUILD_HOME}; mkdir -p ${BUILD_HOME} - -@@ -20,7 +20,7 @@ cd ${BUILD_HOME} - dget -x -u https://launchpad.net/ubuntu/+archive/primary/+files/dpdk_2.2.0-0ubuntu8.dsc - - # copy from debian/control --sudo apt-get install -y debhelper \ -+sudo apt-get install -y --force-yes debhelper \ - dh-python \ - dh-systemd \ - doxygen \ -@@ -49,7 +49,7 @@ cd ${BUILD_HOME} - dget -x -u https://launchpad.net/ubuntu/+archive/primary/+files/openvswitch-dpdk_2.4.0-0ubuntu1.dsc - - # copy from debian/control --sudo apt-get install -y autoconf \ -+sudo apt-get install -y --force-yes autoconf \ - automake \ - bzip2 \ - debhelper \ diff --git a/patches/fuel-plugin-ovs/0004-pre_build_hook-Introduce-USE_DOCKER-option.patch b/patches/fuel-plugin-ovs/0004-pre_build_hook-Introduce-USE_DOCKER-option.patch new file mode 100644 index 00000000..7df0c5f6 --- /dev/null +++ b/patches/fuel-plugin-ovs/0004-pre_build_hook-Introduce-USE_DOCKER-option.patch @@ -0,0 +1,77 @@ +From: Alexandru Avadanii +Date: Sun, 26 Jun 2016 20:00:22 +0200 +Subject: [PATCH] pre_build_hook: Introduce USE_DOCKER option + +The build system uses Ubuntu Trusty, which is not properly supported +by Docker on AArch64 architecture. +Introduce a new environment variable for enabling/disabling build +containerization, and disable by default said variable for AArch64. + +This requires a slight rework of the pre_build_hook script. + +NOTE: Setting USE_DOCKER to false will build the packages on the host +machine directly. + +AArch64 WARNING: This build will install packages automatically! + +Change-Id: Ib1294949ecc1767f12631a82e2c7099c45fcb615 +Signed-off-by: Alexandru Avadanii +--- + pre_build_hook | 33 +++++++++++++++++++++++---------- + 1 file changed, 23 insertions(+), 10 deletions(-) + +diff --git a/pre_build_hook b/pre_build_hook +index 63cf7b4..b9ae6bb 100755 +--- a/pre_build_hook ++++ b/pre_build_hook +@@ -3,27 +3,40 @@ + set -eux + + BUILD_FOR=${BUILD_FOR:-ubuntu} ++USE_DOCKER=${USE_DOCKER:-true} + DIR="$(dirname `readlink -f $0`)" + ++if [ `uname -m` = 'aarch64' ]; then ++ USE_DOCKER=false ++fi ++ + function build_pkg { + case $1 in + ubuntu) +- rm -rf ${DIR}/repositories/ubuntu; mkdir -p ${DIR}/repositories/ubuntu ++ DEB_DIR=${DIR}/deb-ovs-dpdk ++ DEB_DIR_NSH=${DIR}/deb-ovs-nsh-dpdk ++ ++ rm -rf ${DIR}/repositories/ubuntu ${DEB_DIR} ${DEB_DIR_NSH} ++ mkdir -p ${DIR}/repositories/ubuntu ${DEB_DIR} ${DEB_DIR_NSH} ++ sudo chmod -R 777 ${DEB_DIR} ${DEB_DIR_NSH} + + cd ${DIR}/ovs_build +- sudo docker build -t ovs_build . ++ if [ "${USE_DOCKER}" = true ]; then ++ sudo docker build -t ovs_build . ++ sudo docker run -v ${DEB_DIR}:/deb -t ovs_build /ovs_build/build-ovs-dpdk.sh ++ sudo docker run -v ${DEB_DIR_NSH}:/deb -t ovs_build /ovs_build/build-ovs-nsh-dpdk.sh ++ else ++ rm -rf /tmp/ovs-build-{,nsh-}dpdk; mkdir -p /tmp/ovs-build-{,nsh-}dpdk ++ BUILD_HOME=/tmp/ovs-build-dpdk BUILD_DEB=${DEB_DIR} ./build-ovs-dpdk.sh ++ BUILD_HOME=/tmp/ovs-build-nsh-dpdk BUILD_DEST=${DEB_DIR_NSH} ./build-ovs-nsh-dpdk.sh ++ rm -rf /tmp/ovs-build-{,nsh-}dpdk ++ fi + +- DEB_DIR=${DIR}/deb-ovs-dpdk +- rm -rf ${DEB_DIR}; mkdir -p ${DEB_DIR}; chmod 777 ${DEB_DIR}; +- sudo docker run -v ${DEB_DIR}:/deb -t ovs_build /ovs_build/build-ovs-dpdk.sh + cd ${DEB_DIR}; tar czvf ../repositories/ubuntu/ovs-dpdk.tar.gz .; + cd ..; rm -rf ${DEB_DIR} + +- DEB_DIR=${DIR}/deb-ovs-nsh-dpdk +- rm -rf ${DEB_DIR}; mkdir -p ${DEB_DIR}; chmod 777 ${DEB_DIR}; +- sudo docker run -v ${DEB_DIR}:/deb -t ovs_build /ovs_build/build-ovs-nsh-dpdk.sh +- cd ${DEB_DIR}; tar czvf ../repositories/ubuntu/ovs-nsh-dpdk.tar.gz .; +- cd ..; rm -rf ${DEB_DIR} ++ cd ${DEB_DIR_NSH}; tar czvf ../repositories/ubuntu/ovs-nsh-dpdk.tar.gz .; ++ cd ..; rm -rf ${DEB_DIR_NSH} + + ;; + *) echo "Not supported system"; exit 1;; diff --git a/patches/fuel-plugin-ovs/0005-build-install-pre_build_hook-Prepare-multiarch.patch b/patches/fuel-plugin-ovs/0005-build-install-pre_build_hook-Prepare-multiarch.patch new file mode 100644 index 00000000..da71d8e6 --- /dev/null +++ b/patches/fuel-plugin-ovs/0005-build-install-pre_build_hook-Prepare-multiarch.patch @@ -0,0 +1,381 @@ +From: Alexandru Avadanii +Date: Sun, 26 Jun 2016 20:17:59 +0200 +Subject: [PATCH] build, install, pre_build_hook: Prepare multiarch + +install.sh: Factor out dpkg arch into var, read it from dpkg. +install.sh: Relax DPDK/OVS/OVS-DPDK version hardcodes + +Instead of putting all debs in one archive, and possibly wasting +bandwidth / space with unused foreign packages, split plugin +archive(s) into arch-specific archives, with <_${arch}> suffix. +E.g. for becomes + +Since only one (DPDK/OVS/OVS-DPDK) set of packages is shipped per +archive, we can safely wildcard the installed version of libdpdk, +which previously hardcoded 2.2.0 and 16.04 for NSH/non-NSH. + +This is helpful for arm64, which has a custom deb subversion +for DPDK16.07 and also requires DPDK16.07 for OVS-DPDK-NSH, instead +of 2.2.0. + +Pass UBUNTU_ARCH from pre_build_hook and make install.sh more +arch-independant. + +CHANGE: + UBUNTU_ARCH specifies the complete list of supported architectures + of the resulting RPM, in `dpkg --print-architecture` format. + e.g. UBUNTU_ARCH='arm64 amd64' will result in x86 + AArch64 support + +Change-Id: I04ac0a78319b460270545708efc4b53f02f7dd05 +Signed-off-by: Alexandru Avadanii +--- + deployment_scripts/install.sh | 51 +++++++++++----------- + ovs_build/build-ovs-dpdk.sh | 64 ++++++++++++++++------------ + ovs_build/build-ovs-nsh-dpdk.sh | 93 ++++++++++++++++++++++++----------------- + pre_build_hook | 24 +++++++---- + 4 files changed, 136 insertions(+), 96 deletions(-) + +diff --git a/deployment_scripts/install.sh b/deployment_scripts/install.sh +index efbed72..46d74bb 100644 +--- a/deployment_scripts/install.sh ++++ b/deployment_scripts/install.sh +@@ -9,34 +9,33 @@ host=$1 + nsh=$2 + dpdk=$3 + dpdk_socket_mem=${4:-''} ++arch=$(dpkg --print-architecture) ++ovs="ovs-dpdk_${arch}.tar.gz" + +-if [ $nsh = 'true' ] +-then +- curl http://$host:8080/plugins/fuel-plugin-ovs-0.9/repositories/ubuntu/ovs-nsh-dpdk.tar.gz | tar -xzv +- dpkg -i openvswitch-datapath-dkms_2.5.90-1.nsh_all.deb +- dpkg -i openvswitch-common_2.5.90-1.nsh_amd64.deb +- dpkg -i openvswitch-switch_2.5.90-1.nsh_amd64.deb +- dpkg -i python-openvswitch_2.5.90-1.nsh_all.deb +- if [ $dpdk = 'true' ] +- then ++if [ $nsh = 'true' ]; then ++ ovs="ovs-nsh-dpdk_${arch}.tar.gz" ++fi ++ ++curl http://$host:8080/plugins/fuel-plugin-ovs-0.9/repositories/ubuntu/${ovs} | tar -xzv ++dpkg -i openvswitch-datapath-dkms_*.deb ++dpkg -i openvswitch-common_*.deb ++dpkg -i openvswitch-switch_*.deb ++dpkg -i python-openvswitch_*.deb ++if [ $dpdk = 'true' ]; then ++ if [ $nsh = 'true' -o -n $dpdk_socket_mem ]; then + dpkg -i libxenstore3.0*.deb +- dpkg -i libdpdk0_2.2.0-1_amd64.deb +- dpkg -i dpdk_2.2.0-1_amd64.deb +- dpkg -i openvswitch-switch-dpdk_2.5.90-1.nsh_amd64.deb ++ if [ $arch = 'arm64' ]; then ++ # FIXME(armband): arm64 DPDK ships individual libs, install them all ++ dpdk_deb_name=$(ls dpdk_*) ++ dpdk_deb_suffix=${dpdk_deb_name#dpdk_} ++ dpkg -i *${dpdk_deb_suffix%_*}*.deb ++ else ++ dpkg -i libdpdk0_*.deb ++ dpkg -i dpdk_*.deb ++ fi ++ dpkg -i openvswitch-switch-dpdk_*.deb + fi +-else +- curl http://$host:8080/plugins/fuel-plugin-ovs-0.9/repositories/ubuntu/ovs-dpdk.tar.gz | tar -xzv +- dpkg -i openvswitch-datapath-dkms_2.5.90-1_all.deb +- dpkg -i openvswitch-common_2.5.90-1_amd64.deb +- dpkg -i openvswitch-switch_2.5.90-1_amd64.deb +- dpkg -i python-openvswitch_2.5.90-1_all.deb +- if [[ $dpdk = 'true' && -n $dpdk_socket_mem ]] +- then +- dpkg -i libxenstore3.0*.deb +- dpkg -i libdpdk0_16.07-1_amd64.deb +- dpkg -i dpdk_16.07-1_amd64.deb +- dpkg -i openvswitch-switch-dpdk_2.5.90-1_amd64.deb +- ++ if ! [ $nsh = 'true' -a -n $dpdk_socket_mem ]; then + #Set to 0, dpdk init script mount hugepages but don't change current allocation + sed -i "s/[# ]*\(NR_2M_PAGES=\).*/\10/" /etc/dpdk/dpdk.conf + service dpdk start +@@ -47,3 +46,5 @@ else + service openvswitch-switch restart + fi + fi ++ ++rm -rf $INSTALL_HOME +diff --git a/ovs_build/build-ovs-dpdk.sh b/ovs_build/build-ovs-dpdk.sh +index dd9c6ff..a14f5fd 100755 +--- a/ovs_build/build-ovs-dpdk.sh ++++ b/ovs_build/build-ovs-dpdk.sh +@@ -10,18 +10,27 @@ BUILD_DEST=${BUILD_DEST:-/tmp/ovs-dpdk} + + export DEB_BUILD_OPTIONS='parallel=8 nocheck' + +-sudo apt-get -y --force-yes install devscripts dpkg-dev wget ++# Keep track of native arch (BUILD_ARCH) and target arch(s) (UBUNTU_ARCH) ++# All archs should be represented in `dpkg --print-architecture` format ++# UBUNTU_ARCH holds a space-separated list of target arch(s) ++# FIXME(armband): For now, only native building is supported! ++BUILD_ARCH=$(dpkg --print-architecture) ++UBUNTU_ARCH=${UBUNTU_ARCH:-${BUILD_ARCH}} + +-rm -rf ${BUILD_DEST}; mkdir -p ${BUILD_DEST} ++# Build and/or fetch precompiled packages for all arch(s) in UBUNTU_ARCH ++for ARCH in ${UBUNTU_ARCH}; do ++ rm -rf ${BUILD_DEST}; mkdir -p ${BUILD_DEST}; cd ${BUILD_DEST} ++ if [ ${ARCH} = ${BUILD_ARCH} ]; then ++ # Native building for: DPDK, OVS-DPDK, OVS ++ sudo apt-get -y --force-yes install devscripts dpkg-dev wget + +-cd ${BUILD_DEST} +-wget -c http://fast.dpdk.org/rel/dpdk-16.07.tar.xz +-xz -d dpdk-16.07.tar.xz; tar xvf dpdk-16.07.tar +-cd dpdk-16.07 +-cp -r ${BUILD_SRC}/dpdk_16.07/debian . ++ wget -c http://fast.dpdk.org/rel/dpdk-16.07.tar.xz ++ xz -d dpdk-16.07.tar.xz; tar xvf dpdk-16.07.tar ++ cd dpdk-16.07 ++ cp -r ${BUILD_SRC}/dpdk_16.07/debian . + +-# copy from debian/control +-sudo apt-get install -y --force-yes debhelper \ ++ # DPDK build-dep install: copy from debian/control ++ sudo apt-get install -y --force-yes debhelper \ + dh-python \ + dh-systemd \ + doxygen \ +@@ -35,15 +44,15 @@ sudo apt-get install -y --force-yes debhelper \ + python-sphinx \ + texlive-fonts-recommended \ + texlive-latex-extra +-debian/rules build; fakeroot debian/rules binary ++ debian/rules build; fakeroot debian/rules binary + +-cd ${BUILD_DEST} +-sudo dpkg -i *.deb +-apt-get download libxenstore3.0 ++ cd ${BUILD_DEST} ++ sudo dpkg -i *.deb ++ apt-get download libxenstore3.0 + +-sudo apt-get build-dep openvswitch -y --force-yes +-# copy from debian/control +-sudo apt-get install -y --force-yes autoconf \ ++ sudo apt-get build-dep openvswitch -y --force-yes ++ # OVS-DPDK build-dep install: copy from debian/control ++ sudo apt-get install -y --force-yes autoconf \ + automake \ + bzip2 \ + debhelper \ +@@ -62,16 +71,19 @@ sudo apt-get install -y --force-yes autoconf \ + python-zopeinterface \ + python-six + +-wget -c ${URL_OVS_ARCHIVE}/${OVS_COMMIT}.tar.gz +-tar xzf ${OVS_COMMIT}.tar.gz; mv ovs-${OVS_COMMIT} ovs +-cp -r ovs ovs-dpdk ++ wget -c ${URL_OVS_ARCHIVE}/${OVS_COMMIT}.tar.gz ++ tar xzf ${OVS_COMMIT}.tar.gz; mv ovs-${OVS_COMMIT} ovs ++ cp -r ovs ovs-dpdk + +-cd ovs-dpdk +-cp -r ${BUILD_SRC}/openvswitch-dpdk_2.5.90/debian . +-debian/rules build; fakeroot debian/rules binary ++ cd ovs-dpdk ++ cp -r ${BUILD_SRC}/openvswitch-dpdk_2.5.90/debian . ++ debian/rules build; fakeroot debian/rules binary + +-cd ${BUILD_DEST}/ovs +-debian/rules build; fakeroot debian/rules binary ++ cd ${BUILD_DEST}/ovs ++ debian/rules build; fakeroot debian/rules binary ++ fi + +-cp -r ${BUILD_DEST}/*.deb ${BUILD_DEB} +-rm -rf ${BUILD_DEST} ++ # Store DEBs in <${BUILD_DEB}/${ARCH}/> dir and cleanup ++ rm -rf ${BUILD_DEB}/${ARCH}; mkdir -p ${BUILD_DEB}/${ARCH}; cd ${BUILD_DEB}/${ARCH} ++ cp ${BUILD_DEST}/*.deb .; rm -rf ${BUILD_DEST} ++done +diff --git a/ovs_build/build-ovs-nsh-dpdk.sh b/ovs_build/build-ovs-nsh-dpdk.sh +index 3751c02..a65a2bb 100755 +--- a/ovs_build/build-ovs-nsh-dpdk.sh ++++ b/ovs_build/build-ovs-nsh-dpdk.sh +@@ -11,16 +11,24 @@ DIR="$(dirname `readlink -f $0`)" + + export DEB_BUILD_OPTIONS='parallel=8 nocheck' + +-sudo apt-get build-dep openvswitch -y --force-yes +-sudo apt-get -y --force-yes install devscripts dpkg-dev wget ++# Keep track of native arch (BUILD_ARCH) and target arch(s) (UBUNTU_ARCH) ++# All archs should be represented in `dpkg --print-architecture` format ++# UBUNTU_ARCH holds a space-separated list of target arch(s) ++# FIXME(armband): For now, only native building is supported! ++BUILD_ARCH=$(dpkg --print-architecture) ++UBUNTU_ARCH=${UBUNTU_ARCH:-${BUILD_ARCH}} + +-rm -rf ${BUILD_HOME}; mkdir -p ${BUILD_HOME} ++# Build and/or fetch precompiled packages for all arch(s) in UBUNTU_ARCH ++for ARCH in ${UBUNTU_ARCH}; do ++ rm -rf ${BUILD_HOME}; mkdir -p ${BUILD_HOME}; cd ${BUILD_HOME} ++ if [ ${ARCH} = ${BUILD_ARCH} ]; then ++ # Native building for: DPDK, OVS-DPDK, OVS ++ sudo apt-get build-dep openvswitch -y --force-yes ++ sudo apt-get -y --force-yes install devscripts dpkg-dev wget ++ dget -x -u https://launchpad.net/ubuntu/+archive/primary/+files/dpdk_2.2.0-0ubuntu8.dsc + +-cd ${BUILD_HOME} +-dget -x -u https://launchpad.net/ubuntu/+archive/primary/+files/dpdk_2.2.0-0ubuntu8.dsc +- +-# copy from debian/control +-sudo apt-get install -y --force-yes debhelper \ ++ # DPDK build-dep install: copy from debian/control ++ sudo apt-get install -y --force-yes debhelper \ + dh-python \ + dh-systemd \ + doxygen \ +@@ -35,21 +43,22 @@ sudo apt-get install -y --force-yes debhelper \ + texlive-fonts-recommended \ + texlive-latex-extra + +-cd dpdk-2.2.0; rm -rf debian/patches/ +-cat << EOF > debian/changelog ++ cd dpdk-2.2.0; rm -rf debian/patches/ ++ cat << EOF > debian/changelog + dpdk (2.2.0-1) unstable; urgency=low + * DPDK 2.2.0 + -- DPDK team $(date --rfc-2822) + EOF +-debian/rules build; fakeroot debian/rules binary +-cd ${BUILD_HOME}; sudo dpkg -i *.deb +-apt-get download libxenstore3.0 ++ # DPDK build & install (required for following native build of OVS-NSH) ++ debian/rules build; fakeroot debian/rules binary ++ cd ${BUILD_HOME}; sudo dpkg -i *.deb ++ apt-get download libxenstore3.0 + +-cd ${BUILD_HOME} +-dget -x -u https://launchpad.net/ubuntu/+archive/primary/+files/openvswitch-dpdk_2.4.0-0ubuntu1.dsc ++ cd ${BUILD_HOME} ++ dget -x -u https://launchpad.net/ubuntu/+archive/primary/+files/openvswitch-dpdk_2.4.0-0ubuntu1.dsc + +-# copy from debian/control +-sudo apt-get install -y --force-yes autoconf \ ++ # OVS-NSH build-dep install: copy from debian/control ++ sudo apt-get install -y --force-yes autoconf \ + automake \ + bzip2 \ + debhelper \ +@@ -68,33 +77,41 @@ sudo apt-get install -y --force-yes autoconf \ + python-zopeinterface \ + python-six + +-wget -c ${URL_OVS_ARCHIVE}/${OVS_COMMIT}.tar.gz +-tar xzf ${OVS_COMMIT}.tar.gz; mv ovs-${OVS_COMMIT} ovs +-PATCHES=$(cd ${DIR}/patches; echo *patch) +-for patch in ${PATCHES} +-do +- patch -p1 < ${DIR}/patches/${patch} +-done +-cd ${BUILD_HOME}; tar czvf ovs.tar.gz ovs +-rm -rf openvswitch-dpdk-${OVS_VER}* +-cd openvswitch-dpdk-2.4.0; uupdate -v ${OVS_VER} ../ovs.tar.gz +-cd ../openvswitch-dpdk-${OVS_VER} +-sed -i "s/include\/rte_config.h/include\/dpdk\/rte_config.h/" acinclude.m4 +-sed -i 's/DPDK_INCLUDE=.*/DPDK_INCLUDE=$RTE_SDK\/include\/dpdk/' acinclude.m4 +-autoreconf --install +-rm -rf debian/patches/ +-cat << EOF > debian/changelog ++ # OVS-NSH build preparations: download sources, patch if needed ++ wget -c ${URL_OVS_ARCHIVE}/${OVS_COMMIT}.tar.gz ++ tar xzf ${OVS_COMMIT}.tar.gz; mv ovs-${OVS_COMMIT} ovs; cd ovs ++ ++ # Apply OVS-NSH patches, create a new orig tar archive ++ PATCHES=$(cd ${DIR}/patches; echo *patch) ++ for patch in ${PATCHES} ++ do ++ patch -p1 < ${DIR}/patches/${patch} ++ done ++ cd ${BUILD_HOME}; tar czvf ovs.tar.gz ovs ++ rm -rf openvswitch-dpdk-${OVS_VER}* ++ cd openvswitch-dpdk-2.4.0; uupdate -v ${OVS_VER} ../ovs.tar.gz ++ cd ../openvswitch-dpdk-${OVS_VER} ++ sed -i "s/include\/rte_config.h/include\/dpdk\/rte_config.h/" acinclude.m4 ++ sed -i 's/DPDK_INCLUDE=.*/DPDK_INCLUDE=$RTE_SDK\/include\/dpdk/' acinclude.m4 ++ autoreconf --install ++ rm -rf debian/patches/ ++ cat << EOF > debian/changelog + openvswitch-dpdk (${OVS_VER}-1.nsh) unstable; urgency=low + * Support NSH + -- Open vSwitch team $(date --rfc-2822) + EOF +-debian/rules build; fakeroot debian/rules binary ++ debian/rules build; fakeroot debian/rules binary + +-cd ${BUILD_HOME}/ovs +-cat << EOF > debian/changelog ++ cd ${BUILD_HOME}/ovs ++ cat << EOF > debian/changelog + openvswitch (${OVS_VER}-1.nsh) unstable; urgency=low + * Support NSH + -- Open vSwitch team $(date --rfc-2822) + EOF +-debian/rules build; fakeroot debian/rules binary +-cp ${BUILD_HOME}/*.deb ${BUILD_DEST} ++ debian/rules build; fakeroot debian/rules binary ++ fi ++ ++ # Store DEBs in <${BUILD_DEST}/${ARCH}/> dir and cleanup ++ rm -rf ${BUILD_DEST}/${ARCH}; mkdir -p ${BUILD_DEST}/${ARCH}; cd ${BUILD_DEST}/${ARCH} ++ cp ${BUILD_HOME}/*.deb . ++done +diff --git a/pre_build_hook b/pre_build_hook +index b9ae6bb..3e46a37 100755 +--- a/pre_build_hook ++++ b/pre_build_hook +@@ -10,6 +10,11 @@ if [ `uname -m` = 'aarch64' ]; then + USE_DOCKER=false + fi + ++# Pass target arch(s) (UBUNTU_ARCH) to build scripts. ++# All archs should be represented in `dpkg --print-architecture` format ++# UBUNTU_ARCH holds a space-separated list of target arch(s) ++export UBUNTU_ARCH=${UBUNTU_ARCH:-$(dpkg --print-architecture)} ++ + function build_pkg { + case $1 in + ubuntu) +@@ -23,8 +28,10 @@ function build_pkg { + cd ${DIR}/ovs_build + if [ "${USE_DOCKER}" = true ]; then + sudo docker build -t ovs_build . +- sudo docker run -v ${DEB_DIR}:/deb -t ovs_build /ovs_build/build-ovs-dpdk.sh +- sudo docker run -v ${DEB_DIR_NSH}:/deb -t ovs_build /ovs_build/build-ovs-nsh-dpdk.sh ++ sudo docker run -e "UBUNTU_ARCH=${UBUNTU_ARCH}" -v ${DEB_DIR}:/deb \ ++ -t ovs_build /ovs_build/build-ovs-dpdk.sh ++ sudo docker run -e "UBUNTU_ARCH=${UBUNTU_ARCH}" -v ${DEB_DIR_NSH}:/deb \ ++ -t ovs_build /ovs_build/build-ovs-nsh-dpdk.sh + else + rm -rf /tmp/ovs-build-{,nsh-}dpdk; mkdir -p /tmp/ovs-build-{,nsh-}dpdk + BUILD_HOME=/tmp/ovs-build-dpdk BUILD_DEB=${DEB_DIR} ./build-ovs-dpdk.sh +@@ -32,11 +39,14 @@ function build_pkg { + rm -rf /tmp/ovs-build-{,nsh-}dpdk + fi + +- cd ${DEB_DIR}; tar czvf ../repositories/ubuntu/ovs-dpdk.tar.gz .; +- cd ..; rm -rf ${DEB_DIR} +- +- cd ${DEB_DIR_NSH}; tar czvf ../repositories/ubuntu/ovs-nsh-dpdk.tar.gz .; +- cd ..; rm -rf ${DEB_DIR_NSH} ++ # Gather packages for each arch(s) in UBUNTU_ARCH in a separate archive ++ for ARCH in ${UBUNTU_ARCH}; do ++ cd ${DEB_DIR}/${ARCH} ++ tar czvf ../../repositories/ubuntu/ovs-dpdk_${ARCH}.tar.gz . ++ cd ${DEB_DIR_NSH}/${ARCH} ++ tar czvf ../../repositories/ubuntu/ovs-nsh-dpdk_${ARCH}.tar.gz . ++ done ++ cd ${DIR}; sudo rm -rf ${DEB_DIR} ${DEB_DIR_NSH} + + ;; + *) echo "Not supported system"; exit 1;; diff --git a/patches/fuel-plugin-ovs/0005-pre_build_hook-Introduce-USE_DOCKER-option.patch b/patches/fuel-plugin-ovs/0005-pre_build_hook-Introduce-USE_DOCKER-option.patch deleted file mode 100644 index dbbfefcf..00000000 --- a/patches/fuel-plugin-ovs/0005-pre_build_hook-Introduce-USE_DOCKER-option.patch +++ /dev/null @@ -1,77 +0,0 @@ -From: Alexandru Avadanii -Date: Sun, 26 Jun 2016 20:00:22 +0200 -Subject: [PATCH] pre_build_hook: Introduce USE_DOCKER option - -The build system uses Ubuntu Trusty, which is not properly supported -by Docker on AArch64 architecture. -Introduce a new environment variable for enabling/disabling build -containerization, and disable by default said variable for AArch64. - -This requires a slight rework of the pre_build_hook script. - -NOTE: Setting USE_DOCKER to false will build the packages on the host -machine directly. - -AArch64 WARNING: This build will install packages automatically! - -Change-Id: Ib1294949ecc1767f12631a82e2c7099c45fcb615 -Signed-off-by: Alexandru Avadanii ---- - pre_build_hook | 33 +++++++++++++++++++++++---------- - 1 file changed, 23 insertions(+), 10 deletions(-) - -diff --git a/pre_build_hook b/pre_build_hook -index 63cf7b4..b9ae6bb 100755 ---- a/pre_build_hook -+++ b/pre_build_hook -@@ -3,27 +3,40 @@ - set -eux - - BUILD_FOR=${BUILD_FOR:-ubuntu} -+USE_DOCKER=${USE_DOCKER:-true} - DIR="$(dirname `readlink -f $0`)" - -+if [ `uname -m` = 'aarch64' ]; then -+ USE_DOCKER=false -+fi -+ - function build_pkg { - case $1 in - ubuntu) -- rm -rf ${DIR}/repositories/ubuntu; mkdir -p ${DIR}/repositories/ubuntu -+ DEB_DIR=${DIR}/deb-ovs-dpdk -+ DEB_DIR_NSH=${DIR}/deb-ovs-nsh-dpdk -+ -+ rm -rf ${DIR}/repositories/ubuntu ${DEB_DIR} ${DEB_DIR_NSH} -+ mkdir -p ${DIR}/repositories/ubuntu ${DEB_DIR} ${DEB_DIR_NSH} -+ sudo chmod -R 777 ${DEB_DIR} ${DEB_DIR_NSH} - - cd ${DIR}/ovs_build -- sudo docker build -t ovs_build . -+ if [ "${USE_DOCKER}" = true ]; then -+ sudo docker build -t ovs_build . -+ sudo docker run -v ${DEB_DIR}:/deb -t ovs_build /ovs_build/build-ovs-dpdk.sh -+ sudo docker run -v ${DEB_DIR_NSH}:/deb -t ovs_build /ovs_build/build-ovs-nsh-dpdk.sh -+ else -+ rm -rf /tmp/ovs-build-{,nsh-}dpdk; mkdir -p /tmp/ovs-build-{,nsh-}dpdk -+ BUILD_HOME=/tmp/ovs-build-dpdk BUILD_DEB=${DEB_DIR} ./build-ovs-dpdk.sh -+ BUILD_HOME=/tmp/ovs-build-nsh-dpdk BUILD_DEST=${DEB_DIR_NSH} ./build-ovs-nsh-dpdk.sh -+ rm -rf /tmp/ovs-build-{,nsh-}dpdk -+ fi - -- DEB_DIR=${DIR}/deb-ovs-dpdk -- rm -rf ${DEB_DIR}; mkdir -p ${DEB_DIR}; chmod 777 ${DEB_DIR}; -- sudo docker run -v ${DEB_DIR}:/deb -t ovs_build /ovs_build/build-ovs-dpdk.sh - cd ${DEB_DIR}; tar czvf ../repositories/ubuntu/ovs-dpdk.tar.gz .; - cd ..; rm -rf ${DEB_DIR} - -- DEB_DIR=${DIR}/deb-ovs-nsh-dpdk -- rm -rf ${DEB_DIR}; mkdir -p ${DEB_DIR}; chmod 777 ${DEB_DIR}; -- sudo docker run -v ${DEB_DIR}:/deb -t ovs_build /ovs_build/build-ovs-nsh-dpdk.sh -- cd ${DEB_DIR}; tar czvf ../repositories/ubuntu/ovs-nsh-dpdk.tar.gz .; -- cd ..; rm -rf ${DEB_DIR} -+ cd ${DEB_DIR_NSH}; tar czvf ../repositories/ubuntu/ovs-nsh-dpdk.tar.gz .; -+ cd ..; rm -rf ${DEB_DIR_NSH} - - ;; - *) echo "Not supported system"; exit 1;; diff --git a/patches/fuel-plugin-ovs/0006-AArch64-Add-native-build-support.patch b/patches/fuel-plugin-ovs/0006-AArch64-Add-native-build-support.patch new file mode 100644 index 00000000..b4ca8841 --- /dev/null +++ b/patches/fuel-plugin-ovs/0006-AArch64-Add-native-build-support.patch @@ -0,0 +1,150 @@ +From: Alexandru Avadanii +Date: Mon, 5 Sep 2016 18:56:46 +0200 +Subject: [PATCH] AArch64: Add native build support + +FIXME: OVS-NSH-DPDK is not yet supported on arm64, see [1]. + +[1] https://jira.opnfv.org/browse/ARMBAND-86 + +Signed-off-by: Alexandru Avadanii +--- + ovs_build/build-ovs-dpdk.sh | 19 ++++++++-- + ovs_build/build-ovs-nsh-dpdk.sh | 48 ++++++++++++++---------- + ovs_build/openvswitch-dpdk_2.5.90/debian/control | 2 +- + 3 files changed, 45 insertions(+), 24 deletions(-) + +diff --git a/ovs_build/build-ovs-dpdk.sh b/ovs_build/build-ovs-dpdk.sh +index a14f5fd..a0c50e3 100755 +--- a/ovs_build/build-ovs-dpdk.sh ++++ b/ovs_build/build-ovs-dpdk.sh +@@ -10,6 +10,10 @@ BUILD_DEST=${BUILD_DEST:-/tmp/ovs-dpdk} + + export DEB_BUILD_OPTIONS='parallel=8 nocheck' + ++# AArch64 specifics, repository base URL, debian build versions ++AARCH64_REPO=${AARCH64_REPO:-'https://linux.enea.com/mos-repos/ubuntu/9.0'} ++AARCH64_DPDK_DEBV=${AARCH64_DPDK_DEBV:-'0~u14.04+mos1+mos9.0+amos1'} ++ + # Keep track of native arch (BUILD_ARCH) and target arch(s) (UBUNTU_ARCH) + # All archs should be represented in `dpkg --print-architecture` format + # UBUNTU_ARCH holds a space-separated list of target arch(s) +@@ -24,10 +28,17 @@ for ARCH in ${UBUNTU_ARCH}; do + # Native building for: DPDK, OVS-DPDK, OVS + sudo apt-get -y --force-yes install devscripts dpkg-dev wget + +- wget -c http://fast.dpdk.org/rel/dpdk-16.07.tar.xz +- xz -d dpdk-16.07.tar.xz; tar xvf dpdk-16.07.tar +- cd dpdk-16.07 +- cp -r ${BUILD_SRC}/dpdk_16.07/debian . ++ if [ ${ARCH} = 'arm64' ]; then ++ # Armband: arm64 already has debian control archive for DPDK 16.07 ++ dget -x -u ${AARCH64_REPO}/pool/main/d/dpdk/dpdk_16.07-${AARCH64_DPDK_DEBV}.dsc ++ cd dpdk-16.07 ++ else ++ # Other archs will use the debian control archive in this repo ++ wget -c http://fast.dpdk.org/rel/dpdk-16.07.tar.xz ++ xz -d dpdk-16.07.tar.xz; tar xvf dpdk-16.07.tar ++ cd dpdk-16.07 ++ cp -r ${BUILD_SRC}/dpdk_16.07/debian . ++ fi + + # DPDK build-dep install: copy from debian/control + sudo apt-get install -y --force-yes debhelper \ +diff --git a/ovs_build/build-ovs-nsh-dpdk.sh b/ovs_build/build-ovs-nsh-dpdk.sh +index a65a2bb..59d8a79 100755 +--- a/ovs_build/build-ovs-nsh-dpdk.sh ++++ b/ovs_build/build-ovs-nsh-dpdk.sh +@@ -25,10 +25,12 @@ for ARCH in ${UBUNTU_ARCH}; do + # Native building for: DPDK, OVS-DPDK, OVS + sudo apt-get build-dep openvswitch -y --force-yes + sudo apt-get -y --force-yes install devscripts dpkg-dev wget +- dget -x -u https://launchpad.net/ubuntu/+archive/primary/+files/dpdk_2.2.0-0ubuntu8.dsc + ++ # FIXME(armband): OVS-NSH-DPDK is not yet supported on arm64 + # DPDK build-dep install: copy from debian/control +- sudo apt-get install -y --force-yes debhelper \ ++ if [ ! ${ARCH} = 'arm64' ]; then ++ dget -x -u https://launchpad.net/ubuntu/+archive/primary/+files/dpdk_2.2.0-0ubuntu8.dsc ++ sudo apt-get install -y --force-yes debhelper \ + dh-python \ + dh-systemd \ + doxygen \ +@@ -43,19 +45,20 @@ for ARCH in ${UBUNTU_ARCH}; do + texlive-fonts-recommended \ + texlive-latex-extra + +- cd dpdk-2.2.0; rm -rf debian/patches/ +- cat << EOF > debian/changelog ++ cd dpdk-2.2.0; rm -rf debian/patches/ ++ cat << EOF > debian/changelog + dpdk (2.2.0-1) unstable; urgency=low + * DPDK 2.2.0 + -- DPDK team $(date --rfc-2822) + EOF +- # DPDK build & install (required for following native build of OVS-NSH) +- debian/rules build; fakeroot debian/rules binary +- cd ${BUILD_HOME}; sudo dpkg -i *.deb +- apt-get download libxenstore3.0 ++ # DPDK build & install (required for following native build of OVS-NSH) ++ debian/rules build; fakeroot debian/rules binary ++ cd ${BUILD_HOME}; sudo dpkg -i *.deb ++ apt-get download libxenstore3.0 + +- cd ${BUILD_HOME} +- dget -x -u https://launchpad.net/ubuntu/+archive/primary/+files/openvswitch-dpdk_2.4.0-0ubuntu1.dsc ++ # OVS-NSH-DPDK build preparations: download sources, patch if needed ++ dget -x -u https://launchpad.net/ubuntu/+archive/primary/+files/openvswitch-dpdk_2.4.0-0ubuntu1.dsc ++ fi + + # OVS-NSH build-dep install: copy from debian/control + sudo apt-get install -y --force-yes autoconf \ +@@ -88,20 +91,27 @@ EOF + patch -p1 < ${DIR}/patches/${patch} + done + cd ${BUILD_HOME}; tar czvf ovs.tar.gz ovs +- rm -rf openvswitch-dpdk-${OVS_VER}* +- cd openvswitch-dpdk-2.4.0; uupdate -v ${OVS_VER} ../ovs.tar.gz +- cd ../openvswitch-dpdk-${OVS_VER} +- sed -i "s/include\/rte_config.h/include\/dpdk\/rte_config.h/" acinclude.m4 +- sed -i 's/DPDK_INCLUDE=.*/DPDK_INCLUDE=$RTE_SDK\/include\/dpdk/' acinclude.m4 +- autoreconf --install +- rm -rf debian/patches/ +- cat << EOF > debian/changelog ++ ++ # FIXME(armband): OVS-NSH-DPDK is not yet supported on arm64 ++ if [ ! ${ARCH} = 'arm64' ]; then ++ rm -rf openvswitch-dpdk-${OVS_VER}{,.orig*} ++ cd openvswitch-dpdk-2.4.0 ++ uupdate -v ${OVS_VER} ../ovs.tar.gz ++ cd ${BUILD_HOME}/openvswitch-dpdk-${OVS_VER} ++ sed -i "s/include\/rte_config.h/include\/dpdk\/rte_config.h/" acinclude.m4 ++ sed -i 's/DPDK_INCLUDE=.*/DPDK_INCLUDE=$RTE_SDK\/include\/dpdk/' acinclude.m4 ++ rm -rf debian/patches/ ++ autoreconf --install ++ # OVS-NSH-DPDK build ++ cat << EOF > debian/changelog + openvswitch-dpdk (${OVS_VER}-1.nsh) unstable; urgency=low + * Support NSH + -- Open vSwitch team $(date --rfc-2822) + EOF +- debian/rules build; fakeroot debian/rules binary ++ debian/rules build; fakeroot debian/rules binary ++ fi + ++ # OVS-NSH build + cd ${BUILD_HOME}/ovs + cat << EOF > debian/changelog + openvswitch (${OVS_VER}-1.nsh) unstable; urgency=low +diff --git a/ovs_build/openvswitch-dpdk_2.5.90/debian/control b/ovs_build/openvswitch-dpdk_2.5.90/debian/control +index e7171b9..e0c27c5 100644 +--- a/ovs_build/openvswitch-dpdk_2.5.90/debian/control ++++ b/ovs_build/openvswitch-dpdk_2.5.90/debian/control +@@ -27,7 +27,7 @@ Homepage: http://openvswitch.org/ + XS-Testsuite: autopkgtest + + Package: openvswitch-switch-dpdk +-Architecture: i386 amd64 ++Architecture: i386 amd64 arm64 + Depends: dpdk, + openvswitch-switch (>= 2.4.0), + ${misc:Depends}, diff --git a/patches/fuel-plugin-ovs/0006-build-install-pre_build_hook-Prepare-multiarch.patch b/patches/fuel-plugin-ovs/0006-build-install-pre_build_hook-Prepare-multiarch.patch deleted file mode 100644 index 8ba8dd25..00000000 --- a/patches/fuel-plugin-ovs/0006-build-install-pre_build_hook-Prepare-multiarch.patch +++ /dev/null @@ -1,381 +0,0 @@ -From: Alexandru Avadanii -Date: Sun, 26 Jun 2016 20:17:59 +0200 -Subject: [PATCH] build, install, pre_build_hook: Prepare multiarch - -install.sh: Factor out dpkg arch into var, read it from dpkg. -install.sh: Relax DPDK/OVS/OVS-DPDK version hardcodes - -Instead of putting all debs in one archive, and possibly wasting -bandwidth / space with unused foreign packages, split plugin -archive(s) into arch-specific archives, with <_${arch}> suffix. -E.g. for becomes - -Since only one (DPDK/OVS/OVS-DPDK) set of packages is shipped per -archive, we can safely wildcard the installed version of libdpdk, -which previously hardcoded 2.2.0 and 16.04 for NSH/non-NSH. - -This is helpful for arm64, which has a custom deb subversion -for DPDK16.07 and also requires DPDK16.07 for OVS-DPDK-NSH, instead -of 2.2.0. - -Pass UBUNTU_ARCH from pre_build_hook and make install.sh more -arch-independant. - -CHANGE: - UBUNTU_ARCH specifies the complete list of supported architectures - of the resulting RPM, in `dpkg --print-architecture` format. - e.g. UBUNTU_ARCH='arm64 amd64' will result in x86 + AArch64 support - -Change-Id: I04ac0a78319b460270545708efc4b53f02f7dd05 -Signed-off-by: Alexandru Avadanii ---- - deployment_scripts/install.sh | 51 +++++++++++----------- - ovs_build/build-ovs-dpdk.sh | 64 ++++++++++++++++------------ - ovs_build/build-ovs-nsh-dpdk.sh | 93 ++++++++++++++++++++++++----------------- - pre_build_hook | 24 +++++++---- - 4 files changed, 136 insertions(+), 96 deletions(-) - -diff --git a/deployment_scripts/install.sh b/deployment_scripts/install.sh -index efbed72..46d74bb 100644 ---- a/deployment_scripts/install.sh -+++ b/deployment_scripts/install.sh -@@ -9,34 +9,33 @@ host=$1 - nsh=$2 - dpdk=$3 - dpdk_socket_mem=${4:-''} -+arch=$(dpkg --print-architecture) -+ovs="ovs-dpdk_${arch}.tar.gz" - --if [ $nsh = 'true' ] --then -- curl http://$host:8080/plugins/fuel-plugin-ovs-0.9/repositories/ubuntu/ovs-nsh-dpdk.tar.gz | tar -xzv -- dpkg -i openvswitch-datapath-dkms_2.5.90-1.nsh_all.deb -- dpkg -i openvswitch-common_2.5.90-1.nsh_amd64.deb -- dpkg -i openvswitch-switch_2.5.90-1.nsh_amd64.deb -- dpkg -i python-openvswitch_2.5.90-1.nsh_all.deb -- if [ $dpdk = 'true' ] -- then -+if [ $nsh = 'true' ]; then -+ ovs="ovs-nsh-dpdk_${arch}.tar.gz" -+fi -+ -+curl http://$host:8080/plugins/fuel-plugin-ovs-0.9/repositories/ubuntu/${ovs} | tar -xzv -+dpkg -i openvswitch-datapath-dkms_*.deb -+dpkg -i openvswitch-common_*.deb -+dpkg -i openvswitch-switch_*.deb -+dpkg -i python-openvswitch_*.deb -+if [ $dpdk = 'true' ]; then -+ if [ $nsh = 'true' -o -n $dpdk_socket_mem ]; then - dpkg -i libxenstore3.0*.deb -- dpkg -i libdpdk0_2.2.0-1_amd64.deb -- dpkg -i dpdk_2.2.0-1_amd64.deb -- dpkg -i openvswitch-switch-dpdk_2.5.90-1.nsh_amd64.deb -+ if [ $arch = 'arm64' ]; then -+ # FIXME(armband): arm64 DPDK ships individual libs, install them all -+ dpdk_deb_name=$(ls dpdk_*) -+ dpdk_deb_suffix=${dpdk_deb_name#dpdk_} -+ dpkg -i *${dpdk_deb_suffix%_*}*.deb -+ else -+ dpkg -i libdpdk0_*.deb -+ dpkg -i dpdk_*.deb -+ fi -+ dpkg -i openvswitch-switch-dpdk_*.deb - fi --else -- curl http://$host:8080/plugins/fuel-plugin-ovs-0.9/repositories/ubuntu/ovs-dpdk.tar.gz | tar -xzv -- dpkg -i openvswitch-datapath-dkms_2.5.90-1_all.deb -- dpkg -i openvswitch-common_2.5.90-1_amd64.deb -- dpkg -i openvswitch-switch_2.5.90-1_amd64.deb -- dpkg -i python-openvswitch_2.5.90-1_all.deb -- if [[ $dpdk = 'true' && -n $dpdk_socket_mem ]] -- then -- dpkg -i libxenstore3.0*.deb -- dpkg -i libdpdk0_16.07-1_amd64.deb -- dpkg -i dpdk_16.07-1_amd64.deb -- dpkg -i openvswitch-switch-dpdk_2.5.90-1_amd64.deb -- -+ if ! [ $nsh = 'true' -a -n $dpdk_socket_mem ]; then - #Set to 0, dpdk init script mount hugepages but don't change current allocation - sed -i "s/[# ]*\(NR_2M_PAGES=\).*/\10/" /etc/dpdk/dpdk.conf - service dpdk start -@@ -47,3 +46,5 @@ else - service openvswitch-switch restart - fi - fi -+ -+rm -rf $INSTALL_HOME -diff --git a/ovs_build/build-ovs-dpdk.sh b/ovs_build/build-ovs-dpdk.sh -index dd9c6ff..a14f5fd 100755 ---- a/ovs_build/build-ovs-dpdk.sh -+++ b/ovs_build/build-ovs-dpdk.sh -@@ -10,18 +10,27 @@ BUILD_DEST=${BUILD_DEST:-/tmp/ovs-dpdk} - - export DEB_BUILD_OPTIONS='parallel=8 nocheck' - --sudo apt-get -y --force-yes install devscripts dpkg-dev wget -+# Keep track of native arch (BUILD_ARCH) and target arch(s) (UBUNTU_ARCH) -+# All archs should be represented in `dpkg --print-architecture` format -+# UBUNTU_ARCH holds a space-separated list of target arch(s) -+# FIXME(armband): For now, only native building is supported! -+BUILD_ARCH=$(dpkg --print-architecture) -+UBUNTU_ARCH=${UBUNTU_ARCH:-${BUILD_ARCH}} - --rm -rf ${BUILD_DEST}; mkdir -p ${BUILD_DEST} -+# Build and/or fetch precompiled packages for all arch(s) in UBUNTU_ARCH -+for ARCH in ${UBUNTU_ARCH}; do -+ rm -rf ${BUILD_DEST}; mkdir -p ${BUILD_DEST}; cd ${BUILD_DEST} -+ if [ ${ARCH} = ${BUILD_ARCH} ]; then -+ # Native building for: DPDK, OVS-DPDK, OVS -+ sudo apt-get -y --force-yes install devscripts dpkg-dev wget - --cd ${BUILD_DEST} --wget -c http://fast.dpdk.org/rel/dpdk-16.07.tar.xz --xz -d dpdk-16.07.tar.xz; tar xvf dpdk-16.07.tar --cd dpdk-16.07 --cp -r ${BUILD_SRC}/dpdk_16.07/debian . -+ wget -c http://fast.dpdk.org/rel/dpdk-16.07.tar.xz -+ xz -d dpdk-16.07.tar.xz; tar xvf dpdk-16.07.tar -+ cd dpdk-16.07 -+ cp -r ${BUILD_SRC}/dpdk_16.07/debian . - --# copy from debian/control --sudo apt-get install -y --force-yes debhelper \ -+ # DPDK build-dep install: copy from debian/control -+ sudo apt-get install -y --force-yes debhelper \ - dh-python \ - dh-systemd \ - doxygen \ -@@ -35,15 +44,15 @@ sudo apt-get install -y --force-yes debhelper \ - python-sphinx \ - texlive-fonts-recommended \ - texlive-latex-extra --debian/rules build; fakeroot debian/rules binary -+ debian/rules build; fakeroot debian/rules binary - --cd ${BUILD_DEST} --sudo dpkg -i *.deb --apt-get download libxenstore3.0 -+ cd ${BUILD_DEST} -+ sudo dpkg -i *.deb -+ apt-get download libxenstore3.0 - --sudo apt-get build-dep openvswitch -y --force-yes --# copy from debian/control --sudo apt-get install -y --force-yes autoconf \ -+ sudo apt-get build-dep openvswitch -y --force-yes -+ # OVS-DPDK build-dep install: copy from debian/control -+ sudo apt-get install -y --force-yes autoconf \ - automake \ - bzip2 \ - debhelper \ -@@ -62,16 +71,19 @@ sudo apt-get install -y --force-yes autoconf \ - python-zopeinterface \ - python-six - --wget -c ${URL_OVS_ARCHIVE}/${OVS_COMMIT}.tar.gz --tar xzf ${OVS_COMMIT}.tar.gz; mv ovs-${OVS_COMMIT} ovs --cp -r ovs ovs-dpdk -+ wget -c ${URL_OVS_ARCHIVE}/${OVS_COMMIT}.tar.gz -+ tar xzf ${OVS_COMMIT}.tar.gz; mv ovs-${OVS_COMMIT} ovs -+ cp -r ovs ovs-dpdk - --cd ovs-dpdk --cp -r ${BUILD_SRC}/openvswitch-dpdk_2.5.90/debian . --debian/rules build; fakeroot debian/rules binary -+ cd ovs-dpdk -+ cp -r ${BUILD_SRC}/openvswitch-dpdk_2.5.90/debian . -+ debian/rules build; fakeroot debian/rules binary - --cd ${BUILD_DEST}/ovs --debian/rules build; fakeroot debian/rules binary -+ cd ${BUILD_DEST}/ovs -+ debian/rules build; fakeroot debian/rules binary -+ fi - --cp -r ${BUILD_DEST}/*.deb ${BUILD_DEB} --rm -rf ${BUILD_DEST} -+ # Store DEBs in <${BUILD_DEB}/${ARCH}/> dir and cleanup -+ rm -rf ${BUILD_DEB}/${ARCH}; mkdir -p ${BUILD_DEB}/${ARCH}; cd ${BUILD_DEB}/${ARCH} -+ cp ${BUILD_DEST}/*.deb .; rm -rf ${BUILD_DEST} -+done -diff --git a/ovs_build/build-ovs-nsh-dpdk.sh b/ovs_build/build-ovs-nsh-dpdk.sh -index 3751c02..a65a2bb 100755 ---- a/ovs_build/build-ovs-nsh-dpdk.sh -+++ b/ovs_build/build-ovs-nsh-dpdk.sh -@@ -11,16 +11,24 @@ DIR="$(dirname `readlink -f $0`)" - - export DEB_BUILD_OPTIONS='parallel=8 nocheck' - --sudo apt-get build-dep openvswitch -y --force-yes --sudo apt-get -y --force-yes install devscripts dpkg-dev wget -+# Keep track of native arch (BUILD_ARCH) and target arch(s) (UBUNTU_ARCH) -+# All archs should be represented in `dpkg --print-architecture` format -+# UBUNTU_ARCH holds a space-separated list of target arch(s) -+# FIXME(armband): For now, only native building is supported! -+BUILD_ARCH=$(dpkg --print-architecture) -+UBUNTU_ARCH=${UBUNTU_ARCH:-${BUILD_ARCH}} - --rm -rf ${BUILD_HOME}; mkdir -p ${BUILD_HOME} -+# Build and/or fetch precompiled packages for all arch(s) in UBUNTU_ARCH -+for ARCH in ${UBUNTU_ARCH}; do -+ rm -rf ${BUILD_HOME}; mkdir -p ${BUILD_HOME}; cd ${BUILD_HOME} -+ if [ ${ARCH} = ${BUILD_ARCH} ]; then -+ # Native building for: DPDK, OVS-DPDK, OVS -+ sudo apt-get build-dep openvswitch -y --force-yes -+ sudo apt-get -y --force-yes install devscripts dpkg-dev wget -+ dget -x -u https://launchpad.net/ubuntu/+archive/primary/+files/dpdk_2.2.0-0ubuntu8.dsc - --cd ${BUILD_HOME} --dget -x -u https://launchpad.net/ubuntu/+archive/primary/+files/dpdk_2.2.0-0ubuntu8.dsc -- --# copy from debian/control --sudo apt-get install -y --force-yes debhelper \ -+ # DPDK build-dep install: copy from debian/control -+ sudo apt-get install -y --force-yes debhelper \ - dh-python \ - dh-systemd \ - doxygen \ -@@ -35,21 +43,22 @@ sudo apt-get install -y --force-yes debhelper \ - texlive-fonts-recommended \ - texlive-latex-extra - --cd dpdk-2.2.0; rm -rf debian/patches/ --cat << EOF > debian/changelog -+ cd dpdk-2.2.0; rm -rf debian/patches/ -+ cat << EOF > debian/changelog - dpdk (2.2.0-1) unstable; urgency=low - * DPDK 2.2.0 - -- DPDK team $(date --rfc-2822) - EOF --debian/rules build; fakeroot debian/rules binary --cd ${BUILD_HOME}; sudo dpkg -i *.deb --apt-get download libxenstore3.0 -+ # DPDK build & install (required for following native build of OVS-NSH) -+ debian/rules build; fakeroot debian/rules binary -+ cd ${BUILD_HOME}; sudo dpkg -i *.deb -+ apt-get download libxenstore3.0 - --cd ${BUILD_HOME} --dget -x -u https://launchpad.net/ubuntu/+archive/primary/+files/openvswitch-dpdk_2.4.0-0ubuntu1.dsc -+ cd ${BUILD_HOME} -+ dget -x -u https://launchpad.net/ubuntu/+archive/primary/+files/openvswitch-dpdk_2.4.0-0ubuntu1.dsc - --# copy from debian/control --sudo apt-get install -y --force-yes autoconf \ -+ # OVS-NSH build-dep install: copy from debian/control -+ sudo apt-get install -y --force-yes autoconf \ - automake \ - bzip2 \ - debhelper \ -@@ -68,33 +77,41 @@ sudo apt-get install -y --force-yes autoconf \ - python-zopeinterface \ - python-six - --wget -c ${URL_OVS_ARCHIVE}/${OVS_COMMIT}.tar.gz --tar xzf ${OVS_COMMIT}.tar.gz; mv ovs-${OVS_COMMIT} ovs --PATCHES=$(cd ${DIR}/patches; echo *patch) --for patch in ${PATCHES} --do -- patch -p1 < ${DIR}/patches/${patch} --done --cd ${BUILD_HOME}; tar czvf ovs.tar.gz ovs --rm -rf openvswitch-dpdk-${OVS_VER}* --cd openvswitch-dpdk-2.4.0; uupdate -v ${OVS_VER} ../ovs.tar.gz --cd ../openvswitch-dpdk-${OVS_VER} --sed -i "s/include\/rte_config.h/include\/dpdk\/rte_config.h/" acinclude.m4 --sed -i 's/DPDK_INCLUDE=.*/DPDK_INCLUDE=$RTE_SDK\/include\/dpdk/' acinclude.m4 --autoreconf --install --rm -rf debian/patches/ --cat << EOF > debian/changelog -+ # OVS-NSH build preparations: download sources, patch if needed -+ wget -c ${URL_OVS_ARCHIVE}/${OVS_COMMIT}.tar.gz -+ tar xzf ${OVS_COMMIT}.tar.gz; mv ovs-${OVS_COMMIT} ovs; cd ovs -+ -+ # Apply OVS-NSH patches, create a new orig tar archive -+ PATCHES=$(cd ${DIR}/patches; echo *patch) -+ for patch in ${PATCHES} -+ do -+ patch -p1 < ${DIR}/patches/${patch} -+ done -+ cd ${BUILD_HOME}; tar czvf ovs.tar.gz ovs -+ rm -rf openvswitch-dpdk-${OVS_VER}* -+ cd openvswitch-dpdk-2.4.0; uupdate -v ${OVS_VER} ../ovs.tar.gz -+ cd ../openvswitch-dpdk-${OVS_VER} -+ sed -i "s/include\/rte_config.h/include\/dpdk\/rte_config.h/" acinclude.m4 -+ sed -i 's/DPDK_INCLUDE=.*/DPDK_INCLUDE=$RTE_SDK\/include\/dpdk/' acinclude.m4 -+ autoreconf --install -+ rm -rf debian/patches/ -+ cat << EOF > debian/changelog - openvswitch-dpdk (${OVS_VER}-1.nsh) unstable; urgency=low - * Support NSH - -- Open vSwitch team $(date --rfc-2822) - EOF --debian/rules build; fakeroot debian/rules binary -+ debian/rules build; fakeroot debian/rules binary - --cd ${BUILD_HOME}/ovs --cat << EOF > debian/changelog -+ cd ${BUILD_HOME}/ovs -+ cat << EOF > debian/changelog - openvswitch (${OVS_VER}-1.nsh) unstable; urgency=low - * Support NSH - -- Open vSwitch team $(date --rfc-2822) - EOF --debian/rules build; fakeroot debian/rules binary --cp ${BUILD_HOME}/*.deb ${BUILD_DEST} -+ debian/rules build; fakeroot debian/rules binary -+ fi -+ -+ # Store DEBs in <${BUILD_DEST}/${ARCH}/> dir and cleanup -+ rm -rf ${BUILD_DEST}/${ARCH}; mkdir -p ${BUILD_DEST}/${ARCH}; cd ${BUILD_DEST}/${ARCH} -+ cp ${BUILD_HOME}/*.deb . -+done -diff --git a/pre_build_hook b/pre_build_hook -index b9ae6bb..3e46a37 100755 ---- a/pre_build_hook -+++ b/pre_build_hook -@@ -10,6 +10,11 @@ if [ `uname -m` = 'aarch64' ]; then - USE_DOCKER=false - fi - -+# Pass target arch(s) (UBUNTU_ARCH) to build scripts. -+# All archs should be represented in `dpkg --print-architecture` format -+# UBUNTU_ARCH holds a space-separated list of target arch(s) -+export UBUNTU_ARCH=${UBUNTU_ARCH:-$(dpkg --print-architecture)} -+ - function build_pkg { - case $1 in - ubuntu) -@@ -23,8 +28,10 @@ function build_pkg { - cd ${DIR}/ovs_build - if [ "${USE_DOCKER}" = true ]; then - sudo docker build -t ovs_build . -- sudo docker run -v ${DEB_DIR}:/deb -t ovs_build /ovs_build/build-ovs-dpdk.sh -- sudo docker run -v ${DEB_DIR_NSH}:/deb -t ovs_build /ovs_build/build-ovs-nsh-dpdk.sh -+ sudo docker run -e "UBUNTU_ARCH=${UBUNTU_ARCH}" -v ${DEB_DIR}:/deb \ -+ -t ovs_build /ovs_build/build-ovs-dpdk.sh -+ sudo docker run -e "UBUNTU_ARCH=${UBUNTU_ARCH}" -v ${DEB_DIR_NSH}:/deb \ -+ -t ovs_build /ovs_build/build-ovs-nsh-dpdk.sh - else - rm -rf /tmp/ovs-build-{,nsh-}dpdk; mkdir -p /tmp/ovs-build-{,nsh-}dpdk - BUILD_HOME=/tmp/ovs-build-dpdk BUILD_DEB=${DEB_DIR} ./build-ovs-dpdk.sh -@@ -32,11 +39,14 @@ function build_pkg { - rm -rf /tmp/ovs-build-{,nsh-}dpdk - fi - -- cd ${DEB_DIR}; tar czvf ../repositories/ubuntu/ovs-dpdk.tar.gz .; -- cd ..; rm -rf ${DEB_DIR} -- -- cd ${DEB_DIR_NSH}; tar czvf ../repositories/ubuntu/ovs-nsh-dpdk.tar.gz .; -- cd ..; rm -rf ${DEB_DIR_NSH} -+ # Gather packages for each arch(s) in UBUNTU_ARCH in a separate archive -+ for ARCH in ${UBUNTU_ARCH}; do -+ cd ${DEB_DIR}/${ARCH} -+ tar czvf ../../repositories/ubuntu/ovs-dpdk_${ARCH}.tar.gz . -+ cd ${DEB_DIR_NSH}/${ARCH} -+ tar czvf ../../repositories/ubuntu/ovs-nsh-dpdk_${ARCH}.tar.gz . -+ done -+ cd ${DIR}; sudo rm -rf ${DEB_DIR} ${DEB_DIR_NSH} - - ;; - *) echo "Not supported system"; exit 1;; diff --git a/patches/fuel-plugin-ovs/0007-AArch64-Add-native-build-support.patch b/patches/fuel-plugin-ovs/0007-AArch64-Add-native-build-support.patch deleted file mode 100644 index 1ea672b6..00000000 --- a/patches/fuel-plugin-ovs/0007-AArch64-Add-native-build-support.patch +++ /dev/null @@ -1,150 +0,0 @@ -From: Alexandru Avadanii -Date: Mon, 5 Sep 2016 18:56:46 +0200 -Subject: [PATCH] AArch64: Add native build support - -FIXME: OVS-NSH-DPDK is not yet supported on arm64, see [1]. - -[1] https://jira.opnfv.org/browse/ARMBAND-86 - -Signed-off-by: Alexandru Avadanii ---- - ovs_build/build-ovs-dpdk.sh | 19 ++++++++-- - ovs_build/build-ovs-nsh-dpdk.sh | 48 ++++++++++++++---------- - ovs_build/openvswitch-dpdk_2.5.90/debian/control | 2 +- - 3 files changed, 45 insertions(+), 24 deletions(-) - -diff --git a/ovs_build/build-ovs-dpdk.sh b/ovs_build/build-ovs-dpdk.sh -index a14f5fd..a0c50e3 100755 ---- a/ovs_build/build-ovs-dpdk.sh -+++ b/ovs_build/build-ovs-dpdk.sh -@@ -10,6 +10,10 @@ BUILD_DEST=${BUILD_DEST:-/tmp/ovs-dpdk} - - export DEB_BUILD_OPTIONS='parallel=8 nocheck' - -+# AArch64 specifics, repository base URL, debian build versions -+AARCH64_REPO=${AARCH64_REPO:-'https://linux.enea.com/mos-repos/ubuntu/9.0'} -+AARCH64_DPDK_DEBV=${AARCH64_DPDK_DEBV:-'0~u14.04+mos1+mos9.0+amos1'} -+ - # Keep track of native arch (BUILD_ARCH) and target arch(s) (UBUNTU_ARCH) - # All archs should be represented in `dpkg --print-architecture` format - # UBUNTU_ARCH holds a space-separated list of target arch(s) -@@ -24,10 +28,17 @@ for ARCH in ${UBUNTU_ARCH}; do - # Native building for: DPDK, OVS-DPDK, OVS - sudo apt-get -y --force-yes install devscripts dpkg-dev wget - -- wget -c http://fast.dpdk.org/rel/dpdk-16.07.tar.xz -- xz -d dpdk-16.07.tar.xz; tar xvf dpdk-16.07.tar -- cd dpdk-16.07 -- cp -r ${BUILD_SRC}/dpdk_16.07/debian . -+ if [ ${ARCH} = 'arm64' ]; then -+ # Armband: arm64 already has debian control archive for DPDK 16.07 -+ dget -x -u ${AARCH64_REPO}/pool/main/d/dpdk/dpdk_16.07-${AARCH64_DPDK_DEBV}.dsc -+ cd dpdk-16.07 -+ else -+ # Other archs will use the debian control archive in this repo -+ wget -c http://fast.dpdk.org/rel/dpdk-16.07.tar.xz -+ xz -d dpdk-16.07.tar.xz; tar xvf dpdk-16.07.tar -+ cd dpdk-16.07 -+ cp -r ${BUILD_SRC}/dpdk_16.07/debian . -+ fi - - # DPDK build-dep install: copy from debian/control - sudo apt-get install -y --force-yes debhelper \ -diff --git a/ovs_build/build-ovs-nsh-dpdk.sh b/ovs_build/build-ovs-nsh-dpdk.sh -index a65a2bb..59d8a79 100755 ---- a/ovs_build/build-ovs-nsh-dpdk.sh -+++ b/ovs_build/build-ovs-nsh-dpdk.sh -@@ -25,10 +25,12 @@ for ARCH in ${UBUNTU_ARCH}; do - # Native building for: DPDK, OVS-DPDK, OVS - sudo apt-get build-dep openvswitch -y --force-yes - sudo apt-get -y --force-yes install devscripts dpkg-dev wget -- dget -x -u https://launchpad.net/ubuntu/+archive/primary/+files/dpdk_2.2.0-0ubuntu8.dsc - -+ # FIXME(armband): OVS-NSH-DPDK is not yet supported on arm64 - # DPDK build-dep install: copy from debian/control -- sudo apt-get install -y --force-yes debhelper \ -+ if [ ! ${ARCH} = 'arm64' ]; then -+ dget -x -u https://launchpad.net/ubuntu/+archive/primary/+files/dpdk_2.2.0-0ubuntu8.dsc -+ sudo apt-get install -y --force-yes debhelper \ - dh-python \ - dh-systemd \ - doxygen \ -@@ -43,19 +45,20 @@ for ARCH in ${UBUNTU_ARCH}; do - texlive-fonts-recommended \ - texlive-latex-extra - -- cd dpdk-2.2.0; rm -rf debian/patches/ -- cat << EOF > debian/changelog -+ cd dpdk-2.2.0; rm -rf debian/patches/ -+ cat << EOF > debian/changelog - dpdk (2.2.0-1) unstable; urgency=low - * DPDK 2.2.0 - -- DPDK team $(date --rfc-2822) - EOF -- # DPDK build & install (required for following native build of OVS-NSH) -- debian/rules build; fakeroot debian/rules binary -- cd ${BUILD_HOME}; sudo dpkg -i *.deb -- apt-get download libxenstore3.0 -+ # DPDK build & install (required for following native build of OVS-NSH) -+ debian/rules build; fakeroot debian/rules binary -+ cd ${BUILD_HOME}; sudo dpkg -i *.deb -+ apt-get download libxenstore3.0 - -- cd ${BUILD_HOME} -- dget -x -u https://launchpad.net/ubuntu/+archive/primary/+files/openvswitch-dpdk_2.4.0-0ubuntu1.dsc -+ # OVS-NSH-DPDK build preparations: download sources, patch if needed -+ dget -x -u https://launchpad.net/ubuntu/+archive/primary/+files/openvswitch-dpdk_2.4.0-0ubuntu1.dsc -+ fi - - # OVS-NSH build-dep install: copy from debian/control - sudo apt-get install -y --force-yes autoconf \ -@@ -88,20 +91,27 @@ EOF - patch -p1 < ${DIR}/patches/${patch} - done - cd ${BUILD_HOME}; tar czvf ovs.tar.gz ovs -- rm -rf openvswitch-dpdk-${OVS_VER}* -- cd openvswitch-dpdk-2.4.0; uupdate -v ${OVS_VER} ../ovs.tar.gz -- cd ../openvswitch-dpdk-${OVS_VER} -- sed -i "s/include\/rte_config.h/include\/dpdk\/rte_config.h/" acinclude.m4 -- sed -i 's/DPDK_INCLUDE=.*/DPDK_INCLUDE=$RTE_SDK\/include\/dpdk/' acinclude.m4 -- autoreconf --install -- rm -rf debian/patches/ -- cat << EOF > debian/changelog -+ -+ # FIXME(armband): OVS-NSH-DPDK is not yet supported on arm64 -+ if [ ! ${ARCH} = 'arm64' ]; then -+ rm -rf openvswitch-dpdk-${OVS_VER}{,.orig*} -+ cd openvswitch-dpdk-2.4.0 -+ uupdate -v ${OVS_VER} ../ovs.tar.gz -+ cd ${BUILD_HOME}/openvswitch-dpdk-${OVS_VER} -+ sed -i "s/include\/rte_config.h/include\/dpdk\/rte_config.h/" acinclude.m4 -+ sed -i 's/DPDK_INCLUDE=.*/DPDK_INCLUDE=$RTE_SDK\/include\/dpdk/' acinclude.m4 -+ rm -rf debian/patches/ -+ autoreconf --install -+ # OVS-NSH-DPDK build -+ cat << EOF > debian/changelog - openvswitch-dpdk (${OVS_VER}-1.nsh) unstable; urgency=low - * Support NSH - -- Open vSwitch team $(date --rfc-2822) - EOF -- debian/rules build; fakeroot debian/rules binary -+ debian/rules build; fakeroot debian/rules binary -+ fi - -+ # OVS-NSH build - cd ${BUILD_HOME}/ovs - cat << EOF > debian/changelog - openvswitch (${OVS_VER}-1.nsh) unstable; urgency=low -diff --git a/ovs_build/openvswitch-dpdk_2.5.90/debian/control b/ovs_build/openvswitch-dpdk_2.5.90/debian/control -index e7171b9..e0c27c5 100644 ---- a/ovs_build/openvswitch-dpdk_2.5.90/debian/control -+++ b/ovs_build/openvswitch-dpdk_2.5.90/debian/control -@@ -27,7 +27,7 @@ Homepage: http://openvswitch.org/ - XS-Testsuite: autopkgtest - - Package: openvswitch-switch-dpdk --Architecture: i386 amd64 -+Architecture: i386 amd64 arm64 - Depends: dpdk, - openvswitch-switch (>= 2.4.0), - ${misc:Depends}, diff --git a/patches/fuel-plugin-ovs/0007-AArch64-Add-support-for-downloading-prebuilt-DEBs.patch b/patches/fuel-plugin-ovs/0007-AArch64-Add-support-for-downloading-prebuilt-DEBs.patch new file mode 100644 index 00000000..deb1d59a --- /dev/null +++ b/patches/fuel-plugin-ovs/0007-AArch64-Add-support-for-downloading-prebuilt-DEBs.patch @@ -0,0 +1,139 @@ +From: Alexandru Avadanii +Date: Mon, 12 Sep 2016 18:02:42 +0200 +Subject: [PATCH] AArch64: Add support for downloading prebuilt DEBs + +Signed-off-by: Alexandru Avadanii +--- + ovs_build/build-ovs-armband-fetch.sh | 45 ++++++++++++++++++++++++++++++++++++ + ovs_build/build-ovs-dpdk.sh | 18 ++++++++++++++- + ovs_build/build-ovs-nsh-dpdk.sh | 15 +++++++++++- + 3 files changed, 76 insertions(+), 2 deletions(-) + create mode 100755 ovs_build/build-ovs-armband-fetch.sh + +diff --git a/ovs_build/build-ovs-armband-fetch.sh b/ovs_build/build-ovs-armband-fetch.sh +new file mode 100755 +index 0000000..a810b93 +--- /dev/null ++++ b/ovs_build/build-ovs-armband-fetch.sh +@@ -0,0 +1,45 @@ ++#!/bin/bash ++ ++set -eux ++ ++# armband_fetch will download all binaries for one debian source package ++# ++# Usage: ++# armband_fetch \ ++# [ \ ++# [ \ ++# []]] \ ++# ++# e.g.: ++# armband_fetch dpdk 16.07-0~u14.04+mos1+mos9.0+amos1 \ ++# https://linux.enea.com/mos-repos/ubuntu/9.0 \ ++# dists/mos9.0-fuel-plugin-ovs/main/source/Sources \ ++# dists/mos9.0-fuel-plugin-ovs/main/binary-arm64/Packages ++function armband_fetch() { ++ local name=$1 ++ local ver=${2//\+/\\\+} ++ local repo_base_url=${3:-http://linux.enea.com/mos-repos/ubuntu/9.0} ++ local repo_Sources_url=${4:-dists/mos9.0-fuel-plugin-ovs/main/source/Sources} ++ local repo_Packages_url=${5:-dists/mos9.0-fuel-plugin-ovs/main/binary-arm64/Packages} ++ local found=false ++ ++ # Fetch Sources & Packages files if not already present ++ if [ ! -f Sources -o ! -f Packages ]; then ++ sudo apt-get -y --force-yes install wget ++ wget -c "${repo_base_url}/${repo_Sources_url}" ++ wget -c "${repo_base_url}/${repo_Packages_url}" ++ fi ++ ++ L=$(grep -Pzo "(?s)(?<=^Package: ${name}\n^Binary: )(\N*?)(?=\n^Version: ${ver})" \ ++ Sources | tr -d ',') ++ for deb_binary in ${L}; do ++ D=$(grep -Po "(?<=^Filename: )(.*?\/${deb_binary}_${ver}_.*?\.deb)" Packages) || true ++ if [ -n "${D}" ]; then ++ wget -c "${repo_base_url}/${D}" && found=true ++ fi ++ done ++ if [ ${found} = false ]; then ++ echo "ERROR: Could not find DEBs for pkg/ver: ${name}/${ver}" ++ exit 1 ++ fi ++} +diff --git a/ovs_build/build-ovs-dpdk.sh b/ovs_build/build-ovs-dpdk.sh +index a0c50e3..8d70265 100755 +--- a/ovs_build/build-ovs-dpdk.sh ++++ b/ovs_build/build-ovs-dpdk.sh +@@ -13,11 +13,13 @@ export DEB_BUILD_OPTIONS='parallel=8 nocheck' + # AArch64 specifics, repository base URL, debian build versions + AARCH64_REPO=${AARCH64_REPO:-'https://linux.enea.com/mos-repos/ubuntu/9.0'} + AARCH64_DPDK_DEBV=${AARCH64_DPDK_DEBV:-'0~u14.04+mos1+mos9.0+amos1'} ++AARCH64_OVS_DEBV=${AARCH64_OVS_DEBV:-'2.5.90-1'} + + # Keep track of native arch (BUILD_ARCH) and target arch(s) (UBUNTU_ARCH) + # All archs should be represented in `dpkg --print-architecture` format + # UBUNTU_ARCH holds a space-separated list of target arch(s) +-# FIXME(armband): For now, only native building is supported! ++# FIXME(armband): For now, only native building and/or downloading prebuilt ++# debian binaries is supported! + BUILD_ARCH=$(dpkg --print-architecture) + UBUNTU_ARCH=${UBUNTU_ARCH:-${BUILD_ARCH}} + +@@ -92,6 +94,20 @@ for ARCH in ${UBUNTU_ARCH}; do + + cd ${BUILD_DEST}/ovs + debian/rules build; fakeroot debian/rules binary ++ else ++ # FIXME(armband): No cross-build support yet, download prebuilt DEBs ++ if [ ${ARCH} = 'arm64' ]; then ++ source ${BUILD_SRC}/build-ovs-armband-fetch.sh ++ # Fetch Sources/Packages from Armband and construct list of packages to download ++ armband_fetch 'dpdk' "16.07-${AARCH64_DPDK_DEBV}" ++ armband_fetch 'openvswitch-dpdk' "${AARCH64_OVS_DEBV}" ++ armband_fetch 'openvswitch' "${AARCH64_OVS_DEBV}" ++ # libxenstore (equivalent to `apt-get download` for native build) ++ AARCH64_LIBXENSTORE='libxenstore3.0_4.4.2-0ubuntu0.14.04.6_arm64.deb' ++ wget -c "http://ports.ubuntu.com/pool/main/x/xen/${AARCH64_LIBXENSTORE}" ++ else ++ echo "WARNING: Architecture [${ARCH}] does not provide precompiled DEBs, skipping!" ++ fi + fi + + # Store DEBs in <${BUILD_DEB}/${ARCH}/> dir and cleanup +diff --git a/ovs_build/build-ovs-nsh-dpdk.sh b/ovs_build/build-ovs-nsh-dpdk.sh +index 59d8a79..9d8a837 100755 +--- a/ovs_build/build-ovs-nsh-dpdk.sh ++++ b/ovs_build/build-ovs-nsh-dpdk.sh +@@ -11,10 +11,14 @@ DIR="$(dirname `readlink -f $0`)" + + export DEB_BUILD_OPTIONS='parallel=8 nocheck' + ++# AArch64 specifics, repository base URL, debian build versions ++AARCH64_OVS_NSH_DEBV=${AARCH64_OVS_NSH_DEBV:-'2.5.90-1.nsh'} ++ + # Keep track of native arch (BUILD_ARCH) and target arch(s) (UBUNTU_ARCH) + # All archs should be represented in `dpkg --print-architecture` format + # UBUNTU_ARCH holds a space-separated list of target arch(s) +-# FIXME(armband): For now, only native building is supported! ++# FIXME(armband): For now, only native building and/or downloading prebuilt ++# debian binaries is supported! + BUILD_ARCH=$(dpkg --print-architecture) + UBUNTU_ARCH=${UBUNTU_ARCH:-${BUILD_ARCH}} + +@@ -119,6 +123,15 @@ openvswitch (${OVS_VER}-1.nsh) unstable; urgency=low + -- Open vSwitch team $(date --rfc-2822) + EOF + debian/rules build; fakeroot debian/rules binary ++ else ++ # FIXME(armband): No cross-build support yet, download prebuilt DEBs ++ if [ ${ARCH} = 'arm64' ]; then ++ source ${DIR}/build-ovs-armband-fetch.sh ++ # FIXME(armband): https://jira.opnfv.org/browse/ARMBAND-86 ++ armband_fetch 'openvswitch' "${AARCH64_OVS_NSH_DEBV}" ++ else ++ echo "WARNING: Architecture [${ARCH}] does not provide precompiled DEBs, skipping!" ++ fi + fi + + # Store DEBs in <${BUILD_DEST}/${ARCH}/> dir and cleanup diff --git a/patches/fuel-plugin-ovs/0008-AArch64-Add-support-for-downloading-prebuilt-DEBs.patch b/patches/fuel-plugin-ovs/0008-AArch64-Add-support-for-downloading-prebuilt-DEBs.patch deleted file mode 100644 index 0f7e072c..00000000 --- a/patches/fuel-plugin-ovs/0008-AArch64-Add-support-for-downloading-prebuilt-DEBs.patch +++ /dev/null @@ -1,139 +0,0 @@ -From: Alexandru Avadanii -Date: Mon, 12 Sep 2016 18:02:42 +0200 -Subject: [PATCH] AArch64: Add support for downloading prebuilt DEBs - -Signed-off-by: Alexandru Avadanii ---- - ovs_build/build-ovs-armband-fetch.sh | 45 ++++++++++++++++++++++++++++++++++++ - ovs_build/build-ovs-dpdk.sh | 18 ++++++++++++++- - ovs_build/build-ovs-nsh-dpdk.sh | 15 +++++++++++- - 3 files changed, 76 insertions(+), 2 deletions(-) - create mode 100755 ovs_build/build-ovs-armband-fetch.sh - -diff --git a/ovs_build/build-ovs-armband-fetch.sh b/ovs_build/build-ovs-armband-fetch.sh -new file mode 100755 -index 0000000..a810b93 ---- /dev/null -+++ b/ovs_build/build-ovs-armband-fetch.sh -@@ -0,0 +1,45 @@ -+#!/bin/bash -+ -+set -eux -+ -+# armband_fetch will download all binaries for one debian source package -+# -+# Usage: -+# armband_fetch \ -+# [ \ -+# [ \ -+# []]] \ -+# -+# e.g.: -+# armband_fetch dpdk 16.07-0~u14.04+mos1+mos9.0+amos1 \ -+# https://linux.enea.com/mos-repos/ubuntu/9.0 \ -+# dists/mos9.0-fuel-plugin-ovs/main/source/Sources \ -+# dists/mos9.0-fuel-plugin-ovs/main/binary-arm64/Packages -+function armband_fetch() { -+ local name=$1 -+ local ver=${2//\+/\\\+} -+ local repo_base_url=${3:-http://linux.enea.com/mos-repos/ubuntu/9.0} -+ local repo_Sources_url=${4:-dists/mos9.0-fuel-plugin-ovs/main/source/Sources} -+ local repo_Packages_url=${5:-dists/mos9.0-fuel-plugin-ovs/main/binary-arm64/Packages} -+ local found=false -+ -+ # Fetch Sources & Packages files if not already present -+ if [ ! -f Sources -o ! -f Packages ]; then -+ sudo apt-get -y --force-yes install wget -+ wget -c "${repo_base_url}/${repo_Sources_url}" -+ wget -c "${repo_base_url}/${repo_Packages_url}" -+ fi -+ -+ L=$(grep -Pzo "(?s)(?<=^Package: ${name}\n^Binary: )(\N*?)(?=\n^Version: ${ver})" \ -+ Sources | tr -d ',') -+ for deb_binary in ${L}; do -+ D=$(grep -Po "(?<=^Filename: )(.*?\/${deb_binary}_${ver}_.*?\.deb)" Packages) || true -+ if [ -n "${D}" ]; then -+ wget -c "${repo_base_url}/${D}" && found=true -+ fi -+ done -+ if [ ${found} = false ]; then -+ echo "ERROR: Could not find DEBs for pkg/ver: ${name}/${ver}" -+ exit 1 -+ fi -+} -diff --git a/ovs_build/build-ovs-dpdk.sh b/ovs_build/build-ovs-dpdk.sh -index a0c50e3..8d70265 100755 ---- a/ovs_build/build-ovs-dpdk.sh -+++ b/ovs_build/build-ovs-dpdk.sh -@@ -13,11 +13,13 @@ export DEB_BUILD_OPTIONS='parallel=8 nocheck' - # AArch64 specifics, repository base URL, debian build versions - AARCH64_REPO=${AARCH64_REPO:-'https://linux.enea.com/mos-repos/ubuntu/9.0'} - AARCH64_DPDK_DEBV=${AARCH64_DPDK_DEBV:-'0~u14.04+mos1+mos9.0+amos1'} -+AARCH64_OVS_DEBV=${AARCH64_OVS_DEBV:-'2.5.90-1'} - - # Keep track of native arch (BUILD_ARCH) and target arch(s) (UBUNTU_ARCH) - # All archs should be represented in `dpkg --print-architecture` format - # UBUNTU_ARCH holds a space-separated list of target arch(s) --# FIXME(armband): For now, only native building is supported! -+# FIXME(armband): For now, only native building and/or downloading prebuilt -+# debian binaries is supported! - BUILD_ARCH=$(dpkg --print-architecture) - UBUNTU_ARCH=${UBUNTU_ARCH:-${BUILD_ARCH}} - -@@ -92,6 +94,20 @@ for ARCH in ${UBUNTU_ARCH}; do - - cd ${BUILD_DEST}/ovs - debian/rules build; fakeroot debian/rules binary -+ else -+ # FIXME(armband): No cross-build support yet, download prebuilt DEBs -+ if [ ${ARCH} = 'arm64' ]; then -+ source ${BUILD_SRC}/build-ovs-armband-fetch.sh -+ # Fetch Sources/Packages from Armband and construct list of packages to download -+ armband_fetch 'dpdk' "16.07-${AARCH64_DPDK_DEBV}" -+ armband_fetch 'openvswitch-dpdk' "${AARCH64_OVS_DEBV}" -+ armband_fetch 'openvswitch' "${AARCH64_OVS_DEBV}" -+ # libxenstore (equivalent to `apt-get download` for native build) -+ AARCH64_LIBXENSTORE='libxenstore3.0_4.4.2-0ubuntu0.14.04.6_arm64.deb' -+ wget -c "http://ports.ubuntu.com/pool/main/x/xen/${AARCH64_LIBXENSTORE}" -+ else -+ echo "WARNING: Architecture [${ARCH}] does not provide precompiled DEBs, skipping!" -+ fi - fi - - # Store DEBs in <${BUILD_DEB}/${ARCH}/> dir and cleanup -diff --git a/ovs_build/build-ovs-nsh-dpdk.sh b/ovs_build/build-ovs-nsh-dpdk.sh -index 59d8a79..9d8a837 100755 ---- a/ovs_build/build-ovs-nsh-dpdk.sh -+++ b/ovs_build/build-ovs-nsh-dpdk.sh -@@ -11,10 +11,14 @@ DIR="$(dirname `readlink -f $0`)" - - export DEB_BUILD_OPTIONS='parallel=8 nocheck' - -+# AArch64 specifics, repository base URL, debian build versions -+AARCH64_OVS_NSH_DEBV=${AARCH64_OVS_NSH_DEBV:-'2.5.90-1.nsh'} -+ - # Keep track of native arch (BUILD_ARCH) and target arch(s) (UBUNTU_ARCH) - # All archs should be represented in `dpkg --print-architecture` format - # UBUNTU_ARCH holds a space-separated list of target arch(s) --# FIXME(armband): For now, only native building is supported! -+# FIXME(armband): For now, only native building and/or downloading prebuilt -+# debian binaries is supported! - BUILD_ARCH=$(dpkg --print-architecture) - UBUNTU_ARCH=${UBUNTU_ARCH:-${BUILD_ARCH}} - -@@ -119,6 +123,15 @@ openvswitch (${OVS_VER}-1.nsh) unstable; urgency=low - -- Open vSwitch team $(date --rfc-2822) - EOF - debian/rules build; fakeroot debian/rules binary -+ else -+ # FIXME(armband): No cross-build support yet, download prebuilt DEBs -+ if [ ${ARCH} = 'arm64' ]; then -+ source ${DIR}/build-ovs-armband-fetch.sh -+ # FIXME(armband): https://jira.opnfv.org/browse/ARMBAND-86 -+ armband_fetch 'openvswitch' "${AARCH64_OVS_NSH_DEBV}" -+ else -+ echo "WARNING: Architecture [${ARCH}] does not provide precompiled DEBs, skipping!" -+ fi - fi - - # Store DEBs in <${BUILD_DEST}/${ARCH}/> dir and cleanup diff --git a/patches/fuel-plugin-ovs/0008-build-docker-Use-host-s-network-stack.patch b/patches/fuel-plugin-ovs/0008-build-docker-Use-host-s-network-stack.patch new file mode 100644 index 00000000..e0606819 --- /dev/null +++ b/patches/fuel-plugin-ovs/0008-build-docker-Use-host-s-network-stack.patch @@ -0,0 +1,30 @@ +From: Alexandru Avadanii +Date: Thu, 15 Sep 2016 19:16:34 +0200 +Subject: [PATCH] build: docker: Use host's network stack + +Similar to Fuel@OPNFV build process, we want to mount /etc/hosts +in the builder container to be able to use local mirror caches. + +Signed-off-by: Alexandru Avadanii +--- + pre_build_hook | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/pre_build_hook b/pre_build_hook +index 3e46a37..4866219 100755 +--- a/pre_build_hook ++++ b/pre_build_hook +@@ -28,9 +28,11 @@ function build_pkg { + cd ${DIR}/ovs_build + if [ "${USE_DOCKER}" = true ]; then + sudo docker build -t ovs_build . +- sudo docker run -e "UBUNTU_ARCH=${UBUNTU_ARCH}" -v ${DEB_DIR}:/deb \ ++ sudo docker run -e "UBUNTU_ARCH=${UBUNTU_ARCH}" \ ++ -v ${DEB_DIR}:/deb -v /etc/hosts:/etc/hosts \ + -t ovs_build /ovs_build/build-ovs-dpdk.sh +- sudo docker run -e "UBUNTU_ARCH=${UBUNTU_ARCH}" -v ${DEB_DIR_NSH}:/deb \ ++ sudo docker run -e "UBUNTU_ARCH=${UBUNTU_ARCH}" \ ++ -v ${DEB_DIR_NSH}:/deb -v /etc/hosts:/etc/hosts \ + -t ovs_build /ovs_build/build-ovs-nsh-dpdk.sh + else + rm -rf /tmp/ovs-build-{,nsh-}dpdk; mkdir -p /tmp/ovs-build-{,nsh-}dpdk diff --git a/patches/fuel-plugin-ovs/0009-HACK-build-prebuilt-DEBs-src-bin-ver-mismatch.patch b/patches/fuel-plugin-ovs/0009-HACK-build-prebuilt-DEBs-src-bin-ver-mismatch.patch new file mode 100644 index 00000000..bea8a059 --- /dev/null +++ b/patches/fuel-plugin-ovs/0009-HACK-build-prebuilt-DEBs-src-bin-ver-mismatch.patch @@ -0,0 +1,72 @@ +From: Alexandru Avadanii +Date: Thu, 15 Sep 2016 19:41:58 +0200 +Subject: [PATCH] HACK: build: prebuilt DEBs: src/bin ver mismatch + +Our debian source version is not always in sync with the debian +binaries versions, see related bug for a complete description of +this issue. + +This is a temporary chance which should be dropped once the package +versions are aligned. + +Related-bug: ARMBAND-89 +Signed-off-by: Alexandru Avadanii +--- + ovs_build/build-ovs-armband-fetch.sh | 16 ++++++++++++---- + ovs_build/build-ovs-nsh-dpdk.sh | 2 +- + 2 files changed, 13 insertions(+), 5 deletions(-) + +diff --git a/ovs_build/build-ovs-armband-fetch.sh b/ovs_build/build-ovs-armband-fetch.sh +index a810b93..8ab22cc 100755 +--- a/ovs_build/build-ovs-armband-fetch.sh ++++ b/ovs_build/build-ovs-armband-fetch.sh +@@ -17,7 +17,7 @@ set -eux + # dists/mos9.0-fuel-plugin-ovs/main/binary-arm64/Packages + function armband_fetch() { + local name=$1 +- local ver=${2//\+/\\\+} ++ local src_ver=${2//\+/\\\+} + local repo_base_url=${3:-http://linux.enea.com/mos-repos/ubuntu/9.0} + local repo_Sources_url=${4:-dists/mos9.0-fuel-plugin-ovs/main/source/Sources} + local repo_Packages_url=${5:-dists/mos9.0-fuel-plugin-ovs/main/binary-arm64/Packages} +@@ -30,16 +30,24 @@ function armband_fetch() { + wget -c "${repo_base_url}/${repo_Packages_url}" + fi + +- L=$(grep -Pzo "(?s)(?<=^Package: ${name}\n^Binary: )(\N*?)(?=\n^Version: ${ver})" \ ++ L=$(grep -Pzo "(?s)(?<=^Package: ${name}\n^Binary: )(\N*?)(?=\n^Version: ${src_ver})" \ + Sources | tr -d ',') + for deb_binary in ${L}; do +- D=$(grep -Po "(?<=^Filename: )(.*?\/${deb_binary}_${ver}_.*?\.deb)" Packages) || true ++ # FIXME(armband): https://jira.opnfv.org/browse/ARMBAND-89 ++ # Until we align source and binaries versions for nsh, convert on the fly ++ # e.g.: debian source 2.5.90~04.05-1.nsh+amos2 => debian binary 2.5.90-1.nsh ++ deb_ver=${src_ver} ++ if [[ ${deb_ver} == *~*-* ]]; then ++ deb_ver=${deb_ver//~*-/-} ++ deb_ver=${deb_ver%\\\+*} ++ fi ++ D=$(grep -Po "(?<=^Filename: )(.*?\/${deb_binary}_${deb_ver}_.*?\.deb)" Packages) || true + if [ -n "${D}" ]; then + wget -c "${repo_base_url}/${D}" && found=true + fi + done + if [ ${found} = false ]; then +- echo "ERROR: Could not find DEBs for pkg/ver: ${name}/${ver}" ++ echo "ERROR: Could not find DEBs for pkg|src_ver|deb_ver: ${name}|${src_ver}|${deb_ver}" + exit 1 + fi + } +diff --git a/ovs_build/build-ovs-nsh-dpdk.sh b/ovs_build/build-ovs-nsh-dpdk.sh +index 9d8a837..aebcb94 100755 +--- a/ovs_build/build-ovs-nsh-dpdk.sh ++++ b/ovs_build/build-ovs-nsh-dpdk.sh +@@ -12,7 +12,7 @@ DIR="$(dirname `readlink -f $0`)" + export DEB_BUILD_OPTIONS='parallel=8 nocheck' + + # AArch64 specifics, repository base URL, debian build versions +-AARCH64_OVS_NSH_DEBV=${AARCH64_OVS_NSH_DEBV:-'2.5.90-1.nsh'} ++AARCH64_OVS_NSH_DEBV=${AARCH64_OVS_NSH_DEBV:-'2.5.90~04.05-1.nsh+amos2'} + + # Keep track of native arch (BUILD_ARCH) and target arch(s) (UBUNTU_ARCH) + # All archs should be represented in `dpkg --print-architecture` format diff --git a/patches/fuel-plugin-ovs/0009-build-docker-Use-host-s-network-stack.patch b/patches/fuel-plugin-ovs/0009-build-docker-Use-host-s-network-stack.patch deleted file mode 100644 index e0606819..00000000 --- a/patches/fuel-plugin-ovs/0009-build-docker-Use-host-s-network-stack.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: Alexandru Avadanii -Date: Thu, 15 Sep 2016 19:16:34 +0200 -Subject: [PATCH] build: docker: Use host's network stack - -Similar to Fuel@OPNFV build process, we want to mount /etc/hosts -in the builder container to be able to use local mirror caches. - -Signed-off-by: Alexandru Avadanii ---- - pre_build_hook | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/pre_build_hook b/pre_build_hook -index 3e46a37..4866219 100755 ---- a/pre_build_hook -+++ b/pre_build_hook -@@ -28,9 +28,11 @@ function build_pkg { - cd ${DIR}/ovs_build - if [ "${USE_DOCKER}" = true ]; then - sudo docker build -t ovs_build . -- sudo docker run -e "UBUNTU_ARCH=${UBUNTU_ARCH}" -v ${DEB_DIR}:/deb \ -+ sudo docker run -e "UBUNTU_ARCH=${UBUNTU_ARCH}" \ -+ -v ${DEB_DIR}:/deb -v /etc/hosts:/etc/hosts \ - -t ovs_build /ovs_build/build-ovs-dpdk.sh -- sudo docker run -e "UBUNTU_ARCH=${UBUNTU_ARCH}" -v ${DEB_DIR_NSH}:/deb \ -+ sudo docker run -e "UBUNTU_ARCH=${UBUNTU_ARCH}" \ -+ -v ${DEB_DIR_NSH}:/deb -v /etc/hosts:/etc/hosts \ - -t ovs_build /ovs_build/build-ovs-nsh-dpdk.sh - else - rm -rf /tmp/ovs-build-{,nsh-}dpdk; mkdir -p /tmp/ovs-build-{,nsh-}dpdk diff --git a/patches/fuel-plugin-ovs/0010-HACK-build-prebuilt-DEBs-src-bin-ver-mismatch.patch b/patches/fuel-plugin-ovs/0010-HACK-build-prebuilt-DEBs-src-bin-ver-mismatch.patch deleted file mode 100644 index 818203f3..00000000 --- a/patches/fuel-plugin-ovs/0010-HACK-build-prebuilt-DEBs-src-bin-ver-mismatch.patch +++ /dev/null @@ -1,72 +0,0 @@ -From: Alexandru Avadanii -Date: Thu, 15 Sep 2016 19:41:58 +0200 -Subject: [PATCH] HACK: build: prebuilt DEBs: src/bin ver mismatch - -Our debian source version is not always in sync with the debian -binaries versions, see related bug for a complete description of -this issue. - -This is a temporary chance which should be dropped once the package -versions are aligned. - -Related-bug: ARMBAND-89 -Signed-off-by: Alexandru Avadanii ---- - ovs_build/build-ovs-armband-fetch.sh | 16 ++++++++++++---- - ovs_build/build-ovs-nsh-dpdk.sh | 2 +- - 2 files changed, 13 insertions(+), 5 deletions(-) - -diff --git a/ovs_build/build-ovs-armband-fetch.sh b/ovs_build/build-ovs-armband-fetch.sh -index a810b93..8ab22cc 100755 ---- a/ovs_build/build-ovs-armband-fetch.sh -+++ b/ovs_build/build-ovs-armband-fetch.sh -@@ -17,7 +17,7 @@ set -eux - # dists/mos9.0-fuel-plugin-ovs/main/binary-arm64/Packages - function armband_fetch() { - local name=$1 -- local ver=${2//\+/\\\+} -+ local src_ver=${2//\+/\\\+} - local repo_base_url=${3:-http://linux.enea.com/mos-repos/ubuntu/9.0} - local repo_Sources_url=${4:-dists/mos9.0-fuel-plugin-ovs/main/source/Sources} - local repo_Packages_url=${5:-dists/mos9.0-fuel-plugin-ovs/main/binary-arm64/Packages} -@@ -30,16 +30,24 @@ function armband_fetch() { - wget -c "${repo_base_url}/${repo_Packages_url}" - fi - -- L=$(grep -Pzo "(?s)(?<=^Package: ${name}\n^Binary: )(\N*?)(?=\n^Version: ${ver})" \ -+ L=$(grep -Pzo "(?s)(?<=^Package: ${name}\n^Binary: )(\N*?)(?=\n^Version: ${src_ver})" \ - Sources | tr -d ',') - for deb_binary in ${L}; do -- D=$(grep -Po "(?<=^Filename: )(.*?\/${deb_binary}_${ver}_.*?\.deb)" Packages) || true -+ # FIXME(armband): https://jira.opnfv.org/browse/ARMBAND-89 -+ # Until we align source and binaries versions for nsh, convert on the fly -+ # e.g.: debian source 2.5.90~04.05-1.nsh+amos2 => debian binary 2.5.90-1.nsh -+ deb_ver=${src_ver} -+ if [[ ${deb_ver} == *~*-* ]]; then -+ deb_ver=${deb_ver//~*-/-} -+ deb_ver=${deb_ver%\\\+*} -+ fi -+ D=$(grep -Po "(?<=^Filename: )(.*?\/${deb_binary}_${deb_ver}_.*?\.deb)" Packages) || true - if [ -n "${D}" ]; then - wget -c "${repo_base_url}/${D}" && found=true - fi - done - if [ ${found} = false ]; then -- echo "ERROR: Could not find DEBs for pkg/ver: ${name}/${ver}" -+ echo "ERROR: Could not find DEBs for pkg|src_ver|deb_ver: ${name}|${src_ver}|${deb_ver}" - exit 1 - fi - } -diff --git a/ovs_build/build-ovs-nsh-dpdk.sh b/ovs_build/build-ovs-nsh-dpdk.sh -index 9d8a837..aebcb94 100755 ---- a/ovs_build/build-ovs-nsh-dpdk.sh -+++ b/ovs_build/build-ovs-nsh-dpdk.sh -@@ -12,7 +12,7 @@ DIR="$(dirname `readlink -f $0`)" - export DEB_BUILD_OPTIONS='parallel=8 nocheck' - - # AArch64 specifics, repository base URL, debian build versions --AARCH64_OVS_NSH_DEBV=${AARCH64_OVS_NSH_DEBV:-'2.5.90-1.nsh'} -+AARCH64_OVS_NSH_DEBV=${AARCH64_OVS_NSH_DEBV:-'2.5.90~04.05-1.nsh+amos2'} - - # Keep track of native arch (BUILD_ARCH) and target arch(s) (UBUNTU_ARCH) - # All archs should be represented in `dpkg --print-architecture` format diff --git a/patches/fuel-web/0001-nailgun-Add-AArch64-Openstack-Mitaka-release-s.patch b/patches/fuel-web/0001-nailgun-Add-AArch64-Openstack-Mitaka-release-s.patch index f3b9ea70..6dee64d9 100644 --- a/patches/fuel-web/0001-nailgun-Add-AArch64-Openstack-Mitaka-release-s.patch +++ b/patches/fuel-web/0001-nailgun-Add-AArch64-Openstack-Mitaka-release-s.patch @@ -7,14 +7,14 @@ Add the following Openstack releases: - Mitaka on Ubuntu 14.04 (aarch64) - Mitaka on Ubuntu+UCA 14.04 (aarch64) -Signed-off-by: Stanislaw Kardach +Signed-off-by: Stanislaw Kardach Signed-off-by: Alexandru Avadanii --- nailgun/nailgun/fixtures/openstack.yaml | 287 ++++++++++++++++++++++++++++++++ 1 file changed, 287 insertions(+) diff --git a/nailgun/nailgun/fixtures/openstack.yaml b/nailgun/nailgun/fixtures/openstack.yaml -index 62e6b73..9674d66 100644 +index d08a4fc..65646d4 100644 --- a/nailgun/nailgun/fixtures/openstack.yaml +++ b/nailgun/nailgun/fixtures/openstack.yaml @@ -2314,3 +2314,290 @@ diff --git a/patches/fuel-web/0002-Add-arch-to-nailgun-release-and-target-image.patch b/patches/fuel-web/0002-Add-arch-to-nailgun-release-and-target-image.patch index d621dbdf..0435891e 100644 --- a/patches/fuel-web/0002-Add-arch-to-nailgun-release-and-target-image.patch +++ b/patches/fuel-web/0002-Add-arch-to-nailgun-release-and-target-image.patch @@ -1,4 +1,4 @@ -From: Stanislaw Kardach +From: Stanislaw Kardach Date: Wed, 24 Feb 2016 20:11:54 +0100 Subject: [PATCH] Add arch to nailgun release and target image @@ -10,23 +10,23 @@ As a bonus, it is also used when building the target image. .../alembic_migrations/versions/armband.py | 53 ++++++++++++++++++++++ nailgun/nailgun/db/sqlalchemy/models/release.py | 8 ++++ nailgun/nailgun/fixtures/openstack.yaml | 5 ++ - .../nailgun/orchestrator/deployment_serializers.py | 9 +++- + .../nailgun/orchestrator/deployment_serializers.py | 8 +++- .../orchestrator/provisioning_serializers.py | 3 +- nailgun/nailgun/orchestrator/tasks_templates.py | 5 +- .../integration/test_cluster_changes_handler.py | 12 ++--- .../integration/test_orchestrator_serializer.py | 4 +- nailgun/nailgun/test/unit/test_tasks_templates.py | 6 ++- - 10 files changed, 96 insertions(+), 14 deletions(-) + 10 files changed, 95 insertions(+), 14 deletions(-) create mode 100644 nailgun/nailgun/db/migration/alembic_migrations/versions/armband.py diff --git a/nailgun/nailgun/consts.py b/nailgun/nailgun/consts.py -index 1ded0ba..5a1af0a 100644 +index 4900ec0..59b0c91 100644 --- a/nailgun/nailgun/consts.py +++ b/nailgun/nailgun/consts.py @@ -38,6 +38,11 @@ RELEASE_OS = Enum( ) ) - + +RELEASE_ARCHS = Enum( + 'amd64', + 'arm64' @@ -37,7 +37,7 @@ index 1ded0ba..5a1af0a 100644 'ha_full', diff --git a/nailgun/nailgun/db/migration/alembic_migrations/versions/armband.py b/nailgun/nailgun/db/migration/alembic_migrations/versions/armband.py new file mode 100644 -index 0000000..8cca69c +index 0000000..6e42b3f --- /dev/null +++ b/nailgun/nailgun/db/migration/alembic_migrations/versions/armband.py @@ -0,0 +1,53 @@ @@ -114,10 +114,10 @@ index 1b47de4..e209e72 100644 operating_system = Column(String(50), nullable=False) state = Column( diff --git a/nailgun/nailgun/fixtures/openstack.yaml b/nailgun/nailgun/fixtures/openstack.yaml -index 9674d66..d3226da 100644 +index 65646d4..874d4f0 100644 --- a/nailgun/nailgun/fixtures/openstack.yaml +++ b/nailgun/nailgun/fixtures/openstack.yaml -@@ -1904,6 +1904,7 @@ +@@ -1907,6 +1907,7 @@ name: "Mitaka on CentOS 6.5" state: "unavailable" version: "mitaka-9.0" @@ -125,7 +125,7 @@ index 9674d66..d3226da 100644 operating_system: "CentOS" description: "This option will install the OpenStack Mitaka packages using a CentOS based operating system. With high availability features built in, you are getting a robust, enterprise-grade OpenStack deployment." attributes_metadata: -@@ -1978,6 +1979,7 @@ +@@ -1980,6 +1981,7 @@ fields: name: "Mitaka on Ubuntu 14.04" version: "mitaka-9.0" @@ -133,7 +133,7 @@ index 9674d66..d3226da 100644 operating_system: "Ubuntu" description: "This option will install the OpenStack Mitaka packages using Ubuntu as a base operating system. With high availability features built in, you are getting a robust, enterprise-grade OpenStack deployment." attributes_metadata: -@@ -2219,6 +2221,7 @@ +@@ -2220,6 +2222,7 @@ fields: name: "Mitaka on Ubuntu+UCA 14.04" version: "mitaka-9.0" @@ -158,7 +158,7 @@ index 9674d66..d3226da 100644 attributes_metadata: editable: diff --git a/nailgun/nailgun/orchestrator/deployment_serializers.py b/nailgun/nailgun/orchestrator/deployment_serializers.py -index 699a599..6bb7990 100644 +index 08eb9c3..e561324 100644 --- a/nailgun/nailgun/orchestrator/deployment_serializers.py +++ b/nailgun/nailgun/orchestrator/deployment_serializers.py @@ -300,7 +300,13 @@ class DeploymentMultinodeSerializer(object): @@ -173,11 +173,11 @@ index 699a599..6bb7990 100644 + arch = "aarch64" + image_data['img_path'] = '{0}cirros-{1}-disk.img'.format(img_dir, + arch) - + glance_properties = [] - + diff --git a/nailgun/nailgun/orchestrator/provisioning_serializers.py b/nailgun/nailgun/orchestrator/provisioning_serializers.py -index 48a4753..b1f3ca6 100644 +index 48a4753..aaac22a 100644 --- a/nailgun/nailgun/orchestrator/provisioning_serializers.py +++ b/nailgun/nailgun/orchestrator/provisioning_serializers.py @@ -307,7 +307,8 @@ class ProvisioningSerializer61(ProvisioningSerializer): @@ -187,7 +187,7 @@ index 48a4753..b1f3ca6 100644 - packages)) + packages, + cluster.release.arch)) - + # NOTE(kozhukalov): This pre-provision task is going to be # removed by 7.0 because we need this only for classic way of diff --git a/nailgun/nailgun/orchestrator/tasks_templates.py b/nailgun/nailgun/orchestrator/tasks_templates.py @@ -195,8 +195,8 @@ index 51dfdf7..bc2bff9 100644 --- a/nailgun/nailgun/orchestrator/tasks_templates.py +++ b/nailgun/nailgun/orchestrator/tasks_templates.py @@ -210,7 +210,7 @@ def make_reboot_task(uids, task): - - + + def make_provisioning_images_task( - uids, repos, provision_data, cid, packages): + uids, repos, provision_data, cid, packages, arch): @@ -212,63 +212,63 @@ index 51dfdf7..bc2bff9 100644 + "--input_data '{2}'").format(cid, arch, conf), 'timeout': settings.PROVISIONING_IMAGES_BUILD_TIMEOUT, 'retries': 1}}) - + diff --git a/nailgun/nailgun/test/integration/test_cluster_changes_handler.py b/nailgun/nailgun/test/integration/test_cluster_changes_handler.py -index 0f212e5..da50eac 100644 +index fb82be0..450155d 100644 --- a/nailgun/nailgun/test/integration/test_cluster_changes_handler.py +++ b/nailgun/nailgun/test/integration/test_cluster_changes_handler.py -@@ -153,7 +153,7 @@ class TestHandlers(BaseIntegrationTest): +@@ -154,7 +154,7 @@ class TestHandlers(BaseIntegrationTest): common_attrs['last_controller'] = controller_nodes[-1]['name'] common_attrs['storage']['pg_num'] = 128 - + - common_attrs['test_vm_image'] = { + common_attrs['test_vm_image'] = [{ 'container_format': 'bare', 'public': 'true', 'disk_format': 'qcow2', -@@ -165,7 +165,7 @@ class TestHandlers(BaseIntegrationTest): +@@ -166,7 +166,7 @@ class TestHandlers(BaseIntegrationTest): """--property murano_image_info=""" """'{"title": "Murano Demo", "type": "cirros.demo"}'""" ), - } + }] - + critical_mapping = { 'primary-controller': True, -@@ -565,7 +565,7 @@ class TestHandlers(BaseIntegrationTest): +@@ -566,7 +566,7 @@ class TestHandlers(BaseIntegrationTest): common_attrs['last_controller'] = controller_nodes[-1]['name'] common_attrs['storage']['pg_num'] = 128 - + - common_attrs['test_vm_image'] = { + common_attrs['test_vm_image'] = [{ 'container_format': 'bare', 'public': 'true', 'disk_format': 'qcow2', -@@ -577,7 +577,7 @@ class TestHandlers(BaseIntegrationTest): +@@ -578,7 +578,7 @@ class TestHandlers(BaseIntegrationTest): """--property murano_image_info=""" """'{"title": "Murano Demo", "type": "cirros.demo"}'""" ), - } + }] - + critical_mapping = { 'primary-controller': True, -@@ -1049,7 +1049,7 @@ class TestHandlers(BaseIntegrationTest): +@@ -1050,7 +1050,7 @@ class TestHandlers(BaseIntegrationTest): common_attrs['last_controller'] = controller_nodes[-1]['name'] common_attrs['storage']['pg_num'] = 128 - + - common_attrs['test_vm_image'] = { + common_attrs['test_vm_image'] = [{ 'container_format': 'bare', 'public': 'true', 'disk_format': 'qcow2', -@@ -1061,7 +1061,7 @@ class TestHandlers(BaseIntegrationTest): +@@ -1062,7 +1062,7 @@ class TestHandlers(BaseIntegrationTest): """--property murano_image_info=""" """'{"title": "Murano Demo", "type": "cirros.demo"}'""" ), - } + }] - + critical_mapping = { 'primary-controller': True, diff --git a/nailgun/nailgun/test/integration/test_orchestrator_serializer.py b/nailgun/nailgun/test/integration/test_orchestrator_serializer.py @@ -276,22 +276,22 @@ index 5db8f4e..ef208cb 100644 --- a/nailgun/nailgun/test/integration/test_orchestrator_serializer.py +++ b/nailgun/nailgun/test/integration/test_orchestrator_serializer.py @@ -2584,12 +2584,12 @@ class BaseDeploymentSerializer(BaseSerializerTest): - + def check_no_murano_data(self): glance_properties = self.serializer.generate_test_vm_image_data( - self.env.nodes[0])['test_vm_image']['glance_properties'] + self.env.nodes[0])['test_vm_image'][0]['glance_properties'] self.assertNotIn('murano_image_info', glance_properties) - + def check_murano_data(self): glance_properties = self.serializer.generate_test_vm_image_data( - self.env.nodes[0])['test_vm_image']['glance_properties'] + self.env.nodes[0])['test_vm_image'][0]['glance_properties'] self.assertIn('murano_image_info', glance_properties) - - + + diff --git a/nailgun/nailgun/test/unit/test_tasks_templates.py b/nailgun/nailgun/test/unit/test_tasks_templates.py -index 4e81a19..d657518 100644 +index 4e81a19..695e53d 100644 --- a/nailgun/nailgun/test/unit/test_tasks_templates.py +++ b/nailgun/nailgun/test/unit/test_tasks_templates.py @@ -140,7 +140,8 @@ class TestMakeTask(base.BaseTestCase): @@ -302,7 +302,7 @@ index 4e81a19..d657518 100644 + packages=packages, + arch='amd64' ) - + fuel_image_conf = { @@ -177,7 +178,8 @@ class TestMakeTask(base.BaseTestCase): cmd = result["parameters"]["cmd"].lstrip( @@ -312,5 +312,5 @@ index 4e81a19..d657518 100644 + "--data_driver nailgun_build_image --target_arch amd64" + " --input_data '").rstrip("'") self.assertEqual(jsonutils.loads(cmd), fuel_image_conf) - + def test_generate_ironic_bootstrap_keys_task(self): diff --git a/patches/fuel-web/0004-direct-kernel-boot-for-cirros.patch b/patches/fuel-web/0004-direct-kernel-boot-for-cirros.patch deleted file mode 100644 index 994ad730..00000000 --- a/patches/fuel-web/0004-direct-kernel-boot-for-cirros.patch +++ /dev/null @@ -1,137 +0,0 @@ -From: Stanislaw Kardach -Date: Tue, 15 Mar 2016 15:01:51 +0100 -Subject: [PATCH] direct kernel boot for cirros - ---- - nailgun/nailgun/orchestrator/base_serializers.py | 16 +++-- - .../nailgun/orchestrator/deployment_serializers.py | 68 ++++++++++++++++------ - 2 files changed, 61 insertions(+), 23 deletions(-) - -diff --git a/nailgun/nailgun/orchestrator/base_serializers.py b/nailgun/nailgun/orchestrator/base_serializers.py -index 0643635..a2f43b0 100644 ---- a/nailgun/nailgun/orchestrator/base_serializers.py -+++ b/nailgun/nailgun/orchestrator/base_serializers.py -@@ -145,12 +145,16 @@ class MuranoMetadataSerializerMixin(object): - - def inject_murano_settings(self, image_data): - """Adds murano metadata to the test image""" -- test_vm_image = image_data['test_vm_image'] -- existing_properties = test_vm_image['glance_properties'] -- murano_data = ' '.join(["""--property murano_image_info='{"title":""" -- """ "Murano Demo", "type": "cirros.demo"}'"""]) -- test_vm_image['glance_properties'] = existing_properties + murano_data -- return {'test_vm_image': test_vm_image} -+ test_vm_images = [] -+ for test_vm_image in image_data['test_vm_image']: -+ existing_properties = test_vm_image['glance_properties'] -+ murano_data = ' '.join( -+ ["""--property murano_image_info='{"title":""" -+ """ "Murano Demo", "type": "cirros.demo"}'"""]) -+ test_vm_image['glance_properties'] = existing_properties + \ -+ murano_data -+ test_vm_images += [test_vm_image] -+ return {'test_vm_image': test_vm_images} - - - class VmwareDeploymentSerializerMixin(object): -diff --git a/nailgun/nailgun/orchestrator/deployment_serializers.py b/nailgun/nailgun/orchestrator/deployment_serializers.py -index 6bb7990..62fb08b 100644 ---- a/nailgun/nailgun/orchestrator/deployment_serializers.py -+++ b/nailgun/nailgun/orchestrator/deployment_serializers.py -@@ -283,6 +283,9 @@ class DeploymentMultinodeSerializer(object): - return {'glance': {'image_cache_max_size': image_cache_max_size}} - - def generate_test_vm_image_data(self, node): -+ images = [] -+ # By default always prepare the disk image -+ - # Instantiate all default values in dict. - image_data = { - 'container_format': 'bare', -@@ -306,8 +309,8 @@ class DeploymentMultinodeSerializer(object): - arch = "x86_64" - elif arch == "arm64": - arch = "aarch64" -- image_data['img_path'] = '{0}cirros-{1}-disk.img'.format(img_dir, -- arch) -+ image_data['img_path'] = \ -+ '{0}cirros-{1}-disk.img'.format(img_dir, arch) - - glance_properties = [] - -@@ -322,8 +325,38 @@ class DeploymentMultinodeSerializer(object): - glance_properties.append('--property hypervisor_type=vmware') - - image_data['glance_properties'] = ' '.join(glance_properties) -+ images += [image_data] -+ -+ # Now for aarch64 add also kernel and initrd because we direct -+ # kernel boot is used then -+ if arch == 'aarch64': -+ image_data['glance_properties'] += \ -+ ' --property os_command_line=\'root=/dev/vda1 rw rootwait' + \ -+ ' console=tty0 console=ttyS0 console=ttyAMA0\'' + \ -+ ' --property hw_video_model=vga' -+ kernel_data = { -+ 'container_format': 'aki', -+ 'public': 'true', -+ 'disk_format': 'aki', -+ 'img_name': 'TestVM-kernel', -+ 'img_path': '{0}cirros-{1}-kernel'.format(img_dir, arch), -+ 'os_name': 'cirros', -+ 'min_ram': 128, -+ 'glance_properties': '', -+ } -+ initrd_data = { -+ 'container_format': 'ari', -+ 'public': 'true', -+ 'disk_format': 'ari', -+ 'img_name': 'TestVM-initramfs', -+ 'img_path': '{0}cirros-{1}-initramfs'.format(img_dir, arch), -+ 'os_name': 'cirros', -+ 'min_ram': 128, -+ 'glance_properties': '', -+ } -+ images += [kernel_data, initrd_data] - -- return {'test_vm_image': image_data} -+ return {'test_vm_image': images} - - @classmethod - def get_net_provider_serializer(cls, cluster): -@@ -522,20 +555,21 @@ class DeploymentHASerializer61(DeploymentHASerializer, - images_data['test_vm_image'] = [] - if attrs.get('editable', {}).get('common', {}). \ - get('use_vcenter', {}).get('value') is True: -- image_vmdk_data = deepcopy(image_data['test_vm_image']) -- img_path = image_vmdk_data['img_path']. \ -- replace('x86_64-disk.img', 'i386-disk.vmdk') -- image_vmdk_data.update({ -- 'img_name': 'TestVM-VMDK', -- 'disk_format': 'vmdk', -- 'img_path': img_path, -- }) -- image_vmdk_data['glance_properties'] = ' '.join([ -- '--property vmware_disktype=sparse', -- '--property vmware_adaptertype=lsiLogic', -- '--property hypervisor_type=vmware']) -- images_data['test_vm_image'].append(image_vmdk_data) -- images_data['test_vm_image'].append(image_data['test_vm_image']) -+ images_vmdk_data = deepcopy(image_data['test_vm_image']) -+ for image_vmdk_data in images_vmdk_data: -+ img_path = image_vmdk_data['img_path']. \ -+ replace('x86_64-disk.img', 'i386-disk.vmdk') -+ image_vmdk_data.update({ -+ 'img_name': 'TestVM-VMDK', -+ 'disk_format': 'vmdk', -+ 'img_path': img_path, -+ }) -+ image_vmdk_data['glance_properties'] = ' '.join([ -+ '--property vmware_disktype=sparse', -+ '--property vmware_adaptertype=lsiLogic', -+ '--property hypervisor_type=vmware']) -+ images_data['test_vm_image'] += [image_vmdk_data] -+ images_data['test_vm_image'] += image_data['test_vm_image'] - else: - images_data = image_data - diff --git a/patches/fuel-web/0005-FIXME-Disable-amd64-Mitaka-on-Ubuntu-for-now.patch b/patches/fuel-web/0005-FIXME-Disable-amd64-Mitaka-on-Ubuntu-for-now.patch deleted file mode 100644 index 776ae32c..00000000 --- a/patches/fuel-web/0005-FIXME-Disable-amd64-Mitaka-on-Ubuntu-for-now.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Alexandru Avadanii -Date: Sat, 19 Mar 2016 19:02:15 +0100 -Subject: [PATCH] FIXME: Disable amd64 Mitaka on Ubuntu for now. - -Until we fix all cohabitation of amd64 and arm64, disable Openstack -releases and -(both x86_64) in openstack.yaml fixture. - -TODO: Propose renaming above releases to include arch in name. -Signed-off-by: Alexandru Avadanii ---- - nailgun/nailgun/fixtures/openstack.yaml | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/nailgun/nailgun/fixtures/openstack.yaml b/nailgun/nailgun/fixtures/openstack.yaml -index d3226da..7e6e96e 100644 ---- a/nailgun/nailgun/fixtures/openstack.yaml -+++ b/nailgun/nailgun/fixtures/openstack.yaml -@@ -1978,6 +1978,7 @@ - extend: *base_release - fields: - name: "Mitaka on Ubuntu 14.04" -+ state: "unavailable" - version: "mitaka-9.0" - arch: "amd64" - operating_system: "Ubuntu" -@@ -2220,6 +2221,7 @@ - extend: *ubuntu_release - fields: - name: "Mitaka on Ubuntu+UCA 14.04" -+ state: "unavailable" - version: "mitaka-9.0" - arch: "amd64" - description: "This option will install the OpenStack Mitaka packages using Ubuntu as a base operating system, including Ubuntu Cloud Archive OpenStack packages. With high availability features built in, you are getting a robust, enterprise-grade OpenStack deployment." diff --git a/patches/fuel-web/0006-Add-configuration-item-for-WSREP-SST-provider.patch b/patches/fuel-web/0006-Add-configuration-item-for-WSREP-SST-provider.patch deleted file mode 100644 index 87f0a2fd..00000000 --- a/patches/fuel-web/0006-Add-configuration-item-for-WSREP-SST-provider.patch +++ /dev/null @@ -1,45 +0,0 @@ -From: Stanislaw Kardach -Date: Wed, 20 Apr 2016 15:05:15 -0700 -Subject: [PATCH] Add configuration item for WSREP SST provider - -This patch adds a radio button in "OpenStack Services" tab of the -environment settings to configure which WSREP SST provider to use for -MySQL. - -Signed-off-by: Stanislaw Kardach ---- - nailgun/nailgun/fixtures/openstack.yaml | 21 +++++++++++++++++++++ - 1 file changed, 21 insertions(+) - -diff --git a/nailgun/nailgun/fixtures/openstack.yaml b/nailgun/nailgun/fixtures/openstack.yaml -index 62e6b73..4b123b9 100644 ---- a/nailgun/nailgun/fixtures/openstack.yaml -+++ b/nailgun/nailgun/fixtures/openstack.yaml -@@ -918,6 +918,27 @@ - description: "Name for Mongo replication set" - weight: 30 - type: "text" -+ mysql_wsrep: -+ metadata: -+ label: "Database configuration" -+ weight: 15 -+ group: "openstack_services" -+ wsrep_method: -+ value: "xtrabackup-v2" -+ label: "WSREP SST provider" -+ description: "This setting changes the wsrep_sst_method switch in the MySQL Galera cluster configuration." -+ weight: 10 -+ type: "radio" -+ values: -+ - data: "xtrabackup-v2" -+ label: "xtrabackup-v2" -+ description: "Use Percona xtrabackup v2 provider. This is broken on some ARM64 platforms due to outdated MySQL/InnoDB code used by xtrabackup." -+ - data: "rsync" -+ label: "rsync" -+ description: "Use rsync provider. Use if xtrabackup is broken on your platform." -+ - data: "mysqldump" -+ label: "mysqldump" -+ description: "Use mysqldump provider (untested)." - additional_components: - metadata: - label: "Additional Components" diff --git a/patches/fuel-web/0007-kernel-flavor-linux-image-generic-lts-xenial.patch b/patches/fuel-web/0007-kernel-flavor-linux-image-generic-lts-xenial.patch deleted file mode 100644 index 5a068d6f..00000000 --- a/patches/fuel-web/0007-kernel-flavor-linux-image-generic-lts-xenial.patch +++ /dev/null @@ -1,39 +0,0 @@ -From: Alexandru Avadanii -Date: Thu, 4 Aug 2016 12:47:50 +0200 -Subject: [PATCH] kernel-flavor: linux-image-generic-lts-xenial - -Ubuntu arm64: switch from using kernel 4.2 for Trusty -(linux-image-generic-lts-trusty) to kernel 4.4 backported from Xenial -(linux-image-generic-lts-xenial). - -Signed-off-by: Alexandru Avadanii ---- - nailgun/nailgun/fixtures/openstack.yaml | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/nailgun/nailgun/fixtures/openstack.yaml b/nailgun/nailgun/fixtures/openstack.yaml -index 9c34a05..6848424 100644 ---- a/nailgun/nailgun/fixtures/openstack.yaml -+++ b/nailgun/nailgun/fixtures/openstack.yaml -@@ -2103,8 +2103,8 @@ - i40e-dkms - linux-firmware - linux-firmware-nonfree -- linux-headers-generic-lts-trusty -- linux-image-generic-lts-trusty -+ linux-headers-generic-lts-xenial -+ linux-image-generic-lts-xenial - lvm2 - mcollective - mdadm -@@ -2447,8 +2447,8 @@ - i40e-dkms - linux-firmware - linux-firmware-nonfree -- linux-headers-generic-lts-trusty -- linux-image-generic-lts-trusty -+ linux-headers-generic-lts-xenial -+ linux-image-generic-lts-xenial - lvm2 - mcollective - mdadm diff --git a/patches/fuel-web/cross-bootstrap/0000-Add-arch-to-nailgun-release-and-target-image.patch b/patches/fuel-web/cross-bootstrap/0000-Add-arch-to-nailgun-release-and-target-image.patch new file mode 120000 index 00000000..64ff45c3 --- /dev/null +++ b/patches/fuel-web/cross-bootstrap/0000-Add-arch-to-nailgun-release-and-target-image.patch @@ -0,0 +1 @@ +../0002-Add-arch-to-nailgun-release-and-target-image.patch \ No newline at end of file diff --git a/patches/fuel-web/direct-kernel-boot/0000-Add-arch-to-nailgun-release-and-target-image.patch b/patches/fuel-web/direct-kernel-boot/0000-Add-arch-to-nailgun-release-and-target-image.patch new file mode 120000 index 00000000..64ff45c3 --- /dev/null +++ b/patches/fuel-web/direct-kernel-boot/0000-Add-arch-to-nailgun-release-and-target-image.patch @@ -0,0 +1 @@ +../0002-Add-arch-to-nailgun-release-and-target-image.patch \ No newline at end of file diff --git a/patches/fuel-web/direct-kernel-boot/0001-direct-kernel-boot-for-cirros.patch b/patches/fuel-web/direct-kernel-boot/0001-direct-kernel-boot-for-cirros.patch new file mode 100644 index 00000000..0f9395c3 --- /dev/null +++ b/patches/fuel-web/direct-kernel-boot/0001-direct-kernel-boot-for-cirros.patch @@ -0,0 +1,137 @@ +From: Stanislaw Kardach +Date: Tue, 15 Mar 2016 15:01:51 +0100 +Subject: [PATCH] direct kernel boot for cirros + +--- + nailgun/nailgun/orchestrator/base_serializers.py | 16 +++-- + .../nailgun/orchestrator/deployment_serializers.py | 68 ++++++++++++++++------ + 2 files changed, 61 insertions(+), 23 deletions(-) + +diff --git a/nailgun/nailgun/orchestrator/base_serializers.py b/nailgun/nailgun/orchestrator/base_serializers.py +index 2fb0da5..ac787ed 100644 +--- a/nailgun/nailgun/orchestrator/base_serializers.py ++++ b/nailgun/nailgun/orchestrator/base_serializers.py +@@ -145,12 +145,16 @@ class MuranoMetadataSerializerMixin(object): + + def inject_murano_settings(self, image_data): + """Adds murano metadata to the test image""" +- test_vm_image = image_data['test_vm_image'] +- existing_properties = test_vm_image['glance_properties'] +- murano_data = ' '.join(["""--property murano_image_info='{"title":""" +- """ "Murano Demo", "type": "cirros.demo"}'"""]) +- test_vm_image['glance_properties'] = existing_properties + murano_data +- return {'test_vm_image': test_vm_image} ++ test_vm_images = [] ++ for test_vm_image in image_data['test_vm_image']: ++ existing_properties = test_vm_image['glance_properties'] ++ murano_data = ' '.join( ++ ["""--property murano_image_info='{"title":""" ++ """ "Murano Demo", "type": "cirros.demo"}'"""]) ++ test_vm_image['glance_properties'] = existing_properties + \ ++ murano_data ++ test_vm_images += [test_vm_image] ++ return {'test_vm_image': test_vm_images} + + + class VmwareDeploymentSerializerMixin(object): +diff --git a/nailgun/nailgun/orchestrator/deployment_serializers.py b/nailgun/nailgun/orchestrator/deployment_serializers.py +index e561324..601301b 100644 +--- a/nailgun/nailgun/orchestrator/deployment_serializers.py ++++ b/nailgun/nailgun/orchestrator/deployment_serializers.py +@@ -283,6 +283,9 @@ class DeploymentMultinodeSerializer(object): + return {'glance': {'image_cache_max_size': image_cache_max_size}} + + def generate_test_vm_image_data(self, node): ++ images = [] ++ # By default always prepare the disk image ++ + # Instantiate all default values in dict. + image_data = { + 'container_format': 'bare', +@@ -305,8 +308,8 @@ class DeploymentMultinodeSerializer(object): + arch = "x86_64" + elif arch == "arm64": + arch = "aarch64" +- image_data['img_path'] = '{0}cirros-{1}-disk.img'.format(img_dir, +- arch) ++ image_data['img_path'] = \ ++ '{0}cirros-{1}-disk.img'.format(img_dir, arch) + + glance_properties = [] + +@@ -321,8 +324,38 @@ class DeploymentMultinodeSerializer(object): + glance_properties.append('--property hypervisor_type=vmware') + + image_data['glance_properties'] = ' '.join(glance_properties) ++ images += [image_data] ++ ++ # Now for aarch64 add also kernel and initrd because we direct ++ # kernel boot is used then ++ if arch == 'aarch64': ++ image_data['glance_properties'] += \ ++ ' --property os_command_line=\'root=/dev/vda1 rw rootwait' + \ ++ ' console=tty0 console=ttyS0 console=ttyAMA0\'' + \ ++ ' --property hw_video_model=vga' ++ kernel_data = { ++ 'container_format': 'aki', ++ 'public': 'true', ++ 'disk_format': 'aki', ++ 'img_name': 'TestVM-kernel', ++ 'img_path': '{0}cirros-{1}-kernel'.format(img_dir, arch), ++ 'os_name': 'cirros', ++ 'min_ram': 128, ++ 'glance_properties': '', ++ } ++ initrd_data = { ++ 'container_format': 'ari', ++ 'public': 'true', ++ 'disk_format': 'ari', ++ 'img_name': 'TestVM-initramfs', ++ 'img_path': '{0}cirros-{1}-initramfs'.format(img_dir, arch), ++ 'os_name': 'cirros', ++ 'min_ram': 128, ++ 'glance_properties': '', ++ } ++ images += [kernel_data, initrd_data] + +- return {'test_vm_image': image_data} ++ return {'test_vm_image': images} + + @classmethod + def get_net_provider_serializer(cls, cluster): +@@ -521,20 +554,21 @@ class DeploymentHASerializer61(DeploymentHASerializer, + images_data['test_vm_image'] = [] + if attrs.get('editable', {}).get('common', {}). \ + get('use_vcenter', {}).get('value') is True: +- image_vmdk_data = deepcopy(image_data['test_vm_image']) +- img_path = image_vmdk_data['img_path']. \ +- replace('x86_64-disk.img', 'i386-disk.vmdk') +- image_vmdk_data.update({ +- 'img_name': 'TestVM-VMDK', +- 'disk_format': 'vmdk', +- 'img_path': img_path, +- }) +- image_vmdk_data['glance_properties'] = ' '.join([ +- '--property vmware_disktype=sparse', +- '--property vmware_adaptertype=lsiLogic', +- '--property hypervisor_type=vmware']) +- images_data['test_vm_image'].append(image_vmdk_data) +- images_data['test_vm_image'].append(image_data['test_vm_image']) ++ images_vmdk_data = deepcopy(image_data['test_vm_image']) ++ for image_vmdk_data in images_vmdk_data: ++ img_path = image_vmdk_data['img_path']. \ ++ replace('x86_64-disk.img', 'i386-disk.vmdk') ++ image_vmdk_data.update({ ++ 'img_name': 'TestVM-VMDK', ++ 'disk_format': 'vmdk', ++ 'img_path': img_path, ++ }) ++ image_vmdk_data['glance_properties'] = ' '.join([ ++ '--property vmware_disktype=sparse', ++ '--property vmware_adaptertype=lsiLogic', ++ '--property hypervisor_type=vmware']) ++ images_data['test_vm_image'] += [image_vmdk_data] ++ images_data['test_vm_image'] += image_data['test_vm_image'] + else: + images_data = image_data + diff --git a/patches/fuel-web/kernel-bump/0001-kernel-flavor-linux-image-generic-lts-xenial.patch b/patches/fuel-web/kernel-bump/0001-kernel-flavor-linux-image-generic-lts-xenial.patch new file mode 100644 index 00000000..80189744 --- /dev/null +++ b/patches/fuel-web/kernel-bump/0001-kernel-flavor-linux-image-generic-lts-xenial.patch @@ -0,0 +1,39 @@ +From: Alexandru Avadanii +Date: Thu, 4 Aug 2016 12:47:50 +0200 +Subject: [PATCH] kernel-flavor: linux-image-generic-lts-xenial + +Ubuntu arm64: switch from using kernel 4.2 for Trusty +(linux-image-generic-lts-trusty) to kernel 4.4 backported from Xenial +(linux-image-generic-lts-xenial). + +Signed-off-by: Alexandru Avadanii +--- + nailgun/nailgun/fixtures/openstack.yaml | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/nailgun/nailgun/fixtures/openstack.yaml b/nailgun/nailgun/fixtures/openstack.yaml +index 874d4f0..c5087b6 100644 +--- a/nailgun/nailgun/fixtures/openstack.yaml ++++ b/nailgun/nailgun/fixtures/openstack.yaml +@@ -2081,8 +2081,8 @@ + i40e-dkms + linux-firmware + linux-firmware-nonfree +- linux-headers-generic-lts-trusty +- linux-image-generic-lts-trusty ++ linux-headers-generic-lts-xenial ++ linux-image-generic-lts-xenial + lvm2 + mcollective + mdadm +@@ -2424,8 +2424,8 @@ + i40e-dkms + linux-firmware + linux-firmware-nonfree +- linux-headers-generic-lts-trusty +- linux-image-generic-lts-trusty ++ linux-headers-generic-lts-xenial ++ linux-image-generic-lts-xenial + lvm2 + mcollective + mdadm diff --git a/patches/fuel-web/multiarch-fuel/0000-Add-arch-to-nailgun-release-and-target-image.patch b/patches/fuel-web/multiarch-fuel/0000-Add-arch-to-nailgun-release-and-target-image.patch new file mode 120000 index 00000000..64ff45c3 --- /dev/null +++ b/patches/fuel-web/multiarch-fuel/0000-Add-arch-to-nailgun-release-and-target-image.patch @@ -0,0 +1 @@ +../0002-Add-arch-to-nailgun-release-and-target-image.patch \ No newline at end of file diff --git a/patches/fuel-web/multiarch-fuel/0000-nailgun-Add-AArch64-Openstack-Mitaka-release-s.patch b/patches/fuel-web/multiarch-fuel/0000-nailgun-Add-AArch64-Openstack-Mitaka-release-s.patch new file mode 120000 index 00000000..e0d56a81 --- /dev/null +++ b/patches/fuel-web/multiarch-fuel/0000-nailgun-Add-AArch64-Openstack-Mitaka-release-s.patch @@ -0,0 +1 @@ +../0001-nailgun-Add-AArch64-Openstack-Mitaka-release-s.patch \ No newline at end of file diff --git a/patches/fuel-web/multiarch-fuel/0001-FIXME-Disable-amd64-Mitaka-on-Ubuntu-for-now.patch b/patches/fuel-web/multiarch-fuel/0001-FIXME-Disable-amd64-Mitaka-on-Ubuntu-for-now.patch new file mode 100644 index 00000000..d76a1f6d --- /dev/null +++ b/patches/fuel-web/multiarch-fuel/0001-FIXME-Disable-amd64-Mitaka-on-Ubuntu-for-now.patch @@ -0,0 +1,34 @@ +From: Alexandru Avadanii +Date: Sat, 19 Mar 2016 19:02:15 +0100 +Subject: [PATCH] FIXME: Disable amd64 Mitaka on Ubuntu for now. + +Until we fix all cohabitation of amd64 and arm64, disable Openstack +releases and +(both x86_64) in openstack.yaml fixture. + +TODO: Propose renaming above releases to include arch in name. +Signed-off-by: Alexandru Avadanii +--- + nailgun/nailgun/fixtures/openstack.yaml | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/nailgun/nailgun/fixtures/openstack.yaml b/nailgun/nailgun/fixtures/openstack.yaml +index c5087b6..ba25093 100644 +--- a/nailgun/nailgun/fixtures/openstack.yaml ++++ b/nailgun/nailgun/fixtures/openstack.yaml +@@ -1980,6 +1980,7 @@ + extend: *base_release + fields: + name: "Mitaka on Ubuntu 14.04" ++ state: "unavailable" + version: "mitaka-9.0" + arch: "amd64" + operating_system: "Ubuntu" +@@ -2221,6 +2222,7 @@ + extend: *ubuntu_release + fields: + name: "Mitaka on Ubuntu+UCA 14.04" ++ state: "unavailable" + version: "mitaka-9.0" + arch: "amd64" + description: "This option will install the OpenStack Mitaka packages using Ubuntu as a base operating system, including Ubuntu Cloud Archive OpenStack packages. With high availability features built in, you are getting a robust, enterprise-grade OpenStack deployment." diff --git a/patches/fuel-web/mysql-sst-provider/0001-Add-configuration-item-for-WSREP-SST-provider.patch b/patches/fuel-web/mysql-sst-provider/0001-Add-configuration-item-for-WSREP-SST-provider.patch new file mode 100644 index 00000000..2f63ec06 --- /dev/null +++ b/patches/fuel-web/mysql-sst-provider/0001-Add-configuration-item-for-WSREP-SST-provider.patch @@ -0,0 +1,45 @@ +From: Stanislaw Kardach +Date: Wed, 20 Apr 2016 15:05:15 -0700 +Subject: [PATCH] Add configuration item for WSREP SST provider + +This patch adds a radio button in "OpenStack Services" tab of the +environment settings to configure which WSREP SST provider to use for +MySQL. + +Signed-off-by: Stanislaw Kardach +--- + nailgun/nailgun/fixtures/openstack.yaml | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +diff --git a/nailgun/nailgun/fixtures/openstack.yaml b/nailgun/nailgun/fixtures/openstack.yaml +index ba25093..e855cf0 100644 +--- a/nailgun/nailgun/fixtures/openstack.yaml ++++ b/nailgun/nailgun/fixtures/openstack.yaml +@@ -932,6 +932,27 @@ + description: "Name for Mongo replication set" + weight: 30 + type: "text" ++ mysql_wsrep: ++ metadata: ++ label: "Database configuration" ++ weight: 15 ++ group: "openstack_services" ++ wsrep_method: ++ value: "xtrabackup-v2" ++ label: "WSREP SST provider" ++ description: "This setting changes the wsrep_sst_method switch in the MySQL Galera cluster configuration." ++ weight: 10 ++ type: "radio" ++ values: ++ - data: "xtrabackup-v2" ++ label: "xtrabackup-v2" ++ description: "Use Percona xtrabackup v2 provider. This is broken on some ARM64 platforms due to outdated MySQL/InnoDB code used by xtrabackup." ++ - data: "rsync" ++ label: "rsync" ++ description: "Use rsync provider. Use if xtrabackup is broken on your platform." ++ - data: "mysqldump" ++ label: "mysqldump" ++ description: "Use mysqldump provider (untested)." + additional_components: + metadata: + label: "Additional Components" diff --git a/patches/opnfv-fuel/0000-build-Use-OPNFV_GIT_SHA-for-ISO-preparer-ID.patch b/patches/opnfv-fuel/0000-build-Use-OPNFV_GIT_SHA-for-ISO-preparer-ID.patch new file mode 100644 index 00000000..27b00c71 --- /dev/null +++ b/patches/opnfv-fuel/0000-build-Use-OPNFV_GIT_SHA-for-ISO-preparer-ID.patch @@ -0,0 +1,76 @@ +From: Alexandru Avadanii +Date: Wed, 17 Aug 2016 21:56:22 +0200 +Subject: [PATCH] build: Use OPNFV_GIT_SHA for ISO preparer ID + +isoinfo -i lists the following information for Fuel@OPNFV ISO: +"Data preparer id: 86aafaf5454a846c417848bb94f264c4420160f3" +where the SHA hash is Fuel git repo HEAD SHA. + +For Armband's build system, using only the Fuel commit ID is not +enough to fully describe the state of the source code, as patches +are also applied to other fuel modules (as git submodules). +Instead, a pointer to a valid Armband commit ID should be used. + +However, Armband overrides OPNFV_GIT_SHA to the Armband git repo +commit hash, so the ISO metadata should also reflect this. + +While at it, allow product name to be overriden, to signal the +commit ID should be looked up inside the Armband repository. + +Change-Id: I33ad490f1afe28c1d439dda40e39cee1955e0ac2 +Signed-off-by: Alexandru Avadanii +--- + build/Makefile | 4 ++-- + build/docker/runcontext | 2 +- + build/install/install.sh | 6 +++++- + 3 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/build/Makefile b/build/Makefile +index 56acb40..ac85498 100644 +--- a/build/Makefile ++++ b/build/Makefile +@@ -21,11 +21,11 @@ SHELL = /bin/bash + export MOSVERSION = 9.0 + export ISOSRC = file:$(shell pwd)/fuel-$(MOSVERSION).iso + export ISOCACHE = $(shell pwd)/$(shell basename $(ISOSRC)) +-export PRODNO = "OPNFV_FUEL" ++export PRODNO ?= "OPNFV_FUEL" + export REVSTATE = "P0000" + export USER ?= $(shell whoami) + export BUILD_DATE = $(shell date --utc +%Y-%m-%d:%H:%M) +-export OPNFV_GIT_SHA = $(shell git rev-parse HEAD) ++export OPNFV_GIT_SHA ?= $(shell git rev-parse HEAD) + # Store in /etc/fuel_build_id on fuel master + export BUILD_ID := $(PRODNO)_$(BUILD_DATE)_$(OPNFV_GIT_SHA) + +diff --git a/build/docker/runcontext b/build/docker/runcontext +index daad663..2d13562 100755 +--- a/build/docker/runcontext ++++ b/build/docker/runcontext +@@ -115,7 +115,7 @@ RUN_CONTEXT_OPT="--cidfile $CID_FILE --privileged=true --rm \ + -e HOME=$HOME -e CACHEDEBUG -e CACHETRANSPORT -e CACHEMAXAGE -e CACHEBASE \ + -e BUILD_FUEL_PLUGINS -e MIRROR_UBUNTU -e MIRROR_UBUNTU_ROOT \ + -e MIRROR_MOS_UBUNTU -e MIRROR_MOS_UBUNTU_ROOT -e MIRROR_FUEL \ +- -e LATEST_TARGET_UBUNTU -e UBUNTU_ARCH \ ++ -e LATEST_TARGET_UBUNTU -e UBUNTU_ARCH -e OPNFV_GIT_SHA \ + -u $USER_ID:$GROUP_ID -w $PWD \ + -v $GITROOT:$GITROOT -v /sys/fs/cgroup:/sys/fs/cgroup:ro $CACHEMOUNT" + +diff --git a/build/install/install.sh b/build/install/install.sh +index c632419..866d304 100755 +--- a/build/install/install.sh ++++ b/build/install/install.sh +@@ -196,8 +196,12 @@ make_iso_image() { + find . -name TRANS.TBL -exec rm {} \; + rm -rf rr_moved + ++ if [[ -z "$OPNFV_GIT_SHA" ]]; then ++ OPNFV_GIT_SHA=$(git rev-parse --verify HEAD) ++ fi ++ + mkisofs --quiet -r -V "$VOLUMEID" -publisher "$PUBLISHER" \ +- -p `git rev-parse --verify HEAD` -J -R -b isolinux/isolinux.bin \ ++ -p "$OPNFV_GIT_SHA" -J -R -b isolinux/isolinux.bin \ + -no-emul-boot \ + -boot-load-size 4 -boot-info-table \ + --hide-rr-moved \ diff --git a/patches/opnfv-fuel/0001-build-Add-ARMBAND_BASE-support.patch b/patches/opnfv-fuel/0001-build-Add-ARMBAND_BASE-support.patch new file mode 100644 index 00000000..17cfd689 --- /dev/null +++ b/patches/opnfv-fuel/0001-build-Add-ARMBAND_BASE-support.patch @@ -0,0 +1,70 @@ +From: Alexandru Avadanii +Date: Thu, 11 Aug 2016 15:34:32 +0200 +Subject: [PATCH] build: Add ARMBAND_BASE support + +Signed-off-by: Alexandru Avadanii +--- + build/Makefile | 10 ++++++++++ + build/docker/Dockerfile | 2 +- + build/docker/runcontext | 6 +++++- + 3 files changed, 18 insertions(+), 2 deletions(-) + +diff --git a/build/Makefile b/build/Makefile +index 4454c35..377ecc6 100644 +--- a/build/Makefile ++++ b/build/Makefile +@@ -14,4 +14,9 @@ SHELL = /bin/bash + ++# Only configure Armband specific stuff when ARMBAND_BASE is set ++ifdef ARMBAND_BASE ++ include ${ARMBAND_BASE}/armband-fuel-config.mk ++endif ++ + ############################################################################ + # BEGIN of variables to customize + # +@@ -140,6 +140,7 @@ $(ISOCACHE): + # fuel-main Makefiles do not like `make -C` + cd $(FUEL_MAIN_DIR) && make repos + cp f_repos/.cachefuelinfo gitinfo_fuel.txt ++ test -z $(ARMBAND_BASE) || $(REPOINFO) $(ARMBAND_BASE) >> gitinfo_fuel.txt + + # Repeat build up to three times + sudo -E ./fuel_build_loop +diff --git a/build/docker/Dockerfile b/build/docker/Dockerfile +index b38ea4c..624f233 100644 +--- a/build/docker/Dockerfile ++++ b/build/docker/Dockerfile +@@ -30,7 +30,7 @@ RUN echo "Defaults env_keep += \"ftp_proxy http_proxy https_proxy no_proxy RSYNC + # Keeping PWD is needed to build as root + RUN echo "Defaults env_keep += \"PWD\"" > /etc/sudoers.d/keep-pwd + # Keeping variables for ISO build +-RUN echo "Defaults env_keep += \"MIRROR_UBUNTU MIRROR_UBUNTU_ROOT MIRROR_MOS_UBUNTU MIRROR_MOS_UBUNTU_ROOT MIRROR_FUEL LATEST_TARGET_UBUNTU UBUNTU_ARCH\"" > /etc/sudoers.d/keep-mos ++RUN echo "Defaults env_keep += \"MIRROR_UBUNTU MIRROR_UBUNTU_ROOT MIRROR_MOS_UBUNTU MIRROR_MOS_UBUNTU_ROOT MIRROR_FUEL LATEST_TARGET_UBUNTU UBUNTU_ARCH ARMBAND_BASE\"" > /etc/sudoers.d/keep-mos + RUN chmod 0440 /etc/sudoers.d/open-sudo + RUN chmod 0440 /etc/sudoers.d/keep-proxies + RUN chmod 0440 /etc/sudoers.d/keep-pwd +diff --git a/build/docker/runcontext b/build/docker/runcontext +index daad663..e4874df 100755 +--- a/build/docker/runcontext ++++ b/build/docker/runcontext +@@ -42,6 +42,10 @@ GITROOT=`git rev-parse --show-toplevel` + CID_FILE=`mktemp -u -t runcontext.XXXXXXXXXX` + CONTEXT_DIR=`mktemp -d ${GITROOT}/.docker_contextXXXXXX` + ++if [[ $ARMBAND_BASE ]]; then ++ GITROOT=$ARMBAND_BASE ++fi ++ + # If RSYNC_CONNECT_PROG is used, we need to copy all of + # the SSH structure, should one of the keys need to be + # used. +@@ -115,7 +119,7 @@ RUN_CONTEXT_OPT="--cidfile $CID_FILE --privileged=true --rm \ + -e HOME=$HOME -e CACHEDEBUG -e CACHETRANSPORT -e CACHEMAXAGE -e CACHEBASE \ + -e BUILD_FUEL_PLUGINS -e MIRROR_UBUNTU -e MIRROR_UBUNTU_ROOT \ + -e MIRROR_MOS_UBUNTU -e MIRROR_MOS_UBUNTU_ROOT -e MIRROR_FUEL \ +- -e LATEST_TARGET_UBUNTU -e UBUNTU_ARCH -e OPNFV_GIT_SHA \ ++ -e LATEST_TARGET_UBUNTU -e UBUNTU_ARCH -e OPNFV_GIT_SHA -e ARMBAND_BASE \ + -u $USER_ID:$GROUP_ID -w $PWD \ + -v $GITROOT:$GITROOT -v /sys/fs/cgroup:/sys/fs/cgroup:ro $CACHEMOUNT" + diff --git a/patches/opnfv-fuel/0001-kernel-flavor-linux-image-generic-lts-xenial.patch b/patches/opnfv-fuel/0001-kernel-flavor-linux-image-generic-lts-xenial.patch deleted file mode 100644 index 70847ba7..00000000 --- a/patches/opnfv-fuel/0001-kernel-flavor-linux-image-generic-lts-xenial.patch +++ /dev/null @@ -1,51 +0,0 @@ -From: Alexandru Avadanii -Date: Thu, 4 Aug 2016 12:50:19 +0200 -Subject: [PATCH] kernel-flavor: linux-image-generic-lts-xenial - -Ubuntu arm64: switch from using kernel 4.2 for Trusty -(linux-image-generic-lts-trusty) to kernel 4.4 backported from Xenial -(linux-image-generic-lts-xenial). - -Signed-off-by: Alexandru Avadanii ---- - build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml | 4 ++-- - deploy/config/dea_base.yaml | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml b/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml -index daef3d5..2985619 100644 ---- a/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml -+++ b/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml -@@ -5,7 +5,7 @@ - extra_dirs: - - /usr/share/fuel_bootstrap_cli/files/trusty - output_dir: /tmp/ -- kernel_flavor: linux-image-generic-lts-trusty -+ kernel_flavor: linux-image-generic-lts-xenial - packages: - - fuel-agent - - hwloc -@@ -13,6 +13,6 @@ - - i40e-dkms - - linux-firmware - - linux-firmware-nonfree -- - linux-headers-generic -+ - linux-headers-generic-lts-xenial - - live-boot - - live-boot-initramfs-tools -diff --git a/deploy/config/dea_base.yaml b/deploy/config/dea_base.yaml -index 658b328..5f3c156 100644 ---- a/deploy/config/dea_base.yaml -+++ b/deploy/config/dea_base.yaml -@@ -474,9 +474,9 @@ settings: - - linux-firmware-nonfree - -- linux-headers-generic-lts-trusty -+ linux-headers-generic-lts-xenial - -- linux-image-generic-lts-trusty -+ linux-image-generic-lts-xenial - - lvm2 - diff --git a/patches/opnfv-fuel/0002-FIXME-deploy-EFI-Skip-re-ordering-boot-via-IPMI.patch b/patches/opnfv-fuel/0002-FIXME-deploy-EFI-Skip-re-ordering-boot-via-IPMI.patch deleted file mode 100644 index d6ff3818..00000000 --- a/patches/opnfv-fuel/0002-FIXME-deploy-EFI-Skip-re-ordering-boot-via-IPMI.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: Alexandru Avadanii -Date: Fri, 9 Sep 2016 17:55:38 +0200 -Subject: [PATCH] FIXME: deploy: EFI: Skip re-ordering boot via IPMI - -On EFI systems deploys, altering the boot order via IPMI causes -issues on some specific targets. Until we agree on an uniform -solution for EFI systems + IPMI boot order handling, just skip -altering it via IPMI. - -Related-bug: https://jira.opnfv.org/browse/ARMBAND-71 - -Signed-off-by: Alexandru Avadanii ---- - deploy/deploy_env.py | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/deploy/deploy_env.py b/deploy/deploy_env.py -index 93dc395..1d2dfeb 100644 ---- a/deploy/deploy_env.py -+++ b/deploy/deploy_env.py -@@ -255,7 +255,9 @@ class CloudDeploy(object): - - def set_boot_order_nodes(self): - self.power_off_nodes() -- self.set_boot_order(['pxe', 'disk']) -+ # ARMBAND FIXME: See https://jira.opnfv.org/browse/ARMBAND-71 -+ # Until we choose an uniform design on EFI systems, just disable it -+ # self.set_boot_order(['pxe', 'disk']) - self.power_on_nodes() - - def get_put_deploy_log(self): diff --git a/patches/opnfv-fuel/0002-Fuel-VM-for-the-Enea-Armband-lab.patch b/patches/opnfv-fuel/0002-Fuel-VM-for-the-Enea-Armband-lab.patch new file mode 100644 index 00000000..cefc0625 --- /dev/null +++ b/patches/opnfv-fuel/0002-Fuel-VM-for-the-Enea-Armband-lab.patch @@ -0,0 +1,107 @@ +From: Josep Puigdemont +Date: Wed, 4 May 2016 14:27:23 +0200 +Subject: [PATCH] Fuel VM for the Enea Armband lab + +This is the initial VM description fit for Enea's Armband lab. + +Change-Id: Ia89f9728fff0ab1c279f6200fd558d9643cf4ea5 +Signed-off-by: Josep Puigdemont +--- + .../hardware_environment/vms/enea_lab/fuel.xml | 88 ++++++++++++++++++++++ + 1 file changed, 88 insertions(+) + create mode 100644 deploy/templates/hardware_environment/vms/enea_lab/fuel.xml + +diff --git a/deploy/templates/hardware_environment/vms/enea_lab/fuel.xml b/deploy/templates/hardware_environment/vms/enea_lab/fuel.xml +new file mode 100644 +index 0000000..8773ed4 +--- /dev/null ++++ b/deploy/templates/hardware_environment/vms/enea_lab/fuel.xml +@@ -0,0 +1,88 @@ ++ ++ fuel ++ 8290304 ++ 8290304 ++ 8 ++ ++ /machine ++ ++ ++ hvm ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ destroy ++ restart ++ restart ++ ++ ++ ++ ++ ++ /usr/libexec/qemu-kvm ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ diff --git a/patches/opnfv-fuel/0003-dea_base-replace-grub-pc-by-grub-efi-arm64.patch b/patches/opnfv-fuel/0003-dea_base-replace-grub-pc-by-grub-efi-arm64.patch new file mode 100644 index 00000000..fae14001 --- /dev/null +++ b/patches/opnfv-fuel/0003-dea_base-replace-grub-pc-by-grub-efi-arm64.patch @@ -0,0 +1,22 @@ +From: Josep Puigdemont +Date: Mon, 11 Jul 2016 15:21:56 +0200 +Subject: [PATCH] dea_base: replace grub-pc by grub-efi-arm64 + +Signed-off-by: Josep Puigdemont +--- + deploy/config/dea_base.yaml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/deploy/config/dea_base.yaml b/deploy/config/dea_base.yaml +index 0b8485b..658b328 100644 +--- a/deploy/config/dea_base.yaml ++++ b/deploy/config/dea_base.yaml +@@ -462,7 +462,7 @@ settings: + + gdisk + +- grub-pc ++ grub-efi-arm64 + + hpsa-dkms + diff --git a/patches/opnfv-fuel/0004-Fuel-VM-for-the-Enea-Armband-lab.patch b/patches/opnfv-fuel/0004-Fuel-VM-for-the-Enea-Armband-lab.patch deleted file mode 100644 index aa97aa69..00000000 --- a/patches/opnfv-fuel/0004-Fuel-VM-for-the-Enea-Armband-lab.patch +++ /dev/null @@ -1,111 +0,0 @@ -From 800aae6db0d0d79d01cec4df85075026073063dd Mon Sep 17 00:00:00 2001 -From: Josep Puigdemont -Date: Wed, 4 May 2016 14:27:23 +0200 -Subject: [PATCH] Fuel VM for the Enea Armband lab - -This is the initial VM description fit for Enea's Armband lab. - -Change-Id: Ia89f9728fff0ab1c279f6200fd558d9643cf4ea5 -Signed-off-by: Josep Puigdemont ---- - .../hardware_environment/vms/enea_lab/fuel.xml | 88 ++++++++++++++++++++++ - 1 file changed, 88 insertions(+) - create mode 100644 deploy/templates/hardware_environment/vms/enea_lab/fuel.xml - -diff --git a/deploy/templates/hardware_environment/vms/enea_lab/fuel.xml b/deploy/templates/hardware_environment/vms/enea_lab/fuel.xml -new file mode 100644 -index 0000000..8773ed4 ---- /dev/null -+++ b/deploy/templates/hardware_environment/vms/enea_lab/fuel.xml -@@ -0,0 +1,88 @@ -+ -+ fuel -+ 8290304 -+ 8290304 -+ 8 -+ -+ /machine -+ -+ -+ hvm -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ destroy -+ restart -+ restart -+ -+ -+ -+ -+ -+ /usr/libexec/qemu-kvm -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ --- -2.5.5 - diff --git a/patches/opnfv-fuel/0004-post-scripts-Allow-SSH-on-non-admin-ifaces.patch b/patches/opnfv-fuel/0004-post-scripts-Allow-SSH-on-non-admin-ifaces.patch new file mode 100644 index 00000000..e098d47c --- /dev/null +++ b/patches/opnfv-fuel/0004-post-scripts-Allow-SSH-on-non-admin-ifaces.patch @@ -0,0 +1,47 @@ +From: Alexandru Avadanii +Date: Tue, 12 Jul 2016 16:12:25 +0200 +Subject: [PATCH] post-scripts: Allow SSH on non-admin ifaces. + +By default, Fuel 9.0 configures iptables to only accept SSH connections +on admin interface. + +If more than the admin interface is configured (e.g. by transplant script +or manually in fuel menu), whitelist SSH connections on all ifaces. + +Signed-off-by: Alexandru Avadanii +--- + .../post-scripts/10_accept_ssh_all_ifaces.sh | 25 ++++++++++++++++++++++ + 1 file changed, 25 insertions(+) + create mode 100755 build/f_isoroot/f_bootstrap/post-scripts/10_accept_ssh_all_ifaces.sh + +diff --git a/build/f_isoroot/f_bootstrap/post-scripts/10_accept_ssh_all_ifaces.sh b/build/f_isoroot/f_bootstrap/post-scripts/10_accept_ssh_all_ifaces.sh +new file mode 100755 +index 0000000..b551516 +--- /dev/null ++++ b/build/f_isoroot/f_bootstrap/post-scripts/10_accept_ssh_all_ifaces.sh +@@ -0,0 +1,25 @@ ++#/bin/sh ++############################################################################## ++# Copyright (c) 2016 Enea AB and others. ++# Alexandru.Avadanii@enea.com ++# 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 ++############################################################################## ++ ++# Only mess with iptables if we have additional interfaces configured ++if grep -q "DEFROUTE=no" "/etc/sysconfig/network-scripts/ifcfg-eth0"; then ++ echo "iptables: Allow SSH connections on all interfaces" ++ # By default, Fuel 9.0 configures iptables to only accept SSH connections ++ # on admin interface. Whitelist SSH connections on all ifaces. ++ while [ $? -eq 0 ]; do ++ # First, try removing the rule we want to add to prevent duplicates ++ iptables -D INPUT -p tcp --dport ssh -j ACCEPT > /dev/null 2>&1; ++ done ++ iptables -A INPUT -p tcp --dport ssh -j ACCEPT ++ service iptables save ++ echo "iptables: Done configuring SSH" ++else ++ echo "iptables: Skipping configuring SSH for non-admin ifaces" ++fi diff --git a/patches/opnfv-fuel/0005-deploy.py-add-a-time-stamp-to-the-new-ISO-image.patch b/patches/opnfv-fuel/0005-deploy.py-add-a-time-stamp-to-the-new-ISO-image.patch new file mode 100644 index 00000000..61847ab8 --- /dev/null +++ b/patches/opnfv-fuel/0005-deploy.py-add-a-time-stamp-to-the-new-ISO-image.patch @@ -0,0 +1,39 @@ +From: Josep Puigdemont +Date: Tue, 17 May 2016 14:40:48 +0200 +Subject: [PATCH] deploy.py: add a time stamp to the new ISO image + +Add a time stamp to the newly create ISO image. This is to prevent name +collisions with other ISO images from earlier deploy jobs. + +Ideally this will only be a temporary need, and releng will provide with +unique IDs for each job that we can use to this effect. + +Signed-off-by: Josep Puigdemont +--- + deploy/deploy.py | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/deploy/deploy.py b/deploy/deploy.py +index 041ba2f..cebef97 100755 +--- a/deploy/deploy.py ++++ b/deploy/deploy.py +@@ -13,6 +13,7 @@ import os + import io + import re + import sys ++import time + import yaml + import errno + import signal +@@ -100,8 +101,9 @@ class AutoDeploy(object): + + def install_fuel_master(self): + log('Install Fuel Master') +- new_iso = ('%s/deploy-%s' +- % (self.tmp_dir, os.path.basename(self.iso_file))) ++ stamp = time.strftime("%Y%m%d%H%M%S") ++ new_iso = ('%s/deploy-%s-%s' ++ % (self.tmp_dir, stamp, os.path.basename(self.iso_file))) + self.patch_iso(new_iso) + self.iso_file = new_iso + self.install_iso() diff --git a/patches/opnfv-fuel/0006-build-docker-Use-host-s-network-stack.patch b/patches/opnfv-fuel/0006-build-docker-Use-host-s-network-stack.patch new file mode 100644 index 00000000..69b0e82f --- /dev/null +++ b/patches/opnfv-fuel/0006-build-docker-Use-host-s-network-stack.patch @@ -0,0 +1,28 @@ +From: Alexandru Avadanii +Date: Mon, 29 Aug 2016 22:58:49 +0200 +Subject: [PATCH] build: docker: Use host's /etc/hosts + +The original motivation was pointing to local mirrors via host's +"/etc/hosts", for which an alternative solution tested was +"--net=host" (see [1] for full description), but lead to wierd +loss of connectivity after a few builds. + +[1] https://docs.docker.com/v1.8/articles/networking/ + +Signed-off-by: Alexandru Avadanii +--- + build/docker/runcontext | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/build/docker/runcontext b/build/docker/runcontext +index 07b0dc1..b0d6d37 100755 +--- a/build/docker/runcontext ++++ b/build/docker/runcontext +@@ -121,6 +121,7 @@ RUN_CONTEXT_OPT="--cidfile $CID_FILE --privileged=true --rm --net=host \ + -e MIRROR_MOS_UBUNTU -e MIRROR_MOS_UBUNTU_ROOT -e MIRROR_FUEL \ + -e LATEST_TARGET_UBUNTU -e UBUNTU_ARCH -e OPNFV_GIT_SHA -e ARMBAND_BASE \ + -u $USER_ID:$GROUP_ID -w $PWD \ ++ -v /etc/hosts:/etc/hosts \ + -v $GITROOT:$GITROOT -v /sys/fs/cgroup:/sys/fs/cgroup:ro $CACHEMOUNT" + + # Passing "debug" puts up an interactive bash shell diff --git a/patches/opnfv-fuel/0006-deploy.sh-no-need-to-set-umask-0000.patch b/patches/opnfv-fuel/0006-deploy.sh-no-need-to-set-umask-0000.patch deleted file mode 100644 index 9c005907..00000000 --- a/patches/opnfv-fuel/0006-deploy.sh-no-need-to-set-umask-0000.patch +++ /dev/null @@ -1,38 +0,0 @@ -From f67625ce6c607b47bc99c5118f5e52fe8a8e763b Mon Sep 17 00:00:00 2001 -From: Josep Puigdemont -Date: Fri, 6 May 2016 03:07:40 +0200 -Subject: [PATCH] deploy.sh: no need to set umask 0000 - -Change-Id: If3283a16139097db57b06c0535d33a88dc1b2ed2 -Signed-off-by: Josep Puigdemont ---- - ci/deploy.sh | 6 ------ - 1 file changed, 6 deletions(-) - -diff --git a/ci/deploy.sh b/ci/deploy.sh -index 8411714..c08a94b 100755 ---- a/ci/deploy.sh -+++ b/ci/deploy.sh -@@ -84,9 +84,6 @@ Input parameters to the build script is: - -i .iso image to be deployed (needs to be provided in a URI - style, it can be a local resource: file:// or a remote resource http(s)://) - --NOTE: Root priviledges are needed for this script to run -- -- - Examples: - sudo `basename $0` -b file:///home/jenkins/lab-config -l lf -p pod1 -s ha_odl-l3_heat_ceilometer -i file:///home/jenkins/myiso.iso - EOF -@@ -231,9 +228,6 @@ fi - # Enable the automatic exit trap - trap do_exit SIGINT SIGTERM EXIT - --# Set no restrictive umask so that Jenkins can removeeee any residuals --umask 0000 -- - clean - - pushd ${DEPLOY_DIR} > /dev/null --- -2.5.5 - diff --git a/patches/opnfv-fuel/0007-Remove-check-for-root.patch b/patches/opnfv-fuel/0007-Remove-check-for-root.patch deleted file mode 100644 index 2282f59d..00000000 --- a/patches/opnfv-fuel/0007-Remove-check-for-root.patch +++ /dev/null @@ -1,85 +0,0 @@ -From b7d5f0ca9a76de6d99fc5d6f5cbb8df864c62b7b Mon Sep 17 00:00:00 2001 -From: Josep Puigdemont -Date: Wed, 4 May 2016 14:27:23 +0200 -Subject: [PATCH] Remove check for root - -Change-Id: Ic6bfaf07c0d9d347aec2df8724184d0314665503 -Signed-off-by: Josep Puigdemont ---- - ci/deploy.sh | 5 ----- - deploy/deploy-config.py | 1 - - deploy/deploy.py | 2 -- - deploy/environments/virtual_fuel.py | 2 -- - 4 files changed, 10 deletions(-) - -diff --git a/ci/deploy.sh b/ci/deploy.sh -index c08a94b..081806c 100755 ---- a/ci/deploy.sh -+++ b/ci/deploy.sh -@@ -209,11 +209,6 @@ do - esac - done - --if [[ $EUID -ne 0 ]]; then -- echo "This script must be run as root" 1>&2 -- exit 1 --fi -- - if [ -z $BASE_CONFIG_URI ] || [ -z $TARGET_LAB ] || \ - [ -z $TARGET_POD ] || [ -z $DEPLOY_SCENARIO ] || \ - [ -z $ISO ]; then -diff --git a/deploy/deploy-config.py b/deploy/deploy-config.py -index 65d51b2..88a1111 100644 ---- a/deploy/deploy-config.py -+++ b/deploy/deploy-config.py -@@ -40,7 +40,6 @@ from common import ( - check_file_exists, - create_dir_if_not_exists, - delete, -- check_if_root, - ArgParser, - ) - -diff --git a/deploy/deploy.py b/deploy/deploy.py -index 56e5bd5..a021e28 100755 ---- a/deploy/deploy.py -+++ b/deploy/deploy.py -@@ -33,7 +33,6 @@ from common import ( - check_dir_exists, - create_dir_if_not_exists, - delete, -- check_if_root, - ArgParser, - ) - -@@ -234,7 +233,6 @@ class AutoDeploy(object): - return 0 - - def run(self): -- check_if_root() - if self.cleanup_only: - self.cleanup_execution_environment() - else: -diff --git a/deploy/environments/virtual_fuel.py b/deploy/environments/virtual_fuel.py -index b1a76e4..4ff68f6 100644 ---- a/deploy/environments/virtual_fuel.py -+++ b/deploy/environments/virtual_fuel.py -@@ -18,7 +18,6 @@ import time - from common import ( - exec_cmd, - check_file_exists, -- check_if_root, - delete, - log, - ) -@@ -135,7 +134,6 @@ class VirtualFuel(ExecutionEnvironment): - vm_definition_overwrite) - - def setup_environment(self): -- check_if_root() - self.cleanup_environment() - self.create_vm() - --- -2.5.5 - diff --git a/patches/opnfv-fuel/0007-deploy-Fix-add-bootstrap-DEA-override-delay.patch b/patches/opnfv-fuel/0007-deploy-Fix-add-bootstrap-DEA-override-delay.patch new file mode 100644 index 00000000..88ac7625 --- /dev/null +++ b/patches/opnfv-fuel/0007-deploy-Fix-add-bootstrap-DEA-override-delay.patch @@ -0,0 +1,32 @@ +From: Alexandru Avadanii +Date: Wed, 17 Aug 2016 16:18:26 +0200 +Subject: [PATCH] deploy: Fix/add bootstrap DEA override delay + +Previous change adding support for DEA to override bootstrap config +did not account for slow execution on remote servers, so add a +one minute sleep before checking for completition of fuel install. + +Signed-off-by: Alexandru Avadanii +--- + deploy/install_fuel_master.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/deploy/install_fuel_master.py b/deploy/install_fuel_master.py +index 808d0b1..1a7685a 100644 +--- a/deploy/install_fuel_master.py ++++ b/deploy/install_fuel_master.py +@@ -196,11 +196,13 @@ class InstallFuelMaster(object): + self.work_dir, os.path.basename(self.dea_file))) + + def wait_until_installation_completed(self): +- WAIT_LOOP = 360 ++ WAIT_LOOP = 720 + SLEEP_TIME = 10 + CMD = 'pgrep -f %s' % BOOTSTRAP_ADMIN + + install_completed = False ++ time.sleep(60) ++ self.wait_for_node_up() + with self.ssh: + for i in range(WAIT_LOOP): + ret = self.ssh.exec_cmd(CMD) diff --git a/patches/opnfv-fuel/0009-dea_base-replace-grub-pc-by-grub-efi-arm64.patch b/patches/opnfv-fuel/0009-dea_base-replace-grub-pc-by-grub-efi-arm64.patch deleted file mode 100644 index 08b84def..00000000 --- a/patches/opnfv-fuel/0009-dea_base-replace-grub-pc-by-grub-efi-arm64.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: Josep Puigdemont -Date: Mon, 11 Jul 2016 15:21:56 +0200 -Subject: [PATCH] dea_base: replace grub-pc by grub-efi-arm64 - -Signed-off-by: Josep Puigdemont ---- - deploy/config/dea_base.yaml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/deploy/config/dea_base.yaml b/deploy/config/dea_base.yaml -index 0b8485b..658b328 100644 ---- a/deploy/config/dea_base.yaml -+++ b/deploy/config/dea_base.yaml -@@ -462,7 +462,7 @@ settings: - - gdisk - -- grub-pc -+ grub-efi-arm64 - - hpsa-dkms - diff --git a/patches/opnfv-fuel/0010-post-scripts-Allow-SSH-on-non-admin-ifaces.patch b/patches/opnfv-fuel/0010-post-scripts-Allow-SSH-on-non-admin-ifaces.patch deleted file mode 100644 index e098d47c..00000000 --- a/patches/opnfv-fuel/0010-post-scripts-Allow-SSH-on-non-admin-ifaces.patch +++ /dev/null @@ -1,47 +0,0 @@ -From: Alexandru Avadanii -Date: Tue, 12 Jul 2016 16:12:25 +0200 -Subject: [PATCH] post-scripts: Allow SSH on non-admin ifaces. - -By default, Fuel 9.0 configures iptables to only accept SSH connections -on admin interface. - -If more than the admin interface is configured (e.g. by transplant script -or manually in fuel menu), whitelist SSH connections on all ifaces. - -Signed-off-by: Alexandru Avadanii ---- - .../post-scripts/10_accept_ssh_all_ifaces.sh | 25 ++++++++++++++++++++++ - 1 file changed, 25 insertions(+) - create mode 100755 build/f_isoroot/f_bootstrap/post-scripts/10_accept_ssh_all_ifaces.sh - -diff --git a/build/f_isoroot/f_bootstrap/post-scripts/10_accept_ssh_all_ifaces.sh b/build/f_isoroot/f_bootstrap/post-scripts/10_accept_ssh_all_ifaces.sh -new file mode 100755 -index 0000000..b551516 ---- /dev/null -+++ b/build/f_isoroot/f_bootstrap/post-scripts/10_accept_ssh_all_ifaces.sh -@@ -0,0 +1,25 @@ -+#/bin/sh -+############################################################################## -+# Copyright (c) 2016 Enea AB and others. -+# Alexandru.Avadanii@enea.com -+# 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 -+############################################################################## -+ -+# Only mess with iptables if we have additional interfaces configured -+if grep -q "DEFROUTE=no" "/etc/sysconfig/network-scripts/ifcfg-eth0"; then -+ echo "iptables: Allow SSH connections on all interfaces" -+ # By default, Fuel 9.0 configures iptables to only accept SSH connections -+ # on admin interface. Whitelist SSH connections on all ifaces. -+ while [ $? -eq 0 ]; do -+ # First, try removing the rule we want to add to prevent duplicates -+ iptables -D INPUT -p tcp --dport ssh -j ACCEPT > /dev/null 2>&1; -+ done -+ iptables -A INPUT -p tcp --dport ssh -j ACCEPT -+ service iptables save -+ echo "iptables: Done configuring SSH" -+else -+ echo "iptables: Skipping configuring SSH for non-admin ifaces" -+fi diff --git a/patches/opnfv-fuel/0015-build-Makefile-Overrideable-product-commit-hash.patch b/patches/opnfv-fuel/0015-build-Makefile-Overrideable-product-commit-hash.patch deleted file mode 100644 index 1c9bd82a..00000000 --- a/patches/opnfv-fuel/0015-build-Makefile-Overrideable-product-commit-hash.patch +++ /dev/null @@ -1,35 +0,0 @@ -From: Alexandru Avadanii -Date: Mon, 18 Jul 2016 23:50:30 +0200 -Subject: [PATCH] build/Makefile: Overrideable product, commit hash. - -For Armband's build system, using only the Fuel commit ID is not -enough to fully describe the state of the source code, as patches -are also applied to other fuel modules (as git submodules). -Instead, a pointer to a valid Armband commit ID should be used. - -While at it, allow product name to be overriden, to signal the -commit ID should be looked up inside the Armband repository. - -Signed-off-by: Alexandru Avadanii ---- - build/Makefile | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/build/Makefile b/build/Makefile -index ec5d27a..ba117da 100644 ---- a/build/Makefile -+++ b/build/Makefile -@@ -21,11 +21,11 @@ SHELL = /bin/bash - export MOSVERSION = 9.0 - export ISOSRC = file:$(shell pwd)/fuel-$(MOSVERSION).iso - export ISOCACHE = $(shell pwd)/$(shell basename $(ISOSRC)) --export PRODNO = "OPNFV_FUEL" -+export PRODNO ?= "OPNFV_FUEL" - export REVSTATE = "P0000" - export USER ?= $(shell whoami) - export BUILD_DATE = $(shell date --utc +%Y-%m-%d:%H:%M) --export OPNFV_GIT_SHA = $(shell git rev-parse HEAD) -+export OPNFV_GIT_SHA ?= $(shell git rev-parse HEAD) - # Store in /etc/fuel_build_id on fuel master - export BUILD_ID := $(PRODNO)_$(BUILD_DATE)_$(OPNFV_GIT_SHA) - diff --git a/patches/opnfv-fuel/0020-Add-arm64-deb-repositories-setup.patch b/patches/opnfv-fuel/0020-Add-arm64-deb-repositories-setup.patch deleted file mode 100644 index 9083ceb1..00000000 --- a/patches/opnfv-fuel/0020-Add-arm64-deb-repositories-setup.patch +++ /dev/null @@ -1,166 +0,0 @@ -From: Stanislaw Kardach -Date: Wed, 24 Feb 2016 20:04:03 +0100 -Subject: [PATCH] Add arm64 deb repositories setup - ---- - build/f_isoroot/f_kscfg/ks.cfg.patch | 10 ++++++++++ - build/install/apt-ftparchive-deb.conf | 8 +++++++- - build/install/apt-ftparchive-release.conf | 2 +- - build/install/apt-ftparchive-udeb.conf | 7 ++++++- - build/install/install.sh | 22 ++++++++++++++++++---- - build/install/uninstall.sh | 18 ++++++++++-------- - 6 files changed, 52 insertions(+), 15 deletions(-) - -diff --git a/build/f_isoroot/f_kscfg/ks.cfg.patch b/build/f_isoroot/f_kscfg/ks.cfg.patch -index a6840e4..e1ae8fc 100644 ---- a/build/f_isoroot/f_kscfg/ks.cfg.patch -+++ b/build/f_isoroot/f_kscfg/ks.cfg.patch -@@ -1,6 +1,16 @@ - *** /dev/null 2016-04-26 10:10:11.481587709 +0200 - --- ks.cfg 2016-04-26 10:10:11.481587709 +0200 - *************** -+*** 448,453 **** -+--- 448,454 ---- -+ cp ${SOURCE}/.treeinfo ${repodir}/centos/x86_64 -+ -+ # Copying Ubuntu files -++ # FIXME: This is missleading as dist/pool may contain multiple arch! -+ mkdir -p ${repodir}/ubuntu/x86_64/images -+ cp -r ${SOURCE}/ubuntu/dists ${repodir}/ubuntu/x86_64 -+ cp -r ${SOURCE}/ubuntu/pool ${repodir}/ubuntu/x86_64 -+*************** - *** 579,584 **** - --- 579,592 ---- - -diff --git a/build/install/apt-ftparchive-deb.conf b/build/install/apt-ftparchive-deb.conf -index 0d15aec..e6392f8 100644 ---- a/build/install/apt-ftparchive-deb.conf -+++ b/build/install/apt-ftparchive-deb.conf -@@ -16,12 +16,18 @@ TreeDefault { - Directory "pool"; - }; - --BinDirectory "pool/main" { -+BinDirectory "pool/main/binary-amd64" { - Packages "dists/trusty/main/binary-amd64/Packages"; - BinOverride "./indices/override.trusty.main"; - ExtraOverride "./indices/override.trusty.extra.main"; - }; - -+BinDirectory "pool/main/binary-arm64" { -+ Packages "dists/trusty/main/binary-arm64/Packages"; -+ BinOverride "./indices/override.trusty.main"; -+ ExtraOverride "./indices/override.trusty.extra.main"; -+}; -+ - Default { - Packages { - Extensions ".deb"; -diff --git a/build/install/apt-ftparchive-release.conf b/build/install/apt-ftparchive-release.conf -index 02706bd..2838714 100644 ---- a/build/install/apt-ftparchive-release.conf -+++ b/build/install/apt-ftparchive-release.conf -@@ -13,6 +13,6 @@ APT::FTPArchive::Release::Label "Ubuntu"; - APT::FTPArchive::Release::Suite "trusty"; - APT::FTPArchive::Release::Version "1.04"; - APT::FTPArchive::Release::Codename "trusty"; --APT::FTPArchive::Release::Architectures "amd64"; -+APT::FTPArchive::Release::Architectures "amd64 arm64"; - APT::FTPArchive::Release::Components "main"; - APT::FTPArchive::Release::Description "Ubuntu Trusty Tahr 14.04 LTS"; -diff --git a/build/install/apt-ftparchive-udeb.conf b/build/install/apt-ftparchive-udeb.conf -index 3b5b239..c6ab4fb 100644 ---- a/build/install/apt-ftparchive-udeb.conf -+++ b/build/install/apt-ftparchive-udeb.conf -@@ -16,11 +16,16 @@ TreeDefault { - Directory "pool"; - }; - --BinDirectory "pool/debian-installer" { -+BinDirectory "pool/debian-installer/binary-amd64" { - Packages "dists/trusty/main/debian-installer/binary-amd64/Packages"; - BinOverride "./indices/override.trusty.main.debian-installer"; - }; - -+BinDirectory "pool/debian-installer/binary-arm64" { -+ Packages "dists/trusty/main/debian-installer/binary-arm64/Packages"; -+ BinOverride "./indices/override.trusty.main.debian-installer"; -+}; -+ - Default { - Packages { - Extensions ".udeb"; -diff --git a/build/install/install.sh b/build/install/install.sh -index 4e0389e..8c29e08 100755 ---- a/build/install/install.sh -+++ b/build/install/install.sh -@@ -122,12 +122,24 @@ prep_make_live() { - ssh-copy-id root@$FUELHOST - sshfs root@1${FUELHOST}:/ $TMP_HOSTMOUNT - -- if [ -f $REPO/dists/trusty/main/binary-amd64/Packages.backup ]; then -+ for arch in arm64 amd64; do -+ if [ -f $REPO/dists/trusty/main/binary-${arch}/Packages.backup ]; then -+ echo "Error - found backup file for Packages for ${arch}!" -+ exit 1 -+ fi -+ -+ if [ -f $REPO/dists/trusty/main/binary-${arch}/Packages.gz.backup ]; then -+ echo "Error - found backup file for Packages.gz for ${arch}!" -+ exit 1 -+ fi -+ done -+ -+ if [ -f $REPO/dists/trusty/main/binary-arm64/Packages.backup ]; then - echo "Error - found backup file for Packages!" - exit 1 - fi - -- if [ -f $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup ]; then -+ if [ -f $REPO/dists/trusty/main/binary-arm64/Packages.gz.backup ]; then - echo "Error - found backup file for Packages.gz!" - exit 1 - fi -@@ -142,8 +154,10 @@ prep_make_live() { - exit 1 - fi - -- cp $REPO/dists/trusty/main/binary-amd64/Packages $REPO/dists/trusty/main/binary-amd64/Packages.backup -- cp $REPO/dists/trusty/main/binary-amd64/Packages.gz $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup -+ for arch in arm64 amd64; do -+ cp $REPO/dists/trusty/main/binary-${arch}/Packages $REPO/dists/trusty/main/binary-${arch}/Packages.backup -+ cp $REPO/dists/trusty/main/binary-${arch}/Packages.gz $REPO/dists/trusty/main/binary-${arch}/Packages.gz.backup -+ done - cp $REPO/dists/trusty/Release $REPO/dists/trusty/Release.backup - cp -Rvp $DEST/etc/puppet $DEST/etc/puppet.backup - } -diff --git a/build/install/uninstall.sh b/build/install/uninstall.sh -index a9e74bc..e90c632 100755 ---- a/build/install/uninstall.sh -+++ b/build/install/uninstall.sh -@@ -31,15 +31,17 @@ DEST=$MOUNT - REPO=$DEST/var/www/nailgun/ubuntu/fuelweb/x86_64 - - cd $REPO --if [ ! -f $REPO/dists/trusty/main/binary-amd64/Packages.backup ]; then -- echo "Error - didn't find backup file for Packages!" -- exit 1 --fi -+for arch in arm64 amd64; do -+ if [ ! -f $REPO/dists/trusty/main/binary-${arch}/Packages.backup ]; then -+ echo "Error - didn't find backup file for Packages for ${arch}!" -+ exit 1 -+ fi - --if [ ! -f $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup ]; then -- echo "Error - didn't find backup file for Packages.gz!" -- exit 1 --fi -+ if [ ! -f $REPO/dists/trusty/main/binary-${arch}/Packages.gz.backup ]; then -+ echo "Error - didn't find backup file for Packages.gz for ${arch}!" -+ exit 1 -+ fi -+done - - if [ ! -f $REPO/dists/trusty/Release.backup ]; then - echo "Error - didn't find backup file for Release!" diff --git a/patches/opnfv-fuel/0021-Build-bootstrap-image-for-arm64.patch b/patches/opnfv-fuel/0021-Build-bootstrap-image-for-arm64.patch deleted file mode 100644 index 4daf733e..00000000 --- a/patches/opnfv-fuel/0021-Build-bootstrap-image-for-arm64.patch +++ /dev/null @@ -1,27 +0,0 @@ -From: Stanislaw Kardach -Date: Thu, 3 Mar 2016 19:04:07 +0100 -Subject: [PATCH] Build bootstrap image for arm64 - -For now the arch is hardcoded for simplicity. We should detect this -but how? If we're multi-arch then one bootstrap image should be built -per supported arch. This requires Fuel refactoring. ---- - build/bootstrap_admin_node.sh.patch | 17 +++++++++++++++++ - 1 file changed, 17 insertions(+) - -diff --git a/build/patch-repos/0010-bootstrap_admin_node.sh.patch b/build/patch-repos/0010-bootstrap_admin_node.sh.patch ---- a/build/patch-repos/0010-bootstrap_admin_node.sh.patch -+++ b/build/patch-repos/0010-bootstrap_admin_node.sh.patch -@@ -53,3 +53,12 @@ - # Enable iptables - systemctl enable iptables.service -+@@ -484,7 +490,7 @@ -+ local ret=1 -+ echo ${bs_progress_message} >&2 -+ set_ui_bootstrap_error "${bs_progress_message}" >&2 -+- if fuel-bootstrap -v --debug build --activate >>"$bs_build_log" 2>&1; then -++ if fuel-bootstrap -v --debug build --target_arch arm64 --activate >>"$bs_build_log" 2>&1; then -+ ret=0 -+ fuel notify --topic "done" --send "${bs_done_message}" -+ else - @@ -532,6 +545,16 @@ systemctl start ntpd diff --git a/patches/opnfv-fuel/0022-bootstrap-Use-public-Ubuntu-ports-mirrors.patch b/patches/opnfv-fuel/0022-bootstrap-Use-public-Ubuntu-ports-mirrors.patch deleted file mode 100644 index ff13b39b..00000000 --- a/patches/opnfv-fuel/0022-bootstrap-Use-public-Ubuntu-ports-mirrors.patch +++ /dev/null @@ -1,46 +0,0 @@ -From: Alexandru Avadanii -Date: Thu, 3 Mar 2016 19:18:27 +0100 -Subject: [PATCH] bootstrap: Use public Ubuntu-ports mirrors. - -Instead of relying on 127.0.0.1 partial Ubuntu mirror, use -public archives. -While doing so, switch to Ubuntu-ports, enabling building arm64 -bootstraps. - -NOTE: This disables the abillity to build amd64 bootstraps with -current config. ---- - build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml b/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml -index aa12c45..2e4843d 100644 ---- a/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml -+++ b/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml -@@ -36,19 +36,19 @@ - repos: - - name: ubuntu - section: "main universe multiverse" -- uri: "http://127.0.0.1:8080/mirrors/ubuntu" -+ uri: "http://ports.ubuntu.com/ubuntu-ports" - priority: - suite: trusty - type: deb - - name: ubuntu-updates - section: "main universe multiverse" -- uri: "http://127.0.0.1:8080/mirrors/ubuntu" -+ uri: "http://ports.ubuntu.com/ubuntu-ports" - priority: - suite: trusty-updates - type: deb - - name: ubuntu-security - section: "main universe multiverse" -- uri: "http://127.0.0.1:8080/mirrors/ubuntu" -+ uri: "http://ports.ubuntu.com/ubuntu-ports" - priority: - suite: trusty-security - type: deb -@@ -60,2 +60,3 @@ - direct_repo_addresses: -+ - "ports.ubuntu.com" - - "127.0.0.1" diff --git a/patches/opnfv-fuel/0027-UX-Update-bootstrap-target-build-time-estimate.patch b/patches/opnfv-fuel/0027-UX-Update-bootstrap-target-build-time-estimate.patch deleted file mode 100644 index fe623957..00000000 --- a/patches/opnfv-fuel/0027-UX-Update-bootstrap-target-build-time-estimate.patch +++ /dev/null @@ -1,38 +0,0 @@ -From: Alexandru Avadanii -Date: Mon, 9 May 2016 17:05:53 +0200 -Subject: [PATCH] UX: Update bootstrap/target build time estimate. - -While building for a different architecture (e.g. AArch64 on x86_64), -the bootstrap/target image build may take longer, due to latency -introduced by using qemu-user-static. - -Signed-off-by: Alexandru Avadanii ---- - build/bootstrap_admin_node.sh.patch | 23 +++++++++++++++++++++++ - 1 file changed, 23 insertions(+) - -diff --git a/build/patch-repos/0010-bootstrap_admin_node.sh.patch b/build/patch-repos/0010-bootstrap_admin_node.sh.patch -index c66b497..46b53e6 100644 ---- a/build/patch-repos/0010-bootstrap_admin_node.sh.patch -+++ b/build/patch-repos/0010-bootstrap_admin_node.sh.patch -@@ -8,5 +8,20 @@ - --- a/iso/bootstrap_admin_node.sh - +++ b/iso/bootstrap_admin_node.sh -+@@ -86,9 +86,11 @@ -+ http://docs.openstack.org/developer/fuel-docs/userdocs/fuel-install-guide/bootstrap/\ -+ bootstrap_troubleshoot.html" -+ bs_progress_message="There is no active bootstrap. Bootstrap image building \ -+-is in progress. Usually it takes 15-20 minutes. It depends on your internet \ -+-connection and hardware performance. After bootstrap image becomes available, \ -+-reboot nodes that failed to be discovered." -++is in progress. Usually it takes 15-20 minutes for a native build (x86_64) \ -++and/or 30-45 minutes for each cross-build (e.g. AArch64). \ -++It depends on your internet connection, hardware performance and selected \ -++bootstrap architecture(s). This ISO supports AArch64 only. After bootstrap \ -++image becomes available, reboot nodes that failed to be discovered." -+ bs_done_message="Default bootstrap image building done. Now you can boot new \ -+ nodes over PXE, they will be discovered and become available for installing \ -+ OpenStack on them" - @@ -339,8 +339,22 @@ fuelmenu --save-only --iface=$ADMIN_INTERFACE || fail - set +x - echo "Done!" diff --git a/patches/opnfv-fuel/0028-bootstrap-Add-lshw-package.patch b/patches/opnfv-fuel/0028-bootstrap-Add-lshw-package.patch deleted file mode 100644 index a811f2f3..00000000 --- a/patches/opnfv-fuel/0028-bootstrap-Add-lshw-package.patch +++ /dev/null @@ -1,29 +0,0 @@ -From: Alexandru Avadanii -Date: Tue, 24 May 2016 16:42:21 +0200 -Subject: [PATCH] bootstrap: Add lshw package. - -Until Ubuntu Trusty fixes the following bug on AArch64 [1]: -"AArch64: slow cpuinfo due to redundant loop" -we will be using a patched version of from Armband MOS repos. - -This change enforces replacing the lshw from Ubuntu with our custom, -patched package. - -[1] https://bugs.launchpad.net/ubuntu/+source/lshw/+bug/1582181 - -Signed-off-by: Alexandru Avadanii ---- - build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml b/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml -index 15d9e9d..b45a14a 100644 ---- a/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml -+++ b/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml -@@ -17,5 +17,6 @@ - - live-boot - - live-boot-initramfs-tools -+ - lshw - - mc - - mcollective - - msmtp-mta diff --git a/patches/opnfv-fuel/0030-deploy.py-add-a-time-stamp-to-the-new-ISO-image.patch b/patches/opnfv-fuel/0030-deploy.py-add-a-time-stamp-to-the-new-ISO-image.patch deleted file mode 100644 index 3e3480b1..00000000 --- a/patches/opnfv-fuel/0030-deploy.py-add-a-time-stamp-to-the-new-ISO-image.patch +++ /dev/null @@ -1,39 +0,0 @@ -From: Josep Puigdemont -Date: Tue, 17 May 2016 14:40:48 +0200 -Subject: [PATCH] deploy.py: add a time stamp to the new ISO image - -Add a time stamp to the newly create ISO image. This is to prevent name -collisions with other ISO images from earlier deploy jobs. - -Ideally this will only be a temporary need, and releng will provide with -unique IDs for each job that we can use to this effect. - -Signed-off-by: Josep Puigdemont ---- - deploy/deploy.py | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/deploy/deploy.py b/deploy/deploy.py -index 041ba2f..cebef97 100755 ---- a/deploy/deploy.py -+++ b/deploy/deploy.py -@@ -13,6 +13,7 @@ import os - import io - import re - import sys -+import time - import yaml - import errno - import signal -@@ -100,8 +101,9 @@ class AutoDeploy(object): - - def install_fuel_master(self): - log('Install Fuel Master') -- new_iso = ('%s/deploy-%s' -- % (self.tmp_dir, os.path.basename(self.iso_file))) -+ stamp = time.strftime("%Y%m%d%H%M%S") -+ new_iso = ('%s/deploy-%s-%s' -+ % (self.tmp_dir, stamp, os.path.basename(self.iso_file))) - self.patch_iso(new_iso) - self.iso_file = new_iso - self.install_iso() diff --git a/patches/opnfv-fuel/0031-post-scripts-Enable-systemd-binfmt-for-first-boot.patch b/patches/opnfv-fuel/0031-post-scripts-Enable-systemd-binfmt-for-first-boot.patch deleted file mode 100644 index 03e877a1..00000000 --- a/patches/opnfv-fuel/0031-post-scripts-Enable-systemd-binfmt-for-first-boot.patch +++ /dev/null @@ -1,93 +0,0 @@ -From: Alexandru Avadanii -Date: Thu, 9 Jun 2016 19:46:56 +0200 -Subject: [PATCH] post-scripts: Enable systemd-binfmt for first boot. - -IMPORTANT: -This commit introduces the following file on Fuel Master, -containing the list of arch supported for target nodes: -. - -This file is created AFTER pre.d OPNFV scripts are ran, also by -bootstrap_admin_node.sh, BEFORE the post.d scripts are executed. -NOTE: Arch format is the same used by dpkg (e.g.: "amd64 arm64") - -Based on the number of foreign architectures we should support -(the list of archs in /etc/fuel_openstack_arch minus native arch), -we determine whether cross-builds are expected, in which case -binfmt support should be functional during first Fuel Master boot. - -Since systemd-binfmt service has a series of preconditions for -starting, which are tested early during first boot, some of them -are NOT YET true (e.g. no binfmt handlers are present before -qemu-user-static package is installed), so the service is not -automatically started. Of course, this only affects the first boot. - -Finally, this commit adds an OPNFV post-install script in -/opt/opnfv/bootstrap/post.d, which starts systemd-binfmt service. ---- - build/bootstrap_admin_node.sh.patch | 15 ++++++++++ - .../post-scripts/80_prepare_cross_builds.sh | 32 ++++++++++++++++++++++ - 2 files changed, 47 insertions(+) - create mode 100755 build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh - -diff --git a/build/patch-repos/0010-bootstrap_admin_node.sh.patch b/build/patch-repos/0010-bootstrap_admin_node.sh.patch -index b1ea90b..7f16d0b 100644 ---- a/build/patch-repos/0010-bootstrap_admin_node.sh.patch -+++ b/build/patch-repos/0010-bootstrap_admin_node.sh.patch -@@ -24,5 +24,18 @@ - nodes over PXE, they will be discovered and become available for installing \ - OpenStack on them" -+@@ -239,6 +239,12 @@ -+ # /etc/fuel_openstack_version is provided by 'fuel-openstack-metadata' package -+ OPENSTACK_VERSION=$(cat /etc/fuel_openstack_version) -+ -++# FIXME(armband): This part might be moved to an earlier stage later -++# /etc/fuel_openstack_arch is constructed based on local mirror metadata -++grep -oP "^Architectures: \K.*$" \ -++ ${wwwdir}/${OPENSTACK_VERSION}/ubuntu/x86_64/dists/mos${FUEL_RELEASE}/Release > \ -++ /etc/fuel_openstack_arch -++ -+ # We do not ship debian-installer kernel and initrd on ISO. -+ # But we still need to be able to create ubuntu cobbler distro -+ # which requires kernel and initrd to be available. So, we - @@ -339,8 +339,22 @@ fuelmenu --save-only --iface=$ADMIN_INTERFACE || fail - set +x - echo "Done!" -diff --git a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -new file mode 100755 -index 0000000..d33d1d1 ---- /dev/null -+++ b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -@@ -0,0 +1,32 @@ -+#/bin/sh -+############################################################################## -+# Copyright (c) 2016 Enea AB and others. -+# Alexandru.Avadanii@enea.com -+# 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 -+############################################################################## -+ -+echo "Preparing for cross-building bootstrap/target images" -+ -+# Fmt handlers are set up by qemu-user-static (after systemd-binfmt -+# prerequisites are checked during first boot of Fuel Master node). -+ -+# Cross-building support provides dpkg, as a fuel-agent dependency -+if which dpkg > /dev/null 2>&1; then -+ # /etc/fuel_openstack_arch is created by bootstrap_admin_node.sh -+ FOREIGN_ARCH_CNT=$(sed -e "s/$(dpkg --print-architecture)//" \ -+ /etc/fuel_openstack_arch | wc -w) -+ if [ ${FOREIGN_ARCH_CNT} -gt 0 ]; then -+ # If no fmt handlers are configured, the service is not started, -+ # so request it explicitly (only necessary for the first boot). -+ systemctl start systemd-binfmt -+ if [ $? -ne 0 ]; then -+ echo "Error starting systemd-binfmt!" -+ exit 1 -+ fi -+ fi -+fi -+ -+echo "Done preparing cross-building" diff --git a/patches/opnfv-fuel/0032-mcagent-Increase-max-shell-command-timeout-to-2h.patch b/patches/opnfv-fuel/0032-mcagent-Increase-max-shell-command-timeout-to-2h.patch deleted file mode 100644 index f5fc4cf1..00000000 --- a/patches/opnfv-fuel/0032-mcagent-Increase-max-shell-command-timeout-to-2h.patch +++ /dev/null @@ -1,49 +0,0 @@ -From: Alexandru Avadanii -Date: Thu, 9 Jun 2016 21:37:48 +0200 -Subject: [PATCH] mcagent: Increase max shell command timeout to 2h - -Since `execute_shell_command` mcagent is used for building the target -image and the timeout provided in the astute task is just respected on -the Astute level (on mcollective level this timeout is actually a -minumum between value provided and ddl value) we need to increase it -for Armband operation. - -Because Armband builds the target image via `qemu-debootstrap`, it can -take more than 1 hour to finish the building. Therefore aside of -increasing the timeout in the Astute task, the maximum timeout value -for mcagent has to be increased. - -[ Alexandru Avadanii ] -Repackaged, based on Stan's `fuel-astute` patch. - -Signed-off-by: Stanislaw Kardach -Signed-off-by: Alexandru Avadanii ---- - .../f_bootstrap/post-scripts/80_prepare_cross_builds.sh | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -index d33d1d1..d78b850 100755 ---- a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -+++ b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -@@ -26,6 +26,20 @@ if which dpkg > /dev/null 2>&1; then - echo "Error starting systemd-binfmt!" - exit 1 - fi -+ -+ # Cross-build timeout adjustments -+ # -+ # Since `execute_shell_command` mcagent is used for building the target -+ # image and the timeout provided in the astute task is just respected on -+ # the Astute level (on mcollective level this timeout is actually a -+ # minumum between value provided and ddl value) we need to increase it -+ # for cross-build operations. -+ -+ # Building the target image via `qemu-debootstrap` can take more than -+ # 1 hour. Therefore aside of increasing the timeout in the Astute task, -+ # the maximum timeout value for mcagent has to be increased (use 2h). -+ sed -i.bak -r 's/^(\s+:timeout\s*=>)\s*[[:digit:]]+$/\1 7200/' \ -+ /usr/libexec/mcollective/mcollective/agent/execute_shell_command.ddl - fi - fi - diff --git a/patches/opnfv-fuel/0033-bootstrap-Use-gzip-instead-of-xz-compression.patch b/patches/opnfv-fuel/0033-bootstrap-Use-gzip-instead-of-xz-compression.patch deleted file mode 100644 index e7b176b9..00000000 --- a/patches/opnfv-fuel/0033-bootstrap-Use-gzip-instead-of-xz-compression.patch +++ /dev/null @@ -1,52 +0,0 @@ -From: Alexandru Avadanii -Date: Fri, 10 Jun 2016 22:30:29 +0200 -Subject: [PATCH] bootstrap: Use gzip instead of xz compression. - -bootstrap mksquashfs using qemu-user-static is extremely slow, -taking up to one hour. gzip, on the other hand, is reasonably fast. -According to [1], xz is slower, with not much size gain. - -[1] https://jonathancarter.org/2015/04/06/squashfs-performance-testing/ - -Signed-off-by: Alexandru Avadanii ---- - .../post-scripts/80_prepare_cross_builds.sh | 19 +++++++++++++++++++ - 1 file changed, 19 insertions(+) - -diff --git a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -index 3839d62..7ceaacc 100755 ---- a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -+++ b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -@@ -27,6 +27,11 @@ if which dpkg > /dev/null 2>&1; then - exit 1 - fi - -+ # Determine python site-packages directory location -+ PYTHON_SITEPKGS_DIR=$(python -c \ -+ "from distutils.sysconfig import get_python_lib; print(get_python_lib())") -+ [ -d ${PYTHON_SITEPKGS_DIR} ] || exit 1 -+ - # Cross-build timeout adjustments - # - # Since `execute_shell_command` mcagent is used for building the target -@@ -40,6 +45,20 @@ if which dpkg > /dev/null 2>&1; then - # the maximum timeout value for mcagent has to be increased (use 2h). - sed -i.bak -r 's/^(\s+:timeout\s*=>)\s*[[:digit:]]+$/\1 7200/' \ - /usr/libexec/mcollective/mcollective/agent/execute_shell_command.ddl -+ -+ # Bootstrap: Use gzip instead of xz compression. -+ # -+ # bootstrap mksquashfs via `qemu-user-static` is extremely slow, -+ # taking up to one hour. gzip, on the other hand, is reasonably fast. -+ -+ # See the following article for a comparison between gzip and xz -+ # https://jonathancarter.org/2015/04/06/squashfs-performance-testing/ -+ # xz is slower, with very little size gain. -+ if [ -f ${PYTHON_SITEPKGS_DIR}/fuel_bootstrap/consts.py ]; then -+ sed -i.bak -r "s/^(\s+'compress_format'\s*:\s*').*?('.*)$/\1gzip\2/g" \ -+ ${PYTHON_SITEPKGS_DIR}/fuel_bootstrap/consts.py -+ echo "INFO: [xz] => [gzip] updated bootstrap initrd / rootfs compression." -+ fi - fi - fi - diff --git a/patches/opnfv-fuel/0034-Nailgun-Increase-target-image-build-timeout.patch b/patches/opnfv-fuel/0034-Nailgun-Increase-target-image-build-timeout.patch deleted file mode 100644 index 2fbe680a..00000000 --- a/patches/opnfv-fuel/0034-Nailgun-Increase-target-image-build-timeout.patch +++ /dev/null @@ -1,36 +0,0 @@ -From: Alexandru Avadanii -Date: Sat, 11 Jun 2016 21:37:29 +0200 -Subject: [PATCH] Nailgun: Increase target image build timeout - -Currently we're close to 40 minutes of image building (thanks to -qemu-debootstrap). If network connectivity is a bit slow (happened to -me) it's easy to go over 1h limit. Therefore let's push this to 2 hours -to be safer. - -[ Alexandru Avadanii ] -Moved original patch wrote by Stan to post-install. - -Signed-off-by: Stanislaw Kardach -Signed-off-by: Alexandru Avadanii ---- - .../f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -index 7ceaacc..0435a28 100755 ---- a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -+++ b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -@@ -45,6 +45,13 @@ if which dpkg > /dev/null 2>&1; then - # the maximum timeout value for mcagent has to be increased (use 2h). - sed -i.bak -r 's/^(\s+:timeout\s*=>)\s*[[:digit:]]+$/\1 7200/' \ - /usr/libexec/mcollective/mcollective/agent/execute_shell_command.ddl -+ # Update nailgun timeout setting (2h) -+ if [ -f ${PYTHON_SITEPKGS_DIR}/nailgun/settings.yaml ]; then -+ sed -i.bak -r \ -+ 's/^(PROVISIONING_IMAGES_BUILD_TIMEOUT:)\s*[[:digit:]]+$/\1 7200/' \ -+ ${PYTHON_SITEPKGS_DIR}/nailgun/settings.yaml -+ echo "INFO: [1h] => [2h] updated nailgun image build timeout." -+ fi - - # Bootstrap: Use gzip instead of xz compression. - # diff --git a/patches/opnfv-fuel/0035-m1.micro-Increase-profile-RAM-size-to-128MB.patch b/patches/opnfv-fuel/0035-m1.micro-Increase-profile-RAM-size-to-128MB.patch deleted file mode 100644 index 89720a2b..00000000 --- a/patches/opnfv-fuel/0035-m1.micro-Increase-profile-RAM-size-to-128MB.patch +++ /dev/null @@ -1,38 +0,0 @@ -From: Alexandru Avadanii -Date: Sat, 11 Jun 2016 23:34:48 +0200 -Subject: [PATCH] m1.micro: Increase profile RAM size to 128MB. - -TestVM (cirros) on aarch64 requires more than 64MB RAM. -Keep profiles uniform across all archs. - -Signed-off-by: Alexandru Avadanii ---- - .../f_bootstrap/post-scripts/80_prepare_cross_builds.sh | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - -diff --git a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -index 0435a28..078f117 100755 ---- a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -+++ b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -@@ -66,6 +66,21 @@ if which dpkg > /dev/null 2>&1; then - ${PYTHON_SITEPKGS_DIR}/fuel_bootstrap/consts.py - echo "INFO: [xz] => [gzip] updated bootstrap initrd / rootfs compression." - fi -+ -+ # TestVM (cirros) adjustments for cross-arch -+ # -+ # TestVM (cirros) on aarch64 requires more than 64MB RAM. -+ # Keep profiles uniform across all archs by bumping micro flavor specs. -+ # m1.micro: Increase profile RAM size to 128MB. -+ OPENSTACK_VERSION=$(cat /etc/fuel_openstack_version) -+ CONTROLLER_PP="/etc/puppet/${OPENSTACK_VERSION}/modules/openstack_tasks" -+ CONTROLLER_PP+="/manifests/openstack_controller/openstack_controller.pp" -+ if [ -f ${CONTROLLER_PP} ]; then -+ sed -i.bak -r \ -+ 's/^(.*flavor-create.*m1\.micro auto)\s+[[:digit:]]+(.*)$/\1 128\2/' \ -+ ${CONTROLLER_PP} -+ echo "INFO: [64] => [128] updated m1.micro profile RAM size (MB)." -+ fi - fi - fi - diff --git a/patches/opnfv-fuel/0039-deploy-Fix-add-bootstrap-DEA-override-delay.patch b/patches/opnfv-fuel/0039-deploy-Fix-add-bootstrap-DEA-override-delay.patch deleted file mode 100644 index 2189b004..00000000 --- a/patches/opnfv-fuel/0039-deploy-Fix-add-bootstrap-DEA-override-delay.patch +++ /dev/null @@ -1,32 +0,0 @@ -From: Alexandru Avadanii -Date: Wed, 17 Aug 2016 16:18:26 +0200 -Subject: [PATCH] deploy: Fix/add bootstrap DEA override delay - -Previous change adding support for DEA to override bootstrap config -did not account for slow execution on remote servers, so add a -one minute sleep before checking for completition of fuel install. - -Signed-off-by: Alexandru Avadanii ---- - deploy/install_fuel_master.py | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/deploy/install_fuel_master.py b/deploy/install_fuel_master.py -index 808d0b1..1a7685a 100644 ---- a/deploy/install_fuel_master.py -+++ b/deploy/install_fuel_master.py -@@ -196,11 +196,13 @@ class InstallFuelMaster(object): - self.work_dir, os.path.basename(self.dea_file))) - - def wait_until_installation_completed(self): -- WAIT_LOOP = 360 -+ WAIT_LOOP = 720 - SLEEP_TIME = 10 - CMD = 'ps -ef | grep %s | grep -v grep' % BOOTSTRAP_ADMIN - - install_completed = False -+ time.sleep(60) -+ self.wait_for_node_up() - with self.ssh: - for i in range(WAIT_LOOP): - ret = self.ssh.exec_cmd(CMD) diff --git a/patches/opnfv-fuel/0040-Backport-dpkg-checkbuilddeps-to-mk-build-deps.patch b/patches/opnfv-fuel/0040-Backport-dpkg-checkbuilddeps-to-mk-build-deps.patch deleted file mode 100644 index 5dde448f..00000000 --- a/patches/opnfv-fuel/0040-Backport-dpkg-checkbuilddeps-to-mk-build-deps.patch +++ /dev/null @@ -1,58 +0,0 @@ -From: Alexandru Avadanii -Date: Wed, 6 Jul 2016 17:03:49 +0200 -Subject: [PATCH] Backport: dpkg-checkbuilddeps to mk-build-deps. - -Backported from [1]. - -[1] https://review.openstack.org/#/c/325210/ - -Signed-off-by: Alexandru Avadanii ---- - ...ce-dpkg-checkbuilddeps-with-mk-build-deps.patch | 38 ++++++++++++++++++++++ - 1 files changed, 38 insertions(+) - create mode 100644 build/replace-dpkg-checkbuilddeps-with-mk-build-deps.patch - -diff --git a/build/patch-repos/0040-replace-dpkg-checkbuilddeps-with-mk-build-deps.patch b/build/patch-repos/0040-replace-dpkg-checkbuilddeps-with-mk-build-deps.patch -new file mode 100644 -index 0000000..896f3cf ---- /dev/null -+++ b/build/patch-repos/0040-replace-dpkg-checkbuilddeps-with-mk-build-deps.patch -@@ -0,0 +1,38 @@ -+From: Sergii Golovatiuk -+Date: Fri, 3 Jun 2016 12:26:19 +0200 -+Subject: [PATCH] Replace dpkg-checkbuilddeps with mk-build-deps -+ -+dpkg-checkbuilddeps doesn't check dependencies inside chroot as in many -+cases host system might not have required packages. This change replaces -+dpkg-checkbuilddeps with mk-build-deps in chroot -+ -+Implements: mos-xenial -+Change-Id: I27a65893c1bd33e6d82c11bf3d08423562dbe4d2 -+Signed-off-by: Sergii Golovatiuk -+--- -+ packages/deb/module.mk | 5 ++--- -+ 1 file changed, 2 insertions(+), 3 deletions(-) -+ -+diff --git a/packages/deb/module.mk b/packages/deb/module.mk -+index 6c93441..c0ba737 100644 -+--- a/packages/deb/module.mk -++++ b/packages/deb/module.mk -+@@ -10,7 +10,7 @@ clean-deb: -+ done -+ sudo rm -rf $(BUILD_DIR)/packages/deb -+ -+-$(BUILD_DIR)/packages/deb/buildd.tar.gz: SANDBOX_DEB_PKGS:=wget bzip2 apt-utils build-essential python-setuptools python-pbr devscripts debhelper fakeroot -++$(BUILD_DIR)/packages/deb/buildd.tar.gz: SANDBOX_DEB_PKGS:=wget bzip2 apt-utils build-essential fakeroot devscripts equivs debhelper python-setuptools python-pbr -+ $(BUILD_DIR)/packages/deb/buildd.tar.gz: SANDBOX_UBUNTU:=$(BUILD_DIR)/packages/deb/chroot -+ $(BUILD_DIR)/packages/deb/buildd.tar.gz: export SANDBOX_UBUNTU_UP:=$(SANDBOX_UBUNTU_UP) -+ $(BUILD_DIR)/packages/deb/buildd.tar.gz: export SANDBOX_UBUNTU_DOWN:=$(SANDBOX_UBUNTU_DOWN) -+@@ -47,8 +47,7 @@ $(BUILD_DIR)/packages/deb/$1.done: $(BUILD_DIR)/repos/repos.done -+ sudo -E dch -c $$(SANDBOX_UBUNTU)/tmp/$1/debian/changelog -D $(UBUNTU_RELEASE) -b --force-distribution \ -+ -v $(PACKAGE_VERSION)-`awk -F'=' '/DEBRELEASE/ {print $$$$2}' $(BUILD_DIR)/packages/sources/$1/version` \ -+ "`awk -F'=' '/DEBMSG/ {print $$$$2}' $(BUILD_DIR)/packages/sources/$1/version`" -+- dpkg-checkbuilddeps $(BUILD_DIR)/repos/$1/debian/control 2>&1 | sed 's/^dpkg-checkbuilddeps: Unmet build dependencies: //g' | sed 's/([^()]*)//g;s/|//g' | sudo tee $$(SANDBOX_UBUNTU)/tmp/$1.installdeps -+- sudo chroot $$(SANDBOX_UBUNTU) /bin/sh -c "cat /tmp/$1.installdeps | xargs --no-run-if-empty env LC_ALL=C DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get -y install" -++ sudo chroot $$(SANDBOX_UBUNTU) /bin/sh -c "mk-build-deps --install --remove --tool 'apt-get --yes --no-remove --no-install-recommends' /tmp/$1/debian/control" -+ sudo chroot $$(SANDBOX_UBUNTU) /bin/sh -c "cd /tmp/$1 ; DEB_BUILD_OPTIONS=nocheck debuild -us -uc -b -d" -+ cp $$(SANDBOX_UBUNTU)/tmp/*.deb $(BUILD_DIR)/packages/deb/packages -+ sudo sh -c "$$$${SANDBOX_UBUNTU_DOWN}" diff --git a/patches/opnfv-fuel/0043-build-Add-armband.mk-config.patch b/patches/opnfv-fuel/0043-build-Add-armband.mk-config.patch deleted file mode 100644 index cb07c9fc..00000000 --- a/patches/opnfv-fuel/0043-build-Add-armband.mk-config.patch +++ /dev/null @@ -1,143 +0,0 @@ -From: Alexandru Avadanii -Date: Thu, 11 Aug 2016 15:34:32 +0200 -Subject: [PATCH] build: Add armband.mk config, env var ARMBAND_BASE - -Signed-off-by: Alexandru Avadanii ---- - build/Makefile | 10 ++++++++++ - build/armband.mk | 53 +++++++++++++++++++++++++++++++++++++++++++++++++ - build/docker/Dockerfile | 2 +- - build/docker/runcontext | 6 +++++- - 4 files changed, 69 insertions(+), 2 deletions(-) - create mode 100644 build/armband.mk - -diff --git a/build/Makefile b/build/Makefile -index 4454c35..377ecc6 100644 ---- a/build/Makefile -+++ b/build/Makefile -@@ -14,6 +14,9 @@ SHELL = /bin/bash - # settings. - -include environment.mk - -+# Override Armband specific information & git commit references -+-include armband.mk -+ - ############################################################################ - # BEGIN of variables to customize - # -@@ -129,5 +132,8 @@ $(ISOCACHE): - cd $(FUEL_MAIN_DIR) && make repos - $(REPOINFO) -r $(FUEL_MAIN_DIR) > gitinfo_fuel.txt -+ @if test -n $(ARMBAND_BASE); then \ -+ $(REPOINFO) -r $(ARMBAND_BASE) >> gitinfo_fuel.txt; \ -+ fi - # OPNFV patches at Fuel build time - # Need to be commited in order for them to be considered by the Fuel - # build system -@@ -228,5 +234,9 @@ debug: - sha1sum fuel_build_loop >> .cachedata - sha1sum config.mk >> .cachedata -+ @if test -n $(ARMBAND_BASE); then \ -+ sha1sum armband.mk >> .cachedata; \ -+ $(REPOINFO) $(ARMBAND_BASE) >> .cachedata; \ -+ fi - sha1sum Makefile >> .cachedata - $(CACHETOOL) getbiweek >> .cachedata - cat .cachedata | $(CACHETOOL) getid > .cacheid -diff --git a/build/armband.mk b/build/armband.mk -new file mode 100644 -index 0000000..1e772f0 ---- /dev/null -+++ b/build/armband.mk -@@ -0,0 +1,54 @@ -+############################################################################## -+# Copyright (c) 2016 Enea AB and others. -+# Alexandru.Avadanii@enea.com -+# 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 -+############################################################################## -+ -+# Only configure Armband stuff when ARMBAND_BASE is set -+ifdef ARMBAND_BASE -+ # Armband plugins, supported archs & specific info -+ export PLUGINS := f_odlpluginbuild f_bgpvpn-pluginbuild f_ovs-nsh-dpdk-pluginbuild -+ export UBUNTU_ARCH := amd64 arm64 -+ export PRODNO := OPNFV_A_FUEL -+ export MIRROR_MOS_UBUNTU := linux.enea.com -+ export EXTRA_RPM_REPOS := armband,http://linux.enea.com/mos-repos/centos/mos9.0-centos7/armband/x86_64,10 -+ -+ # Temporary fuel-plugin-builder repo info for runtime patching -+ export FPB_REPO := https://github.com/openstack/fuel-plugins -+ export FPB_BRANCH := master -+ export FPB_CHANGE := refs/changes/31/311031/2 -+ -+ # Armband git submodules for Fuel/OPNFV components -+ export ASTUTE_REPO := ${ARMBAND_BASE}/upstream/fuel-astute -+ export ASTUTE_COMMIT := HEAD -+ -+ export NAILGUN_REPO := ${ARMBAND_BASE}/upstream/fuel-web -+ export NAILGUN_COMMIT := HEAD -+ -+ export FUEL_AGENT_REPO := ${ARMBAND_BASE}/upstream/fuel-agent -+ export FUEL_AGENT_COMMIT := HEAD -+ -+ export FUEL_NAILGUN_AGENT_REPO := ${ARMBAND_BASE}/upstream/fuel-nailgun-agent -+ export FUEL_NAILGUN_AGENT_COMMIT := HEAD -+ -+ export FUEL_MIRROR_REPO := ${ARMBAND_BASE}/upstream/fuel-mirror -+ export FUEL_MIRROR_COMMIT := HEAD -+ -+ export FUELLIB_REPO := ${ARMBAND_BASE}/upstream/fuel-library -+ export FUELLIB_COMMIT := HEAD -+ -+ export FUEL_PLUGIN_ODL_REPO := ${ARMBAND_BASE}/upstream/fuel-plugin-opendaylight -+ export FUEL_PLUGIN_ODL_BRANCH := armband-workbench -+ export FUEL_PLUGIN_ODL_CHANGE := HEAD -+ export OPNFV_QUAGGE_PACKAGING_REPO := https://github.com/alexandruavadanii/opnfv-quagga-packaging -+ -+ export OVS_NSH_DPDK_REPO := ${ARMBAND_BASE}/upstream/fuel-plugin-ovs -+ export OVS_NSH_DPDK_BRANCH := HEAD -+ -+ export VSPERF_REPO := ${ARMBAND_BASE}/upstream/vswitchperf -+ export VSPERF_BRANCH := armband-workbench -+ export VSPERF_CHANGE := HEAD -+endif -diff --git a/build/docker/Dockerfile b/build/docker/Dockerfile -index b38ea4c..624f233 100644 ---- a/build/docker/Dockerfile -+++ b/build/docker/Dockerfile -@@ -30,7 +30,7 @@ RUN echo "Defaults env_keep += \"ftp_proxy http_proxy https_proxy no_proxy RSYNC - # Keeping PWD is needed to build as root - RUN echo "Defaults env_keep += \"PWD\"" > /etc/sudoers.d/keep-pwd - # Keeping variables for ISO build --RUN echo "Defaults env_keep += \"MIRROR_UBUNTU MIRROR_UBUNTU_ROOT MIRROR_MOS_UBUNTU MIRROR_MOS_UBUNTU_ROOT MIRROR_FUEL LATEST_TARGET_UBUNTU UBUNTU_ARCH\"" > /etc/sudoers.d/keep-mos -+RUN echo "Defaults env_keep += \"MIRROR_UBUNTU MIRROR_UBUNTU_ROOT MIRROR_MOS_UBUNTU MIRROR_MOS_UBUNTU_ROOT MIRROR_FUEL LATEST_TARGET_UBUNTU UBUNTU_ARCH ARMBAND_BASE\"" > /etc/sudoers.d/keep-mos - RUN chmod 0440 /etc/sudoers.d/open-sudo - RUN chmod 0440 /etc/sudoers.d/keep-proxies - RUN chmod 0440 /etc/sudoers.d/keep-pwd -diff --git a/build/docker/runcontext b/build/docker/runcontext -index daad663..e4874df 100755 ---- a/build/docker/runcontext -+++ b/build/docker/runcontext -@@ -42,6 +42,10 @@ GITROOT=`git rev-parse --show-toplevel` - CID_FILE=`mktemp -u -t runcontext.XXXXXXXXXX` - CONTEXT_DIR=`mktemp -d ${GITROOT}/.docker_contextXXXXXX` - -+if [[ $ARMBAND_BASE ]]; then -+ GITROOT=$ARMBAND_BASE -+fi -+ - # If RSYNC_CONNECT_PROG is used, we need to copy all of - # the SSH structure, should one of the keys need to be - # used. -@@ -115,7 +119,7 @@ RUN_CONTEXT_OPT="--cidfile $CID_FILE --privileged=true --rm \ - -e HOME=$HOME -e CACHEDEBUG -e CACHETRANSPORT -e CACHEMAXAGE -e CACHEBASE \ - -e BUILD_FUEL_PLUGINS -e MIRROR_UBUNTU -e MIRROR_UBUNTU_ROOT \ - -e MIRROR_MOS_UBUNTU -e MIRROR_MOS_UBUNTU_ROOT -e MIRROR_FUEL \ -- -e LATEST_TARGET_UBUNTU -e UBUNTU_ARCH \ -+ -e LATEST_TARGET_UBUNTU -e UBUNTU_ARCH -e ARMBAND_BASE \ - -u $USER_ID:$GROUP_ID -w $PWD \ - -v $GITROOT:$GITROOT -v /sys/fs/cgroup:/sys/fs/cgroup:ro $CACHEMOUNT" - diff --git a/patches/opnfv-fuel/0046-build-Use-OPNFV_GIT_SHA-for-ISO-preparer-ID.patch b/patches/opnfv-fuel/0046-build-Use-OPNFV_GIT_SHA-for-ISO-preparer-ID.patch deleted file mode 100644 index e6d4dc21..00000000 --- a/patches/opnfv-fuel/0046-build-Use-OPNFV_GIT_SHA-for-ISO-preparer-ID.patch +++ /dev/null @@ -1,48 +0,0 @@ -From: Alexandru Avadanii -Date: Wed, 17 Aug 2016 21:56:22 +0200 -Subject: [PATCH] build: Use OPNFV_GIT_SHA for ISO preparer ID - -isoinfo -i lists the following information for Fuel@OPNFV ISO: -"Data preparer id: 86aafaf5454a846c417848bb94f264c4420160f3" -where the SHA hash is Fuel git repo HEAD SHA. - -However, Armband overrides OPNFV_GIT_SHA to the Armband git repo -commit hash, so the ISO metadata should also reflect this. - -Signed-off-by: Alexandru Avadanii ---- - build/docker/runcontext | 2 +- - build/install/install.sh | 6 +++++- - 2 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/build/docker/runcontext b/build/docker/runcontext -index e4874df..07b0dc1 100755 ---- a/build/docker/runcontext -+++ b/build/docker/runcontext -@@ -119,7 +119,7 @@ RUN_CONTEXT_OPT="--cidfile $CID_FILE --privileged=true --rm \ - -e HOME=$HOME -e CACHEDEBUG -e CACHETRANSPORT -e CACHEMAXAGE -e CACHEBASE \ - -e BUILD_FUEL_PLUGINS -e MIRROR_UBUNTU -e MIRROR_UBUNTU_ROOT \ - -e MIRROR_MOS_UBUNTU -e MIRROR_MOS_UBUNTU_ROOT -e MIRROR_FUEL \ -- -e LATEST_TARGET_UBUNTU -e UBUNTU_ARCH -e ARMBAND_BASE \ -+ -e LATEST_TARGET_UBUNTU -e UBUNTU_ARCH -e ARMBAND_BASE -e OPNFV_GIT_SHA \ - -u $USER_ID:$GROUP_ID -w $PWD \ - -v $GITROOT:$GITROOT -v /sys/fs/cgroup:/sys/fs/cgroup:ro $CACHEMOUNT" - -diff --git a/build/install/install.sh b/build/install/install.sh -index f6308fb..9e003bb 100755 ---- a/build/install/install.sh -+++ b/build/install/install.sh -@@ -210,8 +210,12 @@ make_iso_image() { - find . -name TRANS.TBL -exec rm {} \; - rm -rf rr_moved - -+ if [[ -z "$OPNFV_GIT_SHA" ]]; then -+ OPNFV_GIT_SHA=$(git rev-parse --verify HEAD) -+ fi -+ - mkisofs --quiet -r -V "$VOLUMEID" -publisher "$PUBLISHER" \ -- -p `git rev-parse --verify HEAD` -J -R -b isolinux/isolinux.bin \ -+ -p "$OPNFV_GIT_SHA" -J -R -b isolinux/isolinux.bin \ - -no-emul-boot \ - -boot-load-size 4 -boot-info-table \ - --hide-rr-moved \ diff --git a/patches/opnfv-fuel/0048-fpb-Support-multiple-versions-of-packages.patch b/patches/opnfv-fuel/0048-fpb-Support-multiple-versions-of-packages.patch deleted file mode 100644 index 25187b4e..00000000 --- a/patches/opnfv-fuel/0048-fpb-Support-multiple-versions-of-packages.patch +++ /dev/null @@ -1,48 +0,0 @@ -From: Alexandru Avadanii -Date: Tue, 23 Aug 2016 15:48:56 +0200 -Subject: [PATCH] fpb: Support multiple versions of packages - -This is a temporary change until the fpm installed by pip gets -the change from [1] included. - -[1] https://review.openstack.org/#/c/311031/ - -Signed-off-by: Alexandru Avadanii ---- - build/docker/Dockerfile | 9 ++++++++- - build/docker/Makefile | 4 ++++ - 2 files changed, 12 insertions(+), 1 deletion(-) - -diff --git a/build/docker/Dockerfile b/build/docker/Dockerfile -index 624f233..ab0d0d3 100644 ---- a/build/docker/Dockerfile -+++ b/build/docker/Dockerfile -@@ -23,7 +23,14 @@ RUN apt-get install -y software-properties-common python-software-properties \ - build-essential ruby-dev rubygems-integration python-pip git rpm createrepo dpkg-dev - - RUN gem install fpm --RUN pip install fuel-plugin-builder -+ -+# Temporary: fpb needs to be built from sources -+# RUN pip install fuel-plugin-builder -+RUN git clone -b INSERT_FPB_BRANCH INSERT_FPB_REPO && cd fuel-plugins && \ -+ (test -z INSERT_FPB_CHANGE || \ -+ (git fetch origin INSERT_FPB_CHANGE && git checkout FETCH_HEAD)) && \ -+ python setup.py sdist && pip install ./dist/fuel-plugin-builder-*.tar.gz && \ -+ cd .. && rm -rf fuel-plugins - - RUN echo "ALL ALL=NOPASSWD: ALL" > /etc/sudoers.d/open-sudo - RUN echo "Defaults env_keep += \"ftp_proxy http_proxy https_proxy no_proxy RSYNC_PROXY RSYNC_CONNECT_PROG npm_config_registry\"" > /etc/sudoers.d/keep-proxies -diff --git a/build/docker/Makefile b/build/docker/Makefile -index d4423b0..226bbd0 100644 ---- a/build/docker/Makefile -+++ b/build/docker/Makefile -@@ -25,4 +25,8 @@ all: .docker - cp Dockerfile ubuntu-builder/Dockerfile -+ # Only add FPB ENVs when set - needed to fetch, patch and install FPB -+ test -n "${FPB_REPO}" && sed -i "s;INSERT_FPB_REPO;${FPB_REPO};" ubuntu-builder/Dockerfile || exit 0 -+ test -n "${FPB_BRANCH}" && sed -i "s;INSERT_FPB_BRANCH;${FPB_BRANCH};" ubuntu-builder/Dockerfile || exit 0 -+ test -n "${FPB_CHANGE}" && sed -i "s;INSERT_FPB_CHANGE;${FPB_CHANGE};" ubuntu-builder/Dockerfile || exit 0 - # Only add proxy ENVs where set in host - needed to pull the base Ubuntu image - test -n "${http_proxy}" && sed -i "s;INSERT_HTTP_PROXY;${http_proxy};" ubuntu-builder/Dockerfile || exit 0 - test -n "${https_proxy}" && sed -i "s;INSERT_HTTPS_PROXY;${https_proxy};" ubuntu-builder/Dockerfile || exit 0 diff --git a/patches/opnfv-fuel/0054-net-check-add-support-for-faulty-operstate.patch b/patches/opnfv-fuel/0054-net-check-add-support-for-faulty-operstate.patch deleted file mode 100644 index 8a765c92..00000000 --- a/patches/opnfv-fuel/0054-net-check-add-support-for-faulty-operstate.patch +++ /dev/null @@ -1,63 +0,0 @@ -From: Stefan Sicleru -Date: Tue, 30 Aug 2016 17:53:41 +0200 -Subject: [PATCH] net-check: add support for faulty operstate - -Some eth drivers, such as those for APM X-Gene Mustang Board's NICs, do -not advertise operstate properly in sysfs, ie. it is advertised as -"unknown" whereas ethtool shows the NIC as fully functional with link -detected. This further affects "ip link show" output which is parsed -within _check_iface_ready() method. - -Replace "ip link show" command with "ethtool" in order to obtain proper -results when operstate is unknown. - -Signed-off-by: Stefan Sicleru ---- - ...et-check-add-support-for-faulty-operstate.patch | 38 ++++++++++++++++++++++ - 1 file changed, 38 insertions(+) - create mode 100644 build/patch-repos/build/repos/network-checker/0010-net-check-add-support-for-faulty-operstate.patch - -diff --git a/build/patch-repos/build/repos/network-checker/0010-net-check-add-support-for-faulty-operstate.patch b/build/patch-repos/build/repos/network-checker/0010-net-check-add-support-for-faulty-operstate.patch -new file mode 100644 -index 0000000..71e7b73 ---- /dev/null -+++ b/build/patch-repos/build/repos/network-checker/0010-net-check-add-support-for-faulty-operstate.patch -@@ -0,0 +1,38 @@ -+From: Stefan Sicleru -+Date: Tue, 30 Aug 2016 17:30:24 +0200 -+Subject: [PATCH] net-check: add support for faulty operstate -+ -+Some eth drivers, such as those for APM X-Gene Mustang Board's NICs, do -+not advertise operstate properly in sysfs, ie. it is advertised as -+"unknown" whereas ethtool shows the NIC as fully functional with link -+detected. This further affects "ip link show" output which is parsed -+within _check_iface_ready() method. -+ -+Replace "ip link show" command with "ethtool" in order to obtain proper -+results when operstate is unknown. -+ -+Signed-off-by: Stefan Sicleru -+--- -+ network_checker/net_check/api.py | 9 ++++++++- -+ 1 file changed, 8 insertions(+), 1 deletion(-) -+ -+diff --git a/network_checker/net_check/api.py b/network_checker/net_check/api.py -+index e3c3b4e..87aa257 100755 -+--- a/network_checker/net_check/api.py -++++ b/network_checker/net_check/api.py -+@@ -195,7 +195,14 @@ class Actor(object): -+ def _check_iface_ready(self, iface, vid=None): -+ check_iface = self._iface_name(iface, vid) -+ output = self._execute(['ip', '-o', 'link', 'show', check_iface]) -+- return 'state UP' in '\n'.join(output) -++ if 'state UP' in '\n'.join(output): -++ return True -++ -++ if 'state UNKNOWN' in '\n'.join(output) and vid == None: -++ output = self._execute(['ethtool', check_iface]) -++ return 'Link detected: yes' in '\n'.join(output).replace('\n', ' ') -++ -++ return False -+ -+ def _ensure_iface_up(self, iface, vid=None): -+ """Ensures interface is with vid up.""" diff --git a/patches/opnfv-fuel/0055-build-docker-Use-host-s-network-stack.patch b/patches/opnfv-fuel/0055-build-docker-Use-host-s-network-stack.patch deleted file mode 100644 index d9fd36a0..00000000 --- a/patches/opnfv-fuel/0055-build-docker-Use-host-s-network-stack.patch +++ /dev/null @@ -1,28 +0,0 @@ -From: Alexandru Avadanii -Date: Mon, 29 Aug 2016 22:58:49 +0200 -Subject: [PATCH] build: docker: Use host's /etc/hosts - -The original motivation was pointing to local mirrors via host's -"/etc/hosts", for which an alternative solution tested was -"--net=host" (see [1] for full description), but lead to wierd -loss of connectivity after a few builds. - -[1] https://docs.docker.com/v1.8/articles/networking/ - -Signed-off-by: Alexandru Avadanii ---- - build/docker/runcontext | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/build/docker/runcontext b/build/docker/runcontext -index 07b0dc1..b0d6d37 100755 ---- a/build/docker/runcontext -+++ b/build/docker/runcontext -@@ -121,6 +121,7 @@ RUN_CONTEXT_OPT="--cidfile $CID_FILE --privileged=true --rm --net=host \ - -e MIRROR_MOS_UBUNTU -e MIRROR_MOS_UBUNTU_ROOT -e MIRROR_FUEL \ - -e LATEST_TARGET_UBUNTU -e UBUNTU_ARCH -e ARMBAND_BASE -e OPNFV_GIT_SHA \ - -u $USER_ID:$GROUP_ID -w $PWD \ -+ -v /etc/hosts:/etc/hosts \ - -v $GITROOT:$GITROOT -v /sys/fs/cgroup:/sys/fs/cgroup:ro $CACHEMOUNT" - - # Passing "debug" puts up an interactive bash shell diff --git a/patches/opnfv-fuel/arm64-bug-fixes/0001-bootstrap-Add-lshw-package.patch b/patches/opnfv-fuel/arm64-bug-fixes/0001-bootstrap-Add-lshw-package.patch new file mode 100644 index 00000000..61578bfe --- /dev/null +++ b/patches/opnfv-fuel/arm64-bug-fixes/0001-bootstrap-Add-lshw-package.patch @@ -0,0 +1,30 @@ +From: Alexandru Avadanii +Date: Tue, 24 May 2016 16:42:21 +0200 +Subject: [PATCH] bootstrap: Add lshw package. + +Until Ubuntu Trusty fixes the following bug on AArch64 [1]: +"AArch64: slow cpuinfo due to redundant loop" +we will be using a patched version of from Armband MOS repos. + +This change enforces replacing the lshw from Ubuntu with our custom, +patched package. + +[1] https://bugs.launchpad.net/ubuntu/+source/lshw/+bug/1582181 + +Signed-off-by: Alexandru Avadanii +--- + build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml b/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml +index fcf4257..264ae0e 100644 +--- a/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml ++++ b/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml +@@ -24,6 +24,7 @@ + - linux-headers-generic + - live-boot + - live-boot-initramfs-tools ++ - lshw + - mc + - mcollective + - msmtp-mta diff --git a/patches/opnfv-fuel/arm64-bug-fixes/0002-net-check-add-support-for-faulty-operstate.patch b/patches/opnfv-fuel/arm64-bug-fixes/0002-net-check-add-support-for-faulty-operstate.patch new file mode 100644 index 00000000..a7006fcc --- /dev/null +++ b/patches/opnfv-fuel/arm64-bug-fixes/0002-net-check-add-support-for-faulty-operstate.patch @@ -0,0 +1,63 @@ +From: Stefan Sicleru +Date: Tue, 30 Aug 2016 17:53:41 +0200 +Subject: [PATCH] net-check: add support for faulty operstate + +Some eth drivers, such as those for APM X-Gene Mustang Board's NICs, do +not advertise operstate properly in sysfs, ie. it is advertised as +"unknown" whereas ethtool shows the NIC as fully functional with link +detected. This further affects "ip link show" output which is parsed +within _check_iface_ready() method. + +Replace "ip link show" command with "ethtool" in order to obtain proper +results when operstate is unknown. + +Signed-off-by: Stefan Sicleru +--- + ...et-check-add-support-for-faulty-operstate.patch | 38 ++++++++++++++++++++++ + 1 file changed, 38 insertions(+) + create mode 100644 build/f_repos/patch/network-checker/0010-net-check-add-support-for-faulty-operstate.patch + +diff --git a/build/f_repos/patch/network-checker/0010-net-check-add-support-for-faulty-operstate.patch b/build/f_repos/patch/network-checker/0010-net-check-add-support-for-faulty-operstate.patch +new file mode 100644 +index 0000000..71e7b73 +--- /dev/null ++++ b/build/f_repos/patch/network-checker/0010-net-check-add-support-for-faulty-operstate.patch +@@ -0,0 +1,38 @@ ++From: Stefan Sicleru ++Date: Tue, 30 Aug 2016 17:30:24 +0200 ++Subject: [PATCH] net-check: add support for faulty operstate ++ ++Some eth drivers, such as those for APM X-Gene Mustang Board's NICs, do ++not advertise operstate properly in sysfs, ie. it is advertised as ++"unknown" whereas ethtool shows the NIC as fully functional with link ++detected. This further affects "ip link show" output which is parsed ++within _check_iface_ready() method. ++ ++Replace "ip link show" command with "ethtool" in order to obtain proper ++results when operstate is unknown. ++ ++Signed-off-by: Stefan Sicleru ++--- ++ network_checker/net_check/api.py | 9 ++++++++- ++ 1 file changed, 8 insertions(+), 1 deletion(-) ++ ++diff --git a/network_checker/net_check/api.py b/network_checker/net_check/api.py ++index e3c3b4e..87aa257 100755 ++--- a/network_checker/net_check/api.py +++++ b/network_checker/net_check/api.py ++@@ -195,7 +195,14 @@ class Actor(object): ++ def _check_iface_ready(self, iface, vid=None): ++ check_iface = self._iface_name(iface, vid) ++ output = self._execute(['ip', '-o', 'link', 'show', check_iface]) ++- return 'state UP' in '\n'.join(output) +++ if 'state UP' in '\n'.join(output): +++ return True +++ +++ if 'state UNKNOWN' in '\n'.join(output) and vid == None: +++ output = self._execute(['ethtool', check_iface]) +++ return 'Link detected: yes' in '\n'.join(output).replace('\n', ' ') +++ +++ return False ++ ++ def _ensure_iface_up(self, iface, vid=None): ++ """Ensures interface is with vid up.""" diff --git a/patches/opnfv-fuel/cross-bootstrap/0001-UX-Update-bootstrap-target-build-time-estimate.patch b/patches/opnfv-fuel/cross-bootstrap/0001-UX-Update-bootstrap-target-build-time-estimate.patch new file mode 100644 index 00000000..91ba18a0 --- /dev/null +++ b/patches/opnfv-fuel/cross-bootstrap/0001-UX-Update-bootstrap-target-build-time-estimate.patch @@ -0,0 +1,39 @@ +From: Alexandru Avadanii +Date: Mon, 9 May 2016 17:05:53 +0200 +Subject: [PATCH] UX: Update bootstrap/target build time estimate. + +While building for a different architecture (e.g. AArch64 on x86_64), +the bootstrap/target image build may take longer, due to latency +introduced by using qemu-user-static. + +Signed-off-by: Alexandru Avadanii +--- + .../0001-OPNFV-Additions-to-bootstrap_admin_node.sh.patch | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/build/f_repos/patch/fuel-main/0001-OPNFV-Additions-to-bootstrap_admin_node.sh.patch b/build/f_repos/patch/fuel-main/0001-OPNFV-Additions-to-bootstrap_admin_node.sh.patch +index 446d0b6..c2e664c 100644 +--- a/build/f_repos/patch/fuel-main/0001-OPNFV-Additions-to-bootstrap_admin_node.sh.patch ++++ b/build/f_repos/patch/fuel-main/0001-OPNFV-Additions-to-bootstrap_admin_node.sh.patch +@@ -10,6 +10,21 @@ diff --git a/iso/bootstrap_admin_node.sh b/iso/bootstrap_admin_node.sh + index 3197c91..db3123d 100755 + --- a/iso/bootstrap_admin_node.sh + +++ b/iso/bootstrap_admin_node.sh ++@@ -86,9 +86,11 @@ ++ http://docs.openstack.org/developer/fuel-docs/userdocs/fuel-install-guide/bootstrap/\ ++ bootstrap_troubleshoot.html" ++ bs_progress_message="There is no active bootstrap. Bootstrap image building \ ++-is in progress. Usually it takes 15-20 minutes. It depends on your internet \ ++-connection and hardware performance. After bootstrap image becomes available, \ ++-reboot nodes that failed to be discovered." +++is in progress. Usually it takes 15-20 minutes for a native build (x86_64) \ +++and/or 30-45 minutes for each cross-build (e.g. AArch64). \ +++It depends on your internet connection, hardware performance and selected \ +++bootstrap architecture(s). This ISO supports AArch64 only. After bootstrap \ +++image becomes available, reboot nodes that failed to be discovered." ++ bs_done_message="Default bootstrap image building done. Now you can boot new \ ++ nodes over PXE, they will be discovered and become available for installing \ ++ OpenStack on them" + @@ -339,8 +339,22 @@ fuelmenu --save-only --iface=$ADMIN_INTERFACE || fail + set +x + echo "Done!" diff --git a/patches/opnfv-fuel/cross-bootstrap/0002-Build-bootstrap-image-for-arm64.patch b/patches/opnfv-fuel/cross-bootstrap/0002-Build-bootstrap-image-for-arm64.patch new file mode 100644 index 00000000..836cb2cf --- /dev/null +++ b/patches/opnfv-fuel/cross-bootstrap/0002-Build-bootstrap-image-for-arm64.patch @@ -0,0 +1,31 @@ +From: Stanislaw Kardach +Date: Thu, 3 Mar 2016 19:04:07 +0100 +Subject: [PATCH] Build bootstrap image for arm64 + +For now the arch is hardcoded for simplicity. We should detect this +but how? If we're multi-arch then one bootstrap image should be built +per supported arch. This requires Fuel refactoring. +--- + .../0001-OPNFV-Additions-to-bootstrap_admin_node.sh.patch | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/build/f_repos/patch/fuel-main/0001-OPNFV-Additions-to-bootstrap_admin_node.sh.patch b/build/f_repos/patch/fuel-main/0001-OPNFV-Additions-to-bootstrap_admin_node.sh.patch +index c2e664c..12d0dfb 100644 +--- a/build/f_repos/patch/fuel-main/0001-OPNFV-Additions-to-bootstrap_admin_node.sh.patch ++++ b/build/f_repos/patch/fuel-main/0001-OPNFV-Additions-to-bootstrap_admin_node.sh.patch +@@ -73,6 +73,15 @@ index 3197c91..db3123d 100755 + + # Enable iptables + systemctl enable iptables.service ++@@ -484,7 +490,7 @@ ++ local ret=1 ++ echo ${bs_progress_message} >&2 ++ set_ui_bootstrap_error "${bs_progress_message}" >&2 ++- if fuel-bootstrap -v --debug build --activate >>"$bs_build_log" 2>&1; then +++ if fuel-bootstrap -v --debug build --target_arch arm64 --activate >>"$bs_build_log" 2>&1; then ++ ret=0 ++ fuel notify --topic "done" --send "${bs_done_message}" ++ else + @@ -532,6 +545,16 @@ systemctl start ntpd + + bash /etc/rc.local diff --git a/patches/opnfv-fuel/cross-bootstrap/0003-bootstrap-Use-public-Ubuntu-ports-mirrors.patch b/patches/opnfv-fuel/cross-bootstrap/0003-bootstrap-Use-public-Ubuntu-ports-mirrors.patch new file mode 100644 index 00000000..157306b2 --- /dev/null +++ b/patches/opnfv-fuel/cross-bootstrap/0003-bootstrap-Use-public-Ubuntu-ports-mirrors.patch @@ -0,0 +1,48 @@ +From: Alexandru Avadanii +Date: Thu, 3 Mar 2016 19:18:27 +0100 +Subject: [PATCH] bootstrap: Use public Ubuntu-ports mirrors. + +Instead of relying on 127.0.0.1 partial Ubuntu mirror, use +public archives. +While doing so, switch to Ubuntu-ports, enabling building arm64 +bootstraps. + +NOTE: This disables the abillity to build amd64 bootstraps with +current config. +--- + build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml b/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml +index 264ae0e..17e161f 100644 +--- a/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml ++++ b/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml +@@ -49,19 +49,19 @@ + repos: + - name: ubuntu + section: "main universe multiverse" +- uri: "http://127.0.0.1:8080/mirrors/ubuntu" ++ uri: "http://ports.ubuntu.com/ubuntu-ports" + priority: + suite: trusty + type: deb + - name: ubuntu-updates + section: "main universe multiverse" +- uri: "http://127.0.0.1:8080/mirrors/ubuntu" ++ uri: "http://ports.ubuntu.com/ubuntu-ports" + priority: + suite: trusty-updates + type: deb + - name: ubuntu-security + section: "main universe multiverse" +- uri: "http://127.0.0.1:8080/mirrors/ubuntu" ++ uri: "http://ports.ubuntu.com/ubuntu-ports" + priority: + suite: trusty-security + type: deb +@@ -73,4 +73,5 @@ + type: deb + skip_default_img_build: false + direct_repo_addresses: ++ - "ports.ubuntu.com" + - "127.0.0.1" diff --git a/patches/opnfv-fuel/cross-bootstrap/0004-post-scripts-Enable-systemd-binfmt-for-first-boot.patch b/patches/opnfv-fuel/cross-bootstrap/0004-post-scripts-Enable-systemd-binfmt-for-first-boot.patch new file mode 100644 index 00000000..26b898fe --- /dev/null +++ b/patches/opnfv-fuel/cross-bootstrap/0004-post-scripts-Enable-systemd-binfmt-for-first-boot.patch @@ -0,0 +1,94 @@ +From: Alexandru Avadanii +Date: Thu, 9 Jun 2016 19:46:56 +0200 +Subject: [PATCH] post-scripts: Enable systemd-binfmt for first boot. + +IMPORTANT: +This commit introduces the following file on Fuel Master, +containing the list of arch supported for target nodes: +. + +This file is created AFTER pre.d OPNFV scripts are ran, also by +bootstrap_admin_node.sh, BEFORE the post.d scripts are executed. +NOTE: Arch format is the same used by dpkg (e.g.: "amd64 arm64") + +Based on the number of foreign architectures we should support +(the list of archs in /etc/fuel_openstack_arch minus native arch), +we determine whether cross-builds are expected, in which case +binfmt support should be functional during first Fuel Master boot. + +Since systemd-binfmt service has a series of preconditions for +starting, which are tested early during first boot, some of them +are NOT YET true (e.g. no binfmt handlers are present before +qemu-user-static package is installed), so the service is not +automatically started. Of course, this only affects the first boot. + +Finally, this commit adds an OPNFV post-install script in +/opt/opnfv/bootstrap/post.d, which starts systemd-binfmt service. +--- + .../post-scripts/80_prepare_cross_builds.sh | 32 ++++++++++++++++++++++ + ...PNFV-Additions-to-bootstrap_admin_node.sh.patch | 13 +++++++++ + 2 files changed, 45 insertions(+) + create mode 100755 build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh + +diff --git a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh +new file mode 100755 +index 0000000..01eb2e2 +--- /dev/null ++++ b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh +@@ -0,0 +1,32 @@ ++#/bin/sh ++############################################################################## ++# Copyright (c) 2016 Enea AB and others. ++# Alexandru.Avadanii@enea.com ++# 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 ++############################################################################## ++ ++echo "Preparing for cross-building bootstrap/target images" ++ ++# Fmt handlers are set up by qemu-user-static (after systemd-binfmt ++# prerequisites are checked during first boot of Fuel Master node). ++ ++# Cross-building support provides dpkg, as a fuel-agent dependency ++if which dpkg > /dev/null 2>&1; then ++ # /etc/fuel_openstack_arch is created by bootstrap_admin_node.sh ++ FOREIGN_ARCH_CNT=$(sed -e "s/$(dpkg --print-architecture)//" \ ++ /etc/fuel_openstack_arch | wc -w) ++ if [ ${FOREIGN_ARCH_CNT} -gt 0 ]; then ++ # If no fmt handlers are configured, the service is not started, ++ # so request it explicitly (only necessary for the first boot). ++ systemctl start systemd-binfmt ++ if [ $? -ne 0 ]; then ++ echo "Error starting systemd-binfmt!" ++ exit 1 ++ fi ++ fi ++fi ++ ++echo "Done preparing cross-building" +diff --git a/build/f_repos/patch/fuel-main/0001-OPNFV-Additions-to-bootstrap_admin_node.sh.patch b/build/f_repos/patch/fuel-main/0001-OPNFV-Additions-to-bootstrap_admin_node.sh.patch +index 12d0dfb..81d196b 100644 +--- a/build/f_repos/patch/fuel-main/0001-OPNFV-Additions-to-bootstrap_admin_node.sh.patch ++++ b/build/f_repos/patch/fuel-main/0001-OPNFV-Additions-to-bootstrap_admin_node.sh.patch +@@ -25,6 +25,19 @@ index 3197c91..db3123d 100755 + bs_done_message="Default bootstrap image building done. Now you can boot new \ + nodes over PXE, they will be discovered and become available for installing \ + OpenStack on them" ++@@ -239,6 +239,12 @@ ++ # /etc/fuel_openstack_version is provided by 'fuel-openstack-metadata' package ++ OPENSTACK_VERSION=$(cat /etc/fuel_openstack_version) ++ +++# FIXME(armband): This part might be moved to an earlier stage later +++# /etc/fuel_openstack_arch is constructed based on local mirror metadata +++grep -oP "^Architectures: \K.*$" \ +++ ${wwwdir}/${OPENSTACK_VERSION}/ubuntu/x86_64/dists/mos${FUEL_RELEASE}/Release > \ +++ /etc/fuel_openstack_arch +++ ++ # We do not ship debian-installer kernel and initrd on ISO. ++ # But we still need to be able to create ubuntu cobbler distro ++ # which requires kernel and initrd to be available. So, we + @@ -339,8 +339,22 @@ fuelmenu --save-only --iface=$ADMIN_INTERFACE || fail + set +x + echo "Done!" diff --git a/patches/opnfv-fuel/cross-bootstrap/0005-mcagent-Increase-max-shell-command-timeout-to-2h.patch b/patches/opnfv-fuel/cross-bootstrap/0005-mcagent-Increase-max-shell-command-timeout-to-2h.patch new file mode 100644 index 00000000..c04cc8ab --- /dev/null +++ b/patches/opnfv-fuel/cross-bootstrap/0005-mcagent-Increase-max-shell-command-timeout-to-2h.patch @@ -0,0 +1,49 @@ +From: Alexandru Avadanii +Date: Thu, 9 Jun 2016 21:37:48 +0200 +Subject: [PATCH] mcagent: Increase max shell command timeout to 2h + +Since `execute_shell_command` mcagent is used for building the target +image and the timeout provided in the astute task is just respected on +the Astute level (on mcollective level this timeout is actually a +minumum between value provided and ddl value) we need to increase it +for Armband operation. + +Because Armband builds the target image via `qemu-debootstrap`, it can +take more than 1 hour to finish the building. Therefore aside of +increasing the timeout in the Astute task, the maximum timeout value +for mcagent has to be increased. + +[ Alexandru Avadanii ] +Repackaged, based on Stan's `fuel-astute` patch. + +Signed-off-by: Stanislaw Kardach +Signed-off-by: Alexandru Avadanii +--- + .../f_bootstrap/post-scripts/80_prepare_cross_builds.sh | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh +index 01eb2e2..12f66e6 100755 +--- a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh ++++ b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh +@@ -26,6 +26,20 @@ if which dpkg > /dev/null 2>&1; then + echo "Error starting systemd-binfmt!" + exit 1 + fi ++ ++ # Cross-build timeout adjustments ++ # ++ # Since `execute_shell_command` mcagent is used for building the target ++ # image and the timeout provided in the astute task is just respected on ++ # the Astute level (on mcollective level this timeout is actually a ++ # minumum between value provided and ddl value) we need to increase it ++ # for cross-build operations. ++ ++ # Building the target image via `qemu-debootstrap` can take more than ++ # 1 hour. Therefore aside of increasing the timeout in the Astute task, ++ # the maximum timeout value for mcagent has to be increased (use 2h). ++ sed -i.bak -r 's/^(\s+:timeout\s*=>)\s*[[:digit:]]+$/\1 7200/' \ ++ /usr/libexec/mcollective/mcollective/agent/execute_shell_command.ddl + fi + fi + diff --git a/patches/opnfv-fuel/cross-bootstrap/0006-bootstrap-Use-gzip-instead-of-xz-compression.patch b/patches/opnfv-fuel/cross-bootstrap/0006-bootstrap-Use-gzip-instead-of-xz-compression.patch new file mode 100644 index 00000000..ccbd3e1c --- /dev/null +++ b/patches/opnfv-fuel/cross-bootstrap/0006-bootstrap-Use-gzip-instead-of-xz-compression.patch @@ -0,0 +1,52 @@ +From: Alexandru Avadanii +Date: Fri, 10 Jun 2016 22:30:29 +0200 +Subject: [PATCH] bootstrap: Use gzip instead of xz compression. + +bootstrap mksquashfs using qemu-user-static is extremely slow, +taking up to one hour. gzip, on the other hand, is reasonably fast. +According to [1], xz is slower, with not much size gain. + +[1] https://jonathancarter.org/2015/04/06/squashfs-performance-testing/ + +Signed-off-by: Alexandru Avadanii +--- + .../post-scripts/80_prepare_cross_builds.sh | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +diff --git a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh +index 12f66e6..3cb22f3 100755 +--- a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh ++++ b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh +@@ -27,6 +27,11 @@ if which dpkg > /dev/null 2>&1; then + exit 1 + fi + ++ # Determine python site-packages directory location ++ PYTHON_SITEPKGS_DIR=$(python -c \ ++ "from distutils.sysconfig import get_python_lib; print(get_python_lib())") ++ [ -d ${PYTHON_SITEPKGS_DIR} ] || exit 1 ++ + # Cross-build timeout adjustments + # + # Since `execute_shell_command` mcagent is used for building the target +@@ -40,6 +45,20 @@ if which dpkg > /dev/null 2>&1; then + # the maximum timeout value for mcagent has to be increased (use 2h). + sed -i.bak -r 's/^(\s+:timeout\s*=>)\s*[[:digit:]]+$/\1 7200/' \ + /usr/libexec/mcollective/mcollective/agent/execute_shell_command.ddl ++ ++ # Bootstrap: Use gzip instead of xz compression. ++ # ++ # bootstrap mksquashfs via `qemu-user-static` is extremely slow, ++ # taking up to one hour. gzip, on the other hand, is reasonably fast. ++ ++ # See the following article for a comparison between gzip and xz ++ # https://jonathancarter.org/2015/04/06/squashfs-performance-testing/ ++ # xz is slower, with very little size gain. ++ if [ -f ${PYTHON_SITEPKGS_DIR}/fuel_bootstrap/consts.py ]; then ++ sed -i.bak -r "s/^(\s+'compress_format'\s*:\s*').*?('.*)$/\1gzip\2/g" \ ++ ${PYTHON_SITEPKGS_DIR}/fuel_bootstrap/consts.py ++ echo "INFO: [xz] => [gzip] updated bootstrap initrd / rootfs compression." ++ fi + fi + fi + diff --git a/patches/opnfv-fuel/cross-bootstrap/0007-Nailgun-Increase-target-image-build-timeout.patch b/patches/opnfv-fuel/cross-bootstrap/0007-Nailgun-Increase-target-image-build-timeout.patch new file mode 100644 index 00000000..19a025f7 --- /dev/null +++ b/patches/opnfv-fuel/cross-bootstrap/0007-Nailgun-Increase-target-image-build-timeout.patch @@ -0,0 +1,36 @@ +From: Alexandru Avadanii +Date: Sat, 11 Jun 2016 21:37:29 +0200 +Subject: [PATCH] Nailgun: Increase target image build timeout + +Currently we're close to 40 minutes of image building (thanks to +qemu-debootstrap). If network connectivity is a bit slow (happened to +me) it's easy to go over 1h limit. Therefore let's push this to 2 hours +to be safer. + +[ Alexandru Avadanii ] +Moved original patch wrote by Stan to post-install. + +Signed-off-by: Stanislaw Kardach +Signed-off-by: Alexandru Avadanii +--- + .../f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh +index 3cb22f3..c106bc3 100755 +--- a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh ++++ b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh +@@ -45,6 +45,13 @@ if which dpkg > /dev/null 2>&1; then + # the maximum timeout value for mcagent has to be increased (use 2h). + sed -i.bak -r 's/^(\s+:timeout\s*=>)\s*[[:digit:]]+$/\1 7200/' \ + /usr/libexec/mcollective/mcollective/agent/execute_shell_command.ddl ++ # Update nailgun timeout setting (2h) ++ if [ -f ${PYTHON_SITEPKGS_DIR}/nailgun/settings.yaml ]; then ++ sed -i.bak -r \ ++ 's/^(PROVISIONING_IMAGES_BUILD_TIMEOUT:)\s*[[:digit:]]+$/\1 7200/' \ ++ ${PYTHON_SITEPKGS_DIR}/nailgun/settings.yaml ++ echo "INFO: [1h] => [2h] updated nailgun image build timeout." ++ fi + + # Bootstrap: Use gzip instead of xz compression. + # diff --git a/patches/opnfv-fuel/cross-bootstrap/0008-m1.micro-Increase-profile-RAM-size-to-128MB.patch b/patches/opnfv-fuel/cross-bootstrap/0008-m1.micro-Increase-profile-RAM-size-to-128MB.patch new file mode 100644 index 00000000..a54222a4 --- /dev/null +++ b/patches/opnfv-fuel/cross-bootstrap/0008-m1.micro-Increase-profile-RAM-size-to-128MB.patch @@ -0,0 +1,38 @@ +From: Alexandru Avadanii +Date: Sat, 11 Jun 2016 23:34:48 +0200 +Subject: [PATCH] m1.micro: Increase profile RAM size to 128MB. + +TestVM (cirros) on aarch64 requires more than 64MB RAM. +Keep profiles uniform across all archs. + +Signed-off-by: Alexandru Avadanii +--- + .../f_bootstrap/post-scripts/80_prepare_cross_builds.sh | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh +index c106bc3..0b48ca2 100755 +--- a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh ++++ b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh +@@ -66,6 +66,21 @@ if which dpkg > /dev/null 2>&1; then + ${PYTHON_SITEPKGS_DIR}/fuel_bootstrap/consts.py + echo "INFO: [xz] => [gzip] updated bootstrap initrd / rootfs compression." + fi ++ ++ # TestVM (cirros) adjustments for cross-arch ++ # ++ # TestVM (cirros) on aarch64 requires more than 64MB RAM. ++ # Keep profiles uniform across all archs by bumping micro flavor specs. ++ # m1.micro: Increase profile RAM size to 128MB. ++ OPENSTACK_VERSION=$(cat /etc/fuel_openstack_version) ++ CONTROLLER_PP="/etc/puppet/${OPENSTACK_VERSION}/modules/openstack_tasks" ++ CONTROLLER_PP+="/manifests/openstack_controller/openstack_controller.pp" ++ if [ -f ${CONTROLLER_PP} ]; then ++ sed -i.bak -r \ ++ 's/^(.*flavor-create.*m1\.micro auto)\s+[[:digit:]]+(.*)$/\1 128\2/' \ ++ ${CONTROLLER_PP} ++ echo "INFO: [64] => [128] updated m1.micro profile RAM size (MB)." ++ fi + fi + fi + diff --git a/patches/opnfv-fuel/kernel-bump/0001-kernel-flavor-linux-image-generic-lts-xenial.patch b/patches/opnfv-fuel/kernel-bump/0001-kernel-flavor-linux-image-generic-lts-xenial.patch new file mode 100644 index 00000000..c3a8da4a --- /dev/null +++ b/patches/opnfv-fuel/kernel-bump/0001-kernel-flavor-linux-image-generic-lts-xenial.patch @@ -0,0 +1,52 @@ +From: Alexandru Avadanii +Date: Thu, 4 Aug 2016 12:50:19 +0200 +Subject: [PATCH] kernel-flavor: linux-image-generic-lts-xenial + +Ubuntu arm64: switch from using kernel 4.2 for Trusty +(linux-image-generic-lts-trusty) to kernel 4.4 backported from Xenial +(linux-image-generic-lts-xenial). + +Signed-off-by: Alexandru Avadanii +--- + build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml | 4 ++-- + deploy/config/dea_base.yaml | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml b/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml +index 17e161f..fb0ad1a 100644 +--- a/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml ++++ b/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml +@@ -13,7 +13,7 @@ + extra_dirs: + - /usr/share/fuel_bootstrap_cli/files/trusty + output_dir: /tmp/ +- kernel_flavor: linux-image-generic-lts-trusty ++ kernel_flavor: linux-image-generic-lts-xenial + packages: + - fuel-agent + - hwloc +@@ -21,7 +21,7 @@ + - i40e-dkms + - linux-firmware + - linux-firmware-nonfree +- - linux-headers-generic ++ - linux-headers-generic-lts-xenial + - live-boot + - live-boot-initramfs-tools + - lshw +diff --git a/deploy/config/dea_base.yaml b/deploy/config/dea_base.yaml +index 5a25040..f5a03e2 100644 +--- a/deploy/config/dea_base.yaml ++++ b/deploy/config/dea_base.yaml +@@ -474,9 +474,9 @@ settings: + + linux-firmware-nonfree + +- linux-headers-generic-lts-trusty ++ linux-headers-generic-lts-xenial + +- linux-image-generic-lts-trusty ++ linux-image-generic-lts-xenial + + lvm2 + diff --git a/patches/opnfv-fuel/multiarch-efi/0001-FIXME-deploy-EFI-Skip-re-ordering-boot-via-IPMI.patch b/patches/opnfv-fuel/multiarch-efi/0001-FIXME-deploy-EFI-Skip-re-ordering-boot-via-IPMI.patch new file mode 100644 index 00000000..3b3c612a --- /dev/null +++ b/patches/opnfv-fuel/multiarch-efi/0001-FIXME-deploy-EFI-Skip-re-ordering-boot-via-IPMI.patch @@ -0,0 +1,31 @@ +From: Alexandru Avadanii +Date: Fri, 9 Sep 2016 17:55:38 +0200 +Subject: [PATCH] FIXME: deploy: EFI: Skip re-ordering boot via IPMI + +On EFI systems deploys, altering the boot order via IPMI causes +issues on some specific targets. Until we agree on an uniform +solution for EFI systems + IPMI boot order handling, just skip +altering it via IPMI. + +Related-bug: https://jira.opnfv.org/browse/ARMBAND-71 + +Signed-off-by: Alexandru Avadanii +--- + deploy/deploy_env.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/deploy/deploy_env.py b/deploy/deploy_env.py +index 93dc395..1d2dfeb 100644 +--- a/deploy/deploy_env.py ++++ b/deploy/deploy_env.py +@@ -255,7 +255,9 @@ class CloudDeploy(object): + + def set_boot_order_nodes(self): + self.power_off_nodes() +- self.set_boot_order(['pxe', 'disk']) ++ # ARMBAND FIXME: See https://jira.opnfv.org/browse/ARMBAND-71 ++ # Until we choose an uniform design on EFI systems, just disable it ++ # self.set_boot_order(['pxe', 'disk']) + self.power_on_nodes() + + def get_put_deploy_log(self): diff --git a/patches/opnfv-fuel/multiarch-mirrors/0001-Add-arm64-deb-repositories-setup.patch b/patches/opnfv-fuel/multiarch-mirrors/0001-Add-arm64-deb-repositories-setup.patch new file mode 100644 index 00000000..c3a76d1e --- /dev/null +++ b/patches/opnfv-fuel/multiarch-mirrors/0001-Add-arm64-deb-repositories-setup.patch @@ -0,0 +1,166 @@ +From: Stanislaw Kardach +Date: Wed, 24 Feb 2016 20:04:03 +0100 +Subject: [PATCH] Add arm64 deb repositories setup + +--- + build/f_isoroot/f_kscfg/ks.cfg.patch | 10 ++++++++++ + build/install/apt-ftparchive-deb.conf | 8 +++++++- + build/install/apt-ftparchive-release.conf | 2 +- + build/install/apt-ftparchive-udeb.conf | 7 ++++++- + build/install/install.sh | 22 ++++++++++++++++++---- + build/install/uninstall.sh | 18 ++++++++++-------- + 6 files changed, 52 insertions(+), 15 deletions(-) + +diff --git a/build/f_isoroot/f_kscfg/ks.cfg.patch b/build/f_isoroot/f_kscfg/ks.cfg.patch +index a6840e4..84a241f 100644 +--- a/build/f_isoroot/f_kscfg/ks.cfg.patch ++++ b/build/f_isoroot/f_kscfg/ks.cfg.patch +@@ -1,6 +1,16 @@ + *** /dev/null 2016-04-26 10:10:11.481587709 +0200 + --- ks.cfg 2016-04-26 10:10:11.481587709 +0200 + *************** ++*** 448,453 **** ++--- 448,454 ---- ++ cp ${SOURCE}/.treeinfo ${repodir}/centos/x86_64 ++ ++ # Copying Ubuntu files +++ # FIXME: This is missleading as dist/pool may contain multiple arch! ++ mkdir -p ${repodir}/ubuntu/x86_64/images ++ cp -r ${SOURCE}/ubuntu/dists ${repodir}/ubuntu/x86_64 ++ cp -r ${SOURCE}/ubuntu/pool ${repodir}/ubuntu/x86_64 ++*************** + *** 579,584 **** + --- 579,592 ---- + +diff --git a/build/install/apt-ftparchive-deb.conf b/build/install/apt-ftparchive-deb.conf +index 0d15aec..e6392f8 100644 +--- a/build/install/apt-ftparchive-deb.conf ++++ b/build/install/apt-ftparchive-deb.conf +@@ -16,12 +16,18 @@ TreeDefault { + Directory "pool"; + }; + +-BinDirectory "pool/main" { ++BinDirectory "pool/main/binary-amd64" { + Packages "dists/trusty/main/binary-amd64/Packages"; + BinOverride "./indices/override.trusty.main"; + ExtraOverride "./indices/override.trusty.extra.main"; + }; + ++BinDirectory "pool/main/binary-arm64" { ++ Packages "dists/trusty/main/binary-arm64/Packages"; ++ BinOverride "./indices/override.trusty.main"; ++ ExtraOverride "./indices/override.trusty.extra.main"; ++}; ++ + Default { + Packages { + Extensions ".deb"; +diff --git a/build/install/apt-ftparchive-release.conf b/build/install/apt-ftparchive-release.conf +index 02706bd..2838714 100644 +--- a/build/install/apt-ftparchive-release.conf ++++ b/build/install/apt-ftparchive-release.conf +@@ -13,6 +13,6 @@ APT::FTPArchive::Release::Label "Ubuntu"; + APT::FTPArchive::Release::Suite "trusty"; + APT::FTPArchive::Release::Version "1.04"; + APT::FTPArchive::Release::Codename "trusty"; +-APT::FTPArchive::Release::Architectures "amd64"; ++APT::FTPArchive::Release::Architectures "amd64 arm64"; + APT::FTPArchive::Release::Components "main"; + APT::FTPArchive::Release::Description "Ubuntu Trusty Tahr 14.04 LTS"; +diff --git a/build/install/apt-ftparchive-udeb.conf b/build/install/apt-ftparchive-udeb.conf +index 3b5b239..c6ab4fb 100644 +--- a/build/install/apt-ftparchive-udeb.conf ++++ b/build/install/apt-ftparchive-udeb.conf +@@ -16,11 +16,16 @@ TreeDefault { + Directory "pool"; + }; + +-BinDirectory "pool/debian-installer" { ++BinDirectory "pool/debian-installer/binary-amd64" { + Packages "dists/trusty/main/debian-installer/binary-amd64/Packages"; + BinOverride "./indices/override.trusty.main.debian-installer"; + }; + ++BinDirectory "pool/debian-installer/binary-arm64" { ++ Packages "dists/trusty/main/debian-installer/binary-arm64/Packages"; ++ BinOverride "./indices/override.trusty.main.debian-installer"; ++}; ++ + Default { + Packages { + Extensions ".udeb"; +diff --git a/build/install/install.sh b/build/install/install.sh +index 866d304..9e003bb 100755 +--- a/build/install/install.sh ++++ b/build/install/install.sh +@@ -122,12 +122,24 @@ prep_make_live() { + ssh-copy-id root@$FUELHOST + sshfs root@1${FUELHOST}:/ $TMP_HOSTMOUNT + +- if [ -f $REPO/dists/trusty/main/binary-amd64/Packages.backup ]; then ++ for arch in arm64 amd64; do ++ if [ -f $REPO/dists/trusty/main/binary-${arch}/Packages.backup ]; then ++ echo "Error - found backup file for Packages for ${arch}!" ++ exit 1 ++ fi ++ ++ if [ -f $REPO/dists/trusty/main/binary-${arch}/Packages.gz.backup ]; then ++ echo "Error - found backup file for Packages.gz for ${arch}!" ++ exit 1 ++ fi ++ done ++ ++ if [ -f $REPO/dists/trusty/main/binary-arm64/Packages.backup ]; then + echo "Error - found backup file for Packages!" + exit 1 + fi + +- if [ -f $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup ]; then ++ if [ -f $REPO/dists/trusty/main/binary-arm64/Packages.gz.backup ]; then + echo "Error - found backup file for Packages.gz!" + exit 1 + fi +@@ -142,8 +154,10 @@ prep_make_live() { + exit 1 + fi + +- cp $REPO/dists/trusty/main/binary-amd64/Packages $REPO/dists/trusty/main/binary-amd64/Packages.backup +- cp $REPO/dists/trusty/main/binary-amd64/Packages.gz $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup ++ for arch in arm64 amd64; do ++ cp $REPO/dists/trusty/main/binary-${arch}/Packages $REPO/dists/trusty/main/binary-${arch}/Packages.backup ++ cp $REPO/dists/trusty/main/binary-${arch}/Packages.gz $REPO/dists/trusty/main/binary-${arch}/Packages.gz.backup ++ done + cp $REPO/dists/trusty/Release $REPO/dists/trusty/Release.backup + cp -Rvp $DEST/etc/puppet $DEST/etc/puppet.backup + } +diff --git a/build/install/uninstall.sh b/build/install/uninstall.sh +index a9e74bc..e90c632 100755 +--- a/build/install/uninstall.sh ++++ b/build/install/uninstall.sh +@@ -31,15 +31,17 @@ DEST=$MOUNT + REPO=$DEST/var/www/nailgun/ubuntu/fuelweb/x86_64 + + cd $REPO +-if [ ! -f $REPO/dists/trusty/main/binary-amd64/Packages.backup ]; then +- echo "Error - didn't find backup file for Packages!" +- exit 1 +-fi ++for arch in arm64 amd64; do ++ if [ ! -f $REPO/dists/trusty/main/binary-${arch}/Packages.backup ]; then ++ echo "Error - didn't find backup file for Packages for ${arch}!" ++ exit 1 ++ fi + +-if [ ! -f $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup ]; then +- echo "Error - didn't find backup file for Packages.gz!" +- exit 1 +-fi ++ if [ ! -f $REPO/dists/trusty/main/binary-${arch}/Packages.gz.backup ]; then ++ echo "Error - didn't find backup file for Packages.gz for ${arch}!" ++ exit 1 ++ fi ++done + + if [ ! -f $REPO/dists/trusty/Release.backup ]; then + echo "Error - didn't find backup file for Release!" diff --git a/patches/opnfv-fuel/multiarch-plugins/0001-fpb-Support-multiple-versions-of-packages.patch b/patches/opnfv-fuel/multiarch-plugins/0001-fpb-Support-multiple-versions-of-packages.patch new file mode 100644 index 00000000..35bef5c8 --- /dev/null +++ b/patches/opnfv-fuel/multiarch-plugins/0001-fpb-Support-multiple-versions-of-packages.patch @@ -0,0 +1,50 @@ +From: Alexandru Avadanii +Date: Tue, 23 Aug 2016 15:48:56 +0200 +Subject: [PATCH] fpb: Support multiple versions of packages + +This is a temporary change until the fpm installed by pip gets +the change from [1] included. + +[1] https://review.openstack.org/#/c/311031/ + +Signed-off-by: Alexandru Avadanii +--- + build/docker/Dockerfile | 9 ++++++++- + build/docker/Makefile | 4 ++++ + 2 files changed, 12 insertions(+), 1 deletion(-) + +diff --git a/build/docker/Dockerfile b/build/docker/Dockerfile +index 624f233..ab0d0d3 100644 +--- a/build/docker/Dockerfile ++++ b/build/docker/Dockerfile +@@ -23,7 +23,14 @@ RUN apt-get install -y software-properties-common python-software-properties \ + build-essential ruby-dev rubygems-integration python-pip git rpm createrepo dpkg-dev + + RUN gem install fpm +-RUN pip install fuel-plugin-builder ++ ++# Temporary: fpb needs to be built from sources ++# RUN pip install fuel-plugin-builder ++RUN git clone -b INSERT_FPB_BRANCH INSERT_FPB_REPO && cd fuel-plugins && \ ++ (test -z INSERT_FPB_CHANGE || \ ++ (git fetch origin INSERT_FPB_CHANGE && git checkout FETCH_HEAD)) && \ ++ python setup.py sdist && pip install ./dist/fuel-plugin-builder-*.tar.gz && \ ++ cd .. && rm -rf fuel-plugins + + RUN echo "ALL ALL=NOPASSWD: ALL" > /etc/sudoers.d/open-sudo + RUN echo "Defaults env_keep += \"ftp_proxy http_proxy https_proxy no_proxy RSYNC_PROXY RSYNC_CONNECT_PROG npm_config_registry\"" > /etc/sudoers.d/keep-proxies +diff --git a/build/docker/Makefile b/build/docker/Makefile +index 783881e..74f6346 100644 +--- a/build/docker/Makefile ++++ b/build/docker/Makefile +@@ -34,6 +34,10 @@ all: .docker + + .dockercfg: $(FILES) + cp Dockerfile ubuntu-builder/Dockerfile ++ # Only add FPB ENVs when set - needed to fetch, patch and install FPB ++ test -n "${FPB_REPO}" && sed -i "s;INSERT_FPB_REPO;${FPB_REPO};" ubuntu-builder/Dockerfile || exit 0 ++ test -n "${FPB_BRANCH}" && sed -i "s;INSERT_FPB_BRANCH;${FPB_BRANCH};" ubuntu-builder/Dockerfile || exit 0 ++ test -n "${FPB_CHANGE}" && sed -i "s;INSERT_FPB_CHANGE;${FPB_CHANGE};" ubuntu-builder/Dockerfile || exit 0 + # Only add proxy ENVs where set in host - needed to pull the base Ubuntu image + test -n "${http_proxy}" && sed -i "s;INSERT_HTTP_PROXY;${http_proxy};" ubuntu-builder/Dockerfile || exit 0 + test -n "${https_proxy}" && sed -i "s;INSERT_HTTPS_PROXY;${https_proxy};" ubuntu-builder/Dockerfile || exit 0 diff --git a/patches/opnfv-fuel/upstream-backports/0001-deploy.sh-Remove-check-for-root-rm-umask-0000.patch b/patches/opnfv-fuel/upstream-backports/0001-deploy.sh-Remove-check-for-root-rm-umask-0000.patch new file mode 100644 index 00000000..cd30166a --- /dev/null +++ b/patches/opnfv-fuel/upstream-backports/0001-deploy.sh-Remove-check-for-root-rm-umask-0000.patch @@ -0,0 +1,106 @@ +From: Alexandru Avadanii +Date: Fri, 6 May 2016 03:07:40 +0200 +Subject: [PATCH] deploy.sh: Remove check for root (rm umask 0000) + +Patch(es) by Josep, signed by Alex only for upstreaming. + +[Alexandru Avadanii] +Squashed two atomic commits into one change. + +Signed-off-by: Josep Puigdemont +Signed-off-by: Alexandru Avadanii +--- + ci/deploy.sh | 11 ----------- + deploy/deploy-config.py | 1 - + deploy/deploy.py | 2 -- + deploy/environments/virtual_fuel.py | 2 -- + 4 files changed, 16 deletions(-) + +diff --git a/ci/deploy.sh b/ci/deploy.sh +index 8411714..081806c 100755 +--- a/ci/deploy.sh ++++ b/ci/deploy.sh +@@ -84,9 +84,6 @@ Input parameters to the build script is: + -i .iso image to be deployed (needs to be provided in a URI + style, it can be a local resource: file:// or a remote resource http(s)://) + +-NOTE: Root priviledges are needed for this script to run +- +- + Examples: + sudo `basename $0` -b file:///home/jenkins/lab-config -l lf -p pod1 -s ha_odl-l3_heat_ceilometer -i file:///home/jenkins/myiso.iso + EOF +@@ -212,11 +209,6 @@ do + esac + done + +-if [[ $EUID -ne 0 ]]; then +- echo "This script must be run as root" 1>&2 +- exit 1 +-fi +- + if [ -z $BASE_CONFIG_URI ] || [ -z $TARGET_LAB ] || \ + [ -z $TARGET_POD ] || [ -z $DEPLOY_SCENARIO ] || \ + [ -z $ISO ]; then +@@ -231,9 +223,6 @@ fi + # Enable the automatic exit trap + trap do_exit SIGINT SIGTERM EXIT + +-# Set no restrictive umask so that Jenkins can removeeee any residuals +-umask 0000 +- + clean + + pushd ${DEPLOY_DIR} > /dev/null +diff --git a/deploy/deploy-config.py b/deploy/deploy-config.py +index 2a09aa3..02debe2 100644 +--- a/deploy/deploy-config.py ++++ b/deploy/deploy-config.py +@@ -41,7 +41,6 @@ from common import ( + check_file_exists, + create_dir_if_not_exists, + delete, +- check_if_root, + ArgParser, + ) + +diff --git a/deploy/deploy.py b/deploy/deploy.py +index fe213e5..08702d2 100755 +--- a/deploy/deploy.py ++++ b/deploy/deploy.py +@@ -34,7 +34,6 @@ from common import ( + check_dir_exists, + create_dir_if_not_exists, + delete, +- check_if_root, + ArgParser, + ) + +@@ -252,7 +251,6 @@ class AutoDeploy(object): + return 0 + + def run(self): +- check_if_root() + if self.cleanup_only: + self.cleanup_execution_environment() + else: +diff --git a/deploy/environments/virtual_fuel.py b/deploy/environments/virtual_fuel.py +index b1a76e4..4ff68f6 100644 +--- a/deploy/environments/virtual_fuel.py ++++ b/deploy/environments/virtual_fuel.py +@@ -18,7 +18,6 @@ import time + from common import ( + exec_cmd, + check_file_exists, +- check_if_root, + delete, + log, + ) +@@ -135,7 +134,6 @@ class VirtualFuel(ExecutionEnvironment): + vm_definition_overwrite) + + def setup_environment(self): +- check_if_root() + self.cleanup_environment() + self.create_vm() + diff --git a/patches/opnfv-fuel/upstream-backports/0002-Backport-dpkg-checkbuilddeps-to-mk-build-deps.patch b/patches/opnfv-fuel/upstream-backports/0002-Backport-dpkg-checkbuilddeps-to-mk-build-deps.patch new file mode 100644 index 00000000..eb81942e --- /dev/null +++ b/patches/opnfv-fuel/upstream-backports/0002-Backport-dpkg-checkbuilddeps-to-mk-build-deps.patch @@ -0,0 +1,58 @@ +From: Alexandru Avadanii +Date: Wed, 6 Jul 2016 17:03:49 +0200 +Subject: [PATCH] Backport: dpkg-checkbuilddeps to mk-build-deps. + +Backported from [1]. + +[1] https://review.openstack.org/#/c/325210/ + +Signed-off-by: Alexandru Avadanii +--- + ...ce-dpkg-checkbuilddeps-with-mk-build-deps.patch | 38 ++++++++++++++++++++++ + 1 file changed, 38 insertions(+) + create mode 100644 build/f_repos/patch/fuel-main/0005-replace-dpkg-checkbuilddeps-with-mk-build-deps.patch + +diff --git a/build/f_repos/patch/fuel-main/0005-replace-dpkg-checkbuilddeps-with-mk-build-deps.patch b/build/f_repos/patch/fuel-main/0005-replace-dpkg-checkbuilddeps-with-mk-build-deps.patch +new file mode 100644 +index 0000000..896f3cf +--- /dev/null ++++ b/build/f_repos/patch/fuel-main/0005-replace-dpkg-checkbuilddeps-with-mk-build-deps.patch +@@ -0,0 +1,38 @@ ++From: Sergii Golovatiuk ++Date: Fri, 3 Jun 2016 12:26:19 +0200 ++Subject: [PATCH] Replace dpkg-checkbuilddeps with mk-build-deps ++ ++dpkg-checkbuilddeps doesn't check dependencies inside chroot as in many ++cases host system might not have required packages. This change replaces ++dpkg-checkbuilddeps with mk-build-deps in chroot ++ ++Implements: mos-xenial ++Change-Id: I27a65893c1bd33e6d82c11bf3d08423562dbe4d2 ++Signed-off-by: Sergii Golovatiuk ++--- ++ packages/deb/module.mk | 5 ++--- ++ 1 file changed, 2 insertions(+), 3 deletions(-) ++ ++diff --git a/packages/deb/module.mk b/packages/deb/module.mk ++index 6c93441..c0ba737 100644 ++--- a/packages/deb/module.mk +++++ b/packages/deb/module.mk ++@@ -10,7 +10,7 @@ clean-deb: ++ done ++ sudo rm -rf $(BUILD_DIR)/packages/deb ++ ++-$(BUILD_DIR)/packages/deb/buildd.tar.gz: SANDBOX_DEB_PKGS:=wget bzip2 apt-utils build-essential python-setuptools python-pbr devscripts debhelper fakeroot +++$(BUILD_DIR)/packages/deb/buildd.tar.gz: SANDBOX_DEB_PKGS:=wget bzip2 apt-utils build-essential fakeroot devscripts equivs debhelper python-setuptools python-pbr ++ $(BUILD_DIR)/packages/deb/buildd.tar.gz: SANDBOX_UBUNTU:=$(BUILD_DIR)/packages/deb/chroot ++ $(BUILD_DIR)/packages/deb/buildd.tar.gz: export SANDBOX_UBUNTU_UP:=$(SANDBOX_UBUNTU_UP) ++ $(BUILD_DIR)/packages/deb/buildd.tar.gz: export SANDBOX_UBUNTU_DOWN:=$(SANDBOX_UBUNTU_DOWN) ++@@ -47,8 +47,7 @@ $(BUILD_DIR)/packages/deb/$1.done: $(BUILD_DIR)/repos/repos.done ++ sudo -E dch -c $$(SANDBOX_UBUNTU)/tmp/$1/debian/changelog -D $(UBUNTU_RELEASE) -b --force-distribution \ ++ -v $(PACKAGE_VERSION)-`awk -F'=' '/DEBRELEASE/ {print $$$$2}' $(BUILD_DIR)/packages/sources/$1/version` \ ++ "`awk -F'=' '/DEBMSG/ {print $$$$2}' $(BUILD_DIR)/packages/sources/$1/version`" ++- dpkg-checkbuilddeps $(BUILD_DIR)/repos/$1/debian/control 2>&1 | sed 's/^dpkg-checkbuilddeps: Unmet build dependencies: //g' | sed 's/([^()]*)//g;s/|//g' | sudo tee $$(SANDBOX_UBUNTU)/tmp/$1.installdeps ++- sudo chroot $$(SANDBOX_UBUNTU) /bin/sh -c "cat /tmp/$1.installdeps | xargs --no-run-if-empty env LC_ALL=C DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get -y install" +++ sudo chroot $$(SANDBOX_UBUNTU) /bin/sh -c "mk-build-deps --install --remove --tool 'apt-get --yes --no-remove --no-install-recommends' /tmp/$1/debian/control" ++ sudo chroot $$(SANDBOX_UBUNTU) /bin/sh -c "cd /tmp/$1 ; DEB_BUILD_OPTIONS=nocheck debuild -us -uc -b -d" ++ cp $$(SANDBOX_UBUNTU)/tmp/*.deb $(BUILD_DIR)/packages/deb/packages ++ sudo sh -c "$$$${SANDBOX_UBUNTU_DOWN}" diff --git a/patches/vswitchperf/0001-ci-build-vsperf-make-qemu-system-name-arch-indep.patch b/patches/vswitchperf/0001-ci-build-vsperf-make-qemu-system-name-arch-indep.patch index 29e8a1d3..0fd972cc 100644 --- a/patches/vswitchperf/0001-ci-build-vsperf-make-qemu-system-name-arch-indep.patch +++ b/patches/vswitchperf/0001-ci-build-vsperf-make-qemu-system-name-arch-indep.patch @@ -10,7 +10,7 @@ Signed-off-by: Alexandru Avadanii 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ci/build-vsperf.sh b/ci/build-vsperf.sh -index 5370898..fc38747 100755 +index a02de00..fa0d46a 100755 --- a/ci/build-vsperf.sh +++ b/ci/build-vsperf.sh @@ -87,14 +87,15 @@ TEST_REPORT_LOG_DIR="${HOME}/opnfv/$PROJECT/results/$BRANCH" @@ -22,7 +22,7 @@ index 5370898..fc38747 100755 sudo pkill python3 &> /dev/null - sudo killall -9 qemu-system-x86_64 &> /dev/null + sudo killall -9 "${qemu_system_name}" &> /dev/null - + # sometimes qemu resists to terminate, so wait a bit and kill it again - if pgrep qemu-system-x86_64 &> /dev/null ; then + if pgrep "${qemu_system_name}" &> /dev/null ; then @@ -31,4 +31,4 @@ index 5370898..fc38747 100755 + sudo killall -9 "${qemu_system_name}" &> /dev/null sleep 5 fi - + diff --git a/patches/vswitchperf/0002-s-u-build_base_machine-Arch-indep-libdir-s.patch b/patches/vswitchperf/0002-s-u-build_base_machine-Arch-indep-libdir-s.patch index 0a92144f..f82aaae7 100644 --- a/patches/vswitchperf/0002-s-u-build_base_machine-Arch-indep-libdir-s.patch +++ b/patches/vswitchperf/0002-s-u-build_base_machine-Arch-indep-libdir-s.patch @@ -10,21 +10,21 @@ Signed-off-by: Alexandru Avadanii 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/systems/ubuntu/build_base_machine.sh b/systems/ubuntu/build_base_machine.sh -index a2b48a2..7cbe78e 100755 +index 1b42a79..b0f3740 100755 --- a/systems/ubuntu/build_base_machine.sh +++ b/systems/ubuntu/build_base_machine.sh -@@ -52,11 +52,12 @@ apt-get -y install libfuse-dev +@@ -54,11 +54,12 @@ apt-get -y install libnuma-dev # packages related to VM - + # a few manual fix up on a ubuntu -cd /lib/x86_64-linux-gnu +local arch=$(uname -m) +cd /lib/${arch}-linux-gnu ln -sf libssl.so.1.0.0 libssl.so ln -sf libcrypto.so.1.0.0 libcrypto.so - + -cd /usr/lib/x86_64-linux-gnu +cd /usr/lib/${arch}-linux-gnu ln -sf libxml2.so.2 libxml2.so - - + + -- cgit 1.2.3-korg