Pass client object to flavor.to_profile calls

Ensure that client attribute is passed to to_profile calls,
completing some refactoring earlier during the Ocata cycle.

This resolved issues with cold migration of containers between
compute hosts.

Change-Id: I6500349ecacd30a6cb7698fe3e0af2e1fb1817de
Closes-Bug: 1651006
This commit is contained in:
James Page 2017-03-16 11:05:28 +00:00
parent 6f8a5711bb
commit 9ca7dc3f93
1 changed files with 4 additions and 2 deletions

View File

@ -918,7 +918,8 @@ class LXDDriver(driver.ComputeDriver):
fileutils.ensure_tree(instance_dir)
# Step 1 - Setup the profile on the dest host
flavor.to_profile(instance, network_info, block_device_info)
flavor.to_profile(self.client,
instance, network_info, block_device_info)
# Step 2 - Open a websocket on the srct and and
# generate the container config
@ -949,7 +950,8 @@ class LXDDriver(driver.ComputeDriver):
self.firewall_driver.apply_instance_filter(
instance, network_info)
flavor.to_profile(instance, network_info, block_device_info)
flavor.to_profile(self.client,
instance, network_info, block_device_info)
def live_migration(self, context, instance, dest,
post_method, recover_method, block_migration=False,