Skip to content

Commit

Permalink
maas: boot-resources: Dynamic arch list from PDF
Browse files Browse the repository at this point in the history
Instead of leaving MaaS default to 'amd64', explicitly set the list
of architectures to support based on PDF data.

Change-Id: I852a3ce156db3df0c090f10c0b45c26058dbb6c6
Signed-off-by: Alexandru Avadanii <[email protected]>
(cherry picked from commit be45e31)
  • Loading branch information
alexandruavadanii committed May 24, 2018
1 parent b1f2be6 commit df66a22
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mcp/patches/0003-maas-region-force-artifact-download.patch
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ new file mode 100644
+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"
+wait_for 30 "true {%- for arch in region.opnfv_arches %} && test -d /var/lib/maas/boot-resources/current/ubuntu/{{ arch }}{%- endfor %}"
2 changes: 1 addition & 1 deletion mcp/patches/0016-Set-boot-source-selections.patch
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ diff --git a/maas/region.sls b/maas/region.sls

+boot_source_selections:
+ cmd.run:
+ - name: "maas login {{ region.admin.username }} http://{{ region.bind.host }}:5240/MAAS/api/2.0 - < /var/lib/maas/.maas_credentials && maas opnfv boot-source-selection update 1 1 release='{{ region.maas_config.default_distro_series }}'"
+ - name: "maas login {{ region.admin.username }} http://{{ region.bind.host }}:5240/MAAS/api/2.0 - < /var/lib/maas/.maas_credentials && maas opnfv boot-source-selection update 1 1 release='{{ region.maas_config.default_distro_series }}' {%- for arch in region.opnfv_arches.split(' ') %} arches='{{ arch }}' {%- endfor %}"
+ - require:
+ - cmd: maas_login_admin
+ - unless: "maas login {{ region.admin.username }} http://{{ region.bind.host }}:5240/MAAS/api/2.0 - < /var/lib/maas/.maas_credentials && maas opnfv boot-source-selections read 1 | grep -q {{ region.maas_config.default_distro_series }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
---
{%- set cluster_arch = [] %}
{%- for node in conf.nodes %}
{%- if node.node.arch not in cluster_arch %}
Expand All @@ -14,6 +13,7 @@
{%- endfor %}
{%- set net_admin = [conf.idf.net_config.admin.network,
conf.idf.net_config.admin.mask] | join("/") %}
---
parameters:
maas:
region:
Expand All @@ -31,6 +31,8 @@ parameters:
vid: 0
dhcp_on: true
primary_rack: ${_param:infra_maas_node01_hostname}
# Space-separated list of dpkg architectures to be supported by MaaS
opnfv_arches:{%- for arch in cluster_arch %} {{ arch | dpkg_arch }}{%- endfor %}
sshprefs:
- '{{ conf.MAAS_SSH_KEY }}'
{%- if 'aarch64' in cluster_arch %}
Expand Down

0 comments on commit df66a22

Please sign in to comment.