Bug 1708588
| Summary: | upgrade hosts will fail at TASK [Cordon node prior to upgrade] if openshift_kubeconfig_path="~/.kube/config" | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Weihua Meng <wmeng> |
| Component: | Installer | Assignee: | Russell Teague <rteague> |
| Installer sub component: | openshift-ansible | QA Contact: | Weihua Meng <wmeng> |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | high | ||
| Priority: | high | ||
| Version: | 4.1.0 | ||
| Target Milestone: | --- | ||
| Target Release: | 4.1.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
Cause: The openshift client 'oc' does not support tilde '~' in kube config paths.
Consequence: 'oc' would fail to load the kube config using the default path provided '~/.kube/config'
Fix: An additional filter was added to convert user home paths to full paths before passing to 'oc'
Result: 'oc' is able to load the kube config from user home and default paths.
|
Story Points: | --- |
| Clone Of: | 1708568 | Environment: | |
| Last Closed: | 2019-06-04 10:48:39 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Fixed. openshift-ansible-4.1.0-201905101832.git.156.4682a8f.el7.noarch 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-2019:0758 |
TASK [Cordon node prior to upgrade] ******************************************************************************************************************************************************************************* task path: /usr/share/ansible/openshift-ansible/playbooks/upgrade.yml:23 Friday 10 May 2019 05:23:12 -0400 (0:00:21.078) 0:00:23.883 ************ Using module file /usr/local/lib/python3.6/site-packages/ansible/modules/commands/command.py <localhost> ESTABLISH LOCAL CONNECTION FOR USER: wmeng <localhost> EXEC /bin/sh -c '/usr/bin/python3.6 && sleep 0' failed: [dell-r730-068.dsal.lab.eng.rdu2.redhat.com -> localhost] (item=dell-r730-068.dsal.lab.eng.rdu2.redhat.com) => { "changed": true, "cmd": [ "oc", "adm", "cordon", "dell-r730-068.dsal.lab.eng.rdu2.redhat.com", "--config=~/.kube/config" ], "delta": "0:00:00.100601", "end": "2019-05-10 05:23:13.202324", "invocation": { "module_args": { "_raw_params": "oc adm cordon dell-r730-068.dsal.lab.eng.rdu2.redhat.com --config=~/.kube/config", "_uses_shell": false, "argv": null, "chdir": null, "creates": null, "executable": null, "removes": null, "stdin": null, "warn": true } }, "item": "dell-r730-068.dsal.lab.eng.rdu2.redhat.com", "msg": "non-zero return code", "rc": 1, "start": "2019-05-10 05:23:13.101723", "stderr": "error: stat ~/.kube/config: no such file or directory", "stderr_lines": [ "error: stat ~/.kube/config: no such file or directory" ], "stdout": "", "stdout_lines": [] } +++ This bug was initially created as a clone of Bug #1708568 +++ Description of problem: scaleup hosts will fail at TASK [Get release image] if openshift_kubeconfig_path="~/.kube/config" Root Cause: https://bugzilla.redhat.com/show_bug.cgi?id=1231760 Version-Release number of the following components: openshift-ansible-4.1.0-201905090634.git.152.2919e46.el7.noarch ansible-2.7.10-1.el7.noarch How reproducible: Always Steps to Reproduce: 1. run ansible playbooks with openshift_kubeconfig_path="~/.kube/config" in inventory host file. Actual results: failed. fatal: [dell-r730-068.dsal.lab.eng.rdu2.redhat.com -> localhost]: FAILED! => { "attempts": 36, "changed": true, "cmd": [ "oc", "get", "clusterversion", "--config=~/.kube/config", "--output=jsonpath={.items[0].status.desired.image}" ], "delta": "0:00:00.106092", "end": "2019-05-10 02:04:01.909090", "invocation": { "module_args": { "_raw_params": "oc get clusterversion --config=~/.kube/config --output=jsonpath='{.items[0].status.desired.image}'", "_uses_shell": false, "argv": null, "chdir": null, "creates": null, "executable": null, "removes": null, "stdin": null, "warn": true } }, "msg": "non-zero return code", "rc": 1, "start": "2019-05-10 02:04:01.802998", "stderr": "error: stat ~/.kube/config: no such file or directory", "stderr_lines": [ "error: stat ~/.kube/config: no such file or directory" ], "stdout": "", "stdout_lines": [] } Expected results: ansible playbook finish successfully. Additional info: $ oc get clusterversion --config ~/.kube/config NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version 4.1.0-0.nightly-2019-05-09-204138 True True 2m50s Unable to apply 4.1.0-0.nightly-2019-05-09-204138: the image may not be safe to use $ oc get clusterversion --config=~/.kube/config error: stat ~/.kube/config: no such file or directory [ workaround replace with absolute path