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
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
shell: "{{ item }}"
become_user: "{{ k8s_user }}"
with_items:
- "kubectl patch pvc mongo-0-pv-claim -p '\''{{patch_param }}'\'' --type=merge -n soda-multi-cloud"
- "kubectl patch pvc mongo-1-pv-claim -p '\''{{patch_param }}'\'' --type=merge -n soda-multi-cloud"
- "kubectl patch pvc mongo-2-pv-claim -p '\''{{patch_param }}'\'' --type=merge -n soda-multi-cloud"
- "kubectl patch pvc mongo-0-pv-claim -p '\"{{patch_param }}\"' --type=merge -n soda-multi-cloud"
- "kubectl patch pvc mongo-1-pv-claim -p '\"{{patch_param }}\"' --type=merge -n soda-multi-cloud"
- "kubectl patch pvc mongo-2-pv-claim -p '\"{{patch_param }}\"' --type=merge -n soda-multi-cloud"
ignore_errors: yes

- name: Pause for 2 seconds
Expand Down Expand Up @@ -92,6 +92,6 @@
file:
state: absent
path: "{{ gelato_work_dir }}/multi-cloud/"
ignore_error: yes
ignore_errors: yes
become: yes

2 changes: 1 addition & 1 deletion ansible/roles/ha-ip-update/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

# Same IP is used for both the services. Only Port is different (predefined)
- name: replace the gelato_ha_api_ip and gelato_ha_s3_ip in the gelato-ha.yml
hosts: controllers
# hosts: controllers
replace:
path: "{{ role_path }}/../../group_vars/gelato-ha.yml"
regexp: "{{ item.regexp }}"
Expand Down