Commit 808cb0ee authored by Jose A. Lopes's avatar Jose A. Lopes
Browse files

Change temporary disk from readonly to read-write



Making the temporary disk readonly has absolutely no advantages and it
has the disadvantage that it prevents the OS install helper from
saving temporary data to it, for example, when downloading the OS
install package which is necessary to run the OS scripts.
Signed-off-by: default avatarJose A. Lopes <jabolopes@google.com>
Reviewed-by: default avatarHrvoje Ribicic <riba@google.com>
parent 0dff3a96
...@@ -1567,15 +1567,9 @@ class LUInstanceCreate(LogicalUnit): ...@@ -1567,15 +1567,9 @@ class LUInstanceCreate(LogicalUnit):
disk_size = DetermineImageSize(self, install_image, instance.primary_node) disk_size = DetermineImageSize(self, install_image, instance.primary_node)
# KVM does not support readonly disks
if instance.hypervisor == constants.HT_KVM:
disk_access = constants.DISK_RDWR
else:
disk_access = constants.DISK_RDONLY
with TemporaryDisk(self, with TemporaryDisk(self,
instance, instance,
[(constants.DT_PLAIN, disk_access, disk_size)], [(constants.DT_PLAIN, constants.DISK_RDWR, disk_size)],
feedback_fn): feedback_fn):
feedback_fn("Activating instance disks") feedback_fn("Activating instance disks")
StartInstanceDisks(self, instance, False) StartInstanceDisks(self, instance, False)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment