Failure in TaskFlow returns large WrappedFailure exception to the user

Bug #1637243 reported by Lauren Taylor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pypowervm
Fix Released
Low
Eric Fried

Bug Description

When performing VM operations such as delete, deploy, or volume attach, if a failure occurs during a pypowervm task, a huge WrappedFailure error is returned to the user. The issue with this large error is that the WrappedFailure error no longer contains the original exception. Therefore the user will have no understanding of why the operation failed, unless they dig into the logs.
The messages shown in the UI do not look appropriate - i.e. possibly missing some exception handling to notify on wrapped exception.

Here is an example of the error seen by the user:

Volume csky_v7k_one could not be attached to virtual machine csky_custf. Error message: WrappedFailure: File "/usr/lib/python2.7/dist-packages/taskflow/engines/action_engine/executor.py", line 82, in _execute_task result = task.execute(**arguments) File "/usr/lib/python2.7/dist-packages/pypowervm/utils/transaction.py", line 476, in execute self._wrapper = _execute(self._wrapper or self._getter) File "/usr/lib/python2.7/dist-packages/pypowervm/utils/transaction.py", line 130, in _synchronize return _lock_if_needed(wrp_or_spec, *a1, **k1) File "/usr/lib/python2.7/dist-packages/pypowervm/utils/transaction.py", line 128, in _lock_if_needed return _locked_resolve_wrapper(wos, *a2, **k2) File "/usr/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 274, in inner return f(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/pypowervm/utils/transaction.py", line 106, in _locked_resolve_wrapper return _resolve_wrapper(wos, *a2, **k2) File "/usr/lib/python2.7/dist-packages/pypowervm/utils/transaction.py", line 120, in _resolve_wrapper return _retry_refresh(wos, *a2, **k2) File "/usr/lib/python2.7/dist-packages/pypowervm/utils/retry.py", line 251, in __retry _raise_exc() File "/usr/lib/python2.7/dist-packages/pypowervm/utils/retry.py", line 237, in __retry resp = func(*args, **kwds) File "/usr/lib/python2.7/dist-packages/pypowervm/utils/transaction.py", line 119, in _retry_refresh return func(wrapper, *a3, **k3) File "/usr/lib/python2.7/dist-packages/pypowervm/utils/transaction.py", line 472, in _execute wrapper = wrapper.update(timeout=self.update_timeout) File "/usr/lib/python2.7/dist-packages/pypowervm/wrappers/entry_wrapper.py", line 1127, in update timeout=timeout)) File "/usr/lib/python2.7/dist-packages/pypowervm/adapter.py", line 1005, in update_by_path sensitive=sensitive) File "/usr/lib/python2.7/dist-packages/pypowervm/adapter.py", line 641, in _request resp = func(method, path, **kwds) File "/usr/lib/python2.7/dist-packages/pypowervm/helpers/log_helper.py", line 150, in log_req_resp response = func(*args, **kwds) File "/usr/lib/python2.7/dist-packages/pypowervm/helpers/vios_busy.py", line 60, in wrapper resp = func(*args, **kwds) File "/usr/lib/python2.7/dist-packages/pypowervm/adapter.py", line 421, in request raise pvmex.HttpError(resp) WrappedFailure: File "/usr/lib/python2.7/dist-packages/taskflow/engines/action_engine/executor.py", line 82, in _execute_task result = task.execute(**arguments) File "/usr/lib/python2.7/dist-packages/pypowervm/utils/transaction.py", line 476, in execute self._wrapper = _execute(self._wrapper or self._getter) File "/usr/lib/python2.7/dist-packages/pypowervm/utils/transaction.py", line 130, in _synchronize return _lock_if_needed(wrp_or_spec, *a1, **k1) File "/usr/lib/python2.7/dist-packages/pypowervm/utils/transaction.py", line 128, in _lock_if_needed return _locked_resolve_wrapper(wos, *a2, **k2) File "/usr/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 274, in inner return f(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/pypowervm/utils/transaction.py", line 106, in _locked_resolve_wrapper return _resolve_wrapper(wos, *a2, **k2) File "/usr/lib/python2.7/dist-packages/pypowervm/utils/transaction.py", line 120, in _resolve_wrapper return _retry_refresh(wos, *a2, **k2) File "/usr/lib/python2.7/dist-packages/pypowervm/utils/retry.py", line 251, in __retry _raise_exc() File "/usr/lib/python2.7/dist-packages/pypowervm/utils/retry.py", line 237, in __retry resp = func(*args, **kwds) File "/usr/lib/python2.7/dist-packages/pypowervm/utils/transaction.py", line 119, in _retry_refresh return func(wrapper, *a3, **k3) File "/usr/lib/python2.7/dist-packages/pypowervm/utils/transaction.py", line 472, in _execute wrapper = wrapper.update(timeout=self.update_timeout) File "/usr/lib/python2.7/dist-packages/pypowervm/wrappers/entry_wrapper.py", line 1127, in update timeout=timeout)) File "/usr/lib/python2.7/dist-packages/pypowervm/adapter.py", line 1005, in update_by_path sensitive=sensitive) File "/usr/lib/python2.7/dist-packages/pypowervm/adapter.py", line 641, in _request resp = func(method, path, **kwds) File "/usr/lib/python2.7/dist-packages/pypowervm/helpers/log_helper.py", line 150, in log_req_resp response = func(*args, **kwds) File "/usr/lib/python2.7/dist-packages/pypowervm/helpers/vios_busy.py", line 60, in wrapper resp = func(*args, **kwds) File "/usr/lib/python2.7/dist-packages/pypowervm/adapter.py", line 421, in request raise pvmex.HttpError(resp)

