Running metrics playbook fails with "unicode object has no attribute iteritems" in OCP 3.11
Issue
- The metrics playbook fails when using node selector variables from cli.
ansible-playbook -i inven /usr/share/ansible/openshift-ansible/playbooks/openshift-metrics/config.yml \
-e openshift_metrics_install_metrics=true \
-e openshift_metrics_cassandra_storage_type=pv \
-e openshift_metrics_cassandra_pvc_size=40Gi \
-e openshift_metrics_cassandra_pvc_prefix=metrics-cassandra \
-e openshift_metrics_hawkular_hostname=hawkular-metrics.xyz.com \
-e openshift_metrics_project=openshift-infra \
-e openshift_metrics_server_install=true \
-e openshift_metrics_resolution=30 \
-e openshift_metrics_duration=7 \
-e openshift_metrics_cassandra_nodeselector={'node-role.kubernetes.io/infra':'true'}
Output:
FAILED! => {"msg": "An unhandled exception occurred while templating '{{ openshift_metrics_cassandra_nodeselector | map_to_pairs }}'. Error was a <type 'exceptions.AttributeError'>, original message: 'unicode' object has no attribute 'iteritems'"}
Environment
- Red Hat OpenShift Container Platform (OCP)
- 3.11
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.