Commit 9c8c69bc authored by Helga Velroyen's avatar Helga Velroyen
Browse files

Removes obsolete 'enabled storage types'



Since managing of different storage units is now done using
disk templates and not storage types, we remove the obsolete
enabled storage types.
Signed-off-by: default avatarHelga Velroyen <helgav@google.com>
Reviewed-by: default avatarMichele Tartara <mtarara@google.com>
parent 2dae8d64
...@@ -81,8 +81,6 @@ __all__ = [ ...@@ -81,8 +81,6 @@ __all__ = [
"DST_NODE_OPT", "DST_NODE_OPT",
"EARLY_RELEASE_OPT", "EARLY_RELEASE_OPT",
"ENABLED_HV_OPT", "ENABLED_HV_OPT",
# FIXME: disable storage types once disk templates are fully implemented.
"ENABLED_STORAGE_TYPES_OPT",
"ENABLED_DISK_TEMPLATES_OPT", "ENABLED_DISK_TEMPLATES_OPT",
"ERROR_CODES_OPT", "ERROR_CODES_OPT",
"FAILURE_ONLY_OPT", "FAILURE_ONLY_OPT",
...@@ -1167,13 +1165,6 @@ ENABLED_HV_OPT = cli_option("--enabled-hypervisors", ...@@ -1167,13 +1165,6 @@ ENABLED_HV_OPT = cli_option("--enabled-hypervisors",
help="Comma-separated list of hypervisors", help="Comma-separated list of hypervisors",
type="string", default=None) type="string", default=None)
# FIXME: Remove once enabled disk templates are fully implemented.
ENABLED_STORAGE_TYPES_OPT = cli_option("--enabled-storage-types",
dest="enabled_storage_types",
help="Comma-separated list of "
"storage methods",
type="string", default=None)
ENABLED_DISK_TEMPLATES_OPT = cli_option("--enabled-disk-templates", ENABLED_DISK_TEMPLATES_OPT = cli_option("--enabled-disk-templates",
dest="enabled_disk_templates", dest="enabled_disk_templates",
help="Comma-separated list of " help="Comma-separated list of "
......
...@@ -457,8 +457,6 @@ def ShowClusterConfig(opts, args): ...@@ -457,8 +457,6 @@ def ShowClusterConfig(opts, args):
("OS search path", utils.CommaJoin(pathutils.OS_SEARCH_PATH)), ("OS search path", utils.CommaJoin(pathutils.OS_SEARCH_PATH)),
("ExtStorage Providers search path", ("ExtStorage Providers search path",
utils.CommaJoin(pathutils.ES_SEARCH_PATH)), utils.CommaJoin(pathutils.ES_SEARCH_PATH)),
("enabled storage types",
utils.CommaJoin(result["enabled_storage_types"])),
("enabled disk templates", ("enabled disk templates",
utils.CommaJoin(result["enabled_disk_templates"])), utils.CommaJoin(result["enabled_disk_templates"])),
]), ]),
...@@ -964,9 +962,6 @@ def SetClusterParams(opts, args): ...@@ -964,9 +962,6 @@ def SetClusterParams(opts, args):
opts.use_external_mip_script is not None or opts.use_external_mip_script is not None or
opts.prealloc_wipe_disks is not None or opts.prealloc_wipe_disks is not None or
opts.hv_state or opts.hv_state or
# FIXME: Remove 'enabled_storage_types' once 'enabled_disk_templates'
# are fully implemented.
opts.enabled_storage_types or
opts.enabled_disk_templates or opts.enabled_disk_templates or
opts.disk_state or opts.disk_state or
opts.ispecs_mem_size or opts.ispecs_mem_size or
...@@ -1000,11 +995,6 @@ def SetClusterParams(opts, args): ...@@ -1000,11 +995,6 @@ def SetClusterParams(opts, args):
if hvlist is not None: if hvlist is not None:
hvlist = hvlist.split(",") hvlist = hvlist.split(",")
# FIXME: Remove once 'enabled_disk_templates' are fully implemented.
enabled_storage_types = opts.enabled_storage_types
if enabled_storage_types is not None:
enabled_storage_types = enabled_storage_types.split(",")
enabled_disk_templates = opts.enabled_disk_templates enabled_disk_templates = opts.enabled_disk_templates
if enabled_disk_templates: if enabled_disk_templates:
enabled_disk_templates = enabled_disk_templates.split(",") enabled_disk_templates = enabled_disk_templates.split(",")
...@@ -1100,8 +1090,6 @@ def SetClusterParams(opts, args): ...@@ -1100,8 +1090,6 @@ def SetClusterParams(opts, args):
use_external_mip_script=ext_ip_script, use_external_mip_script=ext_ip_script,
hv_state=hv_state, hv_state=hv_state,
disk_state=disk_state, disk_state=disk_state,
# FIXME: remove once 'enabled_disk_templates' are fully implemented.
enabled_storage_types=enabled_storage_types,
enabled_disk_templates=enabled_disk_templates, enabled_disk_templates=enabled_disk_templates,
) )
SubmitOrSend(op, opts) SubmitOrSend(op, opts)
...@@ -1586,8 +1574,7 @@ commands = { ...@@ -1586,8 +1574,7 @@ commands = {
DRBD_HELPER_OPT, NODRBD_STORAGE_OPT, DEFAULT_IALLOCATOR_OPT, DRBD_HELPER_OPT, NODRBD_STORAGE_OPT, DEFAULT_IALLOCATOR_OPT,
RESERVED_LVS_OPT, DRY_RUN_OPT, PRIORITY_OPT, PREALLOC_WIPE_DISKS_OPT, RESERVED_LVS_OPT, DRY_RUN_OPT, PRIORITY_OPT, PREALLOC_WIPE_DISKS_OPT,
NODE_PARAMS_OPT, USE_EXTERNAL_MIP_SCRIPT, DISK_PARAMS_OPT, HV_STATE_OPT, NODE_PARAMS_OPT, USE_EXTERNAL_MIP_SCRIPT, DISK_PARAMS_OPT, HV_STATE_OPT,
DISK_STATE_OPT, SUBMIT_OPT, ENABLED_STORAGE_TYPES_OPT, DISK_STATE_OPT, SUBMIT_OPT, ENABLED_DISK_TEMPLATES_OPT] +
ENABLED_DISK_TEMPLATES_OPT] +
INSTANCE_POLICY_OPTS, INSTANCE_POLICY_OPTS,
"[opts...]", "[opts...]",
"Alters the parameters of the cluster"), "Alters the parameters of the cluster"),
......
...@@ -4494,10 +4494,6 @@ class LUClusterSetParams(LogicalUnit): ...@@ -4494,10 +4494,6 @@ class LUClusterSetParams(LogicalUnit):
if self.op.enabled_hypervisors is not None: if self.op.enabled_hypervisors is not None:
self.cluster.hvparams = self.new_hvparams self.cluster.hvparams = self.new_hvparams
self.cluster.enabled_hypervisors = self.op.enabled_hypervisors self.cluster.enabled_hypervisors = self.op.enabled_hypervisors
# FIXME: remove once 'enabled_disk_templates' is fully implemented.
if self.op.enabled_storage_types is not None:
self.cluster.enabled_storage_types = \
list(set(self.op.enabled_storage_types))
if self.op.enabled_disk_templates: if self.op.enabled_disk_templates:
self.cluster.enabled_disk_templates = \ self.cluster.enabled_disk_templates = \
list(set(self.op.enabled_disk_templates)) list(set(self.op.enabled_disk_templates))
......
...@@ -393,11 +393,6 @@ VALID_STORAGE_TYPES = compat.UniqueFrozenset([ ...@@ -393,11 +393,6 @@ VALID_STORAGE_TYPES = compat.UniqueFrozenset([
ST_SHARED_FILE, ST_SHARED_FILE,
]) ])
# Per default, only lvm is enabled.
DEFAULT_ENABLED_STORAGE_TYPES = compat.UniqueFrozenset([
ST_LVM_VG,
])
# Storage fields # Storage fields
# first two are valid in LU context only, not passed to backend # first two are valid in LU context only, not passed to backend
SF_NODE = "node" SF_NODE = "node"
......
...@@ -1541,9 +1541,6 @@ class Cluster(TaggableObject): ...@@ -1541,9 +1541,6 @@ class Cluster(TaggableObject):
"prealloc_wipe_disks", "prealloc_wipe_disks",
"hv_state_static", "hv_state_static",
"disk_state_static", "disk_state_static",
# Keeping this in temporarily to not break the build between patches of
# this series. Remove after 'enabled_disk_templates' is fully implemented.
"enabled_storage_types",
"enabled_disk_templates", "enabled_disk_templates",
] + _TIMESTAMPS + _UUID ] + _TIMESTAMPS + _UUID
......
...@@ -954,11 +954,6 @@ class OpClusterSetParams(OpCode): ...@@ -954,11 +954,6 @@ class OpClusterSetParams(OpCode):
" ``%s`` or ``%s``" % (constants.DDM_ADD, constants.DDM_REMOVE)), " ``%s`` or ``%s``" % (constants.DDM_ADD, constants.DDM_REMOVE)),
("use_external_mip_script", None, ht.TMaybeBool, ("use_external_mip_script", None, ht.TMaybeBool,
"Whether to use an external master IP address setup script"), "Whether to use an external master IP address setup script"),
# FIXME: remove once enabled disk templates are fully implemented.
("enabled_storage_types", None,
ht.TMaybe(ht.TAnd(ht.TListOf(ht.TElemOf(constants.VALID_STORAGE_TYPES)),
ht.TTrue)),
"List of enabled storage types"),
("enabled_disk_templates", None, ("enabled_disk_templates", None,
ht.TMaybe(ht.TAnd(ht.TListOf(ht.TElemOf(constants.DISK_TEMPLATES)), ht.TMaybe(ht.TAnd(ht.TListOf(ht.TElemOf(constants.DISK_TEMPLATES)),
ht.TTrue)), ht.TTrue)),
......
...@@ -706,9 +706,6 @@ $(buildObject "Cluster" "cluster" $ ...@@ -706,9 +706,6 @@ $(buildObject "Cluster" "cluster" $
, simpleField "primary_ip_family" [t| IpFamily |] , simpleField "primary_ip_family" [t| IpFamily |]
, simpleField "prealloc_wipe_disks" [t| Bool |] , simpleField "prealloc_wipe_disks" [t| Bool |]
, simpleField "ipolicy" [t| FilledIPolicy |] , simpleField "ipolicy" [t| FilledIPolicy |]
-- FIXME: Remove enabled storage types once enabled disk templates
-- is fully implemented.
, simpleField "enabled_storage_types" [t| [StorageType] |]
, simpleField "enabled_disk_templates" [t| [DiskTemplate] |] , simpleField "enabled_disk_templates" [t| [DiskTemplate] |]
] ]
++ timeStampFields ++ timeStampFields
......
...@@ -175,8 +175,6 @@ $(genOpCode "OpCode" ...@@ -175,8 +175,6 @@ $(genOpCode "OpCode"
, pHiddenOs , pHiddenOs
, pBlacklistedOs , pBlacklistedOs
, pUseExternalMipScript , pUseExternalMipScript
-- FIXME: Remove once enabled disk templates are fully implemented.
, pEnabledStorageTypes
, pEnabledDiskTemplates , pEnabledDiskTemplates
]) ])
, ("OpClusterRedistConf", []) , ("OpClusterRedistConf", [])
......
...@@ -237,8 +237,6 @@ module Ganeti.OpParams ...@@ -237,8 +237,6 @@ module Ganeti.OpParams
, pDependencies , pDependencies
, pComment , pComment
, pReason , pReason
-- FIXME: Remove once enabled disk templates are fully implemented
, pEnabledStorageTypes
, pEnabledDiskTemplates , pEnabledDiskTemplates
, dOldQuery , dOldQuery
, dOldQueryNoLocking , dOldQueryNoLocking
...@@ -761,13 +759,6 @@ pEnabledHypervisors = ...@@ -761,13 +759,6 @@ pEnabledHypervisors =
optionalField $ optionalField $
simpleField "enabled_hypervisors" [t| NonEmpty Hypervisor |] simpleField "enabled_hypervisors" [t| NonEmpty Hypervisor |]
-- | List of enabled storage methods.
-- FIXME: Remove once enabled disk templates are fully implemented.
pEnabledStorageTypes :: Field
pEnabledStorageTypes =
optionalField $
simpleField "enabled_storage_types" [t| NonEmpty StorageType |]
-- | List of enabled disk templates. -- | List of enabled disk templates.
pEnabledDiskTemplates :: Field pEnabledDiskTemplates :: Field
pEnabledDiskTemplates = pEnabledDiskTemplates =
......
...@@ -87,7 +87,6 @@ handleCall :: ConfigData -> LuxiOp -> IO (ErrorResult JSValue) ...@@ -87,7 +87,6 @@ handleCall :: ConfigData -> LuxiOp -> IO (ErrorResult JSValue)
handleCall cdata QueryClusterInfo = handleCall cdata QueryClusterInfo =
let cluster = configCluster cdata let cluster = configCluster cdata
hypervisors = clusterEnabledHypervisors cluster hypervisors = clusterEnabledHypervisors cluster
storageTypes = clusterEnabledStorageTypes cluster
diskTemplates = clusterEnabledDiskTemplates cluster diskTemplates = clusterEnabledDiskTemplates cluster
def_hv = case hypervisors of def_hv = case hypervisors of
x:_ -> showJSON x x:_ -> showJSON x
...@@ -141,9 +140,6 @@ handleCall cdata QueryClusterInfo = ...@@ -141,9 +140,6 @@ handleCall cdata QueryClusterInfo =
showJSON $ clusterPreallocWipeDisks cluster) showJSON $ clusterPreallocWipeDisks cluster)
, ("hidden_os", showJSON $ clusterHiddenOs cluster) , ("hidden_os", showJSON $ clusterHiddenOs cluster)
, ("blacklisted_os", showJSON $ clusterBlacklistedOs cluster) , ("blacklisted_os", showJSON $ clusterBlacklistedOs cluster)
-- FIXME: remove storage types once enabled disk templates are
-- fully implemented.
, ("enabled_storage_types", showJSON storageTypes)
, ("enabled_disk_templates", showJSON diskTemplates) , ("enabled_disk_templates", showJSON diskTemplates)
] ]
......
...@@ -163,8 +163,7 @@ instance Arbitrary OpCodes.OpCode where ...@@ -163,8 +163,7 @@ instance Arbitrary OpCodes.OpCode where
arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*>
emptyMUD <*> emptyMUD <*> arbitrary <*> emptyMUD <*> emptyMUD <*> arbitrary <*>
arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*>
arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary
arbitrary
"OP_CLUSTER_REDIST_CONF" -> pure OpCodes.OpClusterRedistConf "OP_CLUSTER_REDIST_CONF" -> pure OpCodes.OpClusterRedistConf
"OP_CLUSTER_ACTIVATE_MASTER_IP" -> "OP_CLUSTER_ACTIVATE_MASTER_IP" ->
pure OpCodes.OpClusterActivateMasterIp pure OpCodes.OpClusterActivateMasterIp
......
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