Clean BDM when snapshoting volume-backed instances
When snapshoting a volume-backed instance, its block device mapping is
copied entirely into the image properties of the resulting snapshot.
This may lead to some errors when booting from that snapshot because the
fields 'id', 'insance_uuid' and 'connection_info' must be generated for
each instance instead of reusing the ones from the original instance.
For example, sharing the connection_info will cause the new instance to
try to connect to the original volume instead of creating a new one.
This patch cleans all the database-specific plus the connection_info
fields from the block device mapping when creating the snapshot.
Change-Id: I4190e9519d641c61b00b5d86c3885f2ae4fa86f3
Partial-Bug: #1246327
(cherry picked from commit eddd8a14cd2393ce7bdb0ec1c7366177371192b2)
Reviewed: https:/ /review. openstack. org/57890 github. com/openstack/ nova/commit/ cad49c3f2aac14b 9934ee160a650d4 a7b9809d66
Committed: http://
Submitter: Jenkins
Branch: stable/havana
commit cad49c3f2aac14b 9934ee160a650d4 a7b9809d66
Author: Xavier Queralt <email address hidden>
Date: Wed Oct 30 20:21:03 2013 +0100
Clean BDM when snapshoting volume-backed instances
When snapshoting a volume-backed instance, its block device mapping is
copied entirely into the image properties of the resulting snapshot.
This may lead to some errors when booting from that snapshot because the
fields 'id', 'insance_uuid' and 'connection_info' must be generated for
each instance instead of reusing the ones from the original instance.
For example, sharing the connection_info will cause the new instance to
try to connect to the original volume instead of creating a new one.
This patch cleans all the database-specific plus the connection_info
fields from the block device mapping when creating the snapshot.
Change-Id: I4190e9519d641c 61b00b5d86c3885 f2ae4fa86f3 e7bdb0ec1c73661 77371192b2)
Partial-Bug: #1246327
(cherry picked from commit eddd8a14cd2393c