Merge lp:~lamont/maas/bug-1640147 into lp:~maas-committers/maas/trunk

Proposed by LaMont Jones
Status: Merged
Approved by: LaMont Jones
Approved revision: no longer in the source branch.
Merged at revision: 5724
Proposed branch: lp:~lamont/maas/bug-1640147
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 67 lines (+18/-5)
2 files modified
src/provisioningserver/refresh/node_info_scripts.py (+8/-3)
src/provisioningserver/refresh/tests/test_node_info_scripts.py (+10/-2)
To merge this branch: bzr merge lp:~lamont/maas/bug-1640147
Reviewer Review Type Date Requested Status
Lee Trager (community) Approve
Review via email: mp+317156@code.launchpad.net

Commit message

Do not attempt ipv6 discovery on interfaces where ipv6 is disabled.

Description of the change

Do not attempt ipv6 discovery on interfaces where ipv6 is disabled.

To post a comment you must log in.
Revision history for this message
Lee Trager (ltrager) wrote :

LGTM!

review: Approve
Revision history for this message
MAAS Lander (maas-lander) wrote :
Download full text (32.4 KiB)

The attempt to merge lp:~lamont/maas/bug-1640147 into lp:maas failed. Below is the output from the failed tests.

Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Hit:2 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial InRelease
Get:3 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:4 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Get:5 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial-updates/main Sources [230 kB]
Get:6 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [474 kB]
Get:7 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial-updates/main Translation-en [188 kB]
Fetched 1,198 kB in 0s (2,335 kB/s)
Reading package lists...
sudo DEBIAN_FRONTEND=noninteractive apt-get -y \
    --no-install-recommends install apache2 archdetect-deb authbind avahi-utils bash bind9 bind9utils build-essential bzr bzr-builddeb chromium-browser chromium-chromedriver curl daemontools debhelper dh-apport dh-systemd distro-info dnsutils firefox freeipmi-tools git gjs ipython isc-dhcp-common isc-dhcp-server libjs-angularjs libjs-jquery libjs-jquery-hotkeys libjs-yui3-full libjs-yui3-min libnss-wrapper libpq-dev make nodejs-legacy npm postgresql pxelinux python3-all python3-apt python3-attr python3-bson python3-convoy python3-crochet python3-cssselect python3-curtin python3-dev python3-distro-info python3-django python3-django-nose python3-django-piston3 python3-dnspython python3-docutils python3-formencode python3-hivex python3-httplib2 python3-jinja2 python3-jsonschema python3-lxml python3-netaddr python3-netifaces python3-novaclient python3-oauth python3-oauthlib python3-openssl python3-paramiko python3-petname python3-pexpect python3-psycopg2 python3-pyinotify python3-pyparsing python3-pyvmomi python3-requests python3-seamicroclient python3-setuptools python3-simplestreams python3-sphinx python3-tempita python3-twisted python3-txtftp python3-tz python3-yaml python3-zope.interface python-bson python-crochet python-django python-django-piston python-djorm-ext-pgarray python-formencode python-lxml python-netaddr python-netifaces python-pocket-lint python-psycopg2 python-simplejson python-tempita python-twisted python-yaml socat syslinux-common tgt ubuntu-cloudimage-keyring wget xvfb
Reading package lists...
Building dependency tree...
Reading state information...
authbind is already the newest version (2.1.1+nmu1).
avahi-utils is already the newest version (0.6.32~rc+dfsg-1ubuntu2).
build-essential is already the newest version (12.1ubuntu2).
debhelper is already the newest version (9.20160115ubuntu3).
distro-info is already the newest version (0.14build1).
git is already the newest version (1:2.7.4-0ubuntu1).
libjs-angularjs is already the newest version (1.2.28-1ubuntu2).
libjs-jquery is already the newest version (1.11.3+dfsg-4).
libjs-yui3-full is already the newest version (3.5.1-1ubuntu3).
libjs-yui3-min is already the newest version (3.5.1-1ubuntu3).
make is already the newest version (4.1-6).
postgresql is already the newest version (9.5+173).
pxelinux is al...

Revision history for this message
MAAS Lander (maas-lander) wrote :
Download full text (1.7 MiB)

The attempt to merge lp:~lamont/maas/bug-1640147 into lp:maas failed. Below is the output from the failed tests.

Hit:1 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:3 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Get:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Fetched 306 kB in 0s (611 kB/s)
Reading package lists...
sudo DEBIAN_FRONTEND=noninteractive apt-get -y \
    --no-install-recommends install apache2 archdetect-deb authbind avahi-utils bash bind9 bind9utils build-essential bzr bzr-builddeb chromium-browser chromium-chromedriver curl daemontools debhelper dh-apport dh-systemd distro-info dnsutils firefox freeipmi-tools git gjs ipython isc-dhcp-common isc-dhcp-server libjs-angularjs libjs-jquery libjs-jquery-hotkeys libjs-yui3-full libjs-yui3-min libnss-wrapper libpq-dev make nodejs-legacy npm postgresql pxelinux python3-all python3-apt python3-attr python3-bson python3-convoy python3-crochet python3-cssselect python3-curtin python3-dev python3-distro-info python3-django python3-django-nose python3-django-piston3 python3-dnspython python3-docutils python3-formencode python3-hivex python3-httplib2 python3-jinja2 python3-jsonschema python3-lxml python3-netaddr python3-netifaces python3-novaclient python3-oauth python3-oauthlib python3-openssl python3-paramiko python3-petname python3-pexpect python3-psycopg2 python3-pyinotify python3-pyparsing python3-pyvmomi python3-requests python3-seamicroclient python3-setuptools python3-simplestreams python3-sphinx python3-tempita python3-twisted python3-txtftp python3-tz python3-yaml python3-zope.interface python-bson python-crochet python-django python-django-piston python-djorm-ext-pgarray python-formencode python-lxml python-netaddr python-netifaces python-pocket-lint python-psycopg2 python-simplejson python-tempita python-twisted python-yaml socat syslinux-common tgt ubuntu-cloudimage-keyring wget xvfb
