Merge lp:~julian-edwards/maas/panicky-warning-bug-1379556 into lp:~maas-committers/maas/trunk

Proposed by Julian Edwards
Status: Merged
Approved by: Julian Edwards
Approved revision: no longer in the source branch.
Merged at revision: 3276
Proposed branch: lp:~julian-edwards/maas/panicky-warning-bug-1379556
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 47 lines (+8/-4)
2 files modified
src/maasserver/rpc/events.py (+6/-2)
src/maasserver/rpc/tests/test_regionservice.py (+2/-2)
To merge this branch: bzr merge lp:~julian-edwards/maas/panicky-warning-bug-1379556
Reviewer Review Type Date Requested Status
Raphaël Badin (community) Approve
Review via email: mp+239011@code.launchpad.net

Commit message

Change the log warning about node events for non-existent nodes to a debug level message. There are *many* of these log messages when a node is enlisting and it's probing for TFTP files, and they are not useful to casual observers.

To post a comment you must log in.
Revision history for this message
Raphaël Badin (rvb) wrote :

Looks good.

review: Approve
Revision history for this message
Julian Edwards (julian-edwards) wrote :

Cheers.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/maasserver/rpc/events.py'
2--- src/maasserver/rpc/events.py 2014-10-01 12:16:33 +0000
3+++ src/maasserver/rpc/events.py 2014-10-21 06:40:33 +0000
4@@ -68,7 +68,9 @@
5 # The node doesn't exist, but we don't raise an exception - it's
6 # entirely possible the cluster has started sending events for a
7 # node that we don't know about yet.
8- maaslog.warning(
9+ # This is most likely to happen when a new node is trying to
10+ # enlist.
11+ maaslog.debug(
12 "Event '%s: %s' sent for non-existent node '%s'.",
13 type_name, description, system_id)
14 return
15@@ -95,7 +97,9 @@
16 # The node doesn't exist, but we don't raise an exception - it's
17 # entirely possible the cluster has started sending events for a
18 # node that we don't know about yet.
19- maaslog.warning(
20+ # This is most likely to happen when a new node is trying to
21+ # enlist.
22+ maaslog.debug(
23 "Event '%s: %s' sent for non-existent node with MAC "
24 "address '%s'.",
25 type_name, description, mac_address)
26
27=== modified file 'src/maasserver/rpc/tests/test_regionservice.py'
28--- src/maasserver/rpc/tests/test_regionservice.py 2014-10-09 16:22:36 +0000
29+++ src/maasserver/rpc/tests/test_regionservice.py 2014-10-21 06:40:33 +0000
30@@ -929,7 +929,7 @@
31
32 def check(result):
33 self.assertThat(
34- maaslog.warning, MockCalledOnceWith(
35+ maaslog.debug, MockCalledOnceWith(
36 "Event '%s: %s' sent for non-existent node '%s'.",
37 name, event_description, system_id))
38
39@@ -1032,7 +1032,7 @@
40
41 def check(result):
42 self.assertThat(
43- maaslog.warning, MockCalledOnceWith(
44+ maaslog.debug, MockCalledOnceWith(
45 "Event '%s: %s' sent for non-existent node with MAC "
46 "address '%s'.",
47 name, event_description, mac_address))