summaryrefslogtreecommitdiffstats
path: root/mcp/patches
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-12-29 02:58:25 +0100
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-12-29 03:04:00 +0100
commitfedeebd6ee0e3a342777812b7ea90bd4988787ad (patch)
treea27902cbc1b8c97261cd241b0d71ff11d6a1b3c7 /mcp/patches
parent22fbf083c762c56efcf6ba40e6e4cc5643da3e4e (diff)
[maas] artifact sync: improve barrier condition
Simplify wait condition for MaaS service up, since it's fragile and often adds extra time when not really needed. Instead, retry starting boot image import right away. Change-Id: I131d6c82127449cecf6685d4cc7484a366e658c6 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'mcp/patches')
-rw-r--r--mcp/patches/0003-maas-region-force-artifact-download.patch5
1 files changed, 2 insertions, 3 deletions
diff --git a/mcp/patches/0003-maas-region-force-artifact-download.patch b/mcp/patches/0003-maas-region-force-artifact-download.patch
index 56e3bd504..6e6c18fba 100644
--- a/mcp/patches/0003-maas-region-force-artifact-download.patch
+++ b/mcp/patches/0003-maas-region-force-artifact-download.patch
@@ -50,7 +50,7 @@ diff --git a/maas/files/maas-artifact-sync.sh b/maas/files/maas-artifact-sync.sh
new file mode 100644
--- /dev/null
+++ b/maas/files/maas-artifact-sync.sh
-@@ -0,0 +1,21 @@
+@@ -0,0 +1,20 @@
+{%- from "maas/map.jinja" import region with context %}
+#!/bin/bash
+function wait_for {
@@ -67,8 +67,7 @@ new file mode 100644
+ http://{{ region.bind.host }}:5240/MAAS/api/2.0 - < \
+ /var/lib/maas/.maas_credentials || exit 1
+# wait max 5 min for service up, 15 min image download, 5 min region to rack sync
-+wait_for 30 "grep -qzE '(Unable to probe for DHCP servers|DHCP probe complete).*Rack controller' /var/log/maas/rackd.log"
-+maas opnfv boot-resources import || exit 2
++wait_for 30 "maas opnfv boot-resources import"
+wait_for 90 "! maas opnfv boot-resources is-importing | grep -q 'true'"
+maas opnfv rack-controllers import-boot-images || exit 3
+wait_for 30 "test -d /var/lib/maas/boot-resources/current/ubuntu/amd64"