X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=mcp%2Fpatches%2F0003-maas-region-force-artifact-download.patch;h=b61a3d1b8128db54173a6b185beb7cf9fcec20af;hb=a854b61568c2f615672f17868e2cfe31d97c751f;hp=56e3bd50442b6a627f353ac0164df8fdd7ecc028;hpb=fbf520aa48b44b4b6cec070cc46fca007a41661a;p=fuel.git diff --git a/mcp/patches/0003-maas-region-force-artifact-download.patch b/mcp/patches/0003-maas-region-force-artifact-download.patch index 56e3bd504..b61a3d1b8 100644 --- a/mcp/patches/0003-maas-region-force-artifact-download.patch +++ b/mcp/patches/0003-maas-region-force-artifact-download.patch @@ -1,5 +1,5 @@ :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Mirantis Inc., Enea AB and others. +: Copyright (c) 2018 Mirantis Inc., Enea AB and others. : : All rights reserved. This program and the accompanying materials : are made available under the terms of the Apache License, Version 2.0 @@ -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"