Skip to content

Commit 55b2f71

Browse files
authored
Fix apt-get update retry failed when apt-get update failed during add-topology (sonic-net#6677)
What is the motivation for this PR? If apt-get update failed, there was no attribute cache_updated in returned value, so the retry condition would not execute. How did you do it? Add judgment for cache_updated, if it was defined, then check its value. Signed-off-by: Chun'ang Li <chunangli@microsoft.com>
1 parent 9955c06 commit 55b2f71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ansible/roles/vm_set/tasks/docker.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
become: yes
5555
environment: "{{ proxy_env | default({}) }}"
5656
register: apt_update_res
57-
until: apt_update_res.cache_updated
57+
until: apt_update_res.cache_updated is defined and apt_update_res.cache_updated
5858
retries: 5
5959
delay: 10
6060

0 commit comments

Comments
 (0)