Invalid parameter for aggregate with workload_stabilization

Bug #1836195 reported by Dantali0n
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
watcher
Fix Released
Medium
Dantali0n

Bug Description

Backwards compatibility for aggregate type in workload_stabilization overrides the desired value. Even if the aggregate for 'node' is unset the value will override the aggregate value for 'compute_node'.

Dantali0n (dantalion)
Changed in watcher:
milestone: none → train-3
assignee: nobody → Dantali0n (dantalion)
importance: Undecided → Medium
Revision history for this message
Dantali0n (dantalion) wrote :

aggregate has to be of type AGGREGATES: InvalidParameter: aggregate has to be of type AGGREGATES
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/watcher/decision_engine/audit/base.py", line 142, in execute
    solution = self.do_execute(audit, request_context)
  File "/usr/lib/python2.7/site-packages/watcher/decision_engine/audit/base.py", line 83, in do_execute
    audit, request_context)
  File "/usr/lib/python2.7/site-packages/watcher/decision_engine/strategy/context/base.py", line 45, in execute_strategy
    solution = self.do_execute_strategy(audit, request_context)
  File "/usr/lib/python2.7/site-packages/watcher/decision_engine/strategy/context/default.py", line 68, in do_execute_st
rategy
    return selected_strategy.execute()
  File "/usr/lib/python2.7/site-packages/watcher/decision_engine/strategy/strategies/base.py", line 266, in execute
    self.do_execute()
  File "/usr/lib/python2.7/site-packages/watcher/decision_engine/strategy/strategies/workload_stabilization.py", line 526, in do_execute
    migration = self.check_threshold()
  File "/usr/lib/python2.7/site-packages/watcher/decision_engine/strategy/strategies/workload_stabilization.py",[0/1084]1, in check_threshold
    hosts_load = self.get_hosts_load()
  File "/usr/lib/python2.7/site-packages/watcher/decision_engine/strategy/strategies/workload_stabilization.py", line 32
0, in get_hosts_load
    self.aggregation_method['compute_node'], self.granularity)
  File "/usr/lib/python2.7/site-packages/watcher/datasources/grafana.py", line 171, in statistic_aggregation
    translator = self._get_translator(translator_name, data)
  File "/usr/lib/python2.7/site-packages/watcher/datasources/grafana.py", line 123, in _get_translator
    return influxdb.InfluxDBGrafanaTranslator(data)
  File "/usr/lib/python2.7/site-packages/watcher/datasources/grafana_translator/influxdb.py", line 36, in __init__
    super(InfluxDBGrafanaTranslator, self).__init__(data)
  File "/usr/lib/python2.7/site-packages/watcher/datasources/grafana_translator/base.py", line 60, in __init__
    self._validate_data()
  File "/usr/lib/python2.7/site-packages/watcher/datasources/grafana_translator/base.py", line 94, in _validate_data
    if reference_data['aggregate'] not in self.AGGREGATES:
InvalidParameter: aggregate has to be of type AGGREGATES

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to watcher (master)

Fix proposed to branch: master
Review: https://review.opendev.org/670301

Changed in watcher:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to watcher (master)

Reviewed: https://review.opendev.org/670301
Committed: https://git.openstack.org/cgit/openstack/watcher/commit/?id=80e8d0002a0690f5eb52cb105ddea9955f5138bb
Submitter: Zuul
Branch: master

commit 80e8d0002a0690f5eb52cb105ddea9955f5138bb
Author: Dantali0n <email address hidden>
Date: Thu Jul 11 14:54:04 2019 +0200

    Resolve aggregate error in workload_stabilization

    This error is caused because the condition "is not '':" is not always
    true. Sometimes self.aggregation_method['node'] is u'' instead of ''.
    This patch ensures that in both cases the behavior is the same.

    Change-Id: I7453678cc76892ebeacca23c3501a10a08725d1d
    Closes-bug: #1836195

Changed in watcher:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/watcher 3.0.0.0rc1

This issue was fixed in the openstack/watcher 3.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.