diff options
Diffstat (limited to 'patches/fuel-library')
-rw-r--r-- | patches/fuel-library/0001-Add-arm64-templates-to-cobbler-and-nailgun.patch | 67 | ||||
-rw-r--r-- | patches/fuel-library/0008-nova-Update-vga-console-defaults-for-armv7-aarch64.patch (renamed from patches/fuel-library/0009-Update-vga-console-defaults-for-armv7-and-aarch64.patch) | 2 | ||||
-rw-r--r-- | patches/fuel-library/0009-nova-AArch64-enable-hugepage-support.patch | 93 | ||||
-rw-r--r-- | patches/fuel-library/0017-Always-wait-for-MySQL-sync-on-service-refresh.patch | 60 | ||||
-rw-r--r-- | patches/fuel-library/0018-Fix-MySQL-logging-dir-permissions-for-syslog.patch | 90 |
5 files changed, 291 insertions, 21 deletions
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 index 244dedee..963356b2 100644 --- 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 @@ -5,27 +5,37 @@ 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 <stanislaw.kardach@caviumnetworks.com> +Signed-off-by: Matei Valeanu <Matei.Valeanu@enea.com> --- - deployment/puppet/cobbler/manifests/server.pp | 27 +++++++++++++++ + deployment/puppet/cobbler/manifests/server.pp | 36 ++++++++++++++++++++++ .../puppet/cobbler/templates/dnsmasq.template.erb | 2 ++ .../cobbler/templates/efidefault.template.erb | 5 +++ - .../cobbler/templates/grubprofile.template.erb | 12 +++++++ - .../cobbler/templates/grubsystem.template.erb | 16 +++++++++ + .../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 ++ - .../puppet/fuel/manifests/auxiliaryrepos.pp | 12 ++++--- - deployment/puppet/fuel/manifests/cobbler.pp | 38 +++++++++++++++++----- + deployment/puppet/fuel/manifests/auxiliaryrepos.pp | 12 +++++--- + deployment/puppet/fuel/manifests/cobbler.pp | 36 +++++++++++++++++----- .../puppet/fuel/manifests/cobbler/preseed.pp | 13 ++++++++ - 9 files changed, 115 insertions(+), 12 deletions(-) + 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 bdb1ae7..0523404 100644 +index 891dff7..52936d5 100644 --- a/deployment/puppet/cobbler/manifests/server.pp +++ b/deployment/puppet/cobbler/manifests/server.pp -@@ -288,6 +288,33 @@ class cobbler::server ( +@@ -297,6 +297,42 @@ class cobbler::server ( notify => [Service[$cobbler_service], Exec['cobbler_sync']], } @@ -56,14 +66,23 @@ index bdb1ae7..0523404 100644 + 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 3a96ac1..8d3e753 100644 +index d70f8de..98278e9 100644 --- a/deployment/puppet/cobbler/templates/dnsmasq.template.erb +++ b/deployment/puppet/cobbler/templates/dnsmasq.template.erb -@@ -33,5 +33,7 @@ dhcp-no-override +@@ -41,5 +41,7 @@ dhcp-no-override # by assigning IPs one by one instead of using hash algorithm. dhcp-sequential-ip @@ -82,6 +101,14 @@ index 0000000..af09eb8 +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 @@ -123,7 +150,7 @@ index 0000000..9a191bc + 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 fd6dda3..65c6c69 100644 +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 @@ -139,10 +166,10 @@ index fd6dda3..65c6c69 100644 # 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 41a2570..720943d 100644 +index 493ffc6..909fc92 100644 --- a/deployment/puppet/fuel/manifests/auxiliaryrepos.pp +++ b/deployment/puppet/fuel/manifests/auxiliaryrepos.pp -@@ -48,17 +48,21 @@ class nailgun::auxiliaryrepos( +@@ -53,17 +53,21 @@ class fuel::auxiliaryrepos( exec { 'create_ubuntu_repo_dirs': path => '/bin:/sbin:/usr/bin:/usr/sbin', @@ -169,10 +196,10 @@ index 41a2570..720943d 100644 file { $release_files: diff --git a/deployment/puppet/fuel/manifests/cobbler.pp b/deployment/puppet/fuel/manifests/cobbler.pp -index a11498c..95a9497 100644 +index b403733..c89027d 100644 --- a/deployment/puppet/fuel/manifests/cobbler.pp +++ b/deployment/puppet/fuel/manifests/cobbler.pp -@@ -133,12 +133,9 @@ class nailgun::cobbler( +@@ -114,12 +114,9 @@ class fuel::cobbler( require => Class['::cobbler::server'], } @@ -188,10 +215,10 @@ index a11498c..95a9497 100644 } -> cobbler_distro { 'ubuntu_1404_x86_64': -@@ -151,6 +148,21 @@ class nailgun::cobbler( +@@ -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", @@ -210,7 +237,7 @@ index a11498c..95a9497 100644 cobbler_profile { 'centos-x86_64': kickstart => '/var/lib/cobbler/kickstarts/centos-x86_64.ks', kopts => 'biosdevname=0 sshd=1 dhcptimeout=120', -@@ -171,6 +183,16 @@ class nailgun::cobbler( +@@ -152,6 +164,16 @@ class fuel::cobbler( require => Cobbler_distro['ubuntu_1404_x86_64'], } @@ -227,7 +254,7 @@ index a11498c..95a9497 100644 cobbler_distro { 'ubuntu_bootstrap': kernel => "${bootstrap_path}/vmlinuz", initrd => "${bootstrap_path}/initrd.img", -@@ -205,7 +227,7 @@ class nailgun::cobbler( +@@ -166,7 +188,7 @@ class fuel::cobbler( distro => 'ubuntu_bootstrap', menu => true, kickstart => '', @@ -238,7 +265,7 @@ index a11498c..95a9497 100644 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..93c71ba +index 0000000..7e1bee9 --- /dev/null +++ b/deployment/puppet/fuel/manifests/cobbler/preseed.pp @@ -0,0 +1,13 @@ diff --git a/patches/fuel-library/0009-Update-vga-console-defaults-for-armv7-and-aarch64.patch b/patches/fuel-library/0008-nova-Update-vga-console-defaults-for-armv7-aarch64.patch index 199ef122..c289bd8d 100644 --- a/patches/fuel-library/0009-Update-vga-console-defaults-for-armv7-and-aarch64.patch +++ b/patches/fuel-library/0008-nova-Update-vga-console-defaults-for-armv7-aarch64.patch @@ -1,6 +1,6 @@ From: Stanislaw Kardach <stanislaw.kardach@caviumnetworks.com> Date: Tue, 22 Mar 2016 12:05:09 +0100 -Subject: [PATCH] Update vga, console defaults for armv7 and aarch64 +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 diff --git a/patches/fuel-library/0009-nova-AArch64-enable-hugepage-support.patch b/patches/fuel-library/0009-nova-AArch64-enable-hugepage-support.patch new file mode 100644 index 00000000..16e06ba8 --- /dev/null +++ b/patches/fuel-library/0009-nova-AArch64-enable-hugepage-support.patch @@ -0,0 +1,93 @@ +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..847cab6 +--- /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 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/0017-Always-wait-for-MySQL-sync-on-service-refresh.patch b/patches/fuel-library/0017-Always-wait-for-MySQL-sync-on-service-refresh.patch new file mode 100644 index 00000000..e0704110 --- /dev/null +++ b/patches/fuel-library/0017-Always-wait-for-MySQL-sync-on-service-refresh.patch @@ -0,0 +1,60 @@ +From: dmburmistrov <dmburmistrov@mirantis.com> +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 new file mode 100644 index 00000000..da6acac8 --- /dev/null +++ b/patches/fuel-library/0018-Fix-MySQL-logging-dir-permissions-for-syslog.patch @@ -0,0 +1,90 @@ +From: Maksim Malchuk <mmalchuk@mirantis.com> +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 <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( |