+++ This bug was initially created as a clone of Bug #1316352 +++ Description of problem: When testing with different version of client, we may specify path/to/oc. But for edit, it fails. Version-Release number of selected component (if applicable): openshift/oc v1.1.3-553-g19dbf2a kubernetes v1.2.0-alpha.7-703-gbc4550d How reproducible: Always Steps to Reproduce: /bin/oc get dc /bin/oc edit dc database error: open /tmp/bin/oc-edit-sa0n5.yaml: no such file or directory cd / bin/oc edit dc database error: open /tmp/bin/oc-edit-0pcd4.yaml: no such file or directory Actual results: Fail as above. Expected results: Should edit well when oc is prefixed with path Additional info: `./oc edit ...` works Other similar software like crontab can edit well: /bin/crontab -e # edit /tmp/crontab.TMJMNj --- Additional comment from Fabiano Franz on 2016-03-10 13:53:09 EST --- Michail, can you confirm this is fixed upstream and coming in the rebase in progress? --- Additional comment from Michail Kargakis on 2016-03-11 04:17:57 EST --- Yes, this is fixed in https://github.com/kubernetes/kubernetes/pull/22373 and we will have it with the rebase. --- Additional comment from Michail Kargakis on 2016-03-17 06:31:37 EDT --- Rebase landed, this should be fixed. --- Additional comment from Xingxing Xia on 2016-03-17 07:19:40 EDT --- Verified against: openshift/oc v1.1.4-87-g16c0e72 kubernetes v1.2.0-beta.1-28-g148dd34 /bin/oc, bin/oc works now --- Additional comment from Xingxing Xia on 2016-04-18 03:38:50 EDT --- Windows has similar issue (sorry, did not try Windows last time): $ dir origin 04/18/2016 07:13 AM 64,314,880 oc.exe $ origin\oc version oc v1.1.6-132-g0a5b12b kubernetes v1.2.0-36-g4a3f9c5 $ origin\oc edit dc database error: open C:\Users\OPPENS~1\AppData\Local\Temp\origin\oc.exe-edit-evm56.yaml: The system cannot find the path specified. (Similarly, .\oc edit works: cd origin .\oc edit dc database ) --- Additional comment from Michail Kargakis on 2016-04-30 13:02:53 EDT --- https://github.com/openshift/origin/pull/8541 was merged in Origin --- Additional comment from Xingxing Xia on 2016-05-03 01:43:52 EDT --- @Michail Met error when run `hack/build-release.sh` to get windows oc.exe: [root@ip-172-18-10-4 origin]# hack/build-release.sh ++ Building release v1.3.0-alpha.0-267-gcd62e58 ++ Building go targets for linux/amd64: cmd/openshift cmd/oc ++ Building go targets for darwin/amd64: cmd/openshift cmd/oc ++ Building go targets for windows/amd64: cmd/openshift cmd/oc Godeps/_workspace/src/github.com/docker/go-connections/sockets/sockets_windows.go:7:2: cannot find package "github.com/Microsoft/go-winio" in any of: /usr/local/go/src/github.com/Microsoft/go-winio (from $GOROOT) /go/src/github.com/openshift/origin/Godeps/_workspace/src/github.com/Microsoft/go-winio (from $GOPATH) /go/src/github.com/Microsoft/go-winio !!! Error in hack/../hack/common.sh:301 'GOOS=${platform%/*} GOARCH=${platform##*/} go install "${goflags[@]:+${goflags[@]}}" -ldflags "${version_ldflags}" "${nonstatics[@]}"' exited with status 1 Call stack: 1: hack/../hack/common.sh:301 os::build::build_binaries(...) 2: hack/build-cross.sh:28 main(...) Exiting with status 1 !!! Error in hack/../hack/common.sh:253 'os::build::build_binaries "${OS_CROSS_COMPILE_TARGETS[@]}"' exited with status 1 Call stack: 1: hack/../hack/common.sh:253 os::build::build_binaries(...) 2: hack/build-cross.sh:28 main(...) Exiting with status 1 !!! Error in hack/build-release.sh:45 'docker run -e "OS_ONLY_BUILD_PLATFORMS=${OS_ONLY_BUILD_PLATFORMS-}" -i --cidfile="${context}/cid" openshift/origin-release' exited with status 0 1 Call stack: 1: hack/build-release.sh:45 main(...) Exiting with status 1 (Not meet this error in the past. How to resolve it? I tried git clone the GH microsoft/go-winio under /usr/local/go/src/github.com/Microsoft/, the error still happens) --- Additional comment from Xingxing Xia on 2016-05-04 03:42:34 EDT --- Verified in oc.exe v1.3.0-alpha.0-282-g8f127d7. Fixed.
Seems the PR fixing Windows https://github.com/openshift/origin/pull/8541 is not merged into OSE yet. Reproduced in Windows when testing with latest puddle: oc v3.2.0.44 kubernetes v1.2.0-36-g4a3f9c5 Please help merge.
OSE pr: https://github.com/openshift/ose/pull/256
Checked the PR is merged in master, but not in 3.2 branch. Wait for the puddle.
Checked with Win oc v3.2.1.1-1-g33fa4ea, oc edit now works when oc is prefixed with path. Fixed.