From 2bc9141a124e37c344fedf72c29851fa99751c7e Mon Sep 17 00:00:00 2001 From: Scott Hussey Date: Wed, 17 Apr 2019 15:21:12 -0500 Subject: [PATCH] Add explicit rackd image sync - The import resources job can sometimes take much longer than expected seemingly because even though the rack controller has the image data, it doesn't report it. Rather than waiting for MAAS to resync the rack controller automatically, explicitly start an image sync on each rack controller that isn't synced Change-Id: Ie3a8124db2266380420b1efa4aaec6e3aa3c2904 --- charts/maas/templates/bin/_import-boot-resources.sh.tpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/charts/maas/templates/bin/_import-boot-resources.sh.tpl b/charts/maas/templates/bin/_import-boot-resources.sh.tpl index 15db50e..d099dab 100644 --- a/charts/maas/templates/bin/_import-boot-resources.sh.tpl +++ b/charts/maas/templates/bin/_import-boot-resources.sh.tpl @@ -102,6 +102,8 @@ function check_for_rack_sync { if [[ $synced_ctlr == "true" && ! -z ${selected_imgs} ]] then sync_list=$(echo -e "${sync_list}\n${rack_id}" | sort | uniq) + else + maas ${ADMIN_USERNAME} rack-controller import-boot-images ${rack_id} fi if [[ $(echo -e "${rack_list}" | sort | uniq | grep -v '^$' ) == $(echo -e "${sync_list}" | sort | uniq | grep -v '^$') ]] then