Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1511289

Summary: Adding negative value to resource quota yaml file while Setting Limits for Users and Projects.
Product: OpenShift Container Platform Reporter: kavitha <kavithanidi>
Component: ocAssignee: Fabiano Franz <ffranz>
Status: CLOSED WORKSFORME QA Contact: Xingxing Xia <xxia>
Severity: low Docs Contact:
Priority: medium    
Version: 3.6.0CC: aos-bugs, jokerman, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-10 02:42:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description kavitha 2017-11-09 05:32:09 UTC
Description of problem:
Adding negative value to resource quota yaml file while Setting Limits for Users and Projects: while creating quota where persistent volume claim given with negative values 
I could execute the command successfully without any error.

Version-Release number of selected component (if applicable):
atomic-openshift-utils-3.6.173.0.48-1.git.0.1609d30.el7.noarch

How reproducible:
resource-quota.yaml

apiVersion: v1
kind: ResourceQuota
metadata:
  name: core-object-counts
spec:
  hard:
    configmaps: "10"
    persistentvolumeclaims: "-4"
    replicationcontrollers: "20"
    secrets: "10"
    services: "10"


Steps to Reproduce:
1.login to Openshift CLI 
2.oc create -f resource-quota.yaml


Actual results:
It is successfully executing and creating quota.

Expected results:
It should throw the error after detecting the negative value

Additional info:

Comment 1 kavitha 2017-11-09 05:48:35 UTC
*** Bug 1511291 has been marked as a duplicate of this bug. ***

Comment 2 kavitha 2017-11-09 05:49:20 UTC
*** Bug 1511290 has been marked as a duplicate of this bug. ***

Comment 3 Xingxing Xia 2017-11-09 06:11:57 UTC
Thanks, but it is not reproduced in both try of oc/OCP v3.6.173.0.65 and oc/OCP v3.7.0-0.198.0, which both work and give prompt well:
$ oc create -f resource-quota.yaml --config path/to/admin.kubeconfig -n my-proj
The ResourceQuota "core-object-counts" is invalid: spec.hard[persistentvolumeclaims]: Invalid value: "-4": must be greater than or equal to 0

Hmm, what makes 1511291 1511290 submitted concurrently?

Comment 4 Fabiano Franz 2017-11-09 19:03:29 UTC
Unable to reproduce.

Comment 5 Xingxing Xia 2017-11-10 02:42:19 UTC
Per above commented results, it works for us, closing it. Thank you all