Bug 1296184

Summary: oc command is altering paths from relative to direct (after executing commands)
Product: OpenShift Container Platform Reporter: Eric Rich <erich>
Component: ocAssignee: Fabiano Franz <ffranz>
Status: CLOSED ERRATA QA Contact: Xingxing Xia <xxia>
Severity: low Docs Contact:
Priority: unspecified    
Version: 3.0.0CC: aos-bugs, erich, jokerman, mmccomas, tdawson
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-27 09:34:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Eric Rich 2016-01-06 14:35:06 UTC
Description of problem:

The OC command seems to alter file paths to certificates, from a relative path to a direct path (and vice versa) when commands are run. 

Version-Release number of selected component (if applicable): 3.0.1
How reproducible: 100%

Steps to Reproduce:

[root@workstation ~]# oc new-project test
Now using project "test" on server "https://master.example.com:8443".
[root@workstation ~]# oc delete project test
projects/test
[root@workstation ~]# oc logout
Logged "erich" out on "https://master.example.com:8443"
[root@workstation ~]# grep certificate-authority .kube/config
    certificate-authority: /home/student/Desktop/ca.crt

[root@workstation ~]# oc login -u erich -p redhat
Login successful.
...
[root@workstation ~]# oc delete project test2
Error from server: User "erich" cannot delete projects in project "test2"
[root@workstation ~]# oc delete project test2
Error from server: User "erich" cannot delete projects in project "test2"
[root@workstation ~]# oc logout
Logged "erich" out on "https://master.example.com:8443"
[root@workstation ~]# grep certificate-authority .kube/config
    certificate-authority: ../../home/student/Desktop/ca.crt

Actual results:

Path seems to change from direct path to a relative path and back for no reason (needed reason). 

    certificate-authority: /home/student/Desktop/ca.crt
    certificate-authority: ../../home/student/Desktop/ca.crt

Expected results:

This should be a "direct paht" or relative path (but the path should remain consist unless the use changes the path (via a command or config change). 

Additional info:

Comment 1 Fabiano Franz 2016-07-04 21:55:50 UTC
Fixed in master.

Comment 2 Eric Rich 2016-07-05 03:43:28 UTC
(In reply to Fabiano Franz from comment #1)
> Fixed in master.

Can you please link to commit or pr

Comment 3 Xingxing Xia 2016-07-07 06:02:44 UTC
Verified in oc v3.0.1.100, oc v3.1.1.6-35-g0742c54 and oc v3.3.0.2 per steps in comment 0. They all don't reproduce the issue. The actual result is always absolute path. @ Eric Rich, do you still reproduce it?

Comment 6 errata-xmlrpc 2016-09-27 09:34:55 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-2016:1933