Commit 7ec47185 authored by Dimitris Bliablias's avatar Dimitris Bliablias Committed by Petr Pudlak
Browse files

Add Gluster type to the node storage reporting set

This patch, adds the 'gluster' storage type to the set of storage types
for which full node storage reporting is available. This set is used by
the 'LUNodeQueryStorage' logical unit for getting information on storage
units on node(s).
Signed-off-by: default avatarDimitris Bliablias <>
Signed-off-by: default avatarPetr Pudlak <>
Reviewed-by: default avatarPetr Pudlak <>
parent ba550291
......@@ -90,6 +90,7 @@ _USER_STORAGE_TYPE = {
constants.ST_LVM_PV: "lvm-pv",
constants.ST_LVM_VG: "lvm-vg",
constants.ST_SHARED_FILE: "sharedfile",
constants.ST_GLUSTER: "gluster",
......@@ -1147,13 +1147,9 @@ def _GetStorageTypeArgs(cfg, storage_type):
if storage_type == constants.ST_FILE:
return [[cfg.GetFileStorageDir()]]
elif storage_type == constants.ST_SHARED_FILE:
dts = cfg.GetClusterInfo().enabled_disk_templates
paths = []
if constants.DT_SHARED_FILE in dts:
if constants.DT_GLUSTER in dts:
return [paths]
return [[cfg.GetSharedFileStorageDir()]]
elif storage_type == constants.ST_GLUSTER:
return [[cfg.GetGlusterStorageDir()]]
return []
......@@ -471,6 +471,7 @@ _STORAGE_TYPES = {
constants.ST_LVM_PV: LvmPvStorage,
constants.ST_LVM_VG: LvmVgStorage,
constants.ST_SHARED_FILE: FileStorage,
constants.ST_GLUSTER: FileStorage,
......@@ -451,7 +451,7 @@ parsing by scripts. In both cases, the ``--units`` option can be
used to enforce a given output unit.
The ``--storage-type`` option can be used to choose a storage unit
type. Possible choices are lvm-pv, lvm-vg or file.
type. Possible choices are lvm-pv, lvm-vg, file, sharedfile and gluster.
The ``-o (--output)`` option takes a comma-separated list of output
fields. The available fields and their meaning are:
......@@ -737,7 +737,9 @@ stsReport = ConstantUtils.mkSet [stFile, stLvmPv, stLvmVg]
-- | (as used by LUQueryNodeStorage)
stsReportNodeStorage :: FrozenSet String
stsReportNodeStorage = ConstantUtils.union stsReport $
ConstantUtils.mkSet [stSharedFile]
ConstantUtils.mkSet [ stSharedFile
, stGluster
-- * Storage fields
-- ** First two are valid in LU context only, not passed to backend
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