Bug 1029621

Summary: Duplicated text in quota warning message
Product: OKD Reporter: Fabiano Franz <ffranz>
Component: PodAssignee: Lili Nader <lnader>
Status: CLOSED WONTFIX QA Contact: libra bugs <libra-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.xCC: lnader, mfisher
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-12 21:38:46 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 Fabiano Franz 2013-11-12 18:29:17 UTC
Description of problem: when adding a cartridge to a non-scalable app that is reaching quota limits broker sends a duplicated (with different values) message, like:

Warning gear 52826c0c309c98e2b1000005 is using 93.0% of disk quota
Warning gear 52826c0c309c98e2b1000005 is using 97.1% of disk quota

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

How reproducible: always

Steps to Reproduce:
1. rhc create-app foo php-5 --no-git --no-dns
2. rhc ssh foo
3. dd if=/dev/zero of=~/app-root/data/testfile bs=1M count=950
4. exit
5. curl -k --user user:pass https://host/broker/rest/application/<id>/cartridges -X POST --data "name=mysql-5.1"

Actual results:

    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "warning",
      "text": "Warning gear 52826c0c309c98e2b1000005 is using 93.0% of disk quota\nWarning gear 52826c0c309c98e2b1000005 is using 97.1% of disk quota\n"
    },

Expected results:

Message should not be duplicated.

Additional info:

Comment 1 Lili Nader 2013-11-12 21:38:46 UTC
The broker accumulates warning messages from the node at every step and sends it back to the client

First message is from running the configure hook

Warning gear 52826c0c309c98e2b1000005 is using 93.0% of disk quota

Second is from running the post-configure hook

Warning gear 52826c0c309c98e2b1000005 is using 97.1% of disk quota

Obviously the disk usage has gone up since mysql was added.  

The broker has no way of knowing that both of these warning messages are about the same issue so it cannot omit any of the warning messages.