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
This commit is contained in:
Scott Hussey 2019-04-17 15:21:12 -05:00
parent 928cddad00
commit 2bc9141a12
1 changed files with 2 additions and 0 deletions

View File

@ -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