Merge "Remove manual creation of console.log"
This commit is contained in:
@@ -15267,8 +15267,6 @@ class LibvirtDriverTestCase(test.NoDBTestCase):
|
|||||||
self.drvr._get_existing_domain_xml(mox.IgnoreArg(),
|
self.drvr._get_existing_domain_xml(mox.IgnoreArg(),
|
||||||
mox.IgnoreArg()).MultipleTimes().AndReturn(dummyxml)
|
mox.IgnoreArg()).MultipleTimes().AndReturn(dummyxml)
|
||||||
libvirt_utils.write_to_file(mox.IgnoreArg(), mox.IgnoreArg())
|
libvirt_utils.write_to_file(mox.IgnoreArg(), mox.IgnoreArg())
|
||||||
libvirt_utils.write_to_file(mox.IgnoreArg(), mox.IgnoreArg(),
|
|
||||||
mox.IgnoreArg())
|
|
||||||
|
|
||||||
mock_backend = mock.MagicMock()
|
mock_backend = mock.MagicMock()
|
||||||
imagebackend.Backend.image(instance, 'kernel.rescue', 'raw'
|
imagebackend.Backend.image(instance, 'kernel.rescue', 'raw'
|
||||||
@@ -15379,8 +15377,6 @@ class LibvirtDriverTestCase(test.NoDBTestCase):
|
|||||||
self.drvr._get_existing_domain_xml(mox.IgnoreArg(),
|
self.drvr._get_existing_domain_xml(mox.IgnoreArg(),
|
||||||
mox.IgnoreArg()).MultipleTimes().AndReturn(dummyxml)
|
mox.IgnoreArg()).MultipleTimes().AndReturn(dummyxml)
|
||||||
libvirt_utils.write_to_file(mox.IgnoreArg(), mox.IgnoreArg())
|
libvirt_utils.write_to_file(mox.IgnoreArg(), mox.IgnoreArg())
|
||||||
libvirt_utils.write_to_file(mox.IgnoreArg(), mox.IgnoreArg(),
|
|
||||||
mox.IgnoreArg())
|
|
||||||
|
|
||||||
mock_backend = mock.MagicMock()
|
mock_backend = mock.MagicMock()
|
||||||
imagebackend.Backend.image(instance, 'kernel.rescue', 'raw'
|
imagebackend.Backend.image(instance, 'kernel.rescue', 'raw'
|
||||||
|
|||||||
@@ -2920,10 +2920,6 @@ class LibvirtDriver(driver.ComputeDriver):
|
|||||||
|
|
||||||
LOG.info(_LI('Creating image'), instance=instance)
|
LOG.info(_LI('Creating image'), instance=instance)
|
||||||
|
|
||||||
# NOTE(vish): No need add the suffix to console.log
|
|
||||||
libvirt_utils.write_to_file(
|
|
||||||
self._get_console_log_path(instance), '', 7)
|
|
||||||
|
|
||||||
if not disk_images:
|
if not disk_images:
|
||||||
disk_images = {'image_id': instance.image_ref,
|
disk_images = {'image_id': instance.image_ref,
|
||||||
'kernel_id': instance.kernel_id,
|
'kernel_id': instance.kernel_id,
|
||||||
@@ -6406,12 +6402,6 @@ class LibvirtDriver(driver.ComputeDriver):
|
|||||||
# or rbd backed instance), instance path on destination has to
|
# or rbd backed instance), instance path on destination has to
|
||||||
# be prepared
|
# be prepared
|
||||||
|
|
||||||
# Touch the console.log file, required by libvirt.
|
|
||||||
console_file = self._get_console_log_path(instance)
|
|
||||||
LOG.debug('Touch instance console log: %s', console_file,
|
|
||||||
instance=instance)
|
|
||||||
libvirt_utils.file_open(console_file, 'a').close()
|
|
||||||
|
|
||||||
# if image has kernel and ramdisk, just download
|
# if image has kernel and ramdisk, just download
|
||||||
# following normal way.
|
# following normal way.
|
||||||
self._fetch_instance_kernel_ramdisk(context, instance)
|
self._fetch_instance_kernel_ramdisk(context, instance)
|
||||||
|
|||||||
Reference in New Issue
Block a user