Bug 1418910 - [IntService_public_295] install fail due to yaml parsing issue
Summary: [IntService_public_295] install fail due to yaml parsing issue
Keywords:
Status: CLOSED DUPLICATE of bug 1418911
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Jeff Cantrill
QA Contact: Peng Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-03 05:57 UTC by Peng Li
Modified: 2017-02-03 14:46 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-03 14:46:41 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Peng Li 2017-02-03 05:57:34 UTC
Description of problem:
Use ansible to install Metrics, task failed at [openshift_metrics : Start Hawkular Cassandra], and from the error info we could see some yaml parsing/ruamel related info.

TASK [openshift_metrics : Start Hawkular Cassandra] ****************************
task path: /root/openshift-ansible/roles/openshift_metrics/tasks/start_metrics.yaml:12
Using module file /root/openshift-ansible/roles/lib_openshift/library/oc_scale.py
<MASTER> ESTABLISH SSH CONNECTION FOR USER: root
<MASTER> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/root/.ssh/libra.pem"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/ansible-ssh-%h-%p-%r MASTER '/bin/sh -c '"'"'/usr/bin/python && sleep 0'"'"''
An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
  File "/tmp/ansible_P4XL2n/ansible_module_oc_scale.py", line 42, in <module>
    import ruamel.yaml as yaml
ImportError: No module named ruamel.yaml

failed: [MASTER] (item=replicationcontroller/hawkular-cassandra-1) => {
    "failed": true, 
    "invocation": {
        "module_name": "oc_scale"
    }, 
    "module_stderr": "Traceback (most recent call last):\n  File \"/tmp/ansible_P4XL2n/ansible_module_oc_scale.py\", line 42, in <module>\n    import ruamel.yaml as yaml\nImportError: No module named ruamel.yaml\n", 
    "module_stdout": "", 
    "object": "replicationcontroller/hawkular-cassandra-1"
}

MSG:

MODULE FAILURE


This is a regression issue, and we saw a similar issue on Logging ansible install.

Version-Release number of selected component (if applicable):
OCP 3.5
Ansible master branch

How reproducible:
always

Steps to Reproduce:
1.prepare inventory file.

[oo_first_master]
MASTER ansible_user=root ansible_ssh_user=root ansible_ssh_private_key_file="/root/.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
~                                               

2.install necessary packages on control node.

git clone https://github.com/openshift/openshift-ansible

yum -y install -y ansible pyOpenSSL python-cryptography python-lxml
yum -y install httpd-tools
yum -y install openjdk-8-jre java-1.8.0-openjdk java-1.8.0-openjdk-devel 

3.ansible-playbook  -vvv  -i  ~/inventory  playbooks/common/openshift-cluster/openshift_metrics.yml

Actual results:
Install failed.

Expected results:
Install succeed.

Additional info:
Full log attached.
A similar issue on Logging install is observed.

Comment 2 Peng Li 2017-02-03 06:22:28 UTC
This is the logging bug https://bugzilla.redhat.com/show_bug.cgi?id=1418911 and more info is provided there.

Comment 3 Peng Li 2017-02-03 06:34:21 UTC
This issue also impact uninstall, when set openshift_metrics_install_metrics=false and run playbook, similar error occured.

TASK [openshift_metrics : Stop Heapster] ***************************************
task path: /root/openshift-ansible/roles/openshift_metrics/tasks/stop_metrics.yaml:13
Using module file /root/openshift-ansible/roles/lib_openshift/library/oc_scale.py
<MASTER> ESTABLISH SSH CONNECTION FOR USER: root
<MASTER> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/root/.ssh/libra.pem"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/ansible-ssh-%h-%p-%r MASTER '/bin/sh -c '"'"'/usr/bin/python && sleep 0'"'"''
An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
  File "/tmp/ansible_P__pOR/ansible_module_oc_scale.py", line 42, in <module>
    import ruamel.yaml as yaml
ImportError: No module named ruamel.yaml

failed: [MASTER] (item=replicationcontroller/heapster) => {
    "failed": true, 
    "invocation": {
        "module_name": "oc_scale"
    }, 
    "module_stderr": "Traceback (most recent call last):\n  File \"/tmp/ansible_P__pOR/ansible_module_oc_scale.py\", line 42, in <module>\n    import ruamel.yaml as yaml\nImportError: No module named ruamel.yaml\n", 
    "module_stdout": "", 
    "object": "replicationcontroller/heapster"
}

MSG:

MODULE FAILURE


PLAY RECAP *********************************************************************
MASTER : ok=12   changed=1    unreachable=0    failed=1

Comment 4 Jeff Cantrill 2017-02-03 14:46:41 UTC

*** This bug has been marked as a duplicate of bug 1418911 ***


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