Bug 1600041 - Process EventRouter template failed with default value
Summary: Process EventRouter template failed with default value
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Logging
Version: 3.9.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.9.z
Assignee: Vadim Rutkovsky
QA Contact: Anping Li
URL:
Whiteboard:
Depends On:
Blocks: 1620328
TreeView+ depends on / blocked
 
Reported: 2018-07-11 09:33 UTC by Anping Li
Modified: 2021-09-09 14:58 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
: 1620328 (view as bug list)
Environment:
Last Closed: 2018-08-29 14:42:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift openshift-ansible issues 9224 0 None None None 2018-07-17 15:51:20 UTC
Red Hat Product Errata RHBA-2018:2549 0 None None None 2018-08-29 14:43:15 UTC

Description Anping Li 2018-07-11 09:33:38 UTC
Description of problem:
The logging event router failed when use default values. It seems the default "CPU_LIMIT" is null.  Once specified  openshift_logging_eventrouter_cpu_limit=150m, the deploy succeed.


TASK [openshift_logging_eventrouter : Process EventRouter template] ************
fatal: [qe-xxx.rhcloud.com]: FAILED! => {"changed": true, "failed": true, "msg": [{"cmd": "/usr/bin/oc create -f /tmp/aggregated-logging-eventrouter-i5SC20 -n default", "kind": "ServiceAccount", "results": {}, "returncode": 0}, {"cmd": "/usr/bin/oc create -f /tmp/event-reader-DFhp1Q -n default", "kind": "ClusterRole", "results": {}, "returncode": 0}, {"cmd": "/usr/bin/oc create -f /tmp/logging-eventrouter-yp5NYz -n default", "kind": "ConfigMap", "results": {}, "returncode": 0}, {"cmd": "/usr/bin/oc create -f /tmp/logging-eventrouter-pX2IUW -n default", "kind": "DeploymentConfig", "results": {}, "returncode": 1, "stderr": "Error from server (BadRequest): error when creating \"/tmp/logging-eventrouter-pX2IUW\": DeploymentConfig in version \"v1\" cannot be handled as a DeploymentConfig: quantities must match the regular expression '^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$'\n", "stdout": ""}, {"cmd": "/usr/bin/oc create -f /tmp/event-reader-binding-u2vMki -n default", "kind": "ClusterRoleBinding", "results": {}, "returncode": 0}], "state": "present"}

Version-Release number of selected component (if applicable):
openshift-ansible-3.9.33-1.git.56.19ba16e.el7.noarch

How reproducible:
always

Steps to Reproduce:
1. deploy logging and enable envenrouter
openshift_logging_install_eventrouter=true
openshift_logging_install_logging=true

Actual results:
TASK [openshift_logging_eventrouter : Process EventRouter template] ************
task path: /usr/share/ansible/openshift-ansible/roles/openshift_logging_eventrouter/tasks/install_eventrouter.yaml:49
Using module file /usr/share/ansible/openshift-ansible/roles/lib_openshift/library/oc_process.py
<master1.example.com> ESTABLISH SSH CONNECTION FOR USER: root
<master1.example.com> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/tmp/work/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=/opt/app-root/src/.ansible/cp/%h-%r master1.example.com '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<master1.example.com> (0, '/root\n', '')
<master1.example.com> ESTABLISH SSH CONNECTION FOR USER: root
<master1.example.com> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/tmp/work/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=/opt/app-root/src/.ansible/cp/%h-%r master1.example.com '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1531287756.31-116763209830355 `" && echo ansible-tmp-1531287756.31-116763209830355="` echo /root/.ansible/tmp/ansible-tmp-1531287756.31-116763209830355 `" ) && sleep 0'"'"''
<master1.example.com> (0, 'ansible-tmp-1531287756.31-116763209830355=/root/.ansible/tmp/ansible-tmp-1531287756.31-116763209830355\n', '')
<master1.example.com> PUT /tmp/tmpVS_8FZ TO /root/.ansible/tmp/ansible-tmp-1531287756.31-116763209830355/oc_process.py
<master1.example.com> SSH: EXEC sftp -b - -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/tmp/work/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=/opt/app-root/src/.ansible/cp/%h-%r '[master1.example.com]'
<master1.example.com> (0, 'sftp> put /tmp/tmpVS_8FZ /root/.ansible/tmp/ansible-tmp-1531287756.31-116763209830355/oc_process.py\n', '')
<master1.example.com> ESTABLISH SSH CONNECTION FOR USER: root
<master1.example.com> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/tmp/work/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=/opt/app-root/src/.ansible/cp/%h-%r master1.example.com '/bin/sh -c '"'"'chmod u+x /root/.ansible/tmp/ansible-tmp-1531287756.31-116763209830355/ /root/.ansible/tmp/ansible-tmp-1531287756.31-116763209830355/oc_process.py && sleep 0'"'"''
<master1.example.com> (0, '', '')
<master1.example.com> ESTABLISH SSH CONNECTION FOR USER: root
<master1.example.com> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/tmp/work/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=/opt/app-root/src/.ansible/cp/%h-%r -tt master1.example.com '/bin/sh -c '"'"'/usr/bin/python /root/.ansible/tmp/ansible-tmp-1531287756.31-116763209830355/oc_process.py; rm -rf "/root/.ansible/tmp/ansible-tmp-1531287756.31-116763209830355/" > /dev/null 2>&1 && sleep 0'"'"''
<master1.example.com> (0, '\r\n{"exception": "  File \\"/tmp/ansible_G13pTb/ansible_module_oc_process.py\\", line 47, in <module>\\n    import ruamel.yaml as yaml\\n", "changed": true, "failed": true, "state": "present", "invocation": {"module_args": {"reconcile": true, "template_name": "eventrouter-template", "create": false, "namespace": "default", "kubeconfig": "/etc/origin/master/admin.kubeconfig", "content": null, "state": "present", "params": {"REPLICAS": 1, "IMAGE": "registry.reg-aws.openshift.com:443/openshift3/logging-eventrouter:v3.9", "CPU_LIMIT": null, "NAMESPACE": "default", "SINK": "stdout", "MEMORY": "128Mi", "CPU": "100m"}, "debug": false}}, "msg": [{"returncode": 0, "kind": "ServiceAccount", "cmd": "/usr/bin/oc create -f /tmp/aggregated-logging-eventrouter-kMR04K -n default", "results": {}}, {"returncode": 0, "kind": "ClusterRole", "cmd": "/usr/bin/oc create -f /tmp/event-reader-9nWnY7 -n default", "results": {}}, {"returncode": 0, "kind": "ConfigMap", "cmd": "/usr/bin/oc create -f /tmp/logging-eventrouter-Zoe9QD -n default", "results": {}}, {"kind": "DeploymentConfig", "returncode": 1, "stdout": "", "cmd": "/usr/bin/oc create -f /tmp/logging-eventrouter-dg2oM9 -n default", "results": {}, "stderr": "Error from server (BadRequest): error when creating \\"/tmp/logging-eventrouter-dg2oM9\\": DeploymentConfig in version \\"v1\\" cannot be handled as a DeploymentConfig: quantities must match the regular expression \'^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$\'\\n"}, {"returncode": 0, "kind": "ClusterRoleBinding", "cmd": "/usr/bin/oc create -f /tmp/event-reader-binding-8XJOVd -n default", "results": {}}]}\r\n', 'Shared connection to master1.example.com closed.\r\n')
The full traceback is:
  File "/tmp/ansible_G13pTb/ansible_module_oc_process.py", line 47, in <module>
    import ruamel.yaml as yaml

