Commit 1bb1e297 authored by Guido Trotter's avatar Guido Trotter
Browse files

Check that filestorage is enabled when requested


Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent 2112772e
......@@ -7096,6 +7096,10 @@ class LUInstanceCreate(LogicalUnit):
raise errors.OpPrereqError("Invalid file driver name '%s'" %
self.op.file_driver, errors.ECODE_INVAL)
if (self.op.disk_template == constants.DT_FILE and
not constants.ENABLE_FILE_STORAGE):
raise errors.OpPrereqError("File storage disabled")
### Node/iallocator related checks
_CheckIAllocatorOrNode(self, "iallocator", "pnode")
......
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