Bug 1388404 - [networking_public_213] Should add --local option in oc set resources
Summary: [networking_public_213] Should add --local option in oc set resources
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 3.4.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Jacob Tanenbaum
QA Contact: Meng Bo
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-25 09:23 UTC by Yan Du
Modified: 2017-03-08 18:43 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2017-01-18 12:44:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Origin (Github) 11694 0 None None None 2016-11-01 14:26:27 UTC
Red Hat Product Errata RHBA-2017:0066 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.4 RPM Release Advisory 2017-01-18 17:23:26 UTC

Description Yan Du 2016-10-25 09:23:08 UTC
Description of problem:
Should add --local option in oc set resources help page

Version-Release number of selected component (if applicable):
openshift v3.4.0.15+9c963ec
kubernetes v1.4.0+776c994
etcd 3.1.0-alpha.1


How reproducible:
Always

Steps to Reproduce:
1. # oc set resources -h
<------------------------snip---------------------->
  # Print the result (in yaml format) of updating nginx container limits from a local, without hitting the server
  
  oc set resources -f path/to/file.yaml --limits=cpu=200m,memory=512Mi --local -o yaml
<------------------------snip---------------------->
2. Prepare a rc or dc yaml file
3. # oc set resources -f tmp/rc.yaml --limits=cpu=200m,memory=512Mi --local -o yaml

Actual results:
# oc set resources -f tmp/rc.yaml --limits=cpu=200m,memory=512Mi --local -o yaml
Error: unknown flag: --local


Expected results:
Should add --local option in oc set resources

Comment 1 Yan Du 2016-10-25 09:25:36 UTC
If we run the cmd without --local option, then we got below result:

# oc set resources -f /tmp/rc.yaml --limits=cpu=200m,memory=512Mi -o yaml 
Error from server: replicationcontrollers "test-rc" not found

Comment 2 Jacob Tanenbaum 2016-11-01 14:26:27 UTC
https://github.com/openshift/origin/pull/11694

Comment 3 Troy Dawson 2016-11-07 19:45:03 UTC
This has been merged into ose and is in OSE v3.4.0.23 or newer.

Comment 5 Yan Du 2016-11-08 01:57:37 UTC
Issue have been fixed.
oc v3.4.0.23+24b1a58
kubernetes v1.4.0+776c994

# oc set resources -f list.yaml --limits=cpu=200m,memory=512Mi --local -o yaml
apiVersion: v1
kind: ReplicationController
metadata:
  creationTimestamp: null
  generation: 1
  labels:
    name: test-rc
  name: test-rc
  namespace: default
spec:
  replicas: 2
  selector:
    name: test-pods
  template:
    metadata:
      creationTimestamp: null
      labels:
        name: test-pods
    spec:
      containers:
      - image: bmeng/hello-openshift
        imagePullPolicy: Always
        name: test-pod
        resources:
          limits:
            cpu: 200m
            memory: 512Mi
        terminationMessagePath: /dev/termination-log
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      securityContext: {}
      terminationGracePeriodSeconds: 30
status:
  replicas: 0

Comment 7 errata-xmlrpc 2017-01-18 12:44:43 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-2017:0066


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