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
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
https://github.com/openshift/origin/pull/11694
This has been merged into ose and is in OSE v3.4.0.23 or newer.
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
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