~blake-rouse/maas/is-importing-2.1

« back to all changes in this revision

Viewing changes to src/provisioningserver/drivers/power/ipmi.py

  • Committer: LaMont Jones
  • Date: 2016-12-07 12:59:10 UTC
  • mfrom: (5561 2.1)
  • mto: This revision was merged to the branch mainline in revision 5563.
  • Revision ID: lamont@canonical.com-20161207125910-fow7gg8v9bo0s1iq
merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
176
176
            process = Popen(command, stdout=PIPE, stderr=PIPE, env=env)
177
177
            _, stderr = process.communicate()
178
178
        stderr = stderr.decode("utf-8").strip()
179
 
        for error, error_info in IPMI_ERRORS.items():
 
179
        # XXX newell 2016-11-21 bug=1516065: Some IPMI hardware have timeout
 
180
        # issues when trying to set the boot order to PXE.  We want to
 
181
        # continue and not raise an error here.
 
182
        ipmi_errors = {
 
183
            key: IPMI_ERRORS[key] for key in IPMI_ERRORS
 
184
            if IPMI_ERRORS[key]['exception'] == PowerAuthError
 
185
        }
 
186
        for error, error_info in ipmi_errors.items():
180
187
            if error in stderr:
181
188
                raise error_info.get('exception')(error_info.get('message'))
182
189
        if process.returncode != 0: