Verify lxc cache file after download

This patch adds a sha256sum verification to the lxc cache file
download task and also sets the task to retry.

Change-Id: Ie6342c1ee004a3d2de2256408361259d2fb47f1b
Closes-Bug: #1482091
(cherry picked from commit 0ccf11eeddaad8b8f4b53e3a7cf3f33f81d208ee)
This commit is contained in:
Jesse Pretorius 2015-08-06 08:14:52 +01:00
parent f23e8e0c7d
commit e5440cfcbe
3 changed files with 5 additions and 0 deletions

View File

@ -40,6 +40,7 @@ openstack_upstream_url: "http://{{ openstack_upstream_domain }}"
lxc_container_caches:
- url: "{{ openstack_upstream_url }}/container_images/rpc-trusty-container.tgz"
name: "trusty.tgz"
sha256sum: "56c6a6e132ea7d10be2f3e8104f47136ccf408b30e362133f0dc4a0a9adb4d0c"
## RabbitMQ

View File

@ -68,3 +68,4 @@ lxc_apt_packages:
# lxc_container_caches:
# - url: "{{ openstack_upstream_url }}/container_images/rpc-trusty-container.tgz"
# name: "trusty.tgz"
# sha256sum: "56c6a6e132ea7d10be2f3e8104f47136ccf408b30e362133f0dc4a0a9adb4d0c"

View File

@ -19,7 +19,10 @@
dest: "/var/cache/lxc_{{ item.name }}"
mode: "0644"
force: no
sha256sum: "{{ item.sha256sum }}"
register: cache_download
retries: 3
delay: 10
until: cache_download|success
with_items: lxc_container_caches
tags: