Commit 4dffd12b authored by Jose Castro Leon's avatar Jose Castro Leon

Fix image deletion and remove duplicated start

parent 54d1c9c3
Pipeline #1047663 passed with stages
in 4 minutes and 58 seconds
......@@ -107,13 +107,12 @@ instance_snapshot:
- start_instance: <% not $.wait and $.instance_stop and task(check_server).published.server.status = 'ACTIVE'%>
on-error:
- error_task
- start_instance: <% $.instance_stop and task(check_server).published.server.status = 'ACTIVE' %>
wait_for_image_snapshot:
description: 'Waits until the snapshot is flagged as saving'
action: glance.images_get
input:
id: <% $.i_snap_id %>
image_id: <% $.i_snap_id %>
action_region: <% $.action_region %>
retry:
delay: 10
......@@ -142,7 +141,7 @@ instance_snapshot:
cleanup_images:
description: 'Deletes older snapshots if max_snapshots has been reached'
with-items: image_id in <% $.images.take($.images.len() - $.max_snapshots) %>
action: glance.image_delete
action: glance.images_delete
input:
image_id: <% $.image_id %>
action_region: <% $.action_region %>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment