diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 104bad46757..66458fb36e0 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -359,6 +359,13 @@ def _check_image_size(): instance_type = self.db.instance_type_get(context, instance_type_id) allowed_size_gb = instance_type['local_gb'] + + # NOTE(jk0): Since libvirt uses local_gb as a secondary drive, we + # need to handle potential situations where local_gb is 0. This is + # the default for m1.tiny. + if allowed_size_gb == 0: + return + allowed_size_bytes = allowed_size_gb * 1024 * 1024 * 1024 LOG.debug(_("image_id=%(image_id)d, image_size_bytes=" @@ -1369,7 +1376,7 @@ def pre_live_migration(self, context, instance_id, time=None, # In addition, this method is creating filtering rule # onto destination host. self.driver.ensure_filtering_rules_for_instance(instance_ref, - network_info) + network_info) # Preparation for block migration if block_migration: diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py index 6ad4328b102..e8a657bac02 100644 --- a/nova/virt/libvirt/connection.py +++ b/nova/virt/libvirt/connection.py @@ -1538,9 +1538,9 @@ def ensure_filtering_rules_for_instance(self, instance_ref, network_info, # If any instances never launch at destination host, # basic-filtering must be set here. self.firewall_driver.setup_basic_filtering(instance_ref, network_info) - # setting up n)ova-instance-instance-xx mainly. + # setting up nova-instance-instance-xx mainly. self.firewall_driver.prepare_instance_filter(instance_ref, - network_info) + network_info) # wait for completion timeout_count = range(FLAGS.live_migration_retry_count)