watcher strategy workload_stabilization cannot print log normally

Bug #1874416 reported by Min Li
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
watcher
Fix Released
Low
Dantali0n

Bug Description

When I use watcher strategy workload_stabilization,there exists an error:

Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/__init__.py", line 868, in emit
    msg = self.format(record)
  File "/usr/local/lib/python2.7/dist-packages/oslo_log/handlers.py", line 173, in format
    return logging.StreamHandler.format(self, record) + record.reset_color
  File "/usr/lib/python2.7/logging/__init__.py", line 741, in format
    return fmt.format(record)
  File "/usr/local/lib/python2.7/dist-packages/oslo_log/formatters.py", line 517, in format
    return logging.Formatter.format(self, record)
  File "/usr/lib/python2.7/logging/__init__.py", line 465, in format
    record.message = record.getMessage()
  File "/usr/lib/python2.7/logging/__init__.py", line 329, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Logged from file workload_stabilization.py, line 459

After analyzing the source code, I think the error location is:
https://opendev.org/openstack/watcher/src/branch/stable/rocky/watcher/decision_engine/strategy/strategies/workload_stabilization.py#L445
https://opendev.org/openstack/watcher/src/branch/stable/rocky/watcher/decision_engine/strategy/strategies/workload_stabilization.py#L448

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to watcher (stable/rocky)

Related fix proposed to branch: stable/rocky
Review: https://review.opendev.org/722628

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Related fix proposed to branch: stable/rocky
Review: https://review.opendev.org/726877

Dantali0n (dantalion)
Changed in watcher:
status: New → In Progress
assignee: nobody → Dantali0n (dantalion)
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to watcher (stable/rocky)

Reviewed: https://review.opendev.org/726877
Committed: https://git.openstack.org/cgit/openstack/watcher/commit/?id=4c56eba5be5f4dd196b90a427704b470aa9795dd
Submitter: Zuul
Branch: stable/rocky

commit 4c56eba5be5f4dd196b90a427704b470aa9795dd
Author: Alexander Chadin <email address hidden>
Date: Fri Jul 20 13:33:35 2018 +0300

    Improve logs of Workload Stabilization strategy

    This patch set refactors logs of workload stabilization
    strategy to make them more readable and sensible.

    Related-Bug: #1874416
    Change-Id: I408988712bb7560728157f3b4e4f2b37572128c4

tags: added: in-stable-rocky
Dantali0n (dantalion)
Changed in watcher:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on watcher (stable/rocky)

Change abandoned by Min Li (<email address hidden>) on branch: stable/rocky
Review: https://review.opendev.org/722628

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.