Bug 1055647 - rhcsh quota check incorrect
Summary: rhcsh quota check incorrect
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Jhon Honce
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-20 16:55 UTC by Jhon Honce
Modified: 2015-05-14 23:33 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-30 00:56:39 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Jhon Honce 2014-01-20 16:55:53 UTC
Description of problem:
rhcsh quota check doesn't use arithmetic comparison

Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
1. Create gear
2. ssh into gear
3.

Actual results:
Message if quota exceeds 9%

Expected results:
Message if quota exceeds 90.0%

Additional info:

Comment 1 openshift-github-bot 2014-01-21 00:12:43 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/e0876024e55b7439af201682b50e2f426bd3d2b6
Bug 1055647 - rhcsh quota check incorrect

Comment 2 chunchen 2014-01-21 03:01:28 UTC
It's fixed, verified on devenv_4247, please refer to the following results:

1. Create gear
$ rhc app create cews20 jbossews-2.0 --no-git
2. ssh into gear
$ rhc ssh cews20
Connecting to 52dde1bbe8baadd155000007@cews20-cdm.dev.rhcloud.com ...

    *********************************************************************

    You are accessing a service that is for use only by authorized users.  
    If you do not have authorization, discontinue use at once. 
    Any use of the services is subject to the applicable terms of the 
    agreement which can be found at: 
    https://www.openshift.com/legal

    *********************************************************************

    Welcome to OpenShift shell

    This shell will assist you in managing OpenShift applications.

    !!! IMPORTANT !!! IMPORTANT !!! IMPORTANT !!!
    Shell access is quite powerful and it is possible for you to
    accidentally damage your application.  Proceed with care!
    If worse comes to worst, destroy your application with "rhc app delete"
    and recreate it
    !!! IMPORTANT !!! IMPORTANT !!! IMPORTANT !!!

    Type "help" for more info.


[cews20-cdm.dev.rhcloud.com 52dde1bbe8baadd155000007]\>

Comment 3 chunchen 2014-01-21 03:53:18 UTC
Please refer to more situations testing results:

1. Make quota is between 9% and 90%
1) Create an app
$ rhc app create cews20 jbossews-2.0 --no-git
2) SSH into app and write some data to make quota between 9% and 90%
rhc ssh cews20;
cd app-root/data;
dd if=/dev/zero of=300M.txt bs=1M count=300
3) SSH into app again and found there are not the messages
$ rhc ssh cews20
Connecting to 52dde1bbe8baadd155000007@cews20-cdm.dev.rhcloud.com ...

    *********************************************************************

    You are accessing a service that is for use only by authorized users.  
    If you do not have authorization, discontinue use at once. 
    Any use of the services is subject to the applicable terms of the 
    agreement which can be found at: 
    https://www.openshift.com/legal

    *********************************************************************

    Welcome to OpenShift shell

    This shell will assist you in managing OpenShift applications.

    !!! IMPORTANT !!! IMPORTANT !!! IMPORTANT !!!
    Shell access is quite powerful and it is possible for you to
    accidentally damage your application.  Proceed with care!
    If worse comes to worst, destroy your application with "rhc app delete"
    and recreate it
    !!! IMPORTANT !!! IMPORTANT !!! IMPORTANT !!!

    Type "help" for more info.


[cews20-cdm.dev.rhcloud.com 52dde1bbe8baadd155000007]\>

2. Make quota  exceeds 90.0%
1) Create an app
$ rhc app create cews20 jbossews-2.0 --no-git
2) SSH into app and write some data to make quota exceeds 90.0%
rhc ssh cews20;
cd app-root/data;
dd if=/dev/zero of=1000M.txt bs=1M count=1000
3) SSH into app again and found there show the messages
$ rhc ssh cews20
Connecting to 52dde1bbe8baadd155000007@cews20-cdm.dev.rhcloud.com ...

    *********************************************************************

    You are accessing a service that is for use only by authorized users.  
    If you do not have authorization, discontinue use at once. 
    Any use of the services is subject to the applicable terms of the 
    agreement which can be found at: 
    https://www.openshift.com/legal

    *********************************************************************

    Welcome to OpenShift shell

    This shell will assist you in managing OpenShift applications.

    !!! IMPORTANT !!! IMPORTANT !!! IMPORTANT !!!
    Shell access is quite powerful and it is possible for you to
    accidentally damage your application.  Proceed with care!
    If worse comes to worst, destroy your application with "rhc app delete"
    and recreate it
    !!! IMPORTANT !!! IMPORTANT !!! IMPORTANT !!!

    Type "help" for more info.


Warning: Gear 52dde1bbe8baadd155000007 is using 97.9% of disk quota
[cews20-cdm.dev.rhcloud.com 52dde1bbe8baadd155000007]\>

3. Make quota is 9.x%
1) Create an app
$ rhc app create cews20 jbossews-2.0 --no-git
2) SSH into app and write some data to make quota is 9.x%
rhc ssh cews20;
cd app-root/data;
dd if=/dev/zero of=93M.txt bs=1M count=93
3) SSH into app again and found there are not the messages
$ rhc ssh cews20
Connecting to 52dde1bbe8baadd155000007@cews20-cdm.dev.rhcloud.com ...

    *********************************************************************

    You are accessing a service that is for use only by authorized users.  
    If you do not have authorization, discontinue use at once. 
    Any use of the services is subject to the applicable terms of the 
    agreement which can be found at: 
    https://www.openshift.com/legal

    *********************************************************************

    Welcome to OpenShift shell

    This shell will assist you in managing OpenShift applications.

    !!! IMPORTANT !!! IMPORTANT !!! IMPORTANT !!!
    Shell access is quite powerful and it is possible for you to
    accidentally damage your application.  Proceed with care!
    If worse comes to worst, destroy your application with "rhc app delete"
    and recreate it
    !!! IMPORTANT !!! IMPORTANT !!! IMPORTANT !!!

    Type "help" for more info.


[cews20-cdm.dev.rhcloud.com 52dde1bbe8baadd155000007]\>


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