Skip to content

Commit c8471fc

Browse files
committed
Remove unnecessary steps
1 parent cfe96fa commit c8471fc

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

ansible/roles/schedulers/tasks/deploy.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -280,11 +280,6 @@
280280
include_tasks: "{{ item }}.yml"
281281
with_items: "{{ scheduler_plugins | default([]) }}"
282282

283-
- name: Judge current scheduler whether deployed
284-
shell: echo $(docker ps | grep {{ scheduler_name }} | wc -l)
285-
register: schedulerDeployed
286-
when: zeroDowntimeDeployment.enabled == true
287-
288283
- name: disable scheduler{{ groups['schedulers'].index(inventory_hostname) }} before redeploy scheduler
289284
uri:
290285
url: "{{ scheduler.protocol }}://{{ ansible_host }}:{{ scheduler_port }}/disable"
@@ -297,25 +292,21 @@
297292
ignore_errors: "{{ scheduler.deployment_ignore_error }}"
298293
when: zeroDowntimeDeployment.enabled == true and schedulerDeployed.stdout != "0"
299294

300-
- name: wait until all queue and create queue task is finished before redeploy scheduler when using apicall solution or half solution
295+
- name: wait until all activation is finished before redeploy scheduler
301296
uri:
302297
url: "{{ scheduler.protocol }}://{{ ansible_host }}:{{ scheduler_port }}/activation/count"
303298
validate_certs: no
304299
return_content: yes
305300
user: "{{ scheduler.username }}"
306301
password: "{{ scheduler.password }}"
307302
force_basic_auth: yes
308-
register: totalQueue
309-
until: totalQueue.content == "0"
303+
register: result
304+
until: result.content == "0"
310305
retries: 180
311306
delay: 5
312-
when: zeroDowntimeDeployment.enabled == true and schedulerDeployed.stdout != "0"
307+
when: zeroDowntimeDeployment.enabled == true
313308
ignore_errors: "{{ scheduler.deployment_ignore_error }}"
314309

315-
- name: wait until all queue and create queue task is finished before redeploy scheduler using sleep solution
316-
shell: sleep 120s
317-
when: zeroDowntimeDeployment.enabled == true and schedulerDeployed.stdout != "0" and zeroDowntimeDeployment.solution == 'sleep'
318-
319310
- name: (re)start scheduler
320311
docker_container:
321312
name: "{{ scheduler_name }}"

0 commit comments

Comments
 (0)