Merge lp:~blake-rouse/maas/fix-ipmi-python3 into lp:~maas-committers/maas/trunk

Proposed by Blake Rouse
Status: Merged
Approved by: Blake Rouse
Approved revision: no longer in the source branch.
Merged at revision: 4641
Proposed branch: lp:~blake-rouse/maas/fix-ipmi-python3
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 51 lines (+5/-5)
2 files modified
src/provisioningserver/drivers/power/ipmi.py (+1/-1)
src/provisioningserver/drivers/power/tests/test_ipmi.py (+4/-4)
To merge this branch: bzr merge lp:~blake-rouse/maas/fix-ipmi-python3
Reviewer Review Type Date Requested Status
Mike Pontillo (community) Approve
Andres Rodriguez (community) Approve
Review via email: mp+285077@code.launchpad.net

Commit message

Fix issue of decoding the output of the IPMI command.

To post a comment you must log in.
Revision history for this message
Andres Rodriguez (andreserl) wrote :

lgtm!

review: Approve
Revision history for this message
Mike Pontillo (mpontillo) wrote :

Looks good.

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

The attempt to merge lp:~blake-rouse/maas/fix-ipmi-python3 into lp:maas failed. Below is the output from the failed tests.

Get:1 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial InRelease [237 kB]
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [82.2 kB]
Get:3 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial-updates InRelease [82.2 kB]
Get:4 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial-backports InRelease [82.2 kB]
Get:5 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial/universe Sources [7,648 kB]
Get:6 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1,482 kB]
Get:7 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial/main Translation-en [855 kB]
Get:8 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [7,226 kB]
Get:9 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial/universe Translation-en [4,836 kB]
Fetched 22.5 MB in 6s (3,592 kB/s)
Reading package lists...
sudo DEBIAN_FRONTEND=noninteractive apt-get -y \
    --no-install-recommends install apache2 archdetect-deb authbind bind9 bind9utils build-essential 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 libjs-angularjs libjs-jquery libjs-jquery-hotkeys libjs-yui3-full libjs-yui3-min libpq-dev make nodejs-legacy npm postgresql pxelinux python3-apt python3-bson python3-convoy python3-coverage python3-crochet python3-cssselect python3-curtin python3-dev python3-distro-info python3-django python3-django-nose python3-django-piston3 python3-docutils python3-formencode python3-hivex python3-httplib2 python3-jinja2 python3-jsonschema python3-lxml python3-mock python3-netaddr python3-netifaces python3-oauth python3-openssl python3-paramiko python3-petname python3-pexpect python3-psycopg2 python3-pyinotify python3-pyparsing python3-pyvmomi python3-seamicroclient python3-simplejson 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-tempita python-twisted python-yaml socat syslinux-common tgt ubuntu-cloudimage-keyring wget xvfb
Reading package lists...
Building dependency tree...
Reading state information...
apache2 is already the newest version (2.4.18-1ubuntu1).
archdetect-deb is already the newest version (1.114ubuntu1).
authbind is already the newest version (2.1.1+nmu1).
bind9 is already the newest version (1:9.9.5.dfsg-12.1ubuntu1).
bind9utils is already the newest version (1:9.9.5.dfsg-12.1ubuntu1).
build-essential is already the newest version (12.1ubuntu2).
curl is already the newest version (7.47.0-1ubuntu1).
debhelper is already the newest version (9.20160115ubuntu2).
dh-apport is already the newest version (2.19.4-0ubuntu2).
dh-systemd is already the newest version (1.26ubuntu2).
distro-info is already the newest version ...

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

The attempt to merge lp:~blake-rouse/maas/fix-ipmi-python3 into lp:maas failed. Below is the output from the failed tests.

Get:1 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial InRelease [237 kB]
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [82.2 kB]
Get:3 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial-updates InRelease [82.2 kB]
Get:4 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial-backports InRelease [82.2 kB]
Get:5 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial/main Sources [1,129 kB]
Get:6 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial/universe Sources [7,648 kB]
Get:7 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1,482 kB]
Get:8 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [7,226 kB]
Fetched 18.0 MB in 5s (3,381 kB/s)
Reading package lists...
sudo DEBIAN_FRONTEND=noninteractive apt-get -y \
    --no-install-recommends install apache2 archdetect-deb authbind bind9 bind9utils build-essential 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 libjs-angularjs libjs-jquery libjs-jquery-hotkeys libjs-yui3-full libjs-yui3-min libpq-dev make nodejs-legacy npm postgresql pxelinux python3-apt python3-bson python3-convoy python3-coverage python3-crochet python3-cssselect python3-curtin python3-dev python3-distro-info python3-django python3-django-nose python3-django-piston3 python3-docutils python3-formencode python3-hivex python3-httplib2 python3-jinja2 python3-jsonschema python3-lxml python3-mock python3-netaddr python3-netifaces python3-oauth python3-openssl python3-paramiko python3-petname python3-pexpect python3-psycopg2 python3-pyinotify python3-pyparsing python3-pyvmomi python3-seamicroclient python3-simplejson 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-tempita python-twisted python-yaml socat syslinux-common tgt ubuntu-cloudimage-keyring wget xvfb
