Decision engine logs an error if scope is None
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| watcher |
Undecided
|
licanwei |
Bug Description
I use Train version of OpenStack (and train version of watcher as well).
The error is logged not only when I issue command `watcher strategy state <strategy_name>` but also in other time when watcher tries to compute cluster data model.
Here is log attached.
2020-04-28 17:55:38.746 7 DEBUG watcher.
2020-04-28 17:55:38.748 7 ERROR watcher.
2020-04-28 17:55:38.748 7 ERROR watcher.
2020-04-28 17:55:38.748 7 ERROR watcher.
2020-04-28 17:55:38.748 7 ERROR watcher.
2020-04-28 17:55:38.748 7 ERROR watcher.
2020-04-28 17:55:38.748 7 ERROR watcher.
2020-04-28 17:55:38.748 7 ERROR watcher.
2020-04-28 17:55:38.748 7 ERROR watcher.
2020-04-28 17:55:38.748 7 ERROR watcher.
2020-04-28 17:55:38.748 7 ERROR watcher.
2020-04-28 17:55:38.748 7 ERROR watcher.
2020-04-28 17:55:38.748 7 ERROR watcher.
2020-04-28 17:55:38.748 7 ERROR watcher.
2020-04-28 17:55:38.748 7 ERROR watcher.
2020-04-28 17:55:38.748 7 ERROR watcher.
2020-04-28 17:55:38.748 7 ERROR watcher.
The following helped me:
https:/
Changed this line from `self._audit_scope = None` to `self._audit_scope = []`
Or little if here https:/
and on other places (for example https:/
summary: |
- Decision engine logs an error is scope is None + Decision engine logs an error if scope is None |
Changed in watcher: | |
assignee: | nobody → licanwei (li-canwei2) |
Alexandra Nyitraiova (saskan) wrote : | #2 |
Since I am new to Watcher, and I do not have Watcher's GUI available in my environment, I would like to ask, how do I set up a scope in command line for command `watcher strategy state`? Command `watcher strategy state --help` did not suggest any suitable flag to pass scope. Are there actions which are only available through Watcher's GUI and not through CLI?
licanwei (li-canwei2) wrote : | #3 |
Scope is related to audit, you can run command 'watcher audittemplate create' to create a audit template with scope, such as 'watcher audittemplate create at1 dummy --scope /path/jsaonfile', you can get more help through 'watcher help audittemplate create'.
btw, Watcher don't create data model until audit is created after bp https:/
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: master
commit 9f0138e1cf4bb22
Author: licanwei <email address hidden>
Date: Sat Jun 6 11:02:23 2020 +0800
Check if scope is None
if scope is None, don't create data model
Change-Id: Icf611966c9b0a3
Closed-Bug: #1881920
Fix proposed to branch: stable/ussuri
Review: https:/
Fix proposed to branch: stable/train
Review: https:/
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: stable/train
commit 8ef9d14a548a6cc
Author: licanwei <email address hidden>
Date: Sat Jun 6 11:02:23 2020 +0800
Check if scope is None
if scope is None, don't create data model
Change-Id: Icf611966c9b0a3
Closed-Bug: #1881920
(cherry picked from commit 9f0138e1cf4bb22
tags: | added: in-stable-train |
tags: | added: in-stable-ussuri |
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: stable/ussuri
commit cbb06e6765a7129
Author: licanwei <email address hidden>
Date: Sat Jun 6 11:02:23 2020 +0800
Check if scope is None
if scope is None, don't create data model
Change-Id: Icf611966c9b0a3
Closed-Bug: #1881920
(cherry picked from commit 9f0138e1cf4bb22
Fix proposed to branch: master /review. opendev. org/733938
Review: https:/