Bug 1197123
Summary: | Error reported while adding storage to gear should be informative to the user | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Jaspreet Kaur <jkaur> |
Component: | Node | Assignee: | Timothy Williams <tiwillia> |
Status: | CLOSED ERRATA | QA Contact: | Ma xiaoqiang <xiama> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 2.2.0 | CC: | adellape, aos-bugs, jialiu, jokerman, mmccomas, tiwillia, xiama, xtian |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | rubygem-openshift-origin-controller-1.37.3.1-1.el6op | Doc Type: | Bug Fix |
Doc Text: |
When the base gear file storage limits (quota_blocks) were less than 1048576, converting this value to gigabytes previously returned 0. Calculating the total file limit from every gear in the application included dividing by the base gear file storage limits in GB, which when 0 caused a "divide by 0" error to be returned. This bug fix updates the behavior to round up all base gear file storage (quota_blocks) values to 1GB if they are less than 1GB. As a result, the base total file storage limit for an application can now be reported without error when storage limits are less than 1048576. Note that because we round up when the quota_blocks value is less than 1048576, storage values may be inaccurate for some applications.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2015-09-30 16:36:33 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
Jaspreet Kaur
2015-02-27 14:37:03 UTC
The issue here isn't just the error reported, but what caused the error. Because we treat quota_blocks as an integer, the base storage is returned as 0 if quota_blocks is set to anything less than 1048576. This affects other parts of openshift, such as just listing cartridge storage: # rhc cartridge-storage -a storagetest2 RESULT: Ruby 1.9 -------- Base Gear Storage: None <-- 0 base storage Additional Gear Storage: None We definitely expect to be able to add storage to gears with less than 1GB of base storage. Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/a4b1b076947fdd3e8434411c01b13f4895b7af9e Round up if base filesystem quota is less than 1Gb Bug 1197123 https://bugzilla.redhat.com/show_bug.cgi?id=1197123 When a node profile specifies a 'quota_blocks' value less than 1Gb (1048576), round up to 1Gb rather than returning 0. This will inaccurately report base storage as 1Gb when it may be much less, but will avoid reporting that a gear has 0 base storage. Check on puddle [2.2.7/2015-09-17.1] #rhc app create quotacheck php-5.3 #rhc cartridge storage -a quotacheck -c php-5.3 --add 1GB Set storage on cartridge ... Unable to complete the requested operation due to: divided by 0 Reference ID: f4f898807ffc31fe31192b09f164359c [root@broker ~]# rpm -qa|grep rubygem-openshift-origin-controller rubygem-openshift-origin-controller-1.36.2.3-1.el6op.noarch Check on puddle [2.2.7/2015-09-22.1] 1. Set node quota_blocks to 524000. and restart the ruby193-mcollective service 2. create an app rhc app create quotacheck php-5.3 3. add storage to the app rhc cartridge storage -a quotacheck -c php-5.3 --add 1GB Set storage on cartridge ... set to 1GB Storage Info ------------ Base Gear Storage: 1GB Additional Gear Storage: 1GB 4. list the storage rhc cartridge-storage -a quotacheck RESULT: PHP 5.3 ------- Base Gear Storage: 1GB Additional Gear Storage: 1GB 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://rhn.redhat.com/errata/RHSA-2015-1844.html |