summaryrefslogtreecommitdiffstats
path: root/patches/fuel-library/0000-Revert-Fix-building-ironic-bootstrap.patch
blob: 652bb2762bde42d3ec48ea8808c3cb73cb779f46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
: 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 15:57:02 +0100
Subject: [PATCH] Revert "Fix building ironic bootstrap"

This reverts commit c90b8a2fab0b8deab06d75b93394f32c60963be7.
---
 .../manifests/provision/build_image.pp             | 34 +++++++++++-----------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/deployment/puppet/osnailyfacter/manifests/provision/build_image.pp b/deployment/puppet/osnailyfacter/manifests/provision/build_image.pp
index b40f3e2..02fa0f0 100644
--- a/deployment/puppet/osnailyfacter/manifests/provision/build_image.pp
+++ b/deployment/puppet/osnailyfacter/manifests/provision/build_image.pp
@@ -3,9 +3,7 @@ class osnailyfacter::provision::build_image {
   $data_file = "/var/lib/fuel/configs/${::cluster_id}/provision.yaml"
   $data = loadyaml($data_file)

-  if $data['ironic']['enabled'] == true {
-    # TODO(vsaienko): Use the same system packages for fuel image and ironic bootstrap, but exclude
-    # not needed for ironic like nailgun-agent, etc...
+  if $data['ironic']['enabled'] == 'true' {
     $ironic_packages = [
       'openssh-server',
       'ntp',
@@ -17,7 +15,9 @@ class osnailyfacter::provision::build_image {
       'squashfs-tools',
       'linux-firmware',
       'msmtp-mta',
+      'hpsa-dkms',
       'i40e-dkms',
+      'linux-firmware-nonfree',
       'xz-utils',
       'linux-headers-generic',
     ]
@@ -29,25 +29,25 @@ class osnailyfacter::provision::build_image {
     $out_dir = "/var/www/nailgun/bootstrap/ironic/${::cluster_id}/"
     $out_params = "--output-dir ${out_dir}"

-    $ironic_extra_params = "--extra-dir /usr/share/ironic-fa-bootstrap-configs/ --no-compress --no-default-extra-dirs --no-default-packages"
-    $ironic_log_params = '--log-file /var/log/fuel-ironic-bootstrap-image-build.log'
+    $extra_params = "--extra-dir /usr/share/ironic-fa-bootstrap-configs/ --no-compress --no-default-extra-dirs --no-default-packages"
+    $log_params = '--log-file /var/log/fuel-ironic-bootstrap-image-build.log'

     exec { 'generate_image_with_ironic':
-      command => "fuel-bootstrap build ${package_list} ${ssh_params} ${out_params} ${ironic_extra_params} ${ironic_log_params}",
+      command => "fuel-bootstrap build ${package_list} ${ssh_params} ${out_params} ${extra_params} ${log_params}",
       path    => ['/bin', '/usr/bin'],
-      timeout => 1800,
-      unless  => "test -e /var/www/nailgun/bootstrap/ironic/${cluster_id}/vmlinuz",
+      unless  => "test -e /var/www/nailgun/bootstrap/ironic/${::cluster_id}/vmlinuz",
     }

-  }
-
-  $build_dir = '--image_build_dir /var/lib/fuel/ibp'
-  $log_params = "--log-file /var/log/fuel-agent-env-${cluster_id}.log"
-  $extra_params = '--data_driver nailgun_build_image'
+  } else {
+    $build_dir = '--image_build_dir /var/lib/fuel/ibp'
+    $log_params = "--log-file /var/log/fuel-agent-env-${::cluster_id}.log"
+    $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}",
-    path    => ['/bin', '/usr/bin'],
-    timeout => 1800,
+    exec { 'generate_image_with_fuel':
+      command => "fa_build_image ${build_dir} ${log_params} ${extra_params} --input_data_file ${data_file}",
+      path    => ['/bin', '/usr/bin'],
+      timeout => 1800,
+      unless  => "test -e /var/www/nailgun/bootstrap/ironic/${::cluster_id}/vmlinuz",
+    }
   }
 }