fatal: [master1.example.com]: FAILED! => {
    "changed": true, 
    "failed": true, 
    "invocation": {
        "module_args": {
            "content": null, 
            "create": false, 
            "debug": false, 
            "kubeconfig": "/etc/origin/master/admin.kubeconfig", 
            "namespace": "default", 
            "params": {
                "CPU": "100m", 
                "CPU_LIMIT": null, 
                "IMAGE": "registry.reg-aws.openshift.com:443/openshift3/logging-eventrouter:v3.9", 
                "MEMORY": "128Mi", 
                "NAMESPACE": "default", 
                "REPLICAS": 1, 
                "SINK": "stdout"
            }, 
            "reconcile": true, 
            "state": "present", 
            "template_name": "eventrouter-template"
        }
    }, 
    "msg": [
        {
            "cmd": "/usr/bin/oc create -f /tmp/aggregated-logging-eventrouter-kMR04K -n default", 
            "kind": "ServiceAccount", 
            "results": {}, 
            "returncode": 0
        }, 
        {
            "cmd": "/usr/bin/oc create -f /tmp/event-reader-9nWnY7 -n default", 
            "kind": "ClusterRole", 
            "results": {}, 
            "returncode": 0
        }, 
        {
            "cmd": "/usr/bin/oc create -f /tmp/logging-eventrouter-Zoe9QD -n default", 
            "kind": "ConfigMap", 
            "results": {}, 
            "returncode": 0
        }, 
        {
            "cmd": "/usr/bin/oc create -f /tmp/logging-eventrouter-dg2oM9 -n default", 
            "kind": "DeploymentConfig", 
            "results": {}, 
            "returncode": 1, 
            "stderr": "Error from server (BadRequest): error when creating \"/tmp/logging-eventrouter-dg2oM9\": DeploymentConfig in version \"v1\" cannot be handled as a DeploymentConfig: quantities must match the regular expression '^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$'\n", 
            "stdout": ""
        }, 
        {
            "cmd": "/usr/bin/oc create -f /tmp/event-reader-binding-8XJOVd -n default", 
            "kind": "ClusterRoleBinding", 
            "results": {}, 
            "returncode": 0
        }
    ], 
    "state": "present"
}


Expected results:
logging-eventrouter can be deployed with default CPU_LIMIT.

Additional info:

Comment 1 Jeff Cantrill 2018-07-11 15:07:53 UTC
Is this a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1592551

Comment 2 Anping Li 2018-07-12 03:24:47 UTC
Maybe this is pull in by the fix in BZ1592551

Comment 5 Vadim Rutkovsky 2018-07-25 07:23:10 UTC
PR for 3.9 - https://github.com/openshift/openshift-ansible/pull/9329

Comment 6 Anping Li 2018-07-26 05:26:54 UTC
Fixed in ose-ansible/images/v3.9.38-1

Comment 7 Anping Li 2018-08-03 14:16:17 UTC
The fix is not in openshift3/ose-ansible/images/v3.9.40-2.

Comment 8 Anping Li 2018-08-03 14:18:56 UTC
The workaround is to add openshift_logging_eventrouter_cpu_request=100m

Comment 10 Qiaoling Tang 2018-08-27 02:42:51 UTC
Verified on openshift-ansible-3.9.41-1.git.0.4c55974.el7.noarch.

Comment 12 errata-xmlrpc 2018-08-29 14:42:31 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-2018:2549


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