Here is the corresponding REST response in the logs:

[req-72533d3b-37e2-4e94-8a5b-6e83285f34c4 0688b01e6439ca32d698d20789d52169126fb41fb1a4ddafcebb97d854e836c9 7bb573ffa811485487dda1ef85fa58ff - - -]
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:ns2="http://a9.com/-/spec/opensearch/1.1/" xmlns:ns3="http://www.w3.org/1999/xhtml">
    <id>be6c586c-8216-438a-a267-1343bd4c2a65</id>
    <title>HttpErrorResponse</title>
    <published>2016-10-11T02:51:12.758-04:00</published>
    <author>
        <name>IBM Power Systems Management Console</name>
    </author>
    <content type="application/vnd.ibm.powervm.web+xml; type=HttpErrorResponse">
        <HttpErrorResponse:HttpErrorResponse xmlns:HttpErrorResponse="http://www.ibm.com/xmlns/systems/power/firmware/web/mc/2012_10/" xmlns="http://www.ibm.com/xmlns/systems/power/firmware/web/mc/2012_10/" xmlns:ns2="http://www.w3.org/XML/1998/namespace/k2" schemaVersion="V1_3_0">
    <Metadata>
        <Atom/>
    </Metadata>
    <HTTPStatus kb="ROR" kxe="false">500</HTTPStatus>
    <RequestURI kb="ROR" kxe="false">/rest/api/uom/VirtualIOServer/174834E7-AC5F-4AB5-AFAC-6254E5CC21ED</RequestURI>
    <ReasonCode kxe="false" kb="ROR">Unknown internal error.</ReasonCode>
    <Message kb="ROO" kxe="false">[PVME01050017-0383] Cannot change partition with ID 6 because it is migrating.</Message>
    <RequestBody kb="ROO" kxe="false"/>
    <RequestHeaders kxe="false" kb="ROO">{X-Audit-Memento=nova, If-Match=672302045, Accept=application/atom+xml; charset=UTF-8, X-API-Session=*******, X-Transaction-ID=XT10087839, Connection=keep-alive, User-Agent=python-requests/2.10.0, Host=localhost:12080, Accept-Encoding=gzip, deflate, Content-Length=31704, Content-Type=application/vnd.ibm.powervm.uom+xml; type=VirtualIOServer}</RequestHeaders>
</HttpErrorResponse:HttpErrorResponse>
    </content>
</entry>

Eric Fried (efried)
Changed in pypowervm:
assignee: nobody → Eric Fried (efried)
Revision history for this message
Eric Fried (efried) wrote :

Fix out for review (4487)

Changed in pypowervm:
importance: Undecided → Low
status: New → In Progress
Revision history for this message
Eric Fried (efried) wrote :
Changed in pypowervm:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.