Comment 9 for bug 1694666

Reviewed: https://review.openstack.org/478991
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=2fee972bde4a04d398d32aa6c8b6d27819db697b
Submitter: Jenkins
Branch: master

commit 2fee972bde4a04d398d32aa6c8b6d27819db697b
Author: Dan Smith <email address hidden>
Date: Thu Jun 29 09:42:20 2017 -0700

    Sanitize instance in InstanceMetadata to avoid un-pickleable context

    This is a more strategic fix for the issue of us trying to pickle
    an instance with a context that has complex data structures inside
    (i.e. SQLAlchemy connections) into the oslo cache. The right solution
    is for us to stop storing random python objects (InstanceMetadata)
    in the cache with pickle. However, that's a larger change and more
    complex for deployers to roll over. This attempts to sanitize the
    instance before we pickle it to get things working again.

    Change-Id: Ie7d97ce5c62c8fb9da5822590a64210521f8ae7a
    Closes-Bug: #1694666