From fb356f4606884ec608116e2cc9f4d9ac1eeebdda Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Fri, 17 Jun 2016 19:36:51 +0200 Subject: Fix: f-l: upload_cirros glance cmd, syntar err. While at it split another patch in f-l in two. Change-Id: Ife31a94447176798c3cf7052408ffeddb1e753ff Signed-off-by: Alexandru Avadanii --- ...oad_cirros-Add-direct-kernel-boot-support.patch | 27 +++++++++++----------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'patches/fuel-library/0006-upload_cirros-Add-direct-kernel-boot-support.patch') diff --git a/patches/fuel-library/0006-upload_cirros-Add-direct-kernel-boot-support.patch b/patches/fuel-library/0006-upload_cirros-Add-direct-kernel-boot-support.patch index 056b1aef..a928761c 100644 --- a/patches/fuel-library/0006-upload_cirros-Add-direct-kernel-boot-support.patch +++ b/patches/fuel-library/0006-upload_cirros-Add-direct-kernel-boot-support.patch @@ -8,11 +8,11 @@ images (disk formats `AKI` and `ARI`). Signed-off-by: Stanislaw Kardach --- - .../osnailyfacter/modular/astute/upload_cirros.rb | 53 ++++++++++++++++++++-- - 1 file changed, 50 insertions(+), 3 deletions(-) + .../osnailyfacter/modular/astute/upload_cirros.rb | 52 +++++++++++++++++++++- + 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/deployment/puppet/osnailyfacter/modular/astute/upload_cirros.rb b/deployment/puppet/osnailyfacter/modular/astute/upload_cirros.rb -index f0441b0..cefc3ed 100755 +index f0441b0..a619f3f 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 @@ -30,7 +30,7 @@ index f0441b0..cefc3ed 100755 +# Calls glance update-image with a given property and value +def update_image(image_id, property, value) -+ command = "/usr/bin/glance image-update --#{property} #{value} #{image_id}" ++ command = "/usr/bin/openstack image set --property #{property}=#{value} #{image_id}" + puts command + stdout = `#{command}` + return_code = $?.exitstatus @@ -93,13 +93,12 @@ index f0441b0..cefc3ed 100755 ######################## wait_for_glance -@@ -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 +@@ -180,6 +226,8 @@ if errors > 0 + cleanup_image(image) + end + exit 1 ++elsif connect_dependant_images(test_vm_images) > 0 ++ exit 2 + end + + exit 0 -- cgit 1.2.3-korg