From 3e4849e132353f22378fa7d10838f3e0c2f0eef2 Mon Sep 17 00:00:00 2001 From: Scott Hussey Date: Fri, 27 Apr 2018 09:34:10 -0500 Subject: [PATCH] [373577] Allow hostnames with underscores - Use a different token in the tag representing bootaction key so that a hostname with a underscore doesn't cause a deployment failure Change-Id: I6197494bfe28398300e38b5017ad94350204340e --- charts/maas/templates/etc/_curtin_userdata.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/maas/templates/etc/_curtin_userdata.tpl b/charts/maas/templates/etc/_curtin_userdata.tpl index 0704204..420b7dc 100644 --- a/charts/maas/templates/etc/_curtin_userdata.tpl +++ b/charts/maas/templates/etc/_curtin_userdata.tpl @@ -26,10 +26,10 @@ early_commands: late_commands: {{ "{{" }}py: def find_ba_key(n): - tag_prefix = "%s_baid" % n.hostname + tag_prefix = "%s__baid" % n.hostname for t in n.tag_names(): if t.startswith(tag_prefix): - prefix, ba_key = t.split('-') + prefix, ba_key = t.split('__baid__') return ba_key return False {{ "}}" }}