Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(ansible): split unarchive task & add download retries #397

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 42 additions & 9 deletions ansible/roles/common/scenarios/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,22 @@
path: "{{ hotpot_work_dir }}/bin/osdsapiserver"
register: apireleasesexisted

- name: download and extract the api release tarball if not exists
- name: download the api release tarball if not exists
get_url:
url: "{{ api_download_url }}"
dest: /tmp/api_ArChIvE.tar.gz
remote_src: yes
register: dlresult
until: dlresult is not failed
retries: 5
delay: 10
when:
- apireleasesexisted.stat.exists is undefined or apireleasesexisted.stat.exists == false

- name: extract the api release tarball if downloaded
unarchive:
src: "{{ api_download_url }}"
src: /tmp/api_ArChIvE.tar.gz
dest: /tmp/
remote_src: yes
when:
- apireleasesexisted.stat.exists is undefined or apireleasesexisted.stat.exists == false

Expand All @@ -49,11 +60,22 @@
path: "{{ hotpot_work_dir }}/bin/osdslet"
register: controllerreleasesexisted

- name: download and extract the controller release tarball if not exists
- name: download the controller release tarball if not exists
get_url:
url: "{{ controller_download_url }}"
dest: /tmp/controller_ArChIvE.tar.gz
remote_src: yes
register: dlresult
until: dlresult is not failed
retries: 5
delay: 10
when:
- controllerreleasesexisted.stat.exists is undefined or controllerreleasesexisted.stat.exists == false

- name: extract the controller release tarball if downloaded
unarchive:
src: "{{ controller_download_url }}"
src: /tmp/controller_ArChIvE.tar.gz
dest: /tmp/
remote_src: yes
when:
- controllerreleasesexisted.stat.exists is undefined or controllerreleasesexisted.stat.exists == false

Expand All @@ -79,11 +101,22 @@
path: "{{ hotpot_work_dir }}/bin/osdsdock"
register: dockreleasesexisted

- name: download and extract the dock release tarball if not exists
- name: download the dock release tarball if not exists
get_url:
url: "{{ dock_download_url }}"
dest: /tmp/dock_ArChIvE.tar.gz
remote_src: yes
register: dlresult
until: dlresult is not failed
retries: 5
delay: 10
when:
- dockreleasesexisted.stat.exists is undefined or dockreleasesexisted.stat.exists == false

- name: extract the dock release tarball if downloaded
unarchive:
src: "{{ dock_download_url }}"
src: /tmp/dock_ArChIvE.tar.gz
dest: /tmp/
remote_src: yes
when:
- dockreleasesexisted.stat.exists is undefined or dockreleasesexisted.stat.exists == false

Expand Down