Description of problem: User want to install Metrics and assign Cassandra/Hawkular/Heapseter node to specific node by using node_selector. However after set node selector in inventory file, the job always ablort at TASK [openshift_metrics : Generate heapster replication controller] Version-Release number of selected component (if applicable): OCP 3.5 Metrics 3.5 openshift-ansible master branch. How reproducible: always Steps to Reproduce: 1. prepare inventory file, note this is a 2 nodes cluster, and have different labels. [oo_first_master] $master ansible_user=root ansible_ssh_user=root ansible_ssh_private_key_file="~/.ssh/libra.pem" openshift_public_hostname=$master [oo_first_master:vars] deployment_type=openshift-enterprise openshift_release=v3.5.0 openshift_metrics_install_metrics=true openshift_metrics_hawkular_hostname=hawkular-metrics.$subdomain openshift_metrics_project=openshift-infra openshift_metrics_image_prefix=registry.ops.openshift.com/openshift3/ openshift_metrics_image_version=3.5.0 openshift_metrics_hawkular_nodeselector="metrics":"enabled" openshift_metrics_cassandra_nodeselector="metrics":"enabled" openshift_metrics_heapster_nodeselector="metrics":"enabled" [nodes] node1 openshift_node_labels="{'metrics':'false'}" node2 openshift_node_labels="{'metrics':'enabled'}" 2. install dependencies, clone the latest openshift-ansilbe repo and run the playbook ansible-playbook -v -i ~/inventory playbooks/common/openshift-cluster/openshift_metrics.yml 3. check logs Actual results: Install aborted TASK [openshift_metrics : Generate heapster replication controller] ************ fatal: [host-8-174-59.host.centralci.eng.rdu2.redhat.com]: FAILED! => { "changed": false, "failed": true } MSG: AnsibleUndefinedVariable: 'unicode object' has no attribute 'iteritems' Expected results: Install successfully and Cassandra/Hawkular/Heapster pods are on desired node. Additional info: Since there is no sample usage, this may be not a real issue, then we should convert this to a doc bug and tell user the usage.
The node selector must be in the form of a hash similar to what is defined for the node labels in your inventory file. The correct syntax would be: openshift_metrics_hawkular_nodeselector={"metrics":"enabled"} openshift_metrics_cassandra_nodeselector={"metrics":"enabled"} openshift_metrics_heapster_nodeselector={"metrics":"enabled"|
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2017:3438