When the NFV uses tasks and futures and coroutines to
interact with openstack APIs, an OpenStackRestAPIException
can be returned as a task result.
The exception needs to be 'pickled' when sent across the
queue/socket for the 'simulated' asyncio workflow.
However, the pickle code for that exception was broken in
python3. It was relying on a python2 'message' attribute
of the base Exception class to exist, which no longer
exists (in python3)
This was causing the pickle command to quietly fail and
the code waiting for the task result would timeout and
not report back the failure information.
The fix is to ensure that there is a 'message' property
on that exception type.
Unit tests have been added for all the pickleable
exceptions, to ensure their '__reduce__' and other
interactions with 'pickle' are not reporting any failures.
Test Plan:
PASS: create and apply a kube-upgrade-strategy for an
older version of kubernetes and observe it reports its
failure error (rather than a timeout)
Closes-Bug: #2007285
Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: I3a8776163a78330810ae1097ddd1831b1b26a212