aboutsummaryrefslogtreecommitdiffstats
path: root/patches/fuel-library
diff options
context:
space:
mode:
Diffstat (limited to 'patches/fuel-library')
-rw-r--r--patches/fuel-library/0001-ceph-Fix-obsolete-XFS-mount-param-delaylog.patch48
-rw-r--r--patches/fuel-library/0001-puppet-database-Fix-Percona-XtraBackup-sync.patch54
-rw-r--r--patches/fuel-library/0002-ceilometer-Fix-libvirt-bin-group-name-for-armband.patch46
-rw-r--r--patches/fuel-library/0003-compute-Fix-virtlogd-not-started-after-install.patch33
-rw-r--r--patches/fuel-library/0004-puppet-cobbler-Fix-CentOS-version-detection.patch39
-rw-r--r--patches/fuel-library/arm64-bug-fixes/0001-nova-config-Disable-usb-tablet-for-aarch64.patch25
-rw-r--r--patches/fuel-library/arm64-bug-fixes/0002-Install-vgabios-and-link-for-aarch64.patch6
-rw-r--r--patches/fuel-library/arm64-bug-fixes/0003-nova-Update-vga-console-defaults-for-armv7-aarch64.patch12
-rw-r--r--patches/fuel-library/arm64-bug-fixes/0004-AArch64-nova-libvirt-Use-host-model-cpu.patch35
-rw-r--r--patches/fuel-library/arm64-bug-fixes/0004-nova-AArch64-enable-hugepage-support.patch93
-rw-r--r--patches/fuel-library/arm64-bug-fixes/0005-nova-libvirt-fix-delete-instance-with-nvram.patch117
-rw-r--r--patches/fuel-library/direct-kernel-boot/0001-upload_cirros-Add-direct-kernel-boot-support.patch118
-rw-r--r--patches/fuel-library/direct-kernel-boot/0002-nova-Fix-inject-for-direct-boot-with-part-table.patch4
-rw-r--r--patches/fuel-library/multiarch-efi/0001-Add-arm64-templates-to-cobbler-and-nailgun.patch104
-rw-r--r--patches/fuel-library/multiarch-efi/0002-Add-cobbler-grub-aarch64-to-cobbler-dependencies.patch23
-rw-r--r--patches/fuel-library/multiarch-fuel/0002-Make-TestVM-creation-architecture-aware.patch22
-rw-r--r--patches/fuel-library/mysql-sst-provider/0001-Allow-configuring-MySQL-WSREP-SST-provider.patch15
-rw-r--r--patches/fuel-library/upstream-backports/0001-Set-net.ipv4.ip_nonlocal_bind-1-for-vrouter-namespac.patch54
-rw-r--r--patches/fuel-library/upstream-backports/0002-Always-wait-for-MySQL-sync-on-service-refresh.patch60
-rw-r--r--patches/fuel-library/upstream-backports/0003-Fix-MySQL-logging-dir-permissions-for-syslog.patch90
20 files changed, 265 insertions, 733 deletions
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
deleted file mode 100644
index facde8f2..00000000
--- a/patches/fuel-library/0001-ceph-Fix-obsolete-XFS-mount-param-delaylog.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
-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/0001-puppet-database-Fix-Percona-XtraBackup-sync.patch b/patches/fuel-library/0001-puppet-database-Fix-Percona-XtraBackup-sync.patch
new file mode 100644
index 00000000..bf09ce07
--- /dev/null
+++ b/patches/fuel-library/0001-puppet-database-Fix-Percona-XtraBackup-sync.patch
@@ -0,0 +1,54 @@
+From: Dan Andresan <dan.andresan@enea.com>
+Date: Fri, 20 Jan 2017 17:24:40 +0200
+Subject: [PATCH] puppet: database: Fix Percona XtraBackup sync
+
+Recently, Percona released XtraBackup 2.4.5 which considers that SSL
+is enabled if it finds ssl-ca, ssl-cert, ssl-key set up in my.cnf,
+even if ssl is set to false in the same config file. Furthermore,
+it complains that ssl is deprecated on the stdout instead of stderr,
+corrupting xbstream in the process.
+
+Because ssl was set to false, this patch delete all other ssl-* keys
+from the config file, avoiding xtrabackup getting confused.
+
+See percona xtrabackup bugs here:
+https://bugs.launchpad.net/percona-xtrabackup/+bug/1646480
+https://bugs.launchpad.net/percona-xtrabackup/+bug/1647340
+
+Closes-bug: https://jira.opnfv.org/browse/ARMBAND-197
+
+Signed-off-by: Dan Andresan <dan.andresan@enea.com>
+---
+ .../puppet/osnailyfacter/manifests/database/database.pp | 14 +++++++++++++-
+ 1 file changed, 13 insertions(+), 1 deletion(-)
+
+diff --git a/deployment/puppet/osnailyfacter/manifests/database/database.pp b/deployment/puppet/osnailyfacter/manifests/database/database.pp
+index 4fca959..ce406d7 100644
+--- a/deployment/puppet/osnailyfacter/manifests/database/database.pp
++++ b/deployment/puppet/osnailyfacter/manifests/database/database.pp
+@@ -253,12 +253,24 @@ class osnailyfacter::database::database {
+ package_name => $mysql_package_name,
+ }
+
++ # remove ssl - not used and confuse Percona XtraBackup 2.4.5
++ # see ARMBAND-197: https://jira.opnfv.org/browse/ARMBAND-197
++ $percona_hotfix = {
++ 'mysqld' => {
++ 'ssl' => undef,
++ 'ssl-ca' => undef,
++ 'ssl-cert' => undef,
++ 'ssl-key' => undef
++ }
++ }
++
+ # build our mysql options to be configured in my.cnf
+ $mysql_override_options = mysql_deepmerge(
+ $fuel_override_options,
+ $ignore_db_dir_options,
+ $binary_logs_options,
+- $syslog_options
++ $syslog_options,
++ $percona_hotfix
+ )
+ $galera_options = mysql_deepmerge($wsrep_options, $vendor_override_options)
+ $override_options = mysql_deepmerge($mysql_override_options, $galera_options)
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
deleted file mode 100644
index 17700a9a..00000000
--- a/patches/fuel-library/0002-ceilometer-Fix-libvirt-bin-group-name-for-armband.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
-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-compute-Fix-virtlogd-not-started-after-install.patch b/patches/fuel-library/0003-compute-Fix-virtlogd-not-started-after-install.patch
deleted file mode 100644
index a9a49331..00000000
--- a/patches/fuel-library/0003-compute-Fix-virtlogd-not-started-after-install.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
-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 <Alexandru.Avadanii@enea.com>
----
- 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-puppet-cobbler-Fix-CentOS-version-detection.patch b/patches/fuel-library/0004-puppet-cobbler-Fix-CentOS-version-detection.patch
deleted file mode 100644
index 1ada6159..00000000
--- a/patches/fuel-library/0004-puppet-cobbler-Fix-CentOS-version-detection.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
-Date: Wed, 14 Dec 2016 15:40:41 +0100
-Subject: [PATCH] puppet: cobbler: Fix CentOS version detection
-
-Recently, CentOS released version 7.3.1611, which triggered a latent
-bug in fuel-library puppet scripts related to differentiating between
-6.x and 7.x major versions: 7.3.1611 is wrongly detected as 6.x,
-leading to the wrong packages being attempted to be installed,
-leaving nailgun server service broken on the Fuel Master node.
-
-This change forces the match at the beggining of the version string
-(e.g. "/^6.+/: {" instead of "/6.+/: {"), so the new CentOS 7.3.1611
-no longer matches the condition for 6.x).
-
-Closes-bug: 1649895
-
-Change-Id: I8873701d24e406e2804b9e654decb776ec3bf61c
-Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
----
- 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..3c14ea1 100644
---- a/deployment/puppet/cobbler/manifests/packages.pp
-+++ b/deployment/puppet/cobbler/manifests/packages.pp
-@@ -24,10 +24,10 @@ class cobbler::packages {
- $openssh_package = 'openssh-clients'
- $pexpect_package = 'pexpect'
- case $::operatingsystemrelease {
-- /6.+/: {
-+ /^6.+/: {
- $cobbler_additional_packages = ['xinetd', 'tftp-server', 'syslinux', 'wget', 'python-ipaddr','fence-agents', 'bind-utils']
- }
-- /7.+/: {
-+ /^7.+/: {
- $cobbler_additional_packages = ['xinetd', 'tftp-server', 'syslinux', 'wget', 'python-ipaddr','fence-agents-all', 'bind-utils']
- }
- }
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
index f4e19229..eb611bfc 100644
--- 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
@@ -2,22 +2,29 @@ From: Stanislaw Kardach <stanislaw.kardach@cavium.com>
Date: Tue, 15 Mar 2016 11:33:52 +0100
Subject: [PATCH] nova config: Disable usb tablet for aarch64
+[ Alexandru Avadanii ]
+Rebased for Newton: reworked use_usb_tablet using pointer_model.
+
+JIRA: ARMBAND-194
+
+Signed-off-by: Stanislaw Kardach <stanislaw.kardach@cavium.com>
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
---
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
+index 5b247b0..0a1a1c7 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,
-+ };
+@@ -391,6 +391,10 @@ class openstack_tasks::roles::compute {
'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';
++ 'DEFAULT/pointer_model': value => $::architecture ? {
++ /(arm64|aarch64)/ => ps2mouse,
++ default => usbtablet,
++ };
+ }
+
+ # TODO (iberezovskiy): rework this option management once it's available in puppet-nova module
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
index da152ead..9b59349e 100644
--- 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
@@ -17,9 +17,9 @@ 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,
+ libvirt_service_name => 'libvirt-bin',
+ virtlock_service_name => 'virtlockd',
+ virtlog_service_name => 'virtlogd',
+ } ->
+ package { 'vgabios':
+ ensure => present;
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
index 9e9c3d53..be481a78 100644
--- 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
@@ -75,18 +75,17 @@ index b18fa7b..2f0f2a8 100644
case $::osfamily {
'RedHat': {
# From legacy libvirt.pp
-@@ -290,6 +296,7 @@ class openstack_tasks::roles::compute {
+@@ -290,5 +296,6 @@ 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,
+@@ -311,5 +318,17 @@ class openstack_tasks::roles::compute {
+ rabbit_heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold,
+ rabbit_heartbeat_rate => $rabbit_heartbeat_rate,
+ os_region_name => $region_name,
+ } ->
+ # FIXME(armband): Workaround for missing arm defaults in nova libvirt driver
+ file { "${nova_path}/libvirt-vga-console.patch":
@@ -101,4 +100,3 @@ index b18fa7b..2f0f2a8 100644
+ require => [Package['patch']],
}
- class { '::nova::availability_zone':
diff --git a/patches/fuel-library/arm64-bug-fixes/0004-AArch64-nova-libvirt-Use-host-model-cpu.patch b/patches/fuel-library/arm64-bug-fixes/0004-AArch64-nova-libvirt-Use-host-model-cpu.patch
new file mode 100644
index 00000000..aff89365
--- /dev/null
+++ b/patches/fuel-library/arm64-bug-fixes/0004-AArch64-nova-libvirt-Use-host-model-cpu.patch
@@ -0,0 +1,35 @@
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Thu, 19 Jan 2017 19:19:28 +0100
+Subject: [PATCH] AArch64: nova: libvirt: Use host-model cpu
+
+Closes-bug: https://jira.opnfv.org/browse/ARMBAND-193
+
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
+ deployment/puppet/openstack_tasks/manifests/roles/compute.pp | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp
+index a6f4729..f6e6698 100644
+--- a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp
++++ b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp
+@@ -319,9 +319,18 @@ class openstack_tasks::roles::compute {
+ # guest OS by using a combination of CPU features and other parameters (such
+ # as CPUID level) that don't work. Until these issues are fixed, it's a good
+ # idea to avoid using host-model
++ # NOTE(armband): AArch64: Use host-model cpu
+ # http://libvirt.org/formatdomain.html#elementsCPU
+ # https://bugs.launchpad.net/mos/+bug/1618473
+- $libvirt_cpu_mode = 'none'
++ # https://jira.opnfv.org/browse/ARMBAND-193
++ if str2bool($::is_virtual) {
++ $libvirt_cpu_mode = 'none'
++ } else {
++ $libvirt_cpu_mode = $::architecture ? {
++ /(arm64|aarch64)/ => 'host-model',
++ default => 'none',
++ }
++ }
+
+ # Install / configure nova-compute
+
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
deleted file mode 100644
index ab0fb664..00000000
--- a/patches/fuel-library/arm64-bug-fixes/0004-nova-AArch64-enable-hugepage-support.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
-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 <vlingadahalli@mvista.com>
-Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
----
- .../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 <vlingadahalli@mvista.com>
-+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 <vlingadahalli@mvista.com>
-+Acked-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
-+---
-+
-+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/arm64-bug-fixes/0005-nova-libvirt-fix-delete-instance-with-nvram.patch b/patches/fuel-library/arm64-bug-fixes/0005-nova-libvirt-fix-delete-instance-with-nvram.patch
new file mode 100644
index 00000000..9bf9a5c4
--- /dev/null
+++ b/patches/fuel-library/arm64-bug-fixes/0005-nova-libvirt-fix-delete-instance-with-nvram.patch
@@ -0,0 +1,117 @@
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Thu, 19 Jan 2017 23:03:54 +0100
+Subject: [PATCH] nova: libvirt: fix delete instance with nvram
+
+Backported from [1].
+
+Closes-bug: 1567807
+
+[1] https://review.openstack.org/#/q/
+ 539d381434ccadcdc3f5d58c2705c35558a3a065
+
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
+ .../files/nova-libvirt-delete-with-nvram.patch | 70 ++++++++++++++++++++++
+ .../openstack_tasks/manifests/roles/compute.pp | 12 ++++
+ 2 files changed, 82 insertions(+)
+ create mode 100644 deployment/puppet/openstack/files/nova-libvirt-delete-with-nvram.patch
+
+diff --git a/deployment/puppet/openstack/files/nova-libvirt-delete-with-nvram.patch b/deployment/puppet/openstack/files/nova-libvirt-delete-with-nvram.patch
+new file mode 100644
+index 0000000..5d4f67c
+--- /dev/null
++++ b/deployment/puppet/openstack/files/nova-libvirt-delete-with-nvram.patch
+@@ -0,0 +1,70 @@
++From: Kevin Zhao <kevin.zhao@linaro.org>
++Date: Thu, 5 Jan 2017 21:32:41 +0000
++Subject: [PATCH] libvirt: fix nova can't delete the instance with nvram
++
++Currently libvirt needs a flag when deleting an VM with a nvram file,
++without which nova can't delete an instance booted with UEFI. Add
++deletion flag for NVRAM. Also add a test case.
++
++[ Alexandru Avadanii ]
++Removed chunks affecting tests and adapted for OPNFV Armband.
++
++Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
++Co-authored-by: Derek Higgins <derekh@redhat.com>
++Change-Id: I46baa952b6c3a1a4c5cf2660931f317cafb5757d
++Closes-Bug: #1567807
++---
++
++diff --git a/virt/libvirt/driver.py b/virt/libvirt/driver.py
++--- a/virt/libvirt/driver.py
+++++ b/virt/libvirt/driver.py
++@@ -903,7 +903,8 @@ class LibvirtDriver(driver.ComputeDriver):
++ try:
++ guest = self._host.get_guest(instance)
++ try:
++- guest.delete_configuration()
+++ support_uefi = self._has_uefi_support()
+++ guest.delete_configuration(support_uefi)
++ except libvirt.libvirtError as e:
++ with excutils.save_and_reraise_exception():
++ errcode = e.get_error_code()
++@@ -1241,7 +1242,8 @@ class LibvirtDriver(driver.ComputeDriver):
++ # If any part of this block fails, the domain is
++ # re-defined regardless.
++ if guest.has_persistent_configuration():
++- guest.delete_configuration()
+++ support_uefi = self._has_uefi_support()
+++ guest.delete_configuration(support_uefi)
++
++ # Start copy with VIR_DOMAIN_REBASE_REUSE_EXT flag to
++ # allow writing to existing external volume file
++@@ -1760,7 +1762,8 @@ class LibvirtDriver(driver.ComputeDriver):
++ # If any part of this block fails, the domain is
++ # re-defined regardless.
++ if guest.has_persistent_configuration():
++- guest.delete_configuration()
+++ support_uefi = self._has_uefi_support()
+++ guest.delete_configuration(support_uefi)
++
++ # NOTE (rmk): Establish a temporary mirror of our root disk and
++ # issue an abort once we have a complete copy.
++diff --git a/virt/libvirt/guest.py b/virt/libvirt/guest.py
++--- a/virt/libvirt/guest.py
+++++ b/virt/libvirt/guest.py
++@@ -262,11 +262,13 @@ class Guest(object):
++ yield VCPUInfo(
++ id=vcpu[0], cpu=vcpu[3], state=vcpu[1], time=vcpu[2])
++
++- def delete_configuration(self):
+++ def delete_configuration(self, support_uefi=False):
++ """Undefines a domain from hypervisor."""
++ try:
++- self._domain.undefineFlags(
++- libvirt.VIR_DOMAIN_UNDEFINE_MANAGED_SAVE)
+++ flags = libvirt.VIR_DOMAIN_UNDEFINE_MANAGED_SAVE
+++ if support_uefi:
+++ flags |= libvirt.VIR_DOMAIN_UNDEFINE_NVRAM
+++ self._domain.undefineFlags(flags)
++ except libvirt.libvirtError:
++ LOG.debug("Error from libvirt during undefineFlags. %d"
++ "Retrying with undefine", self.id)
+diff --git a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp
+index f6e6698..dd0c034 100644
+--- a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp
++++ b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp
+@@ -301,6 +301,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): Backport fix: nova delete instance with nvram
++ file { "${nova_path}/nova-libvirt-delete-with-nvram.patch":
++ ensure => "file",
++ source => "puppet:///modules/openstack/nova-libvirt-delete-with-nvram.patch",
++ } ->
++ exec { 'nova libvirt delete instance with nvram':
++ path => ['/usr/bin'],
++ command => "patch -p1 < ${nova_path}/nova-libvirt-delete-with-nvram.patch",
++ unless => "patch -p1 -R -N --dry-run < ${nova_path}/nova-libvirt-delete-with-nvram.patch",
++ cwd => $nova_path,
++ require => [Package['patch']],
+ }
+
+ class { '::nova::cache':
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
deleted file mode 100644
index f3eb0748..00000000
--- a/patches/fuel-library/direct-kernel-boot/0001-upload_cirros-Add-direct-kernel-boot-support.patch
+++ /dev/null
@@ -1,118 +0,0 @@
-From: Stanislaw Kardach <stanislaw.kardach@cavium.com>
-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 <stanislaw.kardach@cavium.com>
----
- .../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
index 7cc743af..51c66f76 100644
--- 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
@@ -71,9 +71,7 @@ diff --git a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp b/depl
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,
+@@ -319,4 +319,16 @@ class openstack_tasks::roles::compute {
} ->
+ # FIXME(armband): Fix inject for part image direct boot (bug LP #1469308)
+ file { "${nova_path}/libvirt-inject.patch":
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
index 262bd994..bf5db54e 100644
--- 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
@@ -6,13 +6,22 @@ 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
+[ 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
+[ Alexandru Avadanii ]
+Rebased for Fuel Newton after upstream change:
+"Remove deprecated cobbler parts for classic provisioning" [1].
+
+[1] https://github.com/openstack/fuel-library/commit/
+ e207593d7b3234cfbde6689dbccdcafe6ba67e58
+
Signed-off-by: Stanislaw Kardach <stanislaw.kardach@cavium.com>
Signed-off-by: Matei Valeanu <Matei.Valeanu@enea.com>
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
---
deployment/puppet/cobbler/manifests/server.pp | 36 ++++++++++++++++++++++
.../puppet/cobbler/templates/dnsmasq.template.erb | 2 ++
@@ -20,16 +29,13 @@ Signed-off-by: Matei Valeanu <Matei.Valeanu@enea.com>
.../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
@@ -149,22 +155,6 @@ index 0000000..9a191bc
+ 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
@@ -199,61 +189,6 @@ diff --git a/deployment/puppet/fuel/manifests/cobbler.pp b/deployment/puppet/fue
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,
@@ -263,22 +198,3 @@ index b403733..c89027d 100644
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
index 8314663f..f4edfeae 100644
--- 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
@@ -9,27 +9,22 @@ on the Fuel master node.
[Alexandru.Avadanii@enea.com]
Reworked based on Florin's work for the docker container.
+Rebased for Fuel Newton.
Signed-off-by: Florin Dumitrascu <florin.dumitrascu@enea.com>
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
---
- deployment/puppet/cobbler/manifests/packages.pp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
+ deployment/puppet/cobbler/manifests/packages.pp | 2 +-
+ 1 file changed, 1 insertions(+), 1 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']
- }
- }
+@@ -23,5 +23,5 @@ class cobbler::packages {
+ $django_package = 'python-django'
+ $openssh_package = 'openssh-clients'
+ $pexpect_package = 'pexpect'
+- $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/0002-Make-TestVM-creation-architecture-aware.patch b/patches/fuel-library/multiarch-fuel/0002-Make-TestVM-creation-architecture-aware.patch
index 325b51d4..c326c7d8 100644
--- 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
@@ -48,41 +48,35 @@ 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']
-
+ $details,
+ $template_dir = '/var/lib/nova',
+ ) {
+ case $::architecture {
+ 'arm64', 'aarch64': {
+ $machine_arch = 'aarch64'
-+ $machine_type = 'virt'
++ $machine_type = 'virt-2.6'
+ }
+ default: {
+ $machine_arch = 'x86_64'
-+ $machine_type = 'pc-i440fx-trusty'
++ $machine_type = 'pc'
+ }
+ }
+
- file { "${template_dir}/template_${id}_vm.xml":
+ file { "${template_dir}/template_${name}_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 @@
+@@ -3,14 +3,17 @@
<memory unit='GiB'><%= @details['mem'] %></memory>
<vcpu placement='static'><%= @details['cpu'] %></vcpu>
<os>
-- <type arch='x86_64' machine='pc-i440fx-trusty'>hvm</type>
+- <type arch='x86_64' machine='pc'>hvm</type>
+ <type arch='<%= @machine_arch %>' machine='<%= @machine_type %>'>hvm</type>
-+ <% if == 'aarch64' %>
-+ <kernel>/var/lib/nova/<%= @details['id'] %>_vm.kernel</kernel>
-+ <initrd>/var/lib/nova/<%= @details['id'] %>_vm.initramfs</initrd>
-+ <cmdline>root=/dev/vda1 rw rootwait console=tty0 console=ttyS0 console=ttyAMA0</cmdline>
-+ <% else %>
<boot dev='network'/>
<boot dev='hd'/>
-+ <% end %>
</os>
<features>
<acpi/>
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
index 632aa8f3..f52af67a 100644
--- 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
@@ -24,17 +24,16 @@ diff --git a/deployment/puppet/osnailyfacter/manifests/database/database.pp b/de
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))
+@@ -8,5 +8,6 @@ class osnailyfacter::database::database {
+ $use_syslog = hiera('use_syslog', true)
+ $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')
+ $mgmt_iface = get_network_role_property('mgmt/database', 'interface')
@@ -17,6 +18,7 @@ class osnailyfacter::database::database {
-
$mysql_root_password = $mysql_hash['root_password']
+ $deb_sysmaint_password = $mysql_hash['wsrep_password']
$enabled = pick($mysql_hash['enabled'], true)
+ $wsrep_sst_method = pick($wsrep_hash['wsrep_method'], 'xtrabackup-v2')
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
deleted file mode 100644
index 281ef231..00000000
--- a/patches/fuel-library/upstream-backports/0001-Set-net.ipv4.ip_nonlocal_bind-1-for-vrouter-namespac.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From: Bartosz Kupidura <bkupidura@mirantis.com>
-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
deleted file mode 100644
index d7fac948..00000000
--- a/patches/fuel-library/upstream-backports/0002-Always-wait-for-MySQL-sync-on-service-refresh.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From: dmburmistrov <dmburmistrov@mirantis.com>
-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
deleted file mode 100644
index 7dfede1b..00000000
--- a/patches/fuel-library/upstream-backports/0003-Fix-MySQL-logging-dir-permissions-for-syslog.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From: Maksim Malchuk <mmalchuk@mirantis.com>
-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 <mmalchuk@mirantis.com>
-(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(