Merge lp:~julian-edwards/maas/wrong-log-msg-bug-1381609 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: 3343
Proposed branch: lp:~julian-edwards/maas/wrong-log-msg-bug-1381609
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 27 lines (+6/-4)
1 file modified
src/maasserver/models/macaddress.py (+6/-4)
To merge this branch: bzr merge lp:~julian-edwards/maas/wrong-log-msg-bug-1381609
Reviewer Review Type Date Requested Status
Graham Binns (community) Approve
Newell Jensen (community) Approve
Review via email: mp+240811@code.launchpad.net

Commit message

The log message warning about missing a cluster_interface for macaddress was in completely the wrong place, which meant that it popped up when not allocating IPs. It is now in its rightful place, so only appears at the point an IP allocation is taking place.

To post a comment you must log in.
Revision history for this message
Newell Jensen (newell-jensen) :
review: Approve
Revision history for this message
Graham Binns (gmb) :
review: Approve
Revision history for this message
MAAS Lander (maas-lander) wrote :
Download full text (18.8 KiB)

The attempt to merge lp:~julian-edwards/maas/wrong-log-msg-bug-1381609 into lp:maas failed. Below is the output from the failed tests.

Ign http://security.ubuntu.com trusty-security InRelease
Get:1 http://security.ubuntu.com trusty-security Release.gpg [933 B]
Get:2 http://security.ubuntu.com trusty-security Release [62.0 kB]
Ign http://nova.clouds.archive.ubuntu.com trusty InRelease
Ign http://nova.clouds.archive.ubuntu.com trusty-updates InRelease
Hit http://nova.clouds.archive.ubuntu.com trusty Release.gpg
Get:3 http://nova.clouds.archive.ubuntu.com trusty-updates Release.gpg [933 B]
Hit http://nova.clouds.archive.ubuntu.com trusty Release
Get:4 http://nova.clouds.archive.ubuntu.com trusty-updates Release [62.0 kB]
Get:5 http://security.ubuntu.com trusty-security/main Sources [49.5 kB]
Hit http://nova.clouds.archive.ubuntu.com trusty/main Sources
Get:6 http://security.ubuntu.com trusty-security/universe Sources [11.2 kB]
Get:7 http://security.ubuntu.com trusty-security/main amd64 Packages [153 kB]
Get:8 http://security.ubuntu.com trusty-security/universe amd64 Packages [51.2 kB]
Hit http://nova.clouds.archive.ubuntu.com trusty/universe Sources
Hit http://nova.clouds.archive.ubuntu.com trusty/main amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com trusty/universe amd64 Packages
Hit http://security.ubuntu.com trusty-security/main Translation-en
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty/main Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty/universe Translation-en
Get:9 http://nova.clouds.archive.ubuntu.com trusty-updates/main Sources [135 kB]
Get:10 http://nova.clouds.archive.ubuntu.com trusty-updates/universe Sources [89.3 kB]
Get:11 http://nova.clouds.archive.ubuntu.com trusty-updates/main amd64 Packages [356 kB]
Get:12 http://nova.clouds.archive.ubuntu.com trusty-updates/universe amd64 Packages [217 kB]
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/main Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/universe Translation-en
Ign http://nova.clouds.archive.ubuntu.com trusty/main Translation-en_US
Ign http://nova.clouds.archive.ubuntu.com trusty/universe Translation-en_US
Fetched 1,188 kB in 2s (407 kB/s)
Reading package lists...
sudo DEBIAN_FRONTEND=noninteractive apt-get -y \
     --no-install-recommends install apache2 authbind bind9 bind9utils build-essential bzr-builddeb curl daemontools debhelper dh-apport distro-info dnsutils firefox freeipmi-tools gjs ipython isc-dhcp-common libjs-raphael libjs-yui3-full libjs-yui3-min libpq-dev make pep8 postgresql pyflakes python-amqplib python-bzrlib python-celery python-convoy python-crochet python-cssselect python-curtin python-dev python-distro-info python-django python-django-piston python-django-south python-djorm-ext-pgarray python-docutils python-extras python-fixtures python-flake8 python-formencode python-hivex python-httplib2 python-jinja2 python-jsonschema python-lockfile python-lxml python-mimeparse python-mock python-netaddr python-netifaces python-nose python-oauth python-oops python-oops-amqp python-oops-datedir-repo python-oops-twisted python-oops-ws...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/maasserver/models/macaddress.py'
2--- src/maasserver/models/macaddress.py 2014-11-05 09:41:46 +0000
3+++ src/maasserver/models/macaddress.py 2014-11-06 06:33:17 +0000
4@@ -178,10 +178,6 @@
5 # short term: "for IPv6, use whatever network interface on the cluster
6 # also manages the node's IPv4 address."
7 if self.cluster_interface is None:
8- # No known cluster interface. Nothing we can do.
9- maaslog.error(
10- "%s: Tried to allocate an IP to MAC %s but its cluster "
11- "interface is not known", self.node.hostname, self)
12 return []
13 else:
14 return NodeGroupInterface.objects.filter(
15@@ -259,6 +255,12 @@
16 # We're only interested in cluster interfaces with a static range.
17 # The check for a static range is deliberately kept vague; Django uses
18 # different representations for "none" values in IP addresses.
19+ if self.cluster_interface is None:
20+ # No known cluster interface. Nothing we can do.
21+ maaslog.error(
22+ "%s: Tried to allocate an IP to MAC %s but its cluster "
23+ "interface is not known", self.node.hostname, self)
24+ return []
25 cluster_interfaces = [
26 interface
27 for interface in self.get_cluster_interfaces()