by ignoring the delte failure, we can end up
creating images with duplicate names which confuse
heat when trying to deploy stacks with images using
those names.
a delete can fail if an image is being used when
the delete is issued.
Change-Id: Iff82bd566d573cb2535236f46de9d7cb44c6aa4c
Signed-off-by: Jamo Luhrsen <jluhrsen@redhat.com>
# clean out any non ".new" OPNFV - apex images. In the case of a previously failed
# or aborted apex management job, we can end up with multiple images with the same
# name so being thorough here.
-openstack image list | egrep 'OPNFV - apex' | egrep -v 'new' | awk '{print "openstack image delete",$2}' | sh || true
+openstack image list | egrep 'OPNFV - apex' | egrep -v 'new' | awk '{print "openstack image delete",$2}' | sh
openstack image set --name "$CONTROLLER_IMAGE_NAME" "$CONTROLLER_IMAGE_NAME.new"
openstack image set --tag "Date Uploaded: $(date)" "$CONTROLLER_IMAGE_NAME"