diff options
Diffstat (limited to 'patches')
36 files changed, 1595 insertions, 774 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( 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 05405124..d8fe07da 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 @@ -322,6 +322,6 @@ index 3706678..841bfee 100644 puppet_modules: puppet/modules:/etc/puppet/modules - timeout: 720 + timeout: 3600 + - id: netconfig type: puppet - version: 2.0.0 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 new file mode 100644 index 00000000..e9b90be7 --- /dev/null +++ b/patches/fuel-plugin-ovs/0002-Cleanup-Use-dget-instead-of-wget-dpkg-source.patch @@ -0,0 +1,48 @@ +From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> +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 <Alexandru.Avadanii@enea.com> +--- + 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 new file mode 100644 index 00000000..89cab56a --- /dev/null +++ b/patches/fuel-plugin-ovs/0003-Cleanup-Drop-git-dependency.patch @@ -0,0 +1,99 @@ +From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> +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 <Alexandru.Avadanii@enea.com> +--- + 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/0004-build-apt-force-yes.patch b/patches/fuel-plugin-ovs/0004-build-apt-force-yes.patch new file mode 100644 index 00000000..5b5712d0 --- /dev/null +++ b/patches/fuel-plugin-ovs/0004-build-apt-force-yes.patch @@ -0,0 +1,87 @@ +From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> +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 <Alexandru.Avadanii@enea.com> +--- + 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/0005-pre_build_hook-Introduce-USE_DOCKER-option.patch b/patches/fuel-plugin-ovs/0005-pre_build_hook-Introduce-USE_DOCKER-option.patch new file mode 100644 index 00000000..dbbfefcf --- /dev/null +++ b/patches/fuel-plugin-ovs/0005-pre_build_hook-Introduce-USE_DOCKER-option.patch @@ -0,0 +1,77 @@ +From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> +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 <Alexandru.Avadanii@enea.com> +--- + 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-build-install-pre_build_hook-Prepare-multiarch.patch b/patches/fuel-plugin-ovs/0006-build-install-pre_build_hook-Prepare-multiarch.patch new file mode 100644 index 00000000..8ba8dd25 --- /dev/null +++ b/patches/fuel-plugin-ovs/0006-build-install-pre_build_hook-Prepare-multiarch.patch @@ -0,0 +1,381 @@ +From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> +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. <ovs-dpdk.tar.gz> for <amd64> becomes <ovs-dpdk_amd64.tar.gz> + +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 <Alexandru.Avadanii@enea.com> +--- + 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 <dev@dpdk.org> $(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 <dev@openvswitch.org> $(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 <dev@openvswitch.org> $(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 new file mode 100644 index 00000000..1ea672b6 --- /dev/null +++ b/patches/fuel-plugin-ovs/0007-AArch64-Add-native-build-support.patch @@ -0,0 +1,150 @@ +From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> +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 <Alexandru.Avadanii@enea.com> +--- + 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 <dev@dpdk.org> $(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 <dev@openvswitch.org> $(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/0008-AArch64-Add-support-for-downloading-prebuilt-DEBs.patch b/patches/fuel-plugin-ovs/0008-AArch64-Add-support-for-downloading-prebuilt-DEBs.patch new file mode 100644 index 00000000..0f7e072c --- /dev/null +++ b/patches/fuel-plugin-ovs/0008-AArch64-Add-support-for-downloading-prebuilt-DEBs.patch @@ -0,0 +1,139 @@ +From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> +Date: Mon, 12 Sep 2016 18:02:42 +0200 +Subject: [PATCH] AArch64: Add support for downloading prebuilt DEBs + +Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> +--- + 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 <src_deb_name> <src_deb_version> \ ++# [<repo_base_url> \ ++# [<repo_Sources_relative_url> \ ++# [<repo_Packages_relative_url>]]] \ ++# ++# 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 <dev@openvswitch.org> $(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/0009-build-docker-Use-host-s-network-stack.patch b/patches/fuel-plugin-ovs/0009-build-docker-Use-host-s-network-stack.patch new file mode 100644 index 00000000..e0606819 --- /dev/null +++ b/patches/fuel-plugin-ovs/0009-build-docker-Use-host-s-network-stack.patch @@ -0,0 +1,30 @@ +From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> +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 <Alexandru.Avadanii@enea.com> +--- + 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 new file mode 100644 index 00000000..818203f3 --- /dev/null +++ b/patches/fuel-plugin-ovs/0010-HACK-build-prebuilt-DEBs-src-bin-ver-mismatch.patch @@ -0,0 +1,72 @@ +From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> +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 <Alexandru.Avadanii@enea.com> +--- + 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/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 new file mode 100644 index 00000000..d6ff3818 --- /dev/null +++ b/patches/opnfv-fuel/0002-FIXME-deploy-EFI-Skip-re-ordering-boot-via-IPMI.patch @@ -0,0 +1,31 @@ +From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> +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 <Alexandru.Avadanii@enea.com> +--- + 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-deploy-Delete-old-Fuel-env-if-present.patch b/patches/opnfv-fuel/0002-deploy-Delete-old-Fuel-env-if-present.patch deleted file mode 100644 index e7867d48..00000000 --- a/patches/opnfv-fuel/0002-deploy-Delete-old-Fuel-env-if-present.patch +++ /dev/null @@ -1,58 +0,0 @@ -From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> -Date: Mon, 18 Jul 2016 17:42:48 +0200 -Subject: [PATCH] deploy: Delete old Fuel env if present - -In order to clean up old partitioning and boot entries on target -nodes, before removing the Fuel Master, try ssh-ing into it and -removing all environments/nodes. - -This is especially important for EFI systems, where old boot -entries are left behind without a proper env delete, leading to -target nodes failing to PXE boot on Fuel Master re-install. - -This change assumes that: -- all Fuel Master information is unchanged between old and new - deploy (fuel IP, password etc.); -- Fuel Master is up and running, in a sane state (target nodes - are also online), when deploy starts; - -Closes: ARMBAND-51 - -Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> ---- - deploy/deploy.py | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - -diff --git a/deploy/deploy.py b/deploy/deploy.py -index 48a53c3..184510f 100755 ---- a/deploy/deploy.py -+++ b/deploy/deploy.py -@@ -110,6 +110,20 @@ class AutoDeploy(object): - self.iso_file = new_iso - self.install_iso() - -+ def delete_old_fuel_env(self): -+ log('Delete old Fuel Master environments if present') -+ try: -+ old_dep = CloudDeploy(self.dea, self.dha, self.fuel_conf['ip'], -+ self.fuel_username, self.fuel_password, -+ self.dea_file, self.fuel_plugins_conf_dir, -+ WORK_DIR, self.no_health_check, -+ self.deploy_timeout, -+ self.no_deploy_environment, self.deploy_log) -+ with old_dep.ssh: -+ old_dep.check_previous_installation() -+ except Exception as e: -+ log('Could not delete old env: %s' % str(e)) -+ - def install_iso(self): - fuel = InstallFuelMaster(self.dea_file, self.dha_file, - self.fuel_conf['ip'], self.fuel_username, -@@ -227,6 +241,7 @@ class AutoDeploy(object): - def deploy(self): - self.collect_fuel_info() - if not self.no_fuel: -+ self.delete_old_fuel_env() - self.setup_execution_environment() - self.create_tmp_dir() - self.install_fuel_master() diff --git a/patches/opnfv-fuel/0003-deploy.sh-accept-a-timeout-flag-T.patch b/patches/opnfv-fuel/0003-deploy.sh-accept-a-timeout-flag-T.patch deleted file mode 100644 index 641891bb..00000000 --- a/patches/opnfv-fuel/0003-deploy.sh-accept-a-timeout-flag-T.patch +++ /dev/null @@ -1,86 +0,0 @@ -From 0ca4dada5b3528c84f2edcb7f1a2df8f0a18779d Mon Sep 17 00:00:00 2001 -From: Josep Puigdemont <josep.puigdemont@enea.com> -Date: Mon, 9 May 2016 11:05:58 +0200 -Subject: [PATCH] deploy.sh: accept a timeout flag (-T) - -Change-Id: I58a7b9bc639bb03b994ea34fc317f5679140d9fd -Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com> ---- - ci/deploy.sh | 19 +++++++++++++++---- - 1 file changed, 15 insertions(+), 4 deletions(-) - -diff --git a/ci/deploy.sh b/ci/deploy.sh -index 4e4586c..8411714 100755 ---- a/ci/deploy.sh -+++ b/ci/deploy.sh -@@ -29,7 +29,7 @@ cat << EOF - xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - `basename $0`: Deploys the Fuel@OPNFV stack - --usage: `basename $0` -b base-uri [-B PXE Bridge] [-f] [-F] [-H] -l lab-name -p pod-name -s deploy-scenario [-S image-dir] -i iso -+usage: `basename $0` -b base-uri [-B PXE Bridge] [-f] [-F] [-H] -l lab-name -p pod-name -s deploy-scenario [-S image-dir] [-T timeout] -i iso - -s deployment-scenario [-S optional Deploy-scenario path URI] - [-R optional local relen repo (containing deployment Scenarios] - -@@ -47,6 +47,7 @@ OPTIONS: - -p Pod-name - -s Deploy-scenario short-name/base-file-name - -S Storage dir for VM images -+ -T Timeout, in minutes, for the deploy. - -i iso url - - Description: -@@ -78,6 +79,8 @@ Input parameters to the build script is: - or a deployment short-name as defined by scenario.yaml in the deployment - scenario path. - -S Storage dir for VM images, default is fuel/deploy/images -+-T Timeout, in minutes, for the deploy. It defaults to using the DEPLOY_TIMEOUT -+ environment variable when defined, or to the default in deploy.py otherwise - -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)://) - -@@ -116,6 +119,11 @@ FUEL_CREATION_ONLY='' - NO_DEPLOY_ENVIRONMENT='' - STORAGE_DIR='' - DRY_RUN=0 -+if ! [ -z $DEPLOY_TIMEOUT ]; then -+ DEPLOY_TIMEOUT="-dt $DEPLOY_TIMEOUT" -+else -+ DEPLOY_TIMEOUT="" -+fi - # - # END of variables to customize - ############################################################################ -@@ -123,7 +131,7 @@ DRY_RUN=0 - ############################################################################ - # BEGIN of main - # --while getopts "b:B:dfFHl:L:p:s:S:i:he" OPTION -+while getopts "b:B:dfFHl:L:p:s:S:T:i:he" OPTION - do - case $OPTION in - b) -@@ -174,6 +182,9 @@ do - STORAGE_DIR="-s ${OPTARG}" - fi - ;; -+ T) -+ DEPLOY_TIMEOUT="-dt ${OPTARG}" -+ ;; - i) - ISO=${OPTARG} - if [[ ! $ISO == file://* ]] && \ -@@ -243,8 +254,8 @@ if [ $DRY_RUN -eq 0 ]; then - ISO=${SCRIPT_PATH}/ISO/image.iso - fi - # Start deployment -- echo "python deploy.py $DEPLOY_LOG $STORAGE_DIR $PXE_BRIDGE $USE_EXISTING_FUEL $FUEL_CREATION_ONLY $NO_HEALTH_CHECK $NO_DEPLOY_ENVIRONMENT -dea ${SCRIPT_PATH}/config/dea.yaml -dha ${SCRIPT_PATH}/config/dha.yaml -iso $ISO" -- python deploy.py $DEPLOY_LOG $STORAGE_DIR $PXE_BRIDGE $USE_EXISTING_FUEL $FUEL_CREATION_ONLY $NO_HEALTH_CHECK $NO_DEPLOY_ENVIRONMENT -dea ${SCRIPT_PATH}/config/dea.yaml -dha ${SCRIPT_PATH}/config/dha.yaml -iso $ISO -+ echo "python deploy.py $DEPLOY_LOG $STORAGE_DIR $PXE_BRIDGE $USE_EXISTING_FUEL $FUEL_CREATION_ONLY $NO_HEALTH_CHECK $NO_DEPLOY_ENVIRONMENT -dea ${SCRIPT_PATH}/config/dea.yaml -dha ${SCRIPT_PATH}/config/dha.yaml -iso $ISO $DEPLOY_TIMEOUT" -+ python deploy.py $DEPLOY_LOG $STORAGE_DIR $PXE_BRIDGE $USE_EXISTING_FUEL $FUEL_CREATION_ONLY $NO_HEALTH_CHECK $NO_DEPLOY_ENVIRONMENT -dea ${SCRIPT_PATH}/config/dea.yaml -dha ${SCRIPT_PATH}/config/dha.yaml -iso $ISO $DEPLOY_TIMEOUT - fi - popd > /dev/null - --- -2.5.5 - 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 index aa97aa69..55f6a349 100644 --- 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 @@ -1,4 +1,3 @@ -From 800aae6db0d0d79d01cec4df85075026073063dd Mon Sep 17 00:00:00 2001 From: Josep Puigdemont <josep.puigdemont@enea.com> Date: Wed, 4 May 2016 14:27:23 +0200 Subject: [PATCH] Fuel VM for the Enea Armband lab @@ -20,9 +19,9 @@ index 0000000..8773ed4 @@ -0,0 +1,88 @@ +<domain type='kvm' id='1'> + <name>fuel</name> -+ <memory unit='KiB'>8290304</memory> -+ <currentMemory unit='KiB'>8290304</currentMemory> -+ <vcpu placement='static'>8</vcpu> ++ <memory unit='KiB'>4194304</memory> ++ <currentMemory unit='KiB'>4194304</currentMemory> ++ <vcpu placement='static'>2</vcpu> + <resource> + <partition>/machine</partition> + </resource> @@ -106,6 +105,3 @@ index 0000000..8773ed4 + </memballoon> + </devices> +</domain> --- -2.5.5 - diff --git a/patches/opnfv-fuel/0005-transplant-Generate-extra-interfaces-config-file.patch b/patches/opnfv-fuel/0005-transplant-Generate-extra-interfaces-config-file.patch deleted file mode 100644 index 76c27163..00000000 --- a/patches/opnfv-fuel/0005-transplant-Generate-extra-interfaces-config-file.patch +++ /dev/null @@ -1,108 +0,0 @@ -From: Josep Puigdemont <josep.puigdemont@enea.com> -Date: Wed, 4 May 2016 17:58:56 +0200 -Subject: [PATCH] transplant: Generate extra interfaces config file - -The DEA override may contain a IFCGF_<interface> section in its 'fuel:' -section, containing the necessary keys to produce a ifcfg-<interface> -file, like in this example: - -fuel: - IFCFG_ETH1: - device: eth1 - ipaddress: 10.0.1.10 - netmask: 255.255.255.0 - gateway: 10.0.1.254 - -FIXME: In order for Network Manager to use the newly added interfaces -for outgoing traffic and honor their GATEWAY setting (e.g. if we just -added one public interface), the default route on admin iface (most of -the time called eth0) should be disabled. For now, we assume the admin -interface is always "eth0". - -Change-Id: I0457dc9a0d49e46b8ca85cfe7a4435c2b15f5238 -Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com> -Signed-off-by: Alexandu Avadanii <alexandru.avadanii@enea.com> ---- - deploy/transplant_fuel_settings.py | 37 +++++++++++++++++++++++++++++++++++++ - 1 file changed, 37 insertions(+) - -diff --git a/deploy/transplant_fuel_settings.py b/deploy/transplant_fuel_settings.py -index e57a4fb..9a65cf6 100644 ---- a/deploy/transplant_fuel_settings.py -+++ b/deploy/transplant_fuel_settings.py -@@ -11,10 +11,14 @@ - import sys - import io - import yaml -+import re -+import os - from dea import DeploymentEnvironmentAdapter - - from common import ( - check_file_exists, -+ exec_cmd, -+ log, - ) - - ASTUTE_YAML = '/etc/fuel/astute.yaml' -@@ -35,15 +39,45 @@ def parse_arguments(): - check_file_exists(dea_file) - return dea_file - -+def write_ifcfg_file(key, fuel_conf): -+ config = ('BOOTPROTO=none\n' -+ 'ONBOOT=yes\n' -+ 'TYPE=Ethernet\n' -+ 'NM_CONTROLLED=yes\n') -+ for skey in ('ipaddress', 'device', 'netmask', 'gateway'): -+ if not fuel_conf[key].get(skey): -+ log('Warning: missing key %s for %s' % (skey, key)) -+ config += '%s=\n' % skey.upper() -+ elif skey == 'ipaddress': -+ config += 'IPADDR=%s\n' % fuel_conf[key][skey] -+ else: -+ config += '%s=%s\n' % (skey.upper(), fuel_conf[key][skey]) -+ -+ fname = os.path.join('/etc/sysconfig/network-scripts/', -+ key.lower().replace('_','-')) -+ with open(fname, 'wc') as f: -+ f.write(config) - - def transplant(dea, astute): - fuel_conf = dea.get_fuel_config() -+ require_network_restart = False - for key in fuel_conf.iterkeys(): - if key == 'ADMIN_NETWORK': - for skey in fuel_conf[key].iterkeys(): - astute[key][skey] = fuel_conf[key][skey] -+ elif re.match('^IFCFG', key): -+ log('Adding interface configuration for: %s' % key.lower()) -+ require_network_restart = True -+ write_ifcfg_file(key, fuel_conf) -+ if astute.has_key(key): -+ astute.pop(key, None) - else: - astute[key] = fuel_conf[key] -+ if require_network_restart: -+ admin_ifcfg = '/etc/sysconfig/network-scripts/ifcfg-eth0' -+ exec_cmd('echo "DEFROUTE=no" >> %s' % admin_ifcfg) -+ log('At least one interface was reconfigured, restart network manager') -+ exec_cmd('systemctl restart network') - return astute - - -@@ -51,11 +85,14 @@ def main(): - check_file_exists(ASTUTE_YAML) - check_file_exists(FUEL_BOOTSTRAP_CLI_YAML) - dea = DeploymentEnvironmentAdapter(dea_file) -+ log('Reading astute file %s' % ASTUTE_YAML) - with io.open(ASTUTE_YAML) as stream: - astute = yaml.load(stream) -+ log('Initiating transplant') - transplant(dea, astute) - with io.open(ASTUTE_YAML, 'w') as stream: - yaml.dump(astute, stream, default_flow_style=False) -+ log('Transplant done') - # Update bootstrap config yaml with info from DEA/astute.yaml - with io.open(FUEL_BOOTSTRAP_CLI_YAML) as stream: - fuel_bootstrap_cli = yaml.load(stream) diff --git a/patches/opnfv-fuel/0008-deploy-reap.py-Dump-extra-interfaces-information.patch b/patches/opnfv-fuel/0008-deploy-reap.py-Dump-extra-interfaces-information.patch deleted file mode 100644 index 9ed79cc4..00000000 --- a/patches/opnfv-fuel/0008-deploy-reap.py-Dump-extra-interfaces-information.patch +++ /dev/null @@ -1,97 +0,0 @@ -From e8232eca62d67c2bac1d34f5b2adfeba1a580634 Mon Sep 17 00:00:00 2001 -From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> -Date: Wed, 4 May 2016 18:31:09 +0200 -Subject: [PATCH] deploy/reap.py: Dump extra interfaces information. - -Since on AArch64, Ubuntu local mirror lacks arm64 packages (see [1]), -Fuel master requires internet connectivity during deploy, and hence -a way to setup such a public (extra) interface automatically. - -Previous commit "transplant: Generate extra interfaces config file" -introduced support for passing this information via DEA (override), -which may define a IFCGF_<interface> section in its 'fuel:' -section, containing the necessary keys to produce a ifcfg-<interface> -file, like in this example: - -fuel: - IFCFG_ETH1: - device: eth1 - ipaddress: 10.0.1.10 - netmask: 255.255.255.0 - gateway: 10.0.1.254 - -In order for Network Manager to use the newly added interfaces -for outgoing traffic and honor their GATEWAY setting (e.g. if we just -added one public interface), the default route on admin iface (most of -the time called eth0) is disabled when extra interfaces are present. - -FIXME: Only supports lowercase interface names, but so does Fuel, -see related bug report [2]. - -[1] https://jira.opnfv.org/browse/ARMBAND-35 -[2] https://jira.opnfv.org/browse/FUEL-136 - -Change-Id: I6f0a759c65a435ec8bd883a04c8d1adca109cc13 -Signed-off-by: Alexandu Avadanii <alexandru.avadanii@enea.com> -Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com> ---- - deploy/reap.py | 34 ++++++++++++++++++++++++++++++++++ - 1 file changed, 34 insertions(+) - -diff --git a/deploy/reap.py b/deploy/reap.py -index ed5bc99..9f14e35 100644 ---- a/deploy/reap.py -+++ b/deploy/reap.py -@@ -15,6 +15,8 @@ import yaml - import glob - import shutil - import tempfile -+import re -+import netaddr - - from common import ( - N, -@@ -248,6 +250,40 @@ class Reap(object): - if key not in ['ipaddress', 'netmask', - 'dhcp_pool_start', 'dhcp_pool_end', 'ssh_network']: - del fuel['ADMIN_NETWORK'][key] -+ -+ ## FIXME(armband): Factor in support for adding public/other interfaces. -+ ## TODO: Following block expects interface name(s) to be lowercase only -+ interfaces_list = exec_cmd('ip -o -4 a | grep -e "e[nt][hopsx].*"') -+ for interface in re.split('\n', interfaces_list): -+ # Sample output line from above cmd: -+ # 3: eth1 inet 10.0.2.10/24 scope global eth1 valid_lft forever ... -+ ifcfg = re.split(r'\s+', interface) -+ ifcfg_name = ifcfg[1] -+ ifcfg_ipaddr = ifcfg[3] -+ -+ # Filter out admin interface (device name is not known, match IP) -+ current_network = netaddr.IPNetwork(ifcfg_ipaddr) -+ if str(current_network.ip) == fuel['ADMIN_NETWORK']['ipaddress']: -+ continue -+ -+ # Read ifcfg-* network interface config file, write IFCFG_<IFNAME> -+ ifcfg_sec = 'IFCFG_%s' % ifcfg_name.upper() -+ fuel[ifcfg_sec] = {} -+ ifcfg_data = {} -+ ifcfg_f = ('/etc/sysconfig/network-scripts/ifcfg-%s' % ifcfg_name) -+ with open(ifcfg_f) as f: -+ for line in f: -+ if line.startswith('#'): -+ continue -+ (key, val) = line.split('=') -+ ifcfg_data[key.lower()] = val.rstrip() -+ -+ # Keep only needed info (e.g. filter-out type=Ethernet). -+ fuel[ifcfg_sec]['ipaddress'] = ifcfg_data['ipaddr'] -+ fuel[ifcfg_sec]['device'] = ifcfg_data['device'] -+ fuel[ifcfg_sec]['netmask'] = str(current_network.netmask) -+ fuel[ifcfg_sec]['gateway'] = ifcfg_data['gateway'] -+ - self.write_yaml(self.dea_file, {'fuel': fuel}) - - def reap_network_settings(self): --- -2.5.5 - diff --git a/patches/opnfv-fuel/0021-Build-bootstrap-image-for-arm64.patch b/patches/opnfv-fuel/0021-Build-bootstrap-image-for-arm64.patch index f66777c7..4daf733e 100644 --- a/patches/opnfv-fuel/0021-Build-bootstrap-image-for-arm64.patch +++ b/patches/opnfv-fuel/0021-Build-bootstrap-image-for-arm64.patch @@ -9,9 +9,9 @@ per supported arch. This requires Fuel refactoring. build/bootstrap_admin_node.sh.patch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) -diff --git a/build/bootstrap_admin_node.sh.patch b/build/bootstrap_admin_node.sh.patch ---- a/build/bootstrap_admin_node.sh.patch -+++ b/build/bootstrap_admin_node.sh.patch +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 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 index 4023264c..fe623957 100644 --- 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 @@ -11,10 +11,10 @@ Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> build/bootstrap_admin_node.sh.patch | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) -diff --git a/build/bootstrap_admin_node.sh.patch b/build/bootstrap_admin_node.sh.patch +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/bootstrap_admin_node.sh.patch -+++ b/build/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 @@ -8,5 +8,20 @@ --- a/iso/bootstrap_admin_node.sh +++ b/iso/bootstrap_admin_node.sh 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 index 6d55311c..03e877a1 100644 --- 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 @@ -30,10 +30,10 @@ Finally, this commit adds an OPNFV post-install script in 2 files changed, 47 insertions(+) create mode 100755 build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -diff --git a/build/bootstrap_admin_node.sh.patch b/build/bootstrap_admin_node.sh.patch +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/bootstrap_admin_node.sh.patch -+++ b/build/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 @@ -24,5 +24,18 @@ nodes over PXE, they will be discovered and become available for installing \ OpenStack on them" diff --git a/patches/opnfv-fuel/0036-repo-mirror-Allow-multi-arch-local-mirrors.patch b/patches/opnfv-fuel/0036-repo-mirror-Allow-multi-arch-local-mirrors.patch deleted file mode 100644 index 45ebb4e9..00000000 --- a/patches/opnfv-fuel/0036-repo-mirror-Allow-multi-arch-local-mirrors.patch +++ /dev/null @@ -1,136 +0,0 @@ -From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> -Date: Sat, 18 Jun 2016 19:42:15 +0200 -Subject: [PATCH] repo mirror: Allow multi-arch local mirrors - -This patch allows specifying multiple architectures via UBUNTU_ARCH in -form of a list of space separated architectures. The first architecture -in the list is considered primary and will be used for building all the -deb packages by fuel-main. Additional architectures are added to allow -targets of other architectures to use the mirror. - -NOTE: this imposes a requirement that all packages built are arch -independent (which is true so far). - -[ Alexandru Avadanii ] -Reworked for applying on top of fuel@OPNFV. -Pass UBUNTU_ARCH to Docker containers. - -Signed-off-by: Stanislaw Kardach <stanislaw.kardach@cavium.com> -Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> ---- - build/Makefile | 1 + - build/docker/Dockerfile | 2 +- - build/docker/runcontext | 8 ++++- - build/repo-multi-arch-local-mirrors.patch | 59 +++++++++++++++++++++++++++++++ - 4 files changed, 68 insertions(+), 2 deletions(-) - create mode 100644 build/repo-multi-arch-local-mirrors.patch - -diff --git a/build/Makefile b/build/Makefile -index 95b1487..829a231 100644 ---- a/build/Makefile -+++ b/build/Makefile -@@ -135,6 +135,7 @@ $(ISOCACHE): - cd /tmp/fuel-main && git am $(TOPDIR)/bootstrap_admin_node.sh.patch - cd /tmp/fuel-main && git am $(TOPDIR)/isolinux.cfg.patch - cd /tmp/fuel-main/build/repos/fuel-nailgun && git am $(TOPDIR)/Mark-Intel-82599-10-Gigabit-NIC-as-DPDK-capable.patch -+ cd /tmp/fuel-main && git am $(TOPDIR)/repo-multi-arch-local-mirrors.patch - # Repeat build up to three times - sudo -E ./fuel_build_loop - cp /tmp/fuel-main/build/artifacts/fuel*.iso . -diff --git a/build/docker/Dockerfile b/build/docker/Dockerfile -index 1bb56b7..b38ea4c 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\"" > /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\"" > /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 9f07776..daad663 100755 ---- a/build/docker/runcontext -+++ b/build/docker/runcontext -@@ -111,7 +111,13 @@ if [ -n "$CACHEBASE" ]; then - fi - fi - --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 -u $USER_ID:$GROUP_ID -w $PWD -v $GITROOT:$GITROOT -v /sys/fs/cgroup:/sys/fs/cgroup:ro $CACHEMOUNT" -+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 \ -+ -u $USER_ID:$GROUP_ID -w $PWD \ -+ -v $GITROOT:$GITROOT -v /sys/fs/cgroup:/sys/fs/cgroup:ro $CACHEMOUNT" - - # Passing "debug" puts up an interactive bash shell - if [ "$1" == "debug" ]; then -diff --git a/build/repo-multi-arch-local-mirrors.patch b/build/repo-multi-arch-local-mirrors.patch -new file mode 100644 -index 0000000..d404287 ---- /dev/null -+++ b/build/repo-multi-arch-local-mirrors.patch -@@ -0,0 +1,59 @@ -+From: Stanislaw Kardach <stanislaw.kardach@cavium.com> -+Date: Thu, 25 Feb 2016 13:31:19 +0100 -+Subject: repo mirror: Allow multi-arch local mirrors -+ -+This patch allows specifying multiple architectures via UBUNTU_ARCH in -+form of a list of space separated architectures. The first architecture -+in the list is considered primary and will be used for building all the -+deb packages by fuel-main. Additional architectures are added to allow -+targets of other architectures to use the mirror. -+NOTE: this imposes a requirement that all packages built are arch -+independent (which is true so far). -+ -+Signed-off-by: Stanislaw Kardach <stanislaw.kardach@cavium.com> -+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> -+--- -+ mirror/ubuntu/module.mk | 2 +- -+ sandbox.mk | 2 +- -+ config.mk | 2 +- -+ 3 files changed, 3 insertions(+), 3 deletions(-) -+ -+diff --git a/mirror/ubuntu/module.mk b/mirror/ubuntu/module.mk -+index 7a9466e..fe1ada2 100644 -+--- a/mirror/ubuntu/module.mk -++++ b/mirror/ubuntu/module.mk -+@@ -81,7 +81,7 @@ $(BUILD_DIR)/mirror/ubuntu/mirror.done: -+ --root=$(MIRROR_MOS_UBUNTU_ROOT) \ -+ --dist=$(MIRROR_MOS_UBUNTU_SUITE) \ -+ --section=$(subst $(space),$(comma),$(MIRROR_MOS_UBUNTU_SECTION)) \ -+- --arch=$(UBUNTU_ARCH) \ -++ --arch=$(shell echo $(UBUNTU_ARCH) | tr ' ' ',') \ -+ $(LOCAL_MIRROR_UBUNTU)/ -+ rm -rf $(LOCAL_MIRROR_UBUNTU)/.temp $(LOCAL_MIRROR_UBUNTU)/project -+ $(ACTION.TOUCH) -+diff --git a/sandbox.mk b/sandbox.mk -+index 4bc3962..5ffddbd 100644 -+--- a/sandbox.mk -++++ b/sandbox.mk -+@@ -188,7 +188,7 @@ touch $(SANDBOX_UBUNTU)/etc/init.d/.legacy-bootordering -+ mkdir -p $(SANDBOX_UBUNTU)/usr/sbin -+ cp -a $(BUILD_DIR)/policy-rc.d $(SANDBOX_UBUNTU)/usr/sbin -+ echo "Running debootstrap" -+-sudo debootstrap --no-check-gpg --include=ca-certificates --arch=$(UBUNTU_ARCH) $(MIRROR_UBUNTU_SUITE) $(SANDBOX_UBUNTU) $(MIRROR_UBUNTU_METHOD)://$(MIRROR_UBUNTU)$(MIRROR_UBUNTU_ROOT) -++sudo debootstrap --no-check-gpg --include=ca-certificates --arch=$(word 1,$(UBUNTU_ARCH)) $(MIRROR_UBUNTU_SUITE) $(SANDBOX_UBUNTU) $(MIRROR_UBUNTU_METHOD)://$(MIRROR_UBUNTU)$(MIRROR_UBUNTU_ROOT) -+ if [ -e $(SANDBOX_UBUNTU)/etc/resolv.conf ]; then sudo cp -a $(SANDBOX_UBUNTU)/etc/resolv.conf $(SANDBOX_UBUNTU)/etc/resolv.conf.orig; fi -+ sudo cp /etc/resolv.conf $(SANDBOX_UBUNTU)/etc/resolv.conf -+ if [ -e $(SANDBOX_UBUNTU)/etc/hosts ]; then sudo cp -a $(SANDBOX_UBUNTU)/etc/hosts $(SANDBOX_UBUNTU)/etc/hosts.orig; fi -+diff --git a/config.mk b/config.mk -+index 74ee039..45a3b30 100644 -+--- a/config.mk -++++ b/config.mk -+@@ -49,7 +49,7 @@ UBUNTU_MINOR:=04 -+ UBUNTU_RELEASE_NUMBER:=$(UBUNTU_MAJOR).$(UBUNTU_MINOR) -+ UBUNTU_KERNEL_FLAVOR?=lts-trusty -+ UBUNTU_NETBOOT_FLAVOR?=netboot -+-UBUNTU_ARCH:=amd64 -++UBUNTU_ARCH?=amd64 -+ UBUNTU_IMAGE_RELEASE:=$(UBUNTU_MAJOR)$(UBUNTU_MINOR) -+ SEPARATE_IMAGES?=/boot,ext2 /,ext4 -+ 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 index f0016892..2189b004 100644 --- 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 @@ -8,18 +8,25 @@ one minute sleep before checking for completition of fuel install. Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> --- - deploy/install_fuel_master.py | 1 + - 1 file changed, 1 insertion(+) + 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..609a335 100644 +index 808d0b1..1a7685a 100644 --- a/deploy/install_fuel_master.py +++ b/deploy/install_fuel_master.py -@@ -201,6 +201,7 @@ class InstallFuelMaster(object): +@@ -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 index 675b9815..5dde448f 100644 --- 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 @@ -8,26 +8,15 @@ Backported from [1]. Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> --- - build/Makefile | 1 + ...ce-dpkg-checkbuilddeps-with-mk-build-deps.patch | 38 ++++++++++++++++++++++ - 2 files changed, 39 insertions(+) + 1 files changed, 38 insertions(+) create mode 100644 build/replace-dpkg-checkbuilddeps-with-mk-build-deps.patch -diff --git a/build/Makefile b/build/Makefile -index d917f26..ec5d27a 100644 ---- a/build/Makefile -+++ b/build/Makefile -@@ -140,4 +140,5 @@ $(ISOCACHE): - cd /tmp/fuel-main && git am $(TOPDIR)/repo-multi-arch-local-mirrors.patch -+ cd /tmp/fuel-main && git am $(TOPDIR)/replace-dpkg-checkbuilddeps-with-mk-build-deps.patch - # Repeat build up to three times - sudo -E ./fuel_build_loop - cp /tmp/fuel-main/build/artifacts/fuel*.iso . -diff --git a/build/replace-dpkg-checkbuilddeps-with-mk-build-deps.patch b/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/replace-dpkg-checkbuilddeps-with-mk-build-deps.patch ++++ b/build/patch-repos/0040-replace-dpkg-checkbuilddeps-with-mk-build-deps.patch @@ -0,0 +1,38 @@ +From: Sergii Golovatiuk <sgolovatiuk@mirantis.com> +Date: Fri, 3 Jun 2016 12:26:19 +0200 diff --git a/patches/opnfv-fuel/0041-build-Allow-PLUGINS-override.patch b/patches/opnfv-fuel/0041-build-Allow-PLUGINS-override.patch deleted file mode 100644 index acbbc11c..00000000 --- a/patches/opnfv-fuel/0041-build-Allow-PLUGINS-override.patch +++ /dev/null @@ -1,27 +0,0 @@ -From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> -Date: Wed, 10 Aug 2016 16:43:39 +0200 -Subject: [PATCH] build: Allow PLUGINS override - -Instead of using BUILD_FUEL_PLUGINS, which was intended for manual -overrides of the Fule@OPNFV plugin list, allow PLUGINS to be -preset to a custom list, which we will provide via Armband -Makefile spec. - -Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> ---- - build/f_isoroot/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/build/f_isoroot/Makefile b/build/f_isoroot/Makefile -index 4df7bcb..448f415 100644 ---- a/build/f_isoroot/Makefile -+++ b/build/f_isoroot/Makefile -@@ -11,7 +11,7 @@ - # Add Fuel plugin build targets here - # Plugins disabled for the Fuel Mitaka uplift. Please re-enable your plugin as you have - # verified it! --PLUGINS = f_odlpluginbuild f_onosfwpluginbuild f_vsperfpluginbuild f_ovs-nsh-dpdk-pluginbuild f_yardstick-pluginbuild f_kvm-pluginbuild f_bgpvpn-pluginbuild f_collectd-ceilometer-pluginbuild -+PLUGINS ?= f_odlpluginbuild f_onosfwpluginbuild f_vsperfpluginbuild f_ovs-nsh-dpdk-pluginbuild f_yardstick-pluginbuild f_kvm-pluginbuild f_bgpvpn-pluginbuild f_collectd-ceilometer-pluginbuild - #PLUGINS = f_odlpluginbuild f_onosfwpluginbuild f_ovsnfv-dpdk-pluginbuild f_vsperfpluginbuild f_ovs-nsh-dpdk-pluginbuild f_bgpvpn-pluginbuild - export PLUGINS - #NON_8-0_REBASED_PLUGINS = f_bgpvpn-pluginbuild diff --git a/patches/opnfv-fuel/0042-build-Allow-MIRROR_MOS_UBUNTU-override.patch b/patches/opnfv-fuel/0042-build-Allow-MIRROR_MOS_UBUNTU-override.patch deleted file mode 100644 index 37e4d078..00000000 --- a/patches/opnfv-fuel/0042-build-Allow-MIRROR_MOS_UBUNTU-override.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> -Date: Tue, 16 Aug 2016 18:45:10 +0200 -Subject: [PATCH] build: Allow MIRROR_MOS_UBUNTU override - -Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> ---- - build/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/build/Makefile b/build/Makefile -index 4a4bb2e..6e18ddd 100644 ---- a/build/Makefile -+++ b/build/Makefile -@@ -60,7 +60,7 @@ export MIRROR_UBUNTU_ROOT := $(shell echo -n '/' ; echo "$(MIRROR_UBUNTU_URL)" | - - export LATEST_MIRROR_ID_URL := http://$(shell ./select_closest_fuel_mirror.py) - --export MIRROR_MOS_UBUNTU := $(shell echo "$(LATEST_MIRROR_ID_URL)" | cut -d'/' -f3) -+export MIRROR_MOS_UBUNTU ?= $(shell echo "$(LATEST_MIRROR_ID_URL)" | cut -d'/' -f3) - export LATEST_TARGET_UBUNTU := $(shell curl -sSf "$(MIRROR_MOS_UBUNTU)/mos-repos/ubuntu/$(MOSVERSION).target.txt" | head -1) - export MIRROR_MOS_UBUNTU_ROOT := /mos-repos/ubuntu/$(LATEST_TARGET_UBUNTU) - diff --git a/patches/opnfv-fuel/0043-build-Add-armband.mk-config.patch b/patches/opnfv-fuel/0043-build-Add-armband.mk-config.patch index 31446652..cb07c9fc 100644 --- a/patches/opnfv-fuel/0043-build-Add-armband.mk-config.patch +++ b/patches/opnfv-fuel/0043-build-Add-armband.mk-config.patch @@ -25,18 +25,16 @@ index 4454c35..377ecc6 100644 ############################################################################ # BEGIN of variables to customize # -@@ -129,6 +132,9 @@ $(ISOCACHE): - sudo docker info - cd /tmp/fuel-main && make repos - $(REPOINFO) -r /tmp/fuel-main > gitinfo_fuel.txt +@@ -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,6 +234,10 @@ debug: - sha1sum *.patch >> .cachedata +@@ -228,5 +234,9 @@ debug: sha1sum fuel_build_loop >> .cachedata sha1sum config.mk >> .cachedata + @if test -n $(ARMBAND_BASE); then \ @@ -51,7 +49,7 @@ new file mode 100644 index 0000000..1e772f0 --- /dev/null +++ b/build/armband.mk -@@ -0,0 +1,49 @@ +@@ -0,0 +1,54 @@ +############################################################################## +# Copyright (c) 2016 Enea AB and others. +# Alexandru.Avadanii@enea.com @@ -64,12 +62,17 @@ index 0000000..1e772f0 +# 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 ++ 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 @@ -89,9 +92,9 @@ index 0000000..1e772f0 + export FUELLIB_REPO := ${ARMBAND_BASE}/upstream/fuel-library + export FUELLIB_COMMIT := HEAD + -+ export ODL_REPO := ${ARMBAND_BASE}/upstream/fuel-plugin-opendaylight -+ export ODL_BRANCH := armband-workbench -+ export ODL_CHANGE := 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 diff --git a/patches/opnfv-fuel/0044-build-cache-Allow-LOCAL_CACHE_ARCH_NAME-override.patch b/patches/opnfv-fuel/0044-build-cache-Allow-LOCAL_CACHE_ARCH_NAME-override.patch deleted file mode 100644 index e477421d..00000000 --- a/patches/opnfv-fuel/0044-build-cache-Allow-LOCAL_CACHE_ARCH_NAME-override.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> -Date: Thu, 18 Aug 2016 14:39:08 +0200 -Subject: [PATCH] build: cache: Allow LOCAL_CACHE_ARCH_NAME override - -Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> ---- - ci/build.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ci/build.sh b/ci/build.sh -index 62abba1..82049cd 100755 ---- a/ci/build.sh -+++ b/ci/build.sh -@@ -111,7 +111,7 @@ SCRIPT_DIR=$(readlink -f $(dirname ${BASH_SOURCE[0]})) - BUILD_BASE=$(readlink -e ${SCRIPT_DIR}/../build/) - RESULT_DIR="${BUILD_BASE}/release" - BUILD_SPEC="${BUILD_BASE}/config.mk" --LOCAL_CACHE_ARCH_NAME="fuel-cache" -+LOCAL_CACHE_ARCH_NAME="${LOCAL_CACHE_ARCH_NAME:-fuel-cache}" - - # - # END of variables to customize diff --git a/patches/opnfv-fuel/0045-build-cache-Consider-UBUNTU_ARCH-in-.cacheid.patch b/patches/opnfv-fuel/0045-build-cache-Consider-UBUNTU_ARCH-in-.cacheid.patch deleted file mode 100644 index 43d5bcc5..00000000 --- a/patches/opnfv-fuel/0045-build-cache-Consider-UBUNTU_ARCH-in-.cacheid.patch +++ /dev/null @@ -1,144 +0,0 @@ -From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> -Date: Wed, 17 Aug 2016 20:36:51 +0200 -Subject: [PATCH] build: cache: Consider UBUNTU_ARCH in .cacheid - -Usually UBUNTU_ARCH is not changed inside the same repository, -but we should consider this case anyway for future merging -Armband and Fuel@OPNFV repositories/build systems. - -This applies to all Fuel plugins and the local repo. - -Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> ---- - build/f_isoroot/f_bgpvpn-pluginbuild/Makefile | 1 + - build/f_isoroot/f_collectd-ceilometer-pluginbuild/Makefile | 1 + - build/f_isoroot/f_kvm-pluginbuild/Makefile | 1 + - build/f_isoroot/f_odlpluginbuild/Makefile | 1 + - build/f_isoroot/f_onosfwpluginbuild/Makefile | 1 + - build/f_isoroot/f_ovs-nsh-dpdk-pluginbuild/Makefile | 1 + - build/f_isoroot/f_ovsnfv-dpdk-pluginbuild/Makefile | 1 + - build/f_isoroot/f_repobuild/Makefile | 1 + - build/f_isoroot/f_vsperfpluginbuild/Makefile | 1 + - build/f_isoroot/f_yardstick-pluginbuild/Makefile | 1 + - 10 files changed, 10 insertions(+) - -diff --git a/build/f_isoroot/f_bgpvpn-pluginbuild/Makefile b/build/f_isoroot/f_bgpvpn-pluginbuild/Makefile -index ed3be29..8ce28fc 100644 ---- a/build/f_isoroot/f_bgpvpn-pluginbuild/Makefile -+++ b/build/f_isoroot/f_bgpvpn-pluginbuild/Makefile -@@ -67,6 +67,7 @@ release:.bgpvpnbuild - fi - sha1sum Makefile >> .cachedata - sha1sum config.mk >> .cachedata -+ echo -n $(UBUNTU_ARCH) | sha1sum | awk {'print $$1'} >> .cachedata - cat .cachedata | $(CACHETOOL) getid > .cacheid - - # Clean local data related to caching - called prior to ordinary build -diff --git a/build/f_isoroot/f_collectd-ceilometer-pluginbuild/Makefile b/build/f_isoroot/f_collectd-ceilometer-pluginbuild/Makefile -index 9ab922d..17bc36d 100644 ---- a/build/f_isoroot/f_collectd-ceilometer-pluginbuild/Makefile -+++ b/build/f_isoroot/f_collectd-ceilometer-pluginbuild/Makefile -@@ -67,6 +67,7 @@ release:.fastpathmetrics - fi - @sha1sum Makefile | awk {'print $$1'} >> .cachedata - @sha1sum config.mk | awk {'print $$1'} >> .cachedata -+ @echo -n $(UBUNTU_ARCH) | sha1sum | awk {'print $$1'} >> .cachedata - @cat .cachedata | $(CACHETOOL) getid > .cacheid - - # Clean local data related to caching - called prior to ordinary build -diff --git a/build/f_isoroot/f_kvm-pluginbuild/Makefile b/build/f_isoroot/f_kvm-pluginbuild/Makefile -index ba2fd0b..2454b5e 100644 ---- a/build/f_isoroot/f_kvm-pluginbuild/Makefile -+++ b/build/f_isoroot/f_kvm-pluginbuild/Makefile -@@ -70,6 +70,7 @@ release:.kvmbuild - fi - @sha1sum Makefile | awk {'print $$1'} >> .cachedata - @sha1sum config.mk | awk {'print $$1'} >> .cachedata -+ @echo -n $(UBUNTU_ARCH) | sha1sum | awk {'print $$1'} >> .cachedata - @cat .cachedata | $(CACHETOOL) getid > .cacheid - - # Clean local data related to caching - called prior to ordinary build -diff --git a/build/f_isoroot/f_odlpluginbuild/Makefile b/build/f_isoroot/f_odlpluginbuild/Makefile -index e2cbf7d..6c717c7 100644 ---- a/build/f_isoroot/f_odlpluginbuild/Makefile -+++ b/build/f_isoroot/f_odlpluginbuild/Makefile -@@ -58,6 +58,7 @@ release:.odlbuild - fi - @sha1sum Makefile | awk {'print $$1'} >> .cachedata - @sha1sum config.mk | awk {'print $$1'} >> .cachedata -+ @echo -n $(UBUNTU_ARCH) | sha1sum | awk {'print $$1'} >> .cachedata - cat .cachedata | $(CACHETOOL) getid > .cacheid - - # Clean local data related to caching - called prior to ordinary build -diff --git a/build/f_isoroot/f_onosfwpluginbuild/Makefile b/build/f_isoroot/f_onosfwpluginbuild/Makefile -index a9dcb22..02ba029 100644 ---- a/build/f_isoroot/f_onosfwpluginbuild/Makefile -+++ b/build/f_isoroot/f_onosfwpluginbuild/Makefile -@@ -66,6 +66,7 @@ release:.onosbuild - fi - @sha1sum Makefile | awk {'print $$1'} >> .cachedata - @sha1sum config.mk | awk {'print $$1'} >> .cachedata -+ @echo -n $(UBUNTU_ARCH) | sha1sum | awk {'print $$1'} >> .cachedata - @cat .cachedata | $(CACHETOOL) getid > .cacheid - - # Clean local data related to caching - called prior to ordinary build -diff --git a/build/f_isoroot/f_ovs-nsh-dpdk-pluginbuild/Makefile b/build/f_isoroot/f_ovs-nsh-dpdk-pluginbuild/Makefile -index ecf586a..2d0d202 100644 ---- a/build/f_isoroot/f_ovs-nsh-dpdk-pluginbuild/Makefile -+++ b/build/f_isoroot/f_ovs-nsh-dpdk-pluginbuild/Makefile -@@ -67,6 +67,7 @@ release:.ovsbuild - fi - @sha1sum Makefile | awk {'print $$1'} >> .cachedata - @sha1sum config.mk | awk {'print $$1'} >> .cachedata -+ @echo -n $(UBUNTU_ARCH) | sha1sum | awk {'print $$1'} >> .cachedata - @cat .cachedata | $(CACHETOOL) getid > .cacheid - - # Clean local data related to caching - called prior to ordinary build -diff --git a/build/f_isoroot/f_ovsnfv-dpdk-pluginbuild/Makefile b/build/f_isoroot/f_ovsnfv-dpdk-pluginbuild/Makefile -index 9e432d1..9455389 100644 ---- a/build/f_isoroot/f_ovsnfv-dpdk-pluginbuild/Makefile -+++ b/build/f_isoroot/f_ovsnfv-dpdk-pluginbuild/Makefile -@@ -67,6 +67,7 @@ release:.ovsnfvbuild - fi - @sha1sum Makefile | awk {'print $$1'} >> .cachedata - @sha1sum config.mk | awk {'print $$1'} >> .cachedata -+ @echo -n $(UBUNTU_ARCH) | sha1sum | awk {'print $$1'} >> .cachedata - @cat .cachedata | $(CACHETOOL) getid > .cacheid - - # Clean local data related to caching - called prior to ordinary build -diff --git a/build/f_isoroot/f_repobuild/Makefile b/build/f_isoroot/f_repobuild/Makefile -index 6fef8ff..f6ebc2c 100644 ---- a/build/f_isoroot/f_repobuild/Makefile -+++ b/build/f_isoroot/f_repobuild/Makefile -@@ -73,6 +73,7 @@ release:nailgun - sha1sum Makefile >> .cachedata - sha1sum config.mk >> .cachedata - $(CACHETOOL) packages >> .cachedata -+ echo -n $(UBUNTU_ARCH) | sha1sum | awk {'print $$1'} >> .cachedata - cat .cachedata | $(CACHETOOL) getid > .cacheid - - # Clean local data related to caching - called prior to ordinary build -diff --git a/build/f_isoroot/f_vsperfpluginbuild/Makefile b/build/f_isoroot/f_vsperfpluginbuild/Makefile -index 9bd236a..73de611 100644 ---- a/build/f_isoroot/f_vsperfpluginbuild/Makefile -+++ b/build/f_isoroot/f_vsperfpluginbuild/Makefile -@@ -68,6 +68,7 @@ release:.vsperfbuild - fi - @sha1sum Makefile | awk {'print $$1'} >> .cachedata - @sha1sum config.mk | awk {'print $$1'} >> .cachedata -+ @echo -n $(UBUNTU_ARCH) | sha1sum | awk {'print $$1'} >> .cachedata - @cat .cachedata | $(CACHETOOL) getid > .cacheid - - # Clean local data related to caching - called prior to ordinary build -diff --git a/build/f_isoroot/f_yardstick-pluginbuild/Makefile b/build/f_isoroot/f_yardstick-pluginbuild/Makefile -index 47723d5..32de3b3 100644 ---- a/build/f_isoroot/f_yardstick-pluginbuild/Makefile -+++ b/build/f_isoroot/f_yardstick-pluginbuild/Makefile -@@ -68,6 +68,7 @@ release:.yardstickbuild - fi - @sha1sum Makefile | awk {'print $$1'} >> .cachedata - @sha1sum config.mk | awk {'print $$1'} >> .cachedata -+ @echo -n $(UBUNTU_ARCH) | sha1sum | awk {'print $$1'} >> .cachedata - @cat .cachedata | $(CACHETOOL) getid > .cacheid - - # Clean local data related to caching - called prior to ordinary build diff --git a/patches/opnfv-fuel/0047-build-ubuntu-mirror-blacklist-ftp.acc.umu.se.patch b/patches/opnfv-fuel/0047-build-ubuntu-mirror-blacklist-some-SE-mirrors.patch index e6e6c2b7..b5835edd 100644 --- a/patches/opnfv-fuel/0047-build-ubuntu-mirror-blacklist-ftp.acc.umu.se.patch +++ b/patches/opnfv-fuel/0047-build-ubuntu-mirror-blacklist-some-SE-mirrors.patch @@ -1,8 +1,11 @@ From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> Date: Thu, 18 Aug 2016 19:21:34 +0200 -Subject: [PATCH] build: ubuntu mirror: blacklist ftp.acc.umu.se +Subject: [PATCH] build: ubuntu mirror: blacklist some SE mirrors -Another SE mirror acting up lately ... +Some SE mirrors are acting up lately, blacklist them: +- ftp.acc.umu.se +- ftp.lysator.liu.se +- ftp.availo.se Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> --- @@ -13,12 +16,10 @@ diff --git a/build/f_isoroot/f_repobuild/select_ubuntu_repo.sh b/build/f_isoroot index 4bca6bd..67219cb 100755 --- a/build/f_isoroot/f_repobuild/select_ubuntu_repo.sh +++ b/build/f_isoroot/f_repobuild/select_ubuntu_repo.sh -@@ -21,7 +21,7 @@ RSYNC="rsync -4 --contimeout 5 --no-motd --list-only" +@@ -21,5 +21,5 @@ RSYNC="rsync -4 --contimeout 5 --no-motd --list-only" # Some Ubuntu mirrors seem less reliable for this type of mirroring - # as they are discoved they can be added to the blacklist below in order # for them not to be considered. --BLACKLIST="mirrors.se.eu.kernel.org mirror.its.dal.ca" -+BLACKLIST="mirrors.se.eu.kernel.org ftp.acc.umu.se mirror.its.dal.ca" - - return_url=0 +-BLACKLIST="mirror.clibre.uqam.ca" ++BLACKLIST="mirror.clibre.uqam.ca ftp.acc.umu.se ftp.lysator.liu.se ftp.availo.se" 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 new file mode 100644 index 00000000..c13af1e2 --- /dev/null +++ b/patches/opnfv-fuel/0048-fpb-Support-multiple-versions-of-packages.patch @@ -0,0 +1,50 @@ +From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> +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 <Alexandru.Avadanii@enea.com> +--- + 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,6 +25,10 @@ all: .docker + + .docker: $(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/0054-net-check-add-support-for-faulty-operstate.patch b/patches/opnfv-fuel/0054-net-check-add-support-for-faulty-operstate.patch new file mode 100644 index 00000000..8a765c92 --- /dev/null +++ b/patches/opnfv-fuel/0054-net-check-add-support-for-faulty-operstate.patch @@ -0,0 +1,63 @@ +From: Stefan Sicleru <stefan.sicleru@enea.com> +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 <stefan.sicleru@enea.com> +--- + ...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 <stefan.sicleru@enea.com> ++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 <stefan.sicleru@enea.com> ++--- ++ 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 new file mode 100644 index 00000000..d9fd36a0 --- /dev/null +++ b/patches/opnfv-fuel/0055-build-docker-Use-host-s-network-stack.patch @@ -0,0 +1,28 @@ +From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> +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 <Alexandru.Avadanii@enea.com> +--- + 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 |