Merge lp:~andreserl/maas/lp1594991_2.0 into lp:maas/2.0

Proposed by Andres Rodriguez on 2016-07-13
Status: Merged
Approved by: Andres Rodriguez on 2016-07-13
Approved revision: 5158
Merged at revision: 5158
Proposed branch: lp:~andreserl/maas/lp1594991_2.0
Merge into: lp:maas/2.0
Diff against target: 66 lines (+12/-2)
4 files modified
docs/changelog.rst (+5/-0)
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_2.0
Reviewer Review Type Date Requested Status
Andres Rodriguez Approve on 2016-07-13
Review via email: mp+299995@code.launchpad.net

Commit message

Backport trunk rev5175 : 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.
Andres Rodriguez (andreserl) wrote :
review: Approve
lp:~andreserl/maas/lp1594991_2.0 updated on 2016-07-13
5157. By Gavin Panella on 2016-07-13

[r=andreserl][bug=1557434][author=allenap] Backport r5173 from trunk: For the MAAS CLI, mimic the error behaviour provided by argparse 1.1 on PyPI.

This differs substantially from the argparse 1.1 found in the standard library. This branch also forces the development environment to use argparse as found in the standard library instead of the one pulled in by unittest2.

5158. By Andres Rodriguez on 2016-07-13

Update to include changelog

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'docs/changelog.rst'
2--- docs/changelog.rst 2016-07-13 18:47:45 +0000
3+++ docs/changelog.rst 2016-07-13 22:03:36 +0000
4@@ -11,10 +11,15 @@
5
6 LP: #1557434 For the MAAS CLI, mimic the error behaviour provided by argparse 1.1 on PyPI when insufficient arguments are given.
7
8+LP: #1594991 MAAS displays every power query on the summarized view of node event log.
9+
10
11 2.0.0 (rc2)
12 ===========
13
14+Issues fixed in this release
15+----------------------------
16+
17 LP: #1582070 Pick up wrong grub.cfg if another filesystem exists
18
19 LP: #1599223 [2.0] confusing reverse DNS lookups because MAAS creates multiple PTR records
20
21=== modified file 'src/provisioningserver/events.py'
22--- src/provisioningserver/events.py 2016-06-10 17:58:21 +0000
23+++ src/provisioningserver/events.py 2016-07-13 22:03:36 +0000
24@@ -53,6 +53,7 @@
25 NODE_POWER_ON_FAILED = 'NODE_POWER_ON_FAILED'
26 NODE_POWER_OFF_FAILED = 'NODE_POWER_OFF_FAILED'
27 NODE_POWER_QUERIED = 'NODE_POWER_QUERIED'
28+ NODE_POWER_QUERIED_DEBUG = 'NODE_POWER_QUERIED_DEBUG'
29 NODE_POWER_QUERY_FAILED = 'NODE_POWER_QUERY_FAILED'
30 # PXE request event.
31 NODE_PXE_REQUEST = 'NODE_PXE_REQUEST'
32@@ -118,6 +119,10 @@
33 description="Queried node's BMC",
34 level=INFO,
35 ),
36+ EVENT_TYPES.NODE_POWER_QUERIED_DEBUG: EventDetail(
37+ description="Queried node's BMC",
38+ level=DEBUG,
39+ ),
40 EVENT_TYPES.NODE_POWER_QUERY_FAILED: EventDetail(
41 description="Failed to query node's BMC",
42 level=WARN,
43
44=== modified file 'src/provisioningserver/power/query.py'
45--- src/provisioningserver/power/query.py 2016-04-29 22:12:18 +0000
46+++ src/provisioningserver/power/query.py 2016-07-13 22:03:36 +0000
47@@ -103,7 +103,7 @@
48 message = "Power state queried: %s" % state
49 yield power.power_state_update(system_id, state)
50 yield send_event_node(
51- EVENT_TYPES.NODE_POWER_QUERIED,
52+ EVENT_TYPES.NODE_POWER_QUERIED_DEBUG,
53 system_id, hostname, message)
54
55
56
57=== modified file 'src/provisioningserver/power/tests/test_query.py'
58--- src/provisioningserver/power/tests/test_query.py 2016-05-12 19:07:37 +0000
59+++ src/provisioningserver/power/tests/test_query.py 2016-07-13 22:03:36 +0000
60@@ -104,7 +104,7 @@
61 self.assertThat(
62 protocol.SendEvent,
63 MockCalledOnceWith(
64- ANY, type_name=EVENT_TYPES.NODE_POWER_QUERIED,
65+ ANY, type_name=EVENT_TYPES.NODE_POWER_QUERIED_DEBUG,
66 system_id=system_id, description=message))
67
68

Subscribers

People subscribed via source and target branches