From 65111909cc2370b77a31fe163d82c2315108b4b4 Mon Sep 17 00:00:00 2001 From: John Fulton Date: Fri, 3 Aug 2018 14:43:10 -0400 Subject: [PATCH] Change NodeDataLookup type from string to json The NodeDataLookup parameter should be valid JSON and we should help the user by adding type checking for this early in the deployment so that the user doesn't experience the related bug. Change-Id: Id9d2208f1cbaba9234d7657420cd7efcad3507a0 Related-Bug: #1784967 Related-Bug: #1814070 (cherry picked from commit fe2fda491b1ed97dcc77b3bf3f2df1df7b94493b) --- docker/services/ceph-ansible/ceph-base.yaml | 6 +++--- puppet/extraconfig/pre_deploy/per_node.yaml | 8 ++++---- .../node_data_lookup_string_to_json-69362e93d862bd87.yaml | 7 +++++++ 3 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 releasenotes/notes/node_data_lookup_string_to_json-69362e93d862bd87.yaml diff --git a/docker/services/ceph-ansible/ceph-base.yaml b/docker/services/ceph-ansible/ceph-base.yaml index 4c4ce756ca..f00b7c80ac 100644 --- a/docker/services/ceph-ansible/ceph-base.yaml +++ b/docker/services/ceph-ansible/ceph-base.yaml @@ -39,9 +39,9 @@ parameters: - allowed_values: ['', 'UPGRADE', 'FASTFORWARDUPGRADE'] default: '' NodeDataLookup: - type: string - default: '{}' - description: json string containing per-node configuration map + type: json + default: {} + description: json containing per-node configuration map DeploymentServerBlacklist: default: [] type: comma_delimited_list diff --git a/puppet/extraconfig/pre_deploy/per_node.yaml b/puppet/extraconfig/pre_deploy/per_node.yaml index c5969fd9ae..c578782aca 100644 --- a/puppet/extraconfig/pre_deploy/per_node.yaml +++ b/puppet/extraconfig/pre_deploy/per_node.yaml @@ -12,13 +12,13 @@ parameters: # to the json required for the node-specific hieradata # Note this needs to be a json blob e.g: # parameter_defaults: - # NodeDataLookup: | + # NodeDataLookup: # {"AB4114B1-9C9D-409A-BEFB-D88C151BF2C3": {"foo": "bar"}, # "8CF1A7EA-7B4B-4433-AC83-17675514B1B8": {"foo2": "bar2"}} NodeDataLookup: - type: string - default: '{}' - description: json string containing per-node configuration map + type: json + default: {} + description: json containing per-node configuration map resources: NodeSpecificConfig: diff --git a/releasenotes/notes/node_data_lookup_string_to_json-69362e93d862bd87.yaml b/releasenotes/notes/node_data_lookup_string_to_json-69362e93d862bd87.yaml new file mode 100644 index 0000000000..361d2e7401 --- /dev/null +++ b/releasenotes/notes/node_data_lookup_string_to_json-69362e93d862bd87.yaml @@ -0,0 +1,7 @@ +--- +deprecations: + - | + The NodeDataLookup parameter type was changed from string to json +fixes: + - | + - Bug 1784967 invalid JSON in NodeDataLookup error message should be more helpful