Bug 1838085 - oc run's --restart help need update to only pod would created
Summary: oc run's --restart help need update to only pod would created
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.5
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.6.0
Assignee: Maciej Szulik
QA Contact: RamaKasturi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-20 13:04 UTC by zhou ying
Modified: 2020-10-27 16:00 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 16:00:21 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:00:50 UTC

Description zhou ying 2020-05-20 13:04:17 UTC
Description of problem:
'oc run' only create pod now , but the --restart help do not updated, we should updates the help text for the --restart parameter to reflect this change in behavior.

Version-Release number of selected component (if applicable):
[root@dhcp-140-138 ~]# oc version 
Client Version: 4.5.0-202005181857-67da73a


How reproducible:
always

Steps to Reproduce:
1.`oc run -h`

Actual results:
      --restart='Always': The restart policy for this Pod.  Legal values [Always, OnFailure, Never].  If set to 'Always'
a deployment is created, if set to 'OnFailure' a job is created, if set to 'Never', a regular pod is created. For the
latter two --replicas must be 1.  Default 'Always', for CronJobs `Never`.

Expected results:
      --restart='Always': The restart policy for this Pod.  Legal values [Always, OnFailure, Never]. 

Additional info:

Comment 1 Maciej Szulik 2020-05-20 14:26:10 UTC
This was fixed in https://github.com/kubernetes/kubernetes/pull/89803 and will be picked during next k8s bump.

Comment 2 Maciej Szulik 2020-06-18 10:14:45 UTC
Waiting for next k8s bump.

Comment 3 Maciej Szulik 2020-07-09 11:00:02 UTC
Waiting for next k8s bump.

Comment 4 Maciej Szulik 2020-08-21 12:05:12 UTC
K8s was bumped in https://github.com/openshift/oc/pull/491

Comment 7 RamaKasturi 2020-08-24 07:16:34 UTC
Verified with the build below and i see that bug has been fixed.
[ramakasturinarra@dhcp35-60 ~]$ oc version -o yaml
clientVersion:
  buildDate: "2020-08-21T02:37:08Z"
  compiler: gc
  gitCommit: ea0d54068621ec0f95973068729f739f3dacfef7
  gitTreeState: clean
  gitVersion: 4.6.0-202008210209.p0-ea0d540
  goVersion: go1.14.4
  major: ""
  minor: ""
  platform: linux/amd64
openshiftVersion: 4.6.0-0.nightly-2020-08-23-214712
serverVersion:
  buildDate: "2020-08-20T16:46:57Z"
  compiler: gc
  gitCommit: 3e083ac29409923906267ebcc5f8e0aa13072c72
  gitTreeState: dirty
  gitVersion: v1.19.0-rc.2+3e083ac-dirty
  goVersion: go1.14.4
  major: "1"
  minor: 19+
  platform: linux/amd64



When run oc run -h i see the below values for --restart which is as expected for the bug.

oc run -h
 --restart='Always': The restart policy for this Pod.  Legal values [Always, OnFailure, Never].

Based on the above moving the bug to verified state.

Comment 9 errata-xmlrpc 2020-10-27 16:00:21 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 (OpenShift Container Platform 4.6 GA Images), 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-2020:4196


Note You need to log in before you can comment on or make changes to this bug.