Description of problem: For `oc edit`, when the content being edited has syntax error, it could not be saved. But it also cannot quit either (e.g. in Vim editor, unable to use `:q!` to quit) unless we kill the process that does the edit. Version-Release number of selected component (if applicable): openshift/oc v1.1.1-318-gc7aec97 kubernetes v1.2.0-alpha.4-851-g4a65fa1 How reproducible: Always Steps to Reproduce: 1. oc login, create a project 2. Create a rc and edit it, edit restartPolicy value to "Never" (this will make you unable to save and quit), then press `:wq` to save and quit $ oc run hello-rc --image=openshift/hello-openshift --generator=run-controller/v1 $ oc edit rc hello-rc 3. Being unable to save and quit, press `:q!` to give up the edit and quit Actual results: 2. `:wq` will fail to save and quit, and prompt "unsupported value 'Never', Details: supported values: Always" (This is expected) 3. `:q!` is unable to give up the edit and quit, unless we kill the process that does the edit, or, edit all unsupported changes back to supported ones and save, quit.(e.g. edit "Never" back to "Always", then save and quit). Expected results: 3. `:q!` should be able to give up the edit and quit. Additional info: In step 3, when pressing `:q!`, it will save a temporary file but seems to enforce syntax check, which causes the problem. Other resources have similar problem. e.g. edit service .spec.ports[].protocol to Ethernet.
Related upstream issue: https://github.com/kubernetes/kubernetes/issues/20078
Fixed in master.
Verified in openshift v1.3.0-alpha.0-603-g8ac876b. Fixed.