summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--patches/fuel-agent/0001-TEMP-bootstrap-etc-rc.local-force-mco-start.patch47
-rw-r--r--patches/fuel-library/arm64-bug-fixes/0006-FIXME-compute.pp-Temporarily-disable-apparmor.patch40
-rw-r--r--patches/fuel-library/multiarch-fuel/0003-build_image.pp-Extract-cluster_arch-from-URI.patch27
-rw-r--r--patches/fuel-library/upstream-backports/0002-Increase-reboot-task-timeout.patch31
-rw-r--r--patches/fuel-web/0004-nailgun-Openstack-release-Pin-kernel-to-4.8.0-9944.patch68
-rw-r--r--patches/network-checker/0001-Fixed-typo-in-net-check.patch32
-rw-r--r--patches/opnfv-fuel/arm64-bug-fixes/0002-bootstrap-Pin-kernel-to-4.4.0-45.patch39
-rw-r--r--patches/opnfv-fuel/arm64-bug-fixes/0002-bootstrap-dea_base-Pin-kernel-to-4.8.0-9944.patch79
-rw-r--r--patches/opnfv-fuel/upstream-backports/0005-CI-deploy-cache-Store-and-reuse-deploy-artifacts.patch48
9 files changed, 312 insertions, 99 deletions
diff --git a/patches/fuel-agent/0001-TEMP-bootstrap-etc-rc.local-force-mco-start.patch b/patches/fuel-agent/0001-TEMP-bootstrap-etc-rc.local-force-mco-start.patch
new file mode 100644
index 00000000..ba4c382c
--- /dev/null
+++ b/patches/fuel-agent/0001-TEMP-bootstrap-etc-rc.local-force-mco-start.patch
@@ -0,0 +1,47 @@
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+: Copyright (c) 2017 Enea AB and others.
+:
+: All rights reserved. This program and the accompanying materials
+: are made available under the terms of the Apache License, Version 2.0
+: which accompanies this distribution, and is available at
+: http://www.apache.org/licenses/LICENSE-2.0
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Wed, 22 Feb 2017 21:43:48 +0100
+Subject: [PATCH] TEMP: bootstrap: /etc/rc.local: force mco start
+
+Temporary workaround for upstream bug:
+"Mcollective fails to start in bootstrap of baremetal servers" [1]
+
+This should be reverted as soon as upstream merges a fix.
+
+[1] https://bugs.launchpad.net/fuel/newton/+bug/1656150
+
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
+ contrib/fuel_bootstrap/files/xenial/etc/rc.local | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/contrib/fuel_bootstrap/files/xenial/etc/rc.local b/contrib/fuel_bootstrap/files/xenial/etc/rc.local
+index 9712ba7..12262e3 100755
+--- a/contrib/fuel_bootstrap/files/xenial/etc/rc.local
++++ b/contrib/fuel_bootstrap/files/xenial/etc/rc.local
+@@ -2,3 +2,18 @@
+
+ # Perform fuel bootstrap configuration
+ /usr/bin/fix-configs-on-startup || /bin/true
++
++# FIXME: Temporary workaround for:
++# https://bugs.launchpad.net/fuel/newton/+bug/1656150
++set +e
++until false
++do
++ sleep 60
++ /etc/init.d/mcollective status > /dev/null 2>&1
++ if [ $? -eq 0 ]
++ then
++ break
++ else
++ /usr/bin/fix-configs-on-startup || /bin/true
++ fi
++done
diff --git a/patches/fuel-library/arm64-bug-fixes/0006-FIXME-compute.pp-Temporarily-disable-apparmor.patch b/patches/fuel-library/arm64-bug-fixes/0006-FIXME-compute.pp-Temporarily-disable-apparmor.patch
new file mode 100644
index 00000000..05c143dd
--- /dev/null
+++ b/patches/fuel-library/arm64-bug-fixes/0006-FIXME-compute.pp-Temporarily-disable-apparmor.patch
@@ -0,0 +1,40 @@
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+: Copyright (c) 2017 Enea AB and others.
+:
+: All rights reserved. This program and the accompanying materials
+: are made available under the terms of the Apache License, Version 2.0
+: which accompanies this distribution, and is available at
+: http://www.apache.org/licenses/LICENSE-2.0
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Sun, 26 Mar 2017 20:14:55 +0200
+Subject: [PATCH] FIXME: compute.pp: Temporarily disable apparmor
+
+Apparmor profiles need to be refreshed for Armband specific
+version of libvirt/qemu/etc.; until updated profiles land,
+disable libvirt qemu security driver.
+
+JIRA: https://jira.opnfv.org/browse/ARMBAND-235
+
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
+ deployment/puppet/openstack_tasks/manifests/roles/compute.pp | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp
+index d81be2a..2844c72 100644
+--- a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp
++++ b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp
+@@ -538,9 +538,11 @@ class openstack_tasks::roles::compute {
+ require => Package['apparmor'],
+ }
+
++ # FIXME(armband): HACK: Disable apparmor until profiles are updated
++ # https://jira.opnfv.org/browse/ARMBAND-235
+ file_line { 'qemu_apparmor':
+ path => '/etc/libvirt/qemu.conf',
+- line => 'security_driver = "apparmor"',
++ line => 'security_driver = "none"',
+ require => [Package['libvirt'], Service['apparmor']],
+ notify => Service['libvirt']
+ }
diff --git a/patches/fuel-library/multiarch-fuel/0003-build_image.pp-Extract-cluster_arch-from-URI.patch b/patches/fuel-library/multiarch-fuel/0003-build_image.pp-Extract-cluster_arch-from-URI.patch
index b2291eed..2311442b 100644
--- a/patches/fuel-library/multiarch-fuel/0003-build_image.pp-Extract-cluster_arch-from-URI.patch
+++ b/patches/fuel-library/multiarch-fuel/0003-build_image.pp-Extract-cluster_arch-from-URI.patch
@@ -35,7 +35,7 @@ Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/deployment/puppet/osnailyfacter/manifests/provision/build_image.pp b/deployment/puppet/osnailyfacter/manifests/provision/build_image.pp
-index 3f90aec..c1b8fbe 100644
+index dbfc785..8525e33 100644
--- a/deployment/puppet/osnailyfacter/manifests/provision/build_image.pp
+++ b/deployment/puppet/osnailyfacter/manifests/provision/build_image.pp
@@ -8,6 +8,9 @@ class osnailyfacter::provision::build_image(
@@ -46,17 +46,16 @@ index 3f90aec..c1b8fbe 100644
+ $root_img_suffix_split = split($root_img_uri_split[-1], '[.]')
+ $cluster_arch = $root_img_suffix_split[0]
- if $data['ironic']['enabled'] == 'true' {
- $ironic_packages = [
-@@ -50,9 +53,9 @@ class osnailyfacter::provision::build_image(
- $extra_params = '--data_driver nailgun_build_image'
-
- exec { 'generate_image_with_fuel':
-- command => "fa_build_image ${build_dir} ${log_params} ${extra_params} --input_data_file ${data_file}",
-+ command => "fa_build_image ${build_dir} ${log_params} ${extra_params} --target_arch=${cluster_arch} --input_data_file ${data_file}",
- path => ['/bin', '/usr/bin'],
-- timeout => 1800,
-+ timeout => 3600,
- unless => "test -e /var/www/nailgun/bootstrap/ironic/${cluster_id}/vmlinuz",
- }
+ if $data['ironic']['enabled'] == true {
+ # TODO(vsaienko): Use the same system packages for fuel image and ironic bootstrap, but exclude
+@@ -52,8 +55,8 @@ class osnailyfacter::provision::build_image(
+ $extra_params = '--data_driver nailgun_build_image'
+
+ exec { 'generate_image_with_fuel':
+- command => "fa_build_image ${build_dir} ${log_params} ${extra_params} --input_data_file ${data_file}",
++ command => "fa_build_image ${build_dir} ${log_params} ${extra_params} --target_arch=${cluster_arch} --input_data_file ${data_file}",
+ path => ['/bin', '/usr/bin'],
+- timeout => 1800,
++ timeout => 3600,
}
+ }
diff --git a/patches/fuel-library/upstream-backports/0002-Increase-reboot-task-timeout.patch b/patches/fuel-library/upstream-backports/0002-Increase-reboot-task-timeout.patch
deleted file mode 100644
index a675fc78..00000000
--- a/patches/fuel-library/upstream-backports/0002-Increase-reboot-task-timeout.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-: Copyright (c) 2017 Enea AB and others.
-:
-: All rights reserved. This program and the accompanying materials
-: are made available under the terms of the Apache License, Version 2.0
-: which accompanies this distribution, and is available at
-: http://www.apache.org/licenses/LICENSE-2.0
-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-From: Stanislaw Bogatkin <sbogatkin@mirantis.com>
-Date: Mon, 13 Mar 2017 14:13:34 +0300
-Subject: [PATCH] Increase reboot task timeout
-
-To avoid broken provision on baremetal servers, increase reboot
-task timeout to 15 minutes.
-
-Change-Id: Ia7b9aa96407dae5819420146f5e1e934031b662c
-Closes-Bug: #1671793
----
- graphs/provision/tasks.yaml | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/graphs/provision/tasks.yaml b/graphs/provision/tasks.yaml
-index 46f4faa..68716ce 100644
---- a/graphs/provision/tasks.yaml
-+++ b/graphs/provision/tasks.yaml
-@@ -105,4 +105,4 @@
- requires: [cobbler_disable_netboot]
- required_for: [set_status_provisioned]
- parameters:
-- timeout: 180
-+ timeout: 900
diff --git a/patches/fuel-web/0004-nailgun-Openstack-release-Pin-kernel-to-4.8.0-9944.patch b/patches/fuel-web/0004-nailgun-Openstack-release-Pin-kernel-to-4.8.0-9944.patch
new file mode 100644
index 00000000..a617c809
--- /dev/null
+++ b/patches/fuel-web/0004-nailgun-Openstack-release-Pin-kernel-to-4.8.0-9944.patch
@@ -0,0 +1,68 @@
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+: Copyright (c) 2017 Enea AB and others.
+:
+: All rights reserved. This program and the accompanying materials
+: are made available under the terms of the Apache License, Version 2.0
+: which accompanies this distribution, and is available at
+: http://www.apache.org/licenses/LICENSE-2.0
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Thu, 23 Mar 2017 01:40:45 +0100
+Subject: [PATCH] nailgun: Openstack release: Pin kernel to 4.8.0-9944
+
+Since newer kernels have issues with AAVMF + vhost_net,
+we need to also temporarily blacklist vhost_net.
+
+NOTE: This change also adds linux-image-extra packages to both x86_64
+ and AArch64 target image(s).
+
+TODO: Remove vhost_net blacklist (later).
+
+JIRA: https://jira.opnfv.org/browse/ARMBAND-161
+JIRA: https://jira.opnfv.org/browse/ARMBAND-171
+JIRA: https://jira.opnfv.org/browse/ARMBAND-227
+JIRA: https://jira.opnfv.org/browse/ARMBAND-230
+JIRA: https://jira.opnfv.org/browse/ARMBAND-239
+JIRA: https://jira.opnfv.org/browse/ARMBAND-244
+
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
+ nailgun/nailgun/fixtures/openstack.yaml | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/nailgun/nailgun/fixtures/openstack.yaml b/nailgun/nailgun/fixtures/openstack.yaml
+index 5712006..d404168 100644
+--- a/nailgun/nailgun/fixtures/openstack.yaml
++++ b/nailgun/nailgun/fixtures/openstack.yaml
+@@ -2164,8 +2164,9 @@
+ grub-pc
+ hwloc
+ linux-firmware
+- linux-headers-generic-lts-xenial
+- linux-image-generic-lts-xenial
++ linux-headers-4.8.0-9944-generic
++ linux-image-4.8.0-9944-generic
++ linux-image-extra-4.8.0-9944-generic
+ lvm2
+ mcollective
+ mdadm
+@@ -2492,6 +2493,7 @@
+ value: |
+ acl
+ anacron
++ armband-vhost-net-blacklist
+ bash-completion
+ bridge-utils
+ bsdmainutils
+@@ -2504,8 +2506,9 @@
+ grub-efi-arm64
+ hwloc
+ linux-firmware
+- linux-headers-generic-lts-xenial
+- linux-image-generic-lts-xenial
++ linux-headers-4.8.0-9944-generic
++ linux-image-4.8.0-9944-generic
++ linux-image-extra-4.8.0-9944-generic
+ lvm2
+ mcollective
+ mdadm
diff --git a/patches/network-checker/0001-Fixed-typo-in-net-check.patch b/patches/network-checker/0001-Fixed-typo-in-net-check.patch
new file mode 100644
index 00000000..1546dde5
--- /dev/null
+++ b/patches/network-checker/0001-Fixed-typo-in-net-check.patch
@@ -0,0 +1,32 @@
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+: Copyright (c) 2017 Enea AB and others.
+:
+: All rights reserved. This program and the accompanying materials
+: are made available under the terms of the Apache License, Version 2.0
+: which accompanies this distribution, and is available at
+: http://www.apache.org/licenses/LICENSE-2.0
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+From: chko <hkominos>
+Date: Tue, 21 Mar 2017 14:51:22 +0100
+Subject: [PATCH] Fixed typo in net-check Closes-Bug:#1674724
+
+Change-Id: Ibf35e5ffb1411b998f9ad250b7744c447e16fa71
+Signed-off-by: Charalampos Kominos <hkominos@gmail.com>
+(cherry picked from commit e5debec9fe2d8f1a99521594ca3bb10de3bb6d13)
+---
+ network_checker/net_check/api.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/network_checker/net_check/api.py b/network_checker/net_check/api.py
+index defdde0..a4155db 100755
+--- a/network_checker/net_check/api.py
++++ b/network_checker/net_check/api.py
+@@ -199,7 +199,7 @@ class Actor(object):
+ if state.lower() == 'up':
+ self.logger.debug('Inteface %s is up', check_iface)
+ return True
+- elif state.lower == 'unknown':
++ elif state.lower() == 'unknown':
+ self.logger.debug('Inteface %s state is unknown, using ethtool',
+ check_iface)
+ ethtool_output = self._execute(['ethtool', check_iface])
diff --git a/patches/opnfv-fuel/arm64-bug-fixes/0002-bootstrap-Pin-kernel-to-4.4.0-45.patch b/patches/opnfv-fuel/arm64-bug-fixes/0002-bootstrap-Pin-kernel-to-4.4.0-45.patch
deleted file mode 100644
index b75c1ffa..00000000
--- a/patches/opnfv-fuel/arm64-bug-fixes/0002-bootstrap-Pin-kernel-to-4.4.0-45.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-: Copyright (c) 2017 Enea AB and others.
-:
-: All rights reserved. This program and the accompanying materials
-: are made available under the terms of the Apache License, Version 2.0
-: which accompanies this distribution, and is available at
-: http://www.apache.org/licenses/LICENSE-2.0
-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
-Date: Tue, 14 Mar 2017 19:56:50 +0100
-Subject: [PATCH] bootstrap: Pin kernel to 4.4.0-45
-
-JIRA: https://jira.opnfv.org/browse/ARMBAND-239
-
-Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
----
- build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml b/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml
-index ff5baa8..794cca8 100644
---- a/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml
-+++ b/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml
-@@ -13,13 +13,13 @@
- extra_dirs:
- - /usr/share/fuel_bootstrap_cli/files/xenial
- output_dir: /tmp/
-- kernel_flavor: linux-image-generic-lts-xenial
-+ kernel_flavor: linux-image-4.4.0-45-generic
- packages:
- - daemonize
- - fuel-agent
- - hwloc
- - i40e-dkms
- - linux-firmware
-+ - linux-headers-4.4.0-45-generic
-- - linux-headers-generic
- - live-boot
- - live-boot-initramfs-tools
diff --git a/patches/opnfv-fuel/arm64-bug-fixes/0002-bootstrap-dea_base-Pin-kernel-to-4.8.0-9944.patch b/patches/opnfv-fuel/arm64-bug-fixes/0002-bootstrap-dea_base-Pin-kernel-to-4.8.0-9944.patch
new file mode 100644
index 00000000..b0269419
--- /dev/null
+++ b/patches/opnfv-fuel/arm64-bug-fixes/0002-bootstrap-dea_base-Pin-kernel-to-4.8.0-9944.patch
@@ -0,0 +1,79 @@
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+: Copyright (c) 2017 Enea AB and others.
+:
+: All rights reserved. This program and the accompanying materials
+: are made available under the terms of the Apache License, Version 2.0
+: which accompanies this distribution, and is available at
+: http://www.apache.org/licenses/LICENSE-2.0
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Tue, 14 Mar 2017 19:56:50 +0100
+Subject: [PATCH] bootstrap, dea_base: Pin kernel to 4.8.0-9944
+
+Since newer kernels have issues with AAVMF + vhost_net,
+we need to also temporarily blacklist vhost_net.
+
+TODO: Remove vhost_net blacklist (later).
+
+JIRA: https://jira.opnfv.org/browse/ARMBAND-161
+JIRA: https://jira.opnfv.org/browse/ARMBAND-171
+JIRA: https://jira.opnfv.org/browse/ARMBAND-227
+JIRA: https://jira.opnfv.org/browse/ARMBAND-230
+JIRA: https://jira.opnfv.org/browse/ARMBAND-239
+JIRA: https://jira.opnfv.org/browse/ARMBAND-244
+
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
+ build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml | 5 +++--
+ deploy/config/dea_base.yaml | 8 ++++++--
+ 2 files changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml b/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml
+index ff5baa8..42765b6 100644
+--- a/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml
++++ b/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml
+@@ -13,14 +13,15 @@
+ extra_dirs:
+ - /usr/share/fuel_bootstrap_cli/files/xenial
+ output_dir: /tmp/
+- kernel_flavor: linux-image-generic-lts-xenial
++ kernel_flavor: linux-image-4.8.0-9944-generic
+ packages:
+ - daemonize
+ - fuel-agent
+ - hwloc
+ - i40e-dkms
+ - linux-firmware
+- - linux-headers-generic
++ - linux-image-extra-4.8.0-9944-generic
++ - linux-headers-4.8.0-9944-generic
+ - live-boot
+ - live-boot-initramfs-tools
+ - lshw
+diff --git a/deploy/config/dea_base.yaml b/deploy/config/dea_base.yaml
+index 386686f..2a5928e 100644
+--- a/deploy/config/dea_base.yaml
++++ b/deploy/config/dea_base.yaml
+@@ -534,6 +534,8 @@ settings:
+
+ anacron
+
++ armband-vhost-net-blacklist
++
+ bash-completion
+
+ bridge-utils
+@@ -560,9 +562,11 @@ settings:
+
+ linux-firmware
+
+- linux-headers-generic-lts-xenial
++ linux-image-4.8.0-9944-generic
++
++ linux-image-extra-4.8.0-9944-generic
+
+- linux-image-generic-lts-xenial
++ linux-headers-4.8.0-9944-generic
+
+ lvm2
+
diff --git a/patches/opnfv-fuel/upstream-backports/0005-CI-deploy-cache-Store-and-reuse-deploy-artifacts.patch b/patches/opnfv-fuel/upstream-backports/0005-CI-deploy-cache-Store-and-reuse-deploy-artifacts.patch
index 1bc07bbf..10a7f2c3 100644
--- a/patches/opnfv-fuel/upstream-backports/0005-CI-deploy-cache-Store-and-reuse-deploy-artifacts.patch
+++ b/patches/opnfv-fuel/upstream-backports/0005-CI-deploy-cache-Store-and-reuse-deploy-artifacts.patch
@@ -27,10 +27,11 @@ TODO: implement sanity checks for bootstrap and target images;
TODO: switch `exec_cmd('mkdir ...')` to `create_dir_if_not_exists`;
JIRA: ARMBAND-172
+JIRA: ARMBAND-242
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
---
- ...p_admin_node.sh-deploy_cache-install-hook.patch | 73 +++++
+ ...p_admin_node.sh-deploy_cache-install-hook.patch | 90 ++++++
ci/deploy.sh | 14 +-
deploy/cloud/configure_settings.py | 4 +
deploy/cloud/deployment.py | 12 +
@@ -38,16 +39,16 @@ Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
deploy/deploy_cache.py | 312 +++++++++++++++++++++
deploy/deploy_env.py | 13 +-
deploy/install_fuel_master.py | 9 +-
- 8 files changed, 453 insertions(+), 9 deletions(-)
+ 8 files changed, 470 insertions(+), 9 deletions(-)
create mode 100644 build/f_repos/patch/fuel-main/0006-bootstrap_admin_node.sh-deploy_cache-install-hook.patch
create mode 100644 deploy/deploy_cache.py
diff --git a/build/f_repos/patch/fuel-main/0006-bootstrap_admin_node.sh-deploy_cache-install-hook.patch b/build/f_repos/patch/fuel-main/0006-bootstrap_admin_node.sh-deploy_cache-install-hook.patch
new file mode 100644
-index 0000000..69a4c22
+index 0000000..7acb746
--- /dev/null
+++ b/build/f_repos/patch/fuel-main/0006-bootstrap_admin_node.sh-deploy_cache-install-hook.patch
-@@ -0,0 +1,73 @@
+@@ -0,0 +1,90 @@
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Mon, 28 Nov 2016 14:27:48 +0100
+Subject: [PATCH] bootstrap_admin_node.sh: deploy_cache install hook
@@ -60,18 +61,24 @@ index 0000000..69a4c22
+`build` when a bootstrap tar is available in the agreed location,
+/var/lib/opnfv/cache/bootstraps/.
+
++Temporary until Fuel@Openstack fixes Master key propagation to nodes'
++authorized_keys, use Mcollective remote shell execute to add it
++during deployment.
++This might duplicate the entry in authorized_keys during re-deploys.
++
+JIRA: ARMBAND-172
++JIRA: ARMBAND-242
+
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
-+ iso/bootstrap_admin_node.sh | 20 +++++++++++++++++++-
-+ 1 file changed, 19 insertions(+), 1 deletion(-)
++ iso/bootstrap_admin_node.sh | 35 ++++++++++++++++++++++++++++++++++-
++ 1 file changed, 34 insertions(+), 1 deletion(-)
+
+diff --git a/iso/bootstrap_admin_node.sh b/iso/bootstrap_admin_node.sh
-+index abc5ffb..15e6261 100755
++index 4f5ce4e..4c79552 100755
+--- a/iso/bootstrap_admin_node.sh
++++ b/iso/bootstrap_admin_node.sh
-+@@ -61,6 +61,8 @@ wget \
++@@ -64,6 +64,8 @@ wget \
+ ASTUTE_YAML='/etc/fuel/astute.yaml'
+ BOOTSTRAP_NODE_CONFIG="/etc/fuel/bootstrap_admin_node.conf"
+ CUSTOM_REPOS="/root/default_deb_repos.yaml"
@@ -80,7 +87,7 @@ index 0000000..69a4c22
+ bs_build_log='/var/log/fuel-bootstrap-image-build.log'
+ bs_status=0
+ # Backup network configs to this folder. Folder will be created only if
-+@@ -94,6 +96,7 @@ image becomes available, reboot nodes that failed to be discovered."
++@@ -97,6 +99,7 @@ image becomes available, reboot nodes that failed to be discovered."
+ bs_done_message="Default bootstrap image building done. Now you can boot new \
+ nodes over PXE, they will be discovered and become available for installing \
+ OpenStack on them"
@@ -88,10 +95,20 @@ index 0000000..69a4c22
+ # Update issues messages
+ update_warn_message="There is an issue connecting to update repository of \
+ your distributions of OpenStack. \
-+@@ -500,12 +503,31 @@ set_ui_bootstrap_error () {
++@@ -509,12 +512,42 @@ set_ui_bootstrap_error () {
+ EOF
+ }
+
+++function inject_cached_ssh_key () {
+++ # FIXME(armband): Propagate master ssh key to nodes'
+++ # authorized_keys, until upstream fixes this for image build.
+++ local moddir="/etc/puppet/${OPENSTACK_VERSION}/modules/osnailyfacter/modular"
+++ cat >> "${moddir}/astute/generate_keys.sh" <<-EOF
+++ mco rpc execute_shell_command execute \\
+++ cmd="echo $(cat /root/.ssh/id_rsa.pub) >> /root/.ssh/authorized_keys"
+++ EOF
+++}
+++
++function inject_cached_ubuntu_bootstrap () {
++ if [ -f "${OPNFV_CACHE_PATH}/${OPNFV_CACHE_TAR}" -a \
++ -f "${OPNFV_CACHE_PATH}/id_rsa.pub" -a \
@@ -103,6 +120,7 @@ index 0000000..69a4c22
++ /etc/nailgun/settings.yaml && \
++ fuel-bootstrap -v --debug import --activate \
++ "${OPNFV_CACHE_PATH}/${OPNFV_CACHE_TAR}" >>"$bs_build_log" 2>&1; then
+++ inject_cached_ssh_key
++ fuel notify --topic "done" --send "${bs_cache_message}"
++ return 0
++ fi
@@ -203,7 +221,7 @@ index b60a60f..4e007e1 100644
with io.open(settings_yaml, 'w') as stream:
yaml.dump(settings, stream, default_flow_style=False)
diff --git a/deploy/cloud/deployment.py b/deploy/cloud/deployment.py
-index 28bcfdf..b0bfdcc 100644
+index 4329a4c..a84d46c 100644
--- a/deploy/cloud/deployment.py
+++ b/deploy/cloud/deployment.py
@@ -19,6 +19,8 @@ from common import (
@@ -215,7 +233,7 @@ index 28bcfdf..b0bfdcc 100644
SEARCH_TEXT = '(err)'
LOG_FILE = '/var/log/puppet.log'
GREP_LINES_OF_LEADING_CONTEXT = 100
-@@ -47,6 +49,14 @@ class Deployment(object):
+@@ -51,6 +53,14 @@ class Deployment(object):
self.pattern = re.compile(
'\d\d\d\d-\d\d-\d\d\s\d\d:\d\d:\d\d')
@@ -230,7 +248,7 @@ index 28bcfdf..b0bfdcc 100644
def collect_error_logs(self):
for node_id, roles_blade in self.node_id_roles_dict.iteritems():
log_list = []
-@@ -108,6 +118,7 @@ class Deployment(object):
+@@ -112,6 +122,7 @@ class Deployment(object):
start = time.time()
log('Starting deployment of environment %s' % self.env_id)
@@ -238,7 +256,7 @@ index 28bcfdf..b0bfdcc 100644
deploy_id = None
ready = False
timeout = False
-@@ -140,6 +151,7 @@ class Deployment(object):
+@@ -144,6 +155,7 @@ class Deployment(object):
err('Deployment timed out, environment %s is not operational, '
'snapshot will not be performed'
% self.env_id)
@@ -671,7 +689,7 @@ index 0000000..7df43c6
+ log('Failed to install targetimages for env %s: %s' %
+ (str(env_id), str(ex)))
diff --git a/deploy/deploy_env.py b/deploy/deploy_env.py
-index 8afaeb1..318345d 100644
+index d374cce..445070a 100644
--- a/deploy/deploy_env.py
+++ b/deploy/deploy_env.py
@@ -15,6 +15,7 @@ import glob