Bug 1033567

Summary: alarm-threshold-update cannot update generic alarm attributes
Product: Red Hat OpenStack Reporter: Eoghan Glynn <eglynn>
Component: python-ceilometerclientAssignee: Eoghan Glynn <eglynn>
Status: CLOSED ERRATA QA Contact: Kevin Whitney <kwhitney>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: breeler, ddomingo, eglynn, hateya, jruzicka, srevivo, yeylon
Target Milestone: rcKeywords: OtherQA
Target Release: 4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-ceilometerclient-1.0.7-1.el6ost Doc Type: Bug Fix
Doc Text:
The alarm-threshold-update command incorrectly expected optional threshold_rule fields to always be present. As a result, any valid alarm-threshold-update commands that did not include these optional fields failed. With this fix, alarm-threshold-update now treats threshold_rule parameters as optional. This ensures that alarm-threshold-update can now update alarm attributes unrelated to threshold_rule.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-20 00:38:42 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:

Description Eoghan Glynn 2013-11-22 12:01:22 UTC
Description of problem:

Generic (i.e. non-threshold-related) alarm attributes cannot be updated with the alarm-threshold-update command, for example:

  $ ceilometer --debug alarm-threshold-update -a $ALARM_ID --repeat-actions True
  INFO (connectionpool:176) Starting new HTTP connection (1): 192.168.122.73
  DEBUG (connectionpool:344) "POST /v2.0/tokens HTTP/1.1" 200 9905
  'threshold_rule'

The non-update is not properly reported, i.e. the failure is semi-silent.


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

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

python-ceilometerclient-1.0.6-1.el6ost.noarch


How reproducible:

100%


Steps to Reproduce:
1. Create a new alarm:

   $ ceilometer alarm-threshold-create --name cpu_high --description 'instance running hot'  \
   --meter-name cpu_util  --threshold 70.0 \
   --comparison-operator gt  --statistic avg \
   --period 600 --evaluation-periods 3 \
   --alarm-action 'log://' \
   --query resource_id=INSTANCE_ID --repeat-actions True

2. Attempt to update some generic alarm attribute:

  $ ceilometer alarm-threshold-update -a $ALARM_ID --repeat-actions False

3. Note the attribute is not updated:

  $ ceilometer alarm-threshold-show -a $ALARM_ID | grep repeat
  
   

Actual results:

Attempt to update alarm attribute fails semi-silently.


Expected results:

Alarm attribute should be updated.

Comment 1 Eoghan Glynn 2013-11-22 12:04:15 UTC
Fix proposed upstream:

  https://review.openstack.org/57903

Comment 3 Eoghan Glynn 2013-11-29 13:30:04 UTC
Fix landed upstream:

  http://github.com/openstack/python-ceilometerclient/commit/08b476d2

Comment 4 Eoghan Glynn 2013-11-29 13:30:40 UTC
Fix included in upstream python-ceilometerclient 1.0.7 release:

  https://pypi.python.org/pypi/python-ceilometerclient/1.0.7

Comment 9 errata-xmlrpc 2013-12-20 00:38:42 UTC
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.

http://rhn.redhat.com/errata/RHEA-2013-1859.html