summaryrefslogtreecommitdiffstats
path: root/src/virtual/ogOperations.py
diff options
context:
space:
mode:
authorRoberto Hueso Gómez <rhueso@soleta.eu>2020-05-13 14:15:44 +0200
committerRoberto Hueso Gómez <rhueso@soleta.eu>2020-05-13 14:15:44 +0200
commitb63bd727f983853c14086cd2005221e9dc179ccb (patch)
tree728052f5845a1dfc86bf900325a0ffffdaa3b82f /src/virtual/ogOperations.py
parentff988b80b5776e3d796b309f48b8483772ff1fef (diff)
Change permissions on virtual images for /refresh
Write permission is not needed to get information about each virtual drive so this patch changes permissions to 'only read'. This can prevent race conditions.
Diffstat (limited to 'src/virtual/ogOperations.py')
-rw-r--r--src/virtual/ogOperations.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/virtual/ogOperations.py b/src/virtual/ogOperations.py
index a92f28f..02f50da 100644
--- a/src/virtual/ogOperations.py
+++ b/src/virtual/ogOperations.py
@@ -268,7 +268,7 @@ class OgVirtualOperations:
g = guestfs.GuestFS(python_return_dict=True)
g.add_drive_opts(part['virt-drive'],
format="qcow2",
- readonly=0)
+ readonly=1)
g.launch()
devices = g.list_devices()
assert(len(devices) == 1)