Merge lp:~newell-jensen/maas/2.1-fix-ipmi-chassis-config-timeout into lp:maas/2.1

Proposed by Newell Jensen
Status: Merged
Approved by: Newell Jensen
Approved revision: no longer in the source branch.
Merged at revision: 5555
Proposed branch: lp:~newell-jensen/maas/2.1-fix-ipmi-chassis-config-timeout
Merge into: lp:maas/2.1
Diff against target: 59 lines (+17/-3)
3 files modified
docs/changelog.rst (+2/-0)
src/provisioningserver/drivers/power/ipmi.py (+8/-1)
src/provisioningserver/drivers/power/tests/test_ipmi.py (+7/-2)
To merge this branch: bzr merge lp:~newell-jensen/maas/2.1-fix-ipmi-chassis-config-timeout
Reviewer Review Type Date Requested Status
Newell Jensen (community) Approve
Review via email: mp+311551@code.launchpad.net

Commit message

Backport trunk r5565: Fix IPMI chassis config session timeout issue when configuring the boot device that is a cause some errors in older HP Proliant BMCs. Only error on PowerAuthErrors when configuring the IPMI chassis boot order.

To post a comment you must log in.
Revision history for this message
Newell Jensen (newell-jensen) wrote :

Self approved backport.

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

The attempt to merge lp:~newell-jensen/maas/2.1-fix-ipmi-chassis-config-timeout into lp:maas/2.1 failed. Below is the output from the failed tests.

Hit:1 http://prodstack-zone-1.clouds.archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://prodstack-zone-1.clouds.archive.ubuntu.com/ubuntu xenial-updates InRelease [95.7 kB]
Get:3 http://security.ubuntu.com/ubuntu xenial-security InRelease [94.5 kB]
Get:4 http://prodstack-zone-1.clouds.archive.ubuntu.com/ubuntu xenial-backports InRelease [92.2 kB]
Get:5 http://prodstack-zone-1.clouds.archive.ubuntu.com/ubuntu xenial-updates/main Sources [206 kB]
Get:6 http://prodstack-zone-1.clouds.archive.ubuntu.com/ubuntu xenial-updates/universe Sources [109 kB]
Get:7 http://prodstack-zone-1.clouds.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [426 kB]
Get:8 http://prodstack-zone-1.clouds.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [365 kB]
Get:9 http://prodstack-zone-1.clouds.archive.ubuntu.com/ubuntu xenial-updates/universe Translation-en [132 kB]
Fetched 1,520 kB in 0s (2,212 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 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).
freeipmi-tools is already the newest version (1.4.11-1ubuntu1).
git is already the newest version (1:2.7.4-0ubuntu1).
libjs-angularjs is already the newest version (1.2.28-1u...

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-11-22 14:48:23 +0000
3+++ docs/changelog.rst 2016-11-22 23:18:12 +0000
4@@ -8,6 +8,8 @@
5 Bugs fixed in this release
6 --------------------------
7
8+LP: #1516065 Fix IPMI chassis config session timeout issue when configuring the boot device. Only error on PowerAuthErrors when configuring the IPMI chassis boot order.
9+
10 LP: #1642996 2.x preseeds with {{escape.shell}} fail if not upgraded at 2.1.1
11
12 LP: #1643057 juju2 with maas 2.1.1 LXD containers get wrong ip addresses
13
14=== modified file 'src/provisioningserver/drivers/power/ipmi.py'
15--- src/provisioningserver/drivers/power/ipmi.py 2016-05-20 12:40:13 +0000
16+++ src/provisioningserver/drivers/power/ipmi.py 2016-11-22 23:18:12 +0000
17@@ -176,7 +176,14 @@
18 process = Popen(command, stdout=PIPE, stderr=PIPE, env=env)
19 _, stderr = process.communicate()
20 stderr = stderr.decode("utf-8").strip()
21- for error, error_info in IPMI_ERRORS.items():
22+ # XXX newell 2016-11-21 bug=1516065: Some IPMI hardware have timeout
23+ # issues when trying to set the boot order to PXE. We want to
24+ # continue and not raise an error here.
25+ ipmi_errors = {
26+ key: IPMI_ERRORS[key] for key in IPMI_ERRORS
27+ if IPMI_ERRORS[key]['exception'] == PowerAuthError
28+ }
29+ for error, error_info in ipmi_errors.items():
30 if error in stderr:
31 raise error_info.get('exception')(error_info.get('message'))
32 if process.returncode != 0:
33
34=== modified file 'src/provisioningserver/drivers/power/tests/test_ipmi.py'
35--- src/provisioningserver/drivers/power/tests/test_ipmi.py 2016-05-18 08:37:24 +0000
36+++ src/provisioningserver/drivers/power/tests/test_ipmi.py 2016-11-22 23:18:12 +0000
37@@ -21,6 +21,7 @@
38 from maastesting.testcase import MAASTestCase
39 from provisioningserver.drivers.power import (
40 ipmi as ipmi_module,
41+ PowerAuthError,
42 PowerError,
43 )
44 from provisioningserver.drivers.power.ipmi import (
45@@ -138,8 +139,12 @@
46 self.assertThat(tmpfile.flush, MockCalledOnceWith())
47 self.assertThat(tmpfile.__exit__, MockCalledOnceWith(None, None, None))
48
49- def test__issue_ipmi_chassis_config_command_raises_power_error(self):
50- for error, error_info in IPMI_ERRORS.items():
51+ def test__issue_ipmi_chassis_config_command_raises_power_auth_error(self):
52+ ipmi_errors = {
53+ key: IPMI_ERRORS[key] for key in IPMI_ERRORS
54+ if IPMI_ERRORS[key]['exception'] == PowerAuthError
55+ }
56+ for error, error_info in ipmi_errors.items():
57 popen_mock = self.patch(ipmi_module, 'Popen')
58 process = popen_mock.return_value
59 process.communicate.return_value = (b'', error.encode('utf-8'))

Subscribers

People subscribed via source and target branches

to all changes: