Skip to content
Merged
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
4 changes: 2 additions & 2 deletions ansible/library/reduce_and_add_sonic_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def install_new_sonic_image(module, new_image_url):
msg="Remove config_db.json in preference of minigraph.xml")


def work_around_for_slow_disks():
def work_around_for_slow_disks(module):
# Increase hung task timeout to 600 seconds to avoid kernel panic
# while writing lots of data to a slow disk.
exec_command(module, cmd="sysctl -w kernel.hung_task_timeout_secs=600", ignore_error=True)
Expand All @@ -124,7 +124,7 @@ def main():
new_image_url = module.params['new_image_url']

try:
work_around_for_slow_disks()
work_around_for_slow_disks(module)
reduce_installed_sonic_images(module, disk_used_pcent)
install_new_sonic_image(module, new_image_url)
except:
Expand Down