failed when create audit zone_migration

Bug #1746191 reported by licanwei
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
watcher
Fix Released
Undecided
licanwei

Bug Description

stack@ubuntudbs:/home/code/devstack$ openstack optimize audittemplate create at2 hardware_maintenance --strategy zone_migration
+-------------+--------------------------------------+
| Field | Value |
+-------------+--------------------------------------+
| UUID | 0c46307c-72aa-4e28-920a-87feccf9595e |
| Created At | 2018-01-30T06:49:11.058320+00:00 |
| Updated At | None |
| Deleted At | None |
| Description | None |
| Name | at2 |
| Goal | hardware_maintenance |
| Strategy | zone_migration |
| Audit Scope | [] |
+-------------+--------------------------------------+

stack@ubuntudbs:/home/code/devstack$ openstack optimize audit create -a at2 -p compute_nodes='[{"src_node": "s01", "dst_node": "d01"}]'
+---------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+---------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| UUID | 573a5b7c-6667-4f97-bd0f-b5dc4f52a666 |
| Name | zone_migration-2018-01-30T07:03:51.167231 |
| Created At | 2018-01-30T07:03:51.197688+00:00 |
| Updated At | None |
| Deleted At | None |
| State | PENDING |
| Audit Type | ONESHOT |
| Parameters | {u'compute_nodes': [{u'dst_node': u'd01', u'src_node': u's01'}], u'parallel_total': 6, u'parallel_per_pool': 2, u'with_attached_volume': False, u'parallel_per_node': 2} |
| Interval | None |
| Goal | hardware_maintenance |
| Strategy | zone_migration |
| Audit Scope | [] |
| Auto Trigger | False |
| Next Run Time | None |
+---------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

 2018-01-29 23:03:51.673 ERROR watcher.decision_engine.audit.base [req-ec56dbed-2270-4005-90a8-8d5d825d6d38 None None] 'ZoneMigration' object has no attribute 'audit': AttributeError: 'ZoneMigration' object has no attribute 'audit'
 2018-01-29 23:03:51.673 TRACE watcher.decision_engine.audit.base Traceback (most recent call last):
 2018-01-29 23:03:51.673 TRACE watcher.decision_engine.audit.base File "/home/code/watcher/watcher/decision_engine/audit/base.py", line 128, in execute
 2018-01-29 23:03:51.673 TRACE watcher.decision_engine.audit.base solution = self.do_execute(audit, request_context)
 2018-01-29 23:03:51.673 TRACE watcher.decision_engine.audit.base File "/home/code/watcher/watcher/decision_engine/audit/oneshot.py", line 26, in do_execute
 2018-01-29 23:03:51.673 TRACE watcher.decision_engine.audit.base audit, request_context)
 2018-01-29 23:03:51.673 TRACE watcher.decision_engine.audit.base File "/home/code/watcher/watcher/decision_engine/strategy/context/base.py", line 45, in execute_strategy
 2018-01-29 23:03:51.673 TRACE watcher.decision_engine.audit.base solution = self.do_execute_strategy(audit, request_context)
 2018-01-29 23:03:51.673 TRACE watcher.decision_engine.audit.base File "/home/code/watcher/watcher/decision_engine/strategy/context/default.py", line 68, in do_execute_strategy
 2018-01-29 23:03:51.673 TRACE watcher.decision_engine.audit.base return selected_strategy.execute()
 2018-01-29 23:03:51.673 TRACE watcher.decision_engine.audit.base File "/home/code/watcher/watcher/decision_engine/strategy/strategies/base.py", line 227, in execute
 2018-01-29 23:03:51.673 TRACE watcher.decision_engine.audit.base self.pre_execute()
 2018-01-29 23:03:51.673 TRACE watcher.decision_engine.audit.base File "/home/code/watcher/watcher/decision_engine/strategy/strategies/zone_migration.py", line 273, in pre_execute
 2018-01-29 23:03:51.673 TRACE watcher.decision_engine.audit.base if len(self.get_available_storage_nodes()) == 0:
 2018-01-29 23:03:51.673 TRACE watcher.decision_engine.audit.base File "/home/code/watcher/watcher/decision_engine/strategy/strategies/zone_migration.py", line 259, in get_available_storage_nodes
 2018-01-29 23:03:51.673 TRACE watcher.decision_engine.audit.base self.storage_model.get_all_storage_nodes().items()
 2018-01-29 23:03:51.673 TRACE watcher.decision_engine.audit.base File "/home/code/watcher/watcher/decision_engine/strategy/strategies/base.py", line 275, in storage_model
 2018-01-29 23:03:51.673 TRACE watcher.decision_engine.audit.base audit_scope=self.audit.scope)
 2018-01-29 23:03:51.673 TRACE watcher.decision_engine.audit.base AttributeError: 'ZoneMigration' object has no attribute 'audit'
 2018-01-29 23:03:51.673 TRACE watcher.decision_engine.audit.base

licanwei (li-canwei2)
Changed in watcher:
assignee: nobody → licanwei (li-canwei2)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to watcher (master)

Fix proposed to branch: master
Review: https://review.openstack.org/539142

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.openstack.org/539142
Committed: https://git.openstack.org/cgit/openstack/watcher/commit/?id=f24744c91015e580d9dac0bbffc8b61cacfe3e6f
Submitter: Zuul
Branch: master

commit f24744c91015e580d9dac0bbffc8b61cacfe3e6f
Author: licanwei <email address hidden>
Date: Tue Jan 30 00:32:19 2018 -0800

    Fixed AttributeError in storage_model

    self.audit.scope should be self.audit_scope

    Closes-Bug: #1746191

    Change-Id: I0cce165a2bc1afd4c9e09c51e4d3250ee70d3705

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

This issue was fixed in the openstack/watcher 1.8.0 release.

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.