nova/nova/virt/libvirt
Kashyap Chamarthy ca03fe8737 libvirt: Don't disregard cache mode for instance boot disks
One of the things this commit:

    commit 14c38ac0f2
    Author: Kashyap Chamarthy <kchamart@redhat.com>
    Date:   Thu Jul 20 19:01:23 2017 +0200

        libvirt: Post-migration, set cache value for Cinder volume(s)

    [...]

did was to supposedly remove "duplicate" calls to _set_cache_mode().

But that came back to bite us.

Now, while the Cinder volumes are taken care of w.r.t handling its cache
value during migration, but the above referred commit (14c38ac) seemed
to introduce a regression because it disregards the 'disk_cachemodes'
Nova config parameter altogether for boot disks -- i.e. even though if
a user set the cache mode to be 'writeback', it's ignored and
instead 'none' is set unconditionally.

Add the _set_cache_mode() calls back in _get_guest_storage_config().

Co-Authored-By: melanie witt <melwittt@gmail.com>

Closes-Bug: #1727558

 Conflicts:
	nova/virt/libvirt/driver.py

NOTE(melwitt): The conflict is from a helper function
_get_scsi_controller in ocata that doesn't exist in newton.

Change-Id: I7370cc2942a6c8c51ab5355b50a9e5666cca042e
(cherry picked from commit 24e79bcbf7)
(cherry picked from commit 60d6e87cac)
(cherry picked from commit fc10b54f25)
2017-10-26 22:47:20 +00:00
..
storage Fix decoding of encryption key passed to dmcrypt 2017-05-23 16:01:53 +01:00
volume Fixed indentation 2016-08-31 18:02:02 +02:00
__init__.py Remove vi modelines 2014-02-03 14:19:44 +00:00
blockinfo.py libvirt: Delete the lase_device of find_disk_dev_for_disk_bus 2016-11-28 10:45:08 +00:00
compat.py Replace deprecated LOG.warn with LOG.warning 2016-03-15 11:57:56 +00:00
config.py libvirt: Use the mirror element to detect job completion 2017-01-31 16:47:16 +00:00
designer.py libvirt: conditionally set script path for ethernet vif types 2017-03-21 15:32:35 -04:00
driver.py libvirt: Don't disregard cache mode for instance boot disks 2017-10-26 22:47:20 +00:00
firewall.py libvirt: ignore conflict when defining network filters 2016-09-30 20:48:23 +00:00
guest.py Use VIR_DOMAIN_BLOCK_REBASE_COPY_DEV when rebasing 2017-10-18 12:58:32 -04:00
host.py libvirt: cleanup baselineCPU return value checking 2016-06-15 17:35:47 +08:00
imagebackend.py Fix resizing in imagebackend.cache() 2016-09-09 18:36:23 +00:00
imagecache.py Fix imagecache.get_cache_fname() to work in python3 2016-06-07 05:36:08 -04:00
instancejobtracker.py Replace deprecated LOG.warn with LOG.warning 2016-03-15 11:57:56 +00:00
migration.py libvirt: prepare domain XML update for serial ports 2017-01-03 10:24:48 +00:00
utils.py Catch error and log warning when not able to update mtimes 2017-02-03 14:09:08 +00:00
vif.py libvirt: conditionally set script path for ethernet vif types 2017-03-21 15:32:35 -04:00