Merge lp:~andreserl/maas/lp1594991 into lp:maas/trunk

Proposed by Andres Rodriguez on 2016-07-13
Status: Merged
Approved by: Andres Rodriguez on 2016-07-13
Approved revision: 5174
Merged at revision: 5175
Proposed branch: lp:~andreserl/maas/lp1594991
Merge into: lp:maas/trunk
Diff against target: 46 lines (+7/-2)
3 files modified
src/provisioningserver/events.py (+5/-0)
src/provisioningserver/power/query.py (+1/-1)
src/provisioningserver/power/tests/test_query.py (+1/-1)
To merge this branch: bzr merge lp:~andreserl/maas/lp1594991
Reviewer Review Type Date Requested Status
Newell Jensen 2016-07-13 Approve on 2016-07-13
Review via email: mp+299994@code.launchpad.net

Commit message

Fix LP: #1594991 to ensure that power query logs (every 5 minutes) are displayed as DEBUG rather than INFO

To post a comment you must log in.
Newell Jensen (newell-jensen) wrote :

Approved. Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/provisioningserver/events.py'
2--- src/provisioningserver/events.py 2016-06-10 17:58:21 +0000
3+++ src/provisioningserver/events.py 2016-07-13 19:13:52 +0000
4@@ -53,6 +53,7 @@
5 NODE_POWER_ON_FAILED = 'NODE_POWER_ON_FAILED'
6 NODE_POWER_OFF_FAILED = 'NODE_POWER_OFF_FAILED'
7 NODE_POWER_QUERIED = 'NODE_POWER_QUERIED'
8+ NODE_POWER_QUERIED_DEBUG = 'NODE_POWER_QUERIED_DEBUG'
9 NODE_POWER_QUERY_FAILED = 'NODE_POWER_QUERY_FAILED'
10 # PXE request event.
11 NODE_PXE_REQUEST = 'NODE_PXE_REQUEST'
12@@ -118,6 +119,10 @@
13 description="Queried node's BMC",
14 level=INFO,
15 ),
16+ EVENT_TYPES.NODE_POWER_QUERIED_DEBUG: EventDetail(
17+ description="Queried node's BMC",
18+ level=DEBUG,
19+ ),
20 EVENT_TYPES.NODE_POWER_QUERY_FAILED: EventDetail(
21 description="Failed to query node's BMC",
22 level=WARN,
23
24=== modified file 'src/provisioningserver/power/query.py'
25--- src/provisioningserver/power/query.py 2016-04-29 22:12:18 +0000
26+++ src/provisioningserver/power/query.py 2016-07-13 19:13:52 +0000
27@@ -103,7 +103,7 @@
28 message = "Power state queried: %s" % state
29 yield power.power_state_update(system_id, state)
30 yield send_event_node(
31- EVENT_TYPES.NODE_POWER_QUERIED,
32+ EVENT_TYPES.NODE_POWER_QUERIED_DEBUG,
33 system_id, hostname, message)
34
35
36
37=== modified file 'src/provisioningserver/power/tests/test_query.py'
38--- src/provisioningserver/power/tests/test_query.py 2016-05-12 19:07:37 +0000
39+++ src/provisioningserver/power/tests/test_query.py 2016-07-13 19:13:52 +0000
40@@ -104,7 +104,7 @@
41 self.assertThat(
42 protocol.SendEvent,
43 MockCalledOnceWith(
44- ANY, type_name=EVENT_TYPES.NODE_POWER_QUERIED,
45+ ANY, type_name=EVENT_TYPES.NODE_POWER_QUERIED_DEBUG,
46 system_id=system_id, description=message))
47
48