diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2018-01-08 12:46:52 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-08 12:46:52 -0800 |
commit | 74294d8258a4812752434feaf4cd4b512a992af8 (patch) | |
tree | 7c2b4fc5a821831331854e2ba557391118f5341f /playbooks/openstack/sample-inventory/inventory.py | |
parent | 0e6fa54388f0adec95bbed79f9fb4f42b6d89fa2 (diff) | |
parent | b7833d6684a238713821cc5e0eb2fa7be99c8197 (diff) | |
download | openshift-74294d8258a4812752434feaf4cd4b512a992af8.tar.gz openshift-74294d8258a4812752434feaf4cd4b512a992af8.tar.bz2 openshift-74294d8258a4812752434feaf4cd4b512a992af8.tar.xz openshift-74294d8258a4812752434feaf4cd4b512a992af8.zip |
Merge pull request #6580 from tomassedovic/openstack-fixes
Automatic merge from submit-queue.
Openstack fixes
This includes a few fixes for the OpenStack provider.
It should fix #6555 and possibly also #6560.
Diffstat (limited to 'playbooks/openstack/sample-inventory/inventory.py')
-rwxr-xr-x | playbooks/openstack/sample-inventory/inventory.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/playbooks/openstack/sample-inventory/inventory.py b/playbooks/openstack/sample-inventory/inventory.py index 084b5c0a0..45cc4e15a 100755 --- a/playbooks/openstack/sample-inventory/inventory.py +++ b/playbooks/openstack/sample-inventory/inventory.py @@ -9,6 +9,7 @@ environment. from __future__ import print_function +from collections import Mapping import json import shade @@ -101,6 +102,10 @@ def build_inventory(): hostvars['glusterfs_devices'] = ['/dev/nvme0n1'] node_labels = server.metadata.get('node_labels') + # NOTE(shadower): the node_labels value must be a dict not string + if not isinstance(node_labels, Mapping): + node_labels = json.loads(node_labels) + if node_labels: hostvars['openshift_node_labels'] = node_labels |