Bug 1421580 - [intservice_public_295] ansible task abort if set node selector
Summary: [intservice_public_295] ansible task abort if set node selector
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.5.z
Assignee: Jeff Cantrill
QA Contact: Peng Li
URL:
Whiteboard:
Depends On:
Blocks: 1406057
TreeView+ depends on / blocked
 
Reported: 2017-02-13 07:35 UTC by Peng Li
Modified: 2017-12-14 21:01 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2017-12-14 21:01:20 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:3438 normal SHIPPED_LIVE OpenShift Container Platform 3.6 and 3.5 bug fix and enhancement update 2017-12-15 01:58:11 UTC

Description Peng Li 2017-02-13 07:35:42 UTC
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.

Comment 4 Jeff Cantrill 2017-02-16 15:10:07 UTC
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"|

Comment 8 errata-xmlrpc 2017-12-14 21:01:20 UTC
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


Note You need to log in before you can comment on or make changes to this bug.