summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasyl Saienko <vsaienko@mirantis.com>2017-03-17 21:38:31 +0200
committerVasyl Saienko <vsaienko@mirantis.com>2017-03-18 20:57:45 +0000
commit218e53584eb5ac7906f09a1f15fe7fcc11973fb8 (patch)
treed97a81563e1c39ce415b8395075a2b84d8720c42
parentccdcbae82a5612a349f81e9cbfb927b8f04bb9dc (diff)
Fix building ironic bootstrap
This patch fixes issues with building ironic bootstrap: * fix if condition that is a trigger to build ironic bootstrap * build fuel image always, ironic bootstrap only when ironic is enabled * Drop incorrect condition check for fuel image Change-Id: Ib7ee0c656ffa71ce913e1924bb80260744319a3a Closes-Bug: #1653204
Notes
Notes (review): Verified+1: Fuel CI <fuel-ci-bot@mirantis.com> Code-Review+1: Mykyta Karpin <mkarpin@mirantis.com> Code-Review+2: Stanislaw Bogatkin <sbogatkin@mirantis.com> Code-Review+1: Michael Polenchuk <mpolenchuk@mirantis.com> Code-Review+2: Denis Egorenko <degorenko@mirantis.com> Workflow+1: Denis Egorenko <degorenko@mirantis.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Tue, 21 Mar 2017 13:06:56 +0000 Reviewed-on: https://review.openstack.org/447112 Project: openstack/fuel-library Branch: refs/heads/master
-rw-r--r--deployment/puppet/osnailyfacter/manifests/provision/build_image.pp32
1 files changed, 16 insertions, 16 deletions
diff --git a/deployment/puppet/osnailyfacter/manifests/provision/build_image.pp b/deployment/puppet/osnailyfacter/manifests/provision/build_image.pp
index 3f90aec..dbfc785 100644
--- a/deployment/puppet/osnailyfacter/manifests/provision/build_image.pp
+++ b/deployment/puppet/osnailyfacter/manifests/provision/build_image.pp
@@ -9,7 +9,9 @@ class osnailyfacter::provision::build_image(
9 } 9 }
10 $cluster_id = $data['cluster']['id'] 10 $cluster_id = $data['cluster']['id']
11 11
12 if $data['ironic']['enabled'] == 'true' { 12 if $data['ironic']['enabled'] == true {
13 # TODO(vsaienko): Use the same system packages for fuel image and ironic bootstrap, but exclude
14 # not needed for ironic like nailgun-agent, etc...
13 $ironic_packages = [ 15 $ironic_packages = [
14 'openssh-server', 16 'openssh-server',
15 'ntp', 17 'ntp',
@@ -21,9 +23,7 @@ class osnailyfacter::provision::build_image(
21 'squashfs-tools', 23 'squashfs-tools',
22 'linux-firmware', 24 'linux-firmware',
23 'msmtp-mta', 25 'msmtp-mta',
24 'hpsa-dkms',
25 'i40e-dkms', 26 'i40e-dkms',
26 'linux-firmware-nonfree',
27 'xz-utils', 27 'xz-utils',
28 'linux-headers-generic', 28 'linux-headers-generic',
29 ] 29 ]
@@ -35,25 +35,25 @@ class osnailyfacter::provision::build_image(
35 $out_dir = "/var/www/nailgun/bootstrap/ironic/${cluster_id}/" 35 $out_dir = "/var/www/nailgun/bootstrap/ironic/${cluster_id}/"
36 $out_params = "--output-dir ${out_dir}" 36 $out_params = "--output-dir ${out_dir}"
37 37
38 $extra_params = "--extra-dir /usr/share/ironic-fa-bootstrap-configs/ --no-compress --no-default-extra-dirs --no-default-packages" 38 $ironic_extra_params = "--extra-dir /usr/share/ironic-fa-bootstrap-configs/ --no-compress --no-default-extra-dirs --no-default-packages"
39 $log_params = '--log-file /var/log/fuel-ironic-bootstrap-image-build.log' 39 $ironic_log_params = '--log-file /var/log/fuel-ironic-bootstrap-image-build.log'
40 40
41 exec { 'generate_image_with_ironic': 41 exec { 'generate_image_with_ironic':
42 command => "fuel-bootstrap build ${package_list} ${ssh_params} ${out_params} ${extra_params} ${log_params}", 42 command => "fuel-bootstrap build ${package_list} ${ssh_params} ${out_params} ${ironic_extra_params} ${ironic_log_params}",
43 path => ['/bin', '/usr/bin'], 43 path => ['/bin', '/usr/bin'],
44 timeout => 1800,
44 unless => "test -e /var/www/nailgun/bootstrap/ironic/${cluster_id}/vmlinuz", 45 unless => "test -e /var/www/nailgun/bootstrap/ironic/${cluster_id}/vmlinuz",
45 } 46 }
46 47
47 } else { 48 }
48 $build_dir = '--image_build_dir /var/lib/fuel/ibp'
49 $log_params = "--log-file /var/log/fuel-agent-env-${cluster_id}.log"
50 $extra_params = '--data_driver nailgun_build_image'
51 49
52 exec { 'generate_image_with_fuel': 50 $build_dir = '--image_build_dir /var/lib/fuel/ibp'
53 command => "fa_build_image ${build_dir} ${log_params} ${extra_params} --input_data_file ${data_file}", 51 $log_params = "--log-file /var/log/fuel-agent-env-${cluster_id}.log"
54 path => ['/bin', '/usr/bin'], 52 $extra_params = '--data_driver nailgun_build_image'
55 timeout => 1800, 53
56 unless => "test -e /var/www/nailgun/bootstrap/ironic/${cluster_id}/vmlinuz", 54 exec { 'generate_image_with_fuel':
57 } 55 command => "fa_build_image ${build_dir} ${log_params} ${extra_params} --input_data_file ${data_file}",
56 path => ['/bin', '/usr/bin'],
57 timeout => 1800,
58 } 58 }
59} 59}