{"action":"created","issue":{"url":"https://api.github.com/repos/openshift/origin/issues/15854","repository_url":"https://api.github.com/repos/openshift/origin","labels_url":"https://api.github.com/repos/openshift/origin/issues/15854/labels{/name}","comments_url":"https://api.github.com/repos/openshift/origin/issues/15854/comments","events_url":"https://api.github.com/repos/openshift/origin/issues/15854/events","html_url":"https://github.com/openshift/origin/issues/15854","id":251228243,"number":15854,"title":"\"oc debug\" should exit non-zero when the executed command returns non-zero","user":{"login":"jperville","id":834791,"avatar_url":"https://avatars2.githubusercontent.com/u/834791?v=4","gravatar_id":"","url":"https://api.github.com/users/jperville","html_url":"https://github.com/jperville","followers_url":"https://api.github.com/users/jperville/followers","following_url":"https://api.github.com/users/jperville/following{/other_user}","gists_url":"https://api.github.com/users/jperville/gists{/gist_id}","starred_url":"https://api.github.com/users/jperville/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jperville/subscriptions","organizations_url":"https://api.github.com/users/jperville/orgs","repos_url":"https://api.github.com/users/jperville/repos","events_url":"https://api.github.com/users/jperville/events{/privacy}","received_events_url":"https://api.github.com/users/jperville/received_events","type":"User","site_admin":false},"labels":[{"id":200493322,"url":"https://api.github.com/repos/openshift/origin/labels/component/cli","name":"component/cli","color":"0052cc","default":false}],"state":"open","locked":false,"assignee":{"login":"juanvallejo","id":3902875,"avatar_url":"https://avatars2.githubusercontent.com/u/3902875?v=4","gravatar_id":"","url":"https://api.github.com/users/juanvallejo","html_url":"https://github.com/juanvallejo","followers_url":"https://api.github.com/users/juanvallejo/followers","following_url":"https://api.github.com/users/juanvallejo/following{/other_user}","gists_url":"https://api.github.com/users/juanvallejo/gists{/gist_id}","starred_url":"https://api.github.com/users/juanvallejo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juanvallejo/subscriptions","organizations_url":"https://api.github.com/users/juanvallejo/orgs","repos_url":"https://api.github.com/users/juanvallejo/repos","events_url":"https://api.github.com/users/juanvallejo/events{/privacy}","received_events_url":"https://api.github.com/users/juanvallejo/received_events","type":"User","site_admin":false},"assignees":[{"login":"juanvallejo","id":3902875,"avatar_url":"https://avatars2.githubusercontent.com/u/3902875?v=4","gravatar_id":"","url":"https://api.github.com/users/juanvallejo","html_url":"https://github.com/juanvallejo","followers_url":"https://api.github.com/users/juanvallejo/followers","following_url":"https://api.github.com/users/juanvallejo/following{/other_user}","gists_url":"https://api.github.com/users/juanvallejo/gists{/gist_id}","starred_url":"https://api.github.com/users/juanvallejo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juanvallejo/subscriptions","organizations_url":"https://api.github.com/users/juanvallejo/orgs","repos_url":"https://api.github.com/users/juanvallejo/repos","events_url":"https://api.github.com/users/juanvallejo/events{/privacy}","received_events_url":"https://api.github.com/users/juanvallejo/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2017-08-18T12:19:20Z","updated_at":"2018-05-03T18:02:31Z","closed_at":null,"author_association":"NONE","body":"The `oc debug` command seems to always exit with a shell status code of 0 even when the executed command exits non-zero. This is counter intuitive and makes using `oc debug` in a `set -e` shell script difficult.\r\n\r\nThere should a new flag to tell `oc debug` to exit non-zero when the executed command exits non-zero, or even better, to make `oc debug` exit the same exit code as the executed command.\r\n\r\n##### Version\r\n\r\n```\r\n[root@xxx-master ~]# oc version\r\noc v1.5.1\r\nkubernetes v1.5.2+43a9be4\r\nfeatures: Basic-Auth GSSAPI Kerberos SPNEGO\r\n\r\nServer https://openshift.example.com:8443\r\nopenshift v1.5.1\r\nkubernetes v1.5.2+43a9be4\r\n```\r\n\r\n##### Steps To Reproduce\r\n\r\n```/bin/sh\r\noc run busybox --image=busybox:ubuntu --replicas=0 # creates a sample DC with no replicas\r\noc debug dc/busybox -- /bin/true                   # run a successful command\r\necho $?                                            # => 0 (as expected)\r\noc debug dc/busybox -- /bin/false                  # run an unsuccessful command\r\necho $?                                            # => 0 (expected: 1)\r\noc debug dc/busybox -- /bin/non-existent           # run a non-existent command\r\necho $?                                            # => 0 (expected: 127)\r\n```\r\n\r\n##### Current Result\r\n\r\nAll 3 `oc debug` commands above exit with status 0.\r\n\r\n##### Expected Result\r\n\r\nThe above `oc debug` commands should set the same exit status as if they were run through `/bin/bash -ce` instead of `oc debug`:\r\n - the first `oc debug` command should exit with status 0;\r\n - the second `oc debug` command should exit with status 1;\r\n - the third `oc debug` command should exit with status 127."},"comment":{"url":"https://api.github.com/repos/openshift/origin/issues/comments/386384318","html_url":"https://github.com/openshift/origin/issues/15854#issuecomment-386384318","issue_url":"https://api.github.com/repos/openshift/origin/issues/15854","id":386384318,"user":{"login":"openshift-bot","id":1779249,"avatar_url":"https://avatars2.githubusercontent.com/u/1779249?v=4","gravatar_id":"","url":"https://api.github.com/users/openshift-bot","html_url":"https://github.com/openshift-bot","followers_url":"https://api.github.com/users/openshift-bot/followers","following_url":"https://api.github.com/users/openshift-bot/following{/other_user}","gists_url":"https://api.github.com/users/openshift-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift-bot/subscriptions","organizations_url":"https://api.github.com/users/openshift-bot/orgs","repos_url":"https://api.github.com/users/openshift-bot/repos","events_url":"https://api.github.com/users/openshift-bot/events{/privacy}","received_events_url":"https://api.github.com/users/openshift-bot/received_events","type":"User","site_admin":false},"created_at":"2018-05-03T18:02:31Z","updated_at":"2018-05-03T18:02:31Z","author_association":"MEMBER","body":"Issues go stale after 90d of inactivity.\n\nMark the issue as fresh by commenting `/remove-lifecycle stale`.\nStale issues rot after an additional 30d of inactivity and eventually close.\nExclude this issue from closing by commenting `/lifecycle frozen`.\n\nIf this issue is safe to close now please do so with `/close`.\n\n/lifecycle stale"}}
{"actor":{"display_login":"openshift-bot"}}