Reading package lists...
Building dependency tree...
Reading state information...
authbind is already the newest version (2.1.1+nmu1).
avahi-utils is already the newest version (0.6.32~rc+dfsg-1ubuntu2).
build-essential is already the newest version (12.1ubuntu2).
debhelper is already the newest version (9.20160115ubuntu3).
distro-info is already the newest version (0.14build1).
git is already the newest version (1:2.7.4-0ubuntu1).
libjs-angularjs is already the newest version (1.2.28-1ubuntu2).
libjs-jquery is already the newest version (1.11.3+dfsg-4).
libjs-yui3-full is already the newest version (3.5.1-1ubuntu3).
libjs-yui3-min is already the newest version (3.5.1-1ubuntu3).
make is already the newest version (4.1-6).
postgresql is already the newest version (9.5+173).
pxelinux is already the newest version (3:6.03+dfsg-11ubuntu1).
python-formencode is already the newest version (1.3.0-0ubuntu5).
python-lxml is already the newest version (3.5.0-1build1).
python-netaddr is already the newest version (0.7.18-1).
python-netifaces is already the newest version (0.10.4-0.1build2).
python-psycopg2 is ...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/provisioningserver/refresh/node_info_scripts.py'
2--- src/provisioningserver/refresh/node_info_scripts.py 2017-01-23 22:02:24 +0000
3+++ src/provisioningserver/refresh/node_info_scripts.py 2017-02-14 14:46:53 +0000
4@@ -130,11 +130,16 @@
5 return False
6
7 def has_ipv6_address(iface):
8+ no_ipv6_found = True
9 output = check_output(('ip', '-6', 'addr', 'list', 'dev', iface))
10 for line in output.splitlines():
11- if line.find(b' inet6 ') >= 0 and line.find(b' inet6 fe80:') == -1:
12- return True
13- return False
14+ if line.find(b' inet6 ') >= 0:
15+ if line.find(b' inet6 fe80:') == -1:
16+ return True
17+ no_ipv6_found = False
18+ # Bug 1640147: If there is no IPv6 address, then we consider this to be
19+ # a configured ipv6 interface, since ipv6 won't work there.
20+ return no_ipv6_found
21
22 all_ifaces = get_iface_list(check_output(("ifconfig", "-s", "-a")))
23 configured_ifaces = get_iface_list(check_output(("ifconfig", "-s")))
24
25=== modified file 'src/provisioningserver/refresh/tests/test_node_info_scripts.py'
26--- src/provisioningserver/refresh/tests/test_node_info_scripts.py 2017-01-23 11:46:04 +0000
27+++ src/provisioningserver/refresh/tests/test_node_info_scripts.py 2017-02-14 14:46:53 +0000
28@@ -216,6 +216,7 @@
29 eth1 1500 0 0 0 0 0 0 0
30 eth0 1500 0 1366127 0 0 0 831110 0
31 eth4 1500 0 0 0 0 0 0 0
32+eth5 1500 0 0 0 0 0 0 0
33 eth6 1500 0 0 0 0 0 0 0
34 lo 65536 0 38075 0 0 0 38075 0
35 virbr0 1500 0 0 0 0 0 0 0
36@@ -227,6 +228,7 @@
37 Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP
38 eth0 1500 0 1366127 0 0 0 831110 0
39 eth4 1500 0 1366127 0 0 0 831110 0
40+eth5 1500 0 1366127 0 0 0 831110 0
41 eth6 1500 0 1366127 0 0 0 831110 0
42 lo 65536 0 38115 0 0 0 38115 0
43 virbr0 1500 0 0 0 0 0 0 0
44@@ -252,6 +254,12 @@
45 inet6 fe80::0201:02ff:fe03:0404/64 scope link
46 valid_lft forever preferred_lft forever
47 """
48+ip_eth5 = b"""\
49+6: eth5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP ...
50+ link/ether 00:01:02:03:04:06 brd ff:ff:ff:ff:ff:ff
51+ inet 192.168.5.1/24 brd 192.168.4.255 scope global eth4
52+ valid_lft forever preferred_lft forever
53+"""
54 ip_eth6 = b"""\
55 6: eth6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP ...
56 link/ether 00:01:02:03:04:06 brd ff:ff:ff:ff:ff:ff
57@@ -292,8 +300,8 @@
58 check_output = self.patch(subprocess, "check_output")
59 check_output.side_effect = [
60 ifconfig_all, ifconfig_config,
61- ip_eth0, ip_eth4, ip_eth6, ip_lo, ip_virbr0, ip_wlan0,
62- ip_eth0, ip_eth4, ip_eth6, ip_lo, ip_virbr0, ip_wlan0
63+ ip_eth0, ip_eth4, ip_eth5, ip_eth6, ip_lo, ip_virbr0, ip_wlan0,
64+ ip_eth0, ip_eth4, ip_eth5, ip_eth6, ip_lo, ip_virbr0, ip_wlan0
65 ]
66 mock_call = self.patch(subprocess, "call")
67 mock_popen = self.patch(subprocess, "Popen")