aboutsummaryrefslogtreecommitdiffstats
path: root/mcp/patches/0003-maas-region-force-artifact-download.patch
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-08-05 02:25:38 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-08-10 20:34:29 +0200
commit75c464b5bdeac188902d17576981c8074624ddf0 (patch)
tree78c3c640f47bfff26488eac711a318c0384da5cc /mcp/patches/0003-maas-region-force-artifact-download.patch
parentbaccdc43292c3f33fd697e5b67b2867e2ea73c71 (diff)
maas: region: credentials workaround, force sync
Workaround the issues described in [1], stating that salt-formula-maas package cannot set an autogenerated PostgreSQL password, respectively the known error thrown during initial setup. FIXME: These should be reverted later, after fixing the MaaS password update and initial artifact sync in the salt formula / scripts. [1] https://docs.mirantis.com/mcp/1.0/mcp-deployment-guide/\ install-base-infra/set-up-bare-metal-provisioner/configure-maas-vm.html Change-Id: I8b37f55d3caa4119c64f9549578850dd4eb9e3ad Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'mcp/patches/0003-maas-region-force-artifact-download.patch')
-rw-r--r--mcp/patches/0003-maas-region-force-artifact-download.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/mcp/patches/0003-maas-region-force-artifact-download.patch b/mcp/patches/0003-maas-region-force-artifact-download.patch
new file mode 100644
index 000000000..72114bb48
--- /dev/null
+++ b/mcp/patches/0003-maas-region-force-artifact-download.patch
@@ -0,0 +1,39 @@
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Sat, 5 Aug 2017 02:03:01 +0200
+Subject: [PATCH] maas: region: force artifact download
+
+MaaS configuration fails until all required artifacts are in place,
+including bootloaders and target images.
+
+Hack around this by forcing an explicit artifact sync.
+
+NOTE: This is probably achievable through existing maas salt custom
+module (py) and/or minor rework on that.
+This fixup should be temporary at best.
+
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
+
+diff --git a/maas/region.sls b/maas/region.sls
+index d3227ca..8a2243d 100644
+--- a/maas/region.sls
++++ b/maas/region.sls
+@@ -109,11 +109,17 @@
+ cmd.run:
+ - name: "maas-region apikey --username {{ region.admin.username }} > /var/lib/maas/.maas_credentials"
+
++maas_force_artifact_sync:
++ cmd.run:
++ - name: "maas login {{ region.admin.username }} http://{{ region.bind.host }}/MAAS/api/2.0 - < /var/lib/maas/.maas_credentials && while ! grep -qzE '(Unable to probe for DHCP servers|DHCP probe complete).*Rack controller' /var/log/maas/rackd.log; do sleep 5; echo -n '.'; done && maas opnfv boot-resources import && while maas opnfv boot-resources is-importing | grep -q -e 'true'; do sleep 5; echo -n '.'; done && maas opnfv rack-controllers import-boot-images && while ! test -d /var/lib/maas/boot-resources/current/ubuntu; do sleep 5; echo -n '.'; done"
++ - require:
++ - cmd: maas_login_admin
++
+ maas_config:
+ module.run:
+ - name: maas.process_maas_config
+ - require:
+- - cmd: maas_login_admin
++ - cmd: maas_force_artifact_sync
+
+ maas_commissioning_scripts:
+ module.run: