summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2017-11-15 11:11:08 -0800
committerGitHub <noreply@github.com>2017-11-15 11:11:08 -0800
commit19c24c763d6c68701ad27a8ec7841b9045ca2ad8 (patch)
treede610bec24fcc207ea2eadef851de1dd4cf7d9a1 /roles
parentbedbf78b8d2a71bd11301b555aa7a3c34c7bac5c (diff)
parent8a1775c1b72d30452c910837b704f2d51f0aa559 (diff)
downloadopenshift-19c24c763d6c68701ad27a8ec7841b9045ca2ad8.tar.gz
openshift-19c24c763d6c68701ad27a8ec7841b9045ca2ad8.tar.bz2
openshift-19c24c763d6c68701ad27a8ec7841b9045ca2ad8.tar.xz
openshift-19c24c763d6c68701ad27a8ec7841b9045ca2ad8.zip
Merge pull request #6079 from mgugino-upstream-stage/fix-log-local-facts
Automatic merge from submit-queue. Fix stale data in openshift_facts for logging Currently, some stale facts may be present in '/etc/ansible/facts.d/openshift.fact' which causes openshift_facts to fail. This commit ensures that the data for the 'logging' key in that file is a dictionary; otherwise we re-initialize a new dictionary. Fixes: https://github.com/openshift/openshift-ansible/issues/6057
Diffstat (limited to 'roles')
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index a61926eb3..99ebb7e36 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -490,7 +490,7 @@ def set_selectors(facts):
facts['hosted']['metrics'] = {}
if 'selector' not in facts['hosted']['metrics'] or facts['hosted']['metrics']['selector'] in [None, 'None']:
facts['hosted']['metrics']['selector'] = None
- if 'logging' not in facts:
+ if 'logging' not in facts or not isinstance(facts['logging'], dict):
facts['logging'] = {}
if 'selector' not in facts['logging'] or facts['logging']['selector'] in [None, 'None']:
facts['logging']['selector'] = None