diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2016-06-13 21:04:24 +0200 |
---|---|---|
committer | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2016-06-13 21:11:22 +0200 |
commit | e3ca391c5de55239b4af8a688ff419bb13457124 (patch) | |
tree | 754567832e1565c82bf36613806ce0a393cbb7ad /patches | |
parent | 5923831d4c9edda72ce6c0c4778d11f37d6f60f6 (diff) |
Rebase for "Improve reliability of upload_cirros"
Upstream change "Improve reliability of upload_cirros.rb" [1]
allows us to drop the "Increase upload_cirros timeout" patch,
and also requires rebasing our direct kernel boot patch.
Also squashed in a small context edit for an unrelated patch.
[1] https://review.openstack.org/#/c/327792/
Change-Id: I8adc30a74714414fae55bc7b81bc0f69f41735ce
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'patches')
-rw-r--r-- | patches/fuel-library/0006-upload_cirros-Add-direct-kernel-boot-support.patch (renamed from patches/fuel-library/0006-direct-kernel-boot-for-cirros.patch) | 49 | ||||
-rw-r--r-- | patches/fuel-library/0008-Increase-upload_cirros-timeout-for-multi-image.patch | 20 | ||||
-rw-r--r-- | patches/fuel-library/0013-Allow-configuring-MySQL-WSREP-SST-provider.patch | 4 |
3 files changed, 29 insertions, 44 deletions
diff --git a/patches/fuel-library/0006-direct-kernel-boot-for-cirros.patch b/patches/fuel-library/0006-upload_cirros-Add-direct-kernel-boot-support.patch index 43c35616..056b1aef 100644 --- a/patches/fuel-library/0006-direct-kernel-boot-for-cirros.patch +++ b/patches/fuel-library/0006-upload_cirros-Add-direct-kernel-boot-support.patch @@ -1,13 +1,18 @@ From: Stanislaw Kardach <stanislaw.kardach@caviumnetworks.com> Date: Tue, 15 Mar 2016 15:01:34 +0100 -Subject: [PATCH] direct kernel boot for cirros +Subject: [PATCH] upload_cirros: Add direct kernel boot support. +AArch64 currently only supports direct kernel boot, so add the +functionality of uploading and connecting kernel and initramfs +images (disk formats `AKI` and `ARI`). + +Signed-off-by: Stanislaw Kardach <stanislaw.kardach@cavium.com> --- - .../osnailyfacter/modular/astute/upload_cirros.rb | 51 +++++++++++++++++++++- - 1 file changed, 49 insertions(+), 2 deletions(-) + .../osnailyfacter/modular/astute/upload_cirros.rb | 53 ++++++++++++++++++++-- + 1 file changed, 50 insertions(+), 3 deletions(-) diff --git a/deployment/puppet/osnailyfacter/modular/astute/upload_cirros.rb b/deployment/puppet/osnailyfacter/modular/astute/upload_cirros.rb -index 53d75fc..8a75356 100755 +index f0441b0..cefc3ed 100755 --- a/deployment/puppet/osnailyfacter/modular/astute/upload_cirros.rb +++ b/deployment/puppet/osnailyfacter/modular/astute/upload_cirros.rb @@ -56,7 +56,7 @@ def image_list @@ -35,17 +40,17 @@ index 53d75fc..8a75356 100755 # check if Glance is online # waited until the glance is started because when vCenter used as a glance # backend launch may takes up to 1 minute. -@@ -93,7 +102,7 @@ end - # if it have not been already uploaded - def upload_image(image) +@@ -133,7 +142,7 @@ end + # return true if image has been uploaded and active + def check_image(image) list_of_images = image_list -- if list_of_images[:images].include?(image['img_name'] => "active") && list_of_images[:exit_code] == 0 -+ if list_of_images[:images].select { |k,v| k == image['img_name'] and v[:status] == "active" } && list_of_images[:exit_code] == 0 - puts "Image '#{image['img_name']}' is already present!" - return 0 +- if list_of_images[:exit_code] == 0 && list_of_images[:images].include?(image['img_name'] => "active") ++ if list_of_images[:exit_code] == 0 && list_of_images[:images].select { |k,v| k == image['img_name'] and v[:status] == "active" } + return true end -@@ -114,6 +123,43 @@ def upload_image(image) - return return_code + return false +@@ -157,6 +166,43 @@ def delete_image(image_name) + [ stdout, return_code ] end +# For each disk image try to find a kernel and initramfs images and @@ -88,11 +93,13 @@ index 53d75fc..8a75356 100755 ######################## wait_for_glance -@@ -122,6 +168,7 @@ errors = 0 - test_vm_images.each do |image| - errors += upload_image(image) - end -+errors = connect_dependant_images(test_vm_images) unless errors != 0 - - exit 1 unless errors == 0 - +@@ -167,7 +213,8 @@ test_vm_images.each do |image| + # retry upload 5 times with a 1 minute sleep between tries + 5.times.each do |retries| + if upload_image(image) +- success = true ++ if connect_dependant_images(test_vm_images) == 0 ++ success = true + break + end + sleep 60 diff --git a/patches/fuel-library/0008-Increase-upload_cirros-timeout-for-multi-image.patch b/patches/fuel-library/0008-Increase-upload_cirros-timeout-for-multi-image.patch deleted file mode 100644 index 40ac638f..00000000 --- a/patches/fuel-library/0008-Increase-upload_cirros-timeout-for-multi-image.patch +++ /dev/null @@ -1,20 +0,0 @@ -From: Stanislaw Kardach <stanislaw.kardach@caviumnetworks.com> -Date: Tue, 22 Mar 2016 10:54:32 +0100 -Subject: [PATCH] Increase upload_cirros timeout for multi-image - ---- - deployment/puppet/osnailyfacter/modular/astute/tasks.yaml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/deployment/puppet/osnailyfacter/modular/astute/tasks.yaml b/deployment/puppet/osnailyfacter/modular/astute/tasks.yaml -index a2cb1da..d9d2dcc 100644 ---- a/deployment/puppet/osnailyfacter/modular/astute/tasks.yaml -+++ b/deployment/puppet/osnailyfacter/modular/astute/tasks.yaml -@@ -19,6 +19,6 @@ - cmd: ruby /etc/puppet/modules/osnailyfacter/modular/astute/upload_cirros.rb - retries: 3 - interval: 20 -- timeout: 180 -+ timeout: 360 - - - id: upload_nodes_info diff --git a/patches/fuel-library/0013-Allow-configuring-MySQL-WSREP-SST-provider.patch b/patches/fuel-library/0013-Allow-configuring-MySQL-WSREP-SST-provider.patch index 28601599..6d9bc8c7 100644 --- a/patches/fuel-library/0013-Allow-configuring-MySQL-WSREP-SST-provider.patch +++ b/patches/fuel-library/0013-Allow-configuring-MySQL-WSREP-SST-provider.patch @@ -24,14 +24,12 @@ diff --git a/deployment/puppet/osnailyfacter/manifests/database/database.pp b/de index 1755c34..0cfbc8c 100644 --- a/deployment/puppet/osnailyfacter/manifests/database/database.pp +++ b/deployment/puppet/osnailyfacter/manifests/database/database.pp -@@ -8,6 +8,7 @@ class osnailyfacter::database::database { +@@ -8,4 +8,5 @@ class osnailyfacter::database::database { $use_syslog = hiera('use_syslog', true) $primary_controller = hiera('primary_controller') $mysql_hash = hiera_hash('mysql', {}) + $wsrep_hash = hiera_hash('mysql_wsrep', {}) $debug = pick($mysql_hash['debug'], hiera('debug', false)) - $management_vip = hiera('management_vip') - $database_vip = hiera('database_vip', $management_vip) @@ -22,6 +23,7 @@ class osnailyfacter::database::database { $mysql_root_password = $mysql_hash['root_password'] |