Reading package lists...
Building dependency tree...
Reading state information...
apache2 is already the newest version (2.4.18-1ubuntu1).
archdetect-deb is already the newest version (1.114ubuntu1).
authbind is already the newest version (2.1.1+nmu1).
bind9 is already the newest version (1:9.9.5.dfsg-12.1ubuntu1).
bind9utils is already the newest version (1:9.9.5.dfsg-12.1ubuntu1).
build-essential is already the newest version (12.1ubuntu2).
curl is already the newest version (7.47.0-1ubuntu1).
debhelper is already the newest version (9.20160115ubuntu2).
dh-apport is already the newest version (2.19.4-0ubuntu2).
dh-systemd is already the newest version (1.26ubuntu2).
distro-info is already the newest version (0.14build1).
dnsutils is already the newest version (1:9.9.5.dfsg-12.1ubuntu1).
firefox is already the newest...

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

The attempt to merge lp:~blake-rouse/maas/fix-ipmi-python3 into lp:maas failed. Below is the output from the failed tests.

Get:1 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial InRelease [237 kB]
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [82.2 kB]
Get:3 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial-updates InRelease [82.2 kB]
Get:4 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial-backports InRelease [82.2 kB]
Get:5 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial/main Sources [1,128 kB]
Get:6 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial/universe Sources [7,648 kB]
Get:7 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1,482 kB]
Get:8 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial/main Translation-en [855 kB]
Get:9 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [7,226 kB]
Get:10 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial/universe Translation-en [4,836 kB]
Fetched 23.7 MB in 6s (3,476 kB/s)
Reading package lists...
sudo DEBIAN_FRONTEND=noninteractive apt-get -y \
    --no-install-recommends install apache2 archdetect-deb authbind bind9 bind9utils build-essential 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 libjs-angularjs libjs-jquery libjs-jquery-hotkeys libjs-yui3-full libjs-yui3-min libpq-dev make nodejs-legacy npm postgresql pxelinux python3-apt python3-bson python3-convoy python3-coverage python3-crochet python3-cssselect python3-curtin python3-dev python3-distro-info python3-django python3-django-nose python3-django-piston3 python3-docutils python3-formencode python3-hivex python3-httplib2 python3-jinja2 python3-jsonschema python3-lxml python3-mock python3-netaddr python3-netifaces python3-oauth python3-openssl python3-paramiko python3-petname python3-pexpect python3-psycopg2 python3-pyinotify python3-pyparsing python3-pyvmomi python3-seamicroclient python3-simplejson 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-tempita python-twisted python-yaml socat syslinux-common tgt ubuntu-cloudimage-keyring wget xvfb
Reading package lists...
Building dependency tree...
Reading state information...
apache2 is already the newest version (2.4.18-1ubuntu1).
archdetect-deb is already the newest version (1.114ubuntu1).
authbind is already the newest version (2.1.1+nmu1).
bind9 is already the newest version (1:9.9.5.dfsg-12.1ubuntu1).
bind9utils is already the newest version (1:9.9.5.dfsg-12.1ubuntu1).
build-essential is already the newest version (12.1ubuntu2).
curl is already the newest version (7.47.0-1ubuntu1).
debhelper is already the newest version (9.20160115ubuntu2).
dh-apport is already the newest version (2.19.4-0ubuntu2).
dh-...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/provisioningserver/drivers/power/ipmi.py'
2--- src/provisioningserver/drivers/power/ipmi.py 2015-12-01 18:12:59 +0000
3+++ src/provisioningserver/drivers/power/ipmi.py 2016-02-04 15:20:19 +0000
4@@ -76,7 +76,7 @@
5 env = shell.select_c_utf8_locale()
6 command = tuple(command) # For consistency when testing.
7 try:
8- output = call_and_check(command, env=env)
9+ output = call_and_check(command, env=env).decode("utf-8")
10 except ExternalProcessError as e:
11 raise PowerFatalError(
12 "Failed to power %s %s: %s" % (
13
14=== modified file 'src/provisioningserver/drivers/power/tests/test_ipmi.py'
15--- src/provisioningserver/drivers/power/tests/test_ipmi.py 2015-12-01 18:12:59 +0000
16+++ src/provisioningserver/drivers/power/tests/test_ipmi.py 2016-02-04 15:20:19 +0000
17@@ -165,7 +165,7 @@
18 process.communicate.return_value = (b'', b'')
19 process.returncode = 0
20 call_and_check_mock = self.patch(ipmi_module, 'call_and_check')
21- call_and_check_mock.return_value = 'on'
22+ call_and_check_mock.return_value = b'on'
23
24 result = ipmi_power_driver._issue_ipmi_command('on', **context)
25
26@@ -194,7 +194,7 @@
27 process.communicate.return_value = (b'', b'')
28 process.returncode = 0
29 call_and_check_mock = self.patch(ipmi_module, 'call_and_check')
30- call_and_check_mock.return_value = 'off'
31+ call_and_check_mock.return_value = b'off'
32
33 result = ipmi_power_driver._issue_ipmi_command('off', **context)
34
35@@ -224,7 +224,7 @@
36 process.communicate.return_value = (b'', b'')
37 process.returncode = 0
38 call_and_check_mock = self.patch(ipmi_module, 'call_and_check')
39- call_and_check_mock.return_value = 'off'
40+ call_and_check_mock.return_value = b'off'
41
42 result = ipmi_power_driver._issue_ipmi_command('off', **context)
43
44@@ -250,7 +250,7 @@
45 process.communicate.return_value = (b'', b'')
46 process.returncode = 0
47 call_and_check_mock = self.patch(ipmi_module, 'call_and_check')
48- call_and_check_mock.return_value = 'other'
49+ call_and_check_mock.return_value = b'other'
50
51 result = ipmi_power_driver._issue_ipmi_command('query', **context)
52