Commit b6023d6c authored by Manuel Franceschini's avatar Manuel Franceschini
Browse files

Raise PrereqError when exporting file-based instance

This patch adds a check to LUExportInstance.CheckPrereq to raise an
error when an instance with file disks is exported.

Reviewed-by: ultrotter
parent 93cb65c5
......@@ -4490,6 +4490,12 @@ class LUExportInstance(LogicalUnit):
self.op.target_node)
self.op.target_node = self.dst_node.name
# instance disk type verification
for disk in self.instance.disks:
if disk.dev_type == constants.LD_FILE:
raise errors.OpPrereqError("Export not supported for instances with"
" file-based disks")
def Exec(self, feedback_fn):
"""Export an instance to an image in the cluster.
......
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