sbcli-pre 1.2.3__zip → 1.2.5__zip
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/PKG-INFO +20 -5
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/README.md +19 -4
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/env_var +1 -1
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/sbcli_pre.egg-info/PKG-INFO +20 -5
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/sbcli_pre.egg-info/SOURCES.txt +5 -5
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_cli/cli.py +115 -113
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/cluster_ops.py +238 -141
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/constants.py +7 -5
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/controllers/caching_node_controller.py +6 -8
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/controllers/cluster_events.py +0 -9
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/controllers/device_controller.py +63 -56
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/controllers/events_controller.py +3 -5
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/controllers/health_controller.py +40 -30
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/controllers/lvol_controller.py +36 -42
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/controllers/pool_controller.py +4 -8
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/controllers/snapshot_controller.py +3 -9
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/distr_controller.py +9 -13
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/kv_store.py +29 -47
- sbcli_pre-1.2.5/simplyblock_core/mgmt_node_ops.py +80 -0
- sbcli_pre-1.2.5/simplyblock_core/models/deployer.py +62 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/models/events.py +1 -9
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/models/job_schedule.py +0 -6
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/models/nvme_device.py +4 -42
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/models/storage_node.py +1 -9
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/rpc_client.py +10 -55
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/scripts/__init__.py +4 -0
- sbcli_pre-1.2.3/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 → sbcli_pre-1.2.5/simplyblock_core/scripts/alerting/alert_resources.yaml +5 -54
- sbcli_pre-1.2.5/simplyblock_core/scripts/apply_dashboard.sh +22 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/scripts/dashboards/cluster.json +1 -1
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/scripts/deploy_stack.sh +0 -2
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +13 -22
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/scripts/docker-compose-swarm.yml +2 -17
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/scripts/haproxy.cfg +0 -15
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/scripts/install_deps.sh +0 -1
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/services/capacity_and_stats_collector.py +1 -1
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/services/device_monitor.py +44 -3
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/services/distr_event_collector.py +11 -10
- sbcli_pre-1.2.5/simplyblock_core/services/health_check_service.py +136 -0
- sbcli_pre-1.2.3/simplyblock_core/services/tasks_runner_restart.py → sbcli_pre-1.2.5/simplyblock_core/services/job_tasks.py +46 -93
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/services/lvol_monitor.py +1 -1
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/services/lvol_stat_collector.py +1 -1
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/services/port_stat_collector.py +1 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/services/storage_node_monitor.py +44 -49
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/snode_client.py +0 -12
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/storage_node_ops.py +336 -525
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/utils.py +1 -46
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/app.py +2 -1
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/blueprints/snode_ops.py +25 -103
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/blueprints/web_api_cluster.py +43 -20
- sbcli_pre-1.2.5/simplyblock_web/blueprints/web_api_deployer.py +394 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/blueprints/web_api_device.py +7 -10
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/blueprints/web_api_lvol.py +5 -9
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/blueprints/web_api_pool.py +5 -14
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/blueprints/web_api_storage_node.py +10 -3
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/node_utils.py +2 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/utils.py +0 -8
- sbcli_pre-1.2.3/simplyblock_core/controllers/tasks_controller.py +0 -103
- sbcli_pre-1.2.3/simplyblock_core/controllers/tasks_events.py +0 -37
- sbcli_pre-1.2.3/simplyblock_core/mgmt_node_ops.py +0 -205
- sbcli_pre-1.2.3/simplyblock_core/services/health_check_service.py +0 -134
- sbcli_pre-1.2.3/simplyblock_core/services/tasks_runner_migration.py +0 -61
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/pyproject.toml +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/sbcli_pre.egg-info/dependency_links.txt +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/sbcli_pre.egg-info/entry_points.txt +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/sbcli_pre.egg-info/requires.txt +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/sbcli_pre.egg-info/top_level.txt +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/setup.cfg +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/setup.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_cli/main.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/__init__.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/compute_node_ops.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/models/cluster.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/models/compute_node.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/models/global_settings.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/models/iface.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/models/lvol_model.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/models/pool.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/models/stats.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/scripts/prometheus.yml +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/services/log_agg_service.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/__init__.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/caching_node_app.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/caching_node_app_k8s.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/snode_app.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/static/delete.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/static/tst.py +0 -0
- {sbcli_pre-1.2.3 → sbcli_pre-1.2.5}/simplyblock_web/templates/deploy_spdk.yaml.j2 +0 -0
@@ -10,8 +10,7 @@ from simplyblock_core import compute_node_ops as compute_ops
|
|
10
10
|
from simplyblock_core import storage_node_ops as storage_ops
|
11
11
|
from simplyblock_core import mgmt_node_ops as mgmt_ops
|
12
12
|
from simplyblock_core import constants
|
13
|
-
from simplyblock_core.controllers import pool_controller, lvol_controller, snapshot_controller, device_controller
|
14
|
-
tasks_controller
|
13
|
+
from simplyblock_core.controllers import pool_controller, lvol_controller, snapshot_controller, device_controller
|
15
14
|
from simplyblock_core.controllers import caching_node_controller, health_controller
|
16
15
|
from simplyblock_core.models.pool import Pool
|
17
16
|
|
@@ -39,10 +38,10 @@ class CLIWrapper:
|
|
39
38
|
sub_command.add_argument("cluster_id", help='UUID of the cluster to which the node will belong')
|
40
39
|
sub_command.add_argument("node_ip", help='IP of storage node to add')
|
41
40
|
sub_command.add_argument("ifname", help='Management interface name')
|
42
|
-
sub_command.add_argument("--
|
43
|
-
sub_command.add_argument("--jm-percent", help='Number in percent to use for JM from each device',
|
44
|
-
type=int, default=3, dest='jm_percent')
|
41
|
+
sub_command.add_argument("--jm-pcie", help='JM device address', dest='jm_pcie')
|
45
42
|
sub_command.add_argument("--data-nics", help='Data interface names', nargs='+', dest='data_nics')
|
43
|
+
sub_command.add_argument("--cpu-mask", help='SPDK app CPU mask, default is all cores found',
|
44
|
+
dest='spdk_cpu_mask')
|
46
45
|
sub_command.add_argument("--memory", help='SPDK huge memory allocation, default is 4G', dest='spdk_mem')
|
47
46
|
sub_command.add_argument("--spdk-image", help='SPDK image uri', dest='spdk_image')
|
48
47
|
sub_command.add_argument("--spdk-debug", help='Enable spdk debug logs', dest='spdk_debug', required=False, action='store_true')
|
@@ -65,7 +64,7 @@ class CLIWrapper:
|
|
65
64
|
dest='force_migrate', required=False, action='store_true')
|
66
65
|
# List all storage nodes
|
67
66
|
sub_command = self.add_sub_command(subparser, "list", 'List storage nodes')
|
68
|
-
sub_command.add_argument("--cluster-id", help='id of the cluster for which nodes are listed'
|
67
|
+
sub_command.add_argument("--cluster-id", help='id of the cluster for which nodes are listed')
|
69
68
|
sub_command.add_argument("--json", help='Print outputs in json format', action='store_true')
|
70
69
|
|
71
70
|
sub_command = self.add_sub_command(subparser, "get", 'Get storage node info')
|
@@ -73,10 +72,11 @@ class CLIWrapper:
|
|
73
72
|
|
74
73
|
# Restart storage node
|
75
74
|
sub_command = self.add_sub_command(
|
76
|
-
subparser, "restart", 'Restart a storage node', usage='All functions and device drivers will be reset. '
|
75
|
+
subparser, "restart", 'Restart a storage node.', usage='All functions and device drivers will be reset. '
|
77
76
|
'During restart, the node does not accept IO. In a high-availability setup, '
|
78
|
-
'this will not impact operations')
|
77
|
+
'this will not impact operations.')
|
79
78
|
sub_command.add_argument("node_id", help='UUID of storage node')
|
79
|
+
sub_command.add_argument("--cpu-mask", help='SPDK app CPU mask, default is all cores found', dest='spdk_cpu_mask')
|
80
80
|
sub_command.add_argument("--memory", help='SPDK huge memory allocation, default is 4G', dest='spdk_mem')
|
81
81
|
sub_command.add_argument("--spdk-image", help='SPDK image uri', dest='spdk_image')
|
82
82
|
sub_command.add_argument("--spdk-debug", help='Enable spdk debug logs', dest='spdk_debug', required=False, action='store_true')
|
@@ -90,7 +90,7 @@ class CLIWrapper:
|
|
90
90
|
|
91
91
|
# Shutdown storage node
|
92
92
|
sub_command = self.add_sub_command(
|
93
|
-
subparser, "shutdown", 'Shutdown a storage node', usage='Once the command is issued, the node will stop accepting '
|
93
|
+
subparser, "shutdown", 'Shutdown a storage node.', usage='Once the command is issued, the node will stop accepting '
|
94
94
|
'IO,but IO, which was previously received, will still be processed. '
|
95
95
|
'In a high-availability setup, this will not impact operations.')
|
96
96
|
sub_command.add_argument("node_id", help='UUID of storage node')
|
@@ -98,7 +98,7 @@ class CLIWrapper:
|
|
98
98
|
|
99
99
|
# Suspend storage node
|
100
100
|
sub_command = self.add_sub_command(
|
101
|
-
subparser, "suspend", 'Suspend a storage node', usage='The node will stop accepting new IO, but will finish '
|
101
|
+
subparser, "suspend", 'Suspend a storage node.', usage='The node will stop accepting new IO, but will finish '
|
102
102
|
'processing any IO, which has been received already.')
|
103
103
|
sub_command.add_argument("node_id", help='UUID of storage node')
|
104
104
|
sub_command.add_argument("--force", help='Force node suspend', required=False, action='store_true')
|
@@ -107,13 +107,13 @@ class CLIWrapper:
|
|
107
107
|
sub_command = self.add_sub_command(subparser, "resume", 'Resume a storage node')
|
108
108
|
sub_command.add_argument("node_id", help='UUID of storage node')
|
109
109
|
|
110
|
-
sub_command = self.add_sub_command(subparser, "get-io-stats", '
|
110
|
+
sub_command = self.add_sub_command(subparser, "get-io-stats", 'Returns the current io statistics of a node')
|
111
111
|
sub_command.add_argument("node_id", help='Node ID')
|
112
112
|
sub_command.add_argument("--history", help='list history records -one for every 15 minutes- '
|
113
113
|
'for XX days and YY hours -up to 10 days in total-, format: XXdYYh')
|
114
114
|
|
115
115
|
sub_command = self.add_sub_command(
|
116
|
-
subparser, 'get-capacity', '
|
116
|
+
subparser, 'get-capacity', 'Returns the size, absolute and relative utilization of the node in bytes')
|
117
117
|
sub_command.add_argument("node_id", help='Node ID')
|
118
118
|
sub_command.add_argument("--history", help='list history records -one for every 15 minutes- '
|
119
119
|
'for XX days and YY hours -up to 10 days in total-, format: XXdYYh')
|
@@ -126,7 +126,7 @@ class CLIWrapper:
|
|
126
126
|
sub_command.add_argument(
|
127
127
|
"--json", help='Print outputs in json format', required=False, action='store_true')
|
128
128
|
|
129
|
-
sub_command = self.add_sub_command(subparser, "device-testing-mode", '
|
129
|
+
sub_command = self.add_sub_command(subparser, "device-testing-mode", 'set pt testing bdev mode')
|
130
130
|
sub_command.add_argument("device_id", help='Device UUID')
|
131
131
|
sub_command.add_argument("mode", help='Testing mode', choices=[
|
132
132
|
'full_pass_through', 'io_error_on_read', 'io_error_on_write',
|
@@ -144,7 +144,7 @@ class CLIWrapper:
|
|
144
144
|
sub_command.add_argument("device_id", help='the devices\'s UUID')
|
145
145
|
|
146
146
|
# Reset storage device
|
147
|
-
sub_command = self.add_sub_command(subparser, "restart-device", '
|
147
|
+
sub_command = self.add_sub_command(subparser, "restart-device", 'Re add "removed" storage device',
|
148
148
|
usage="a previously removed or unavailable device may be returned into "
|
149
149
|
"online state. If the device is not physically present, accessible "
|
150
150
|
"or healthy, it will flip back into unavailable state again.")
|
@@ -157,29 +157,30 @@ class CLIWrapper:
|
|
157
157
|
"auto-rebalancing background process in which some cluster "
|
158
158
|
"capacity is re-distributed to this newly added device.")
|
159
159
|
sub_command = self.add_sub_command(
|
160
|
-
subparser, 'remove-device', 'Remove a storage device', usage='The device will become unavailable, independently '
|
160
|
+
subparser, 'remove-device', 'Remove a storage device.', usage='The device will become unavailable, independently '
|
161
161
|
'if it was physically removed from the server. This function can be used if '
|
162
162
|
'auto-detection of removal did not work or if the device must be maintained '
|
163
163
|
'otherwise while remaining inserted into the server. ')
|
164
164
|
sub_command.add_argument("device_id", help='Storage device ID')
|
165
165
|
sub_command.add_argument("--force", help='Force device remove', required=False, action='store_true')
|
166
166
|
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
167
|
+
sub_command = self.add_sub_command(
|
168
|
+
subparser, 'set-failed-device', 'Set storage device to failed state. ', usage='This command can be used, '
|
169
|
+
'if an administrator believes that the device must be changed, '
|
170
|
+
'but its status and health state do not lead to an automatic detection '
|
171
|
+
'of the failure state. Attention!!! The failed state is final, all data '
|
172
|
+
'on the device will be automatically recovered to other devices '
|
173
|
+
'in the cluster. ')
|
174
174
|
|
175
175
|
sub_command = self.add_sub_command(
|
176
|
-
subparser, 'get-capacity-device', '
|
176
|
+
subparser, 'get-capacity-device', 'Returns the size, absolute and relative utilization of '
|
177
|
+
'the device in bytes')
|
177
178
|
sub_command.add_argument("device_id", help='Storage device ID')
|
178
179
|
sub_command.add_argument("--history", help='list history records -one for every 15 minutes- '
|
179
180
|
'for XX days and YY hours -up to 10 days in total-, format: XXdYYh')
|
180
181
|
|
181
182
|
sub_command = self.add_sub_command(
|
182
|
-
subparser, 'get-io-stats-device', '
|
183
|
+
subparser, 'get-io-stats-device', 'Returns device IO statistics')
|
183
184
|
sub_command.add_argument("device_id", help='Storage device ID')
|
184
185
|
sub_command.add_argument("--history", help='list history records -one for every 15 minutes- '
|
185
186
|
'for XX days and YY hours -up to 10 days in total-, format: XXdYYh')
|
@@ -236,23 +237,6 @@ class CLIWrapper:
|
|
236
237
|
dest='log_del_interval', default='7d')
|
237
238
|
sub_command.add_argument("--metrics-retention-period", help='retention period for prometheus metrics, default: 7d',
|
238
239
|
dest='metrics_retention_period', default='7d')
|
239
|
-
sub_command.add_argument("--contact-point", help='the email or slack webhook url to be used for alerting',
|
240
|
-
dest='contact_point', default='')
|
241
|
-
sub_command.add_argument("--grafana-endpoint", help='the endpoint url for grafana',
|
242
|
-
dest='grafana_endpoint', default='')
|
243
|
-
|
244
|
-
# add cluster
|
245
|
-
sub_command = self.add_sub_command(subparser, 'add', 'Add new cluster')
|
246
|
-
sub_command.add_argument("--blk_size", help='The block size in bytes', type=int, choices=[512, 4096], default=512)
|
247
|
-
sub_command.add_argument("--page_size", help='The size of a data page in bytes', type=int, default=2097152)
|
248
|
-
sub_command.add_argument("--cap-warn", help='Capacity warning level in percent, default=80',
|
249
|
-
type=int, required=False, dest="cap_warn")
|
250
|
-
sub_command.add_argument("--cap-crit", help='Capacity critical level in percent, default=90',
|
251
|
-
type=int, required=False, dest="cap_crit")
|
252
|
-
sub_command.add_argument("--prov-cap-warn", help='Capacity warning level in percent, default=180',
|
253
|
-
type=int, required=False, dest="prov_cap_warn")
|
254
|
-
sub_command.add_argument("--prov-cap-crit", help='Capacity critical level in percent, default=190',
|
255
|
-
type=int, required=False, dest="prov_cap_crit")
|
256
240
|
|
257
241
|
# show cluster list
|
258
242
|
self.add_sub_command(subparser, 'list', 'Show clusters list')
|
@@ -275,33 +259,36 @@ class CLIWrapper:
|
|
275
259
|
sub_command.add_argument("cluster_id", help='the cluster UUID')
|
276
260
|
|
277
261
|
sub_command = self.add_sub_command(
|
278
|
-
subparser, 'get-capacity', '
|
262
|
+
subparser, 'get-capacity', 'Returns the current total available capacity, utilized capacity '
|
263
|
+
'(in percent and absolute) and provisioned capacity (in percent and absolute) '
|
264
|
+
'in GB in the cluster.')
|
279
265
|
sub_command.add_argument("cluster_id", help='the cluster UUID')
|
280
266
|
sub_command.add_argument("--json", help='Print json output', required=False, action='store_true')
|
281
267
|
sub_command.add_argument("--history", help='(XXdYYh), list history records (one for every 15 minutes) '
|
282
268
|
'for XX days and YY hours (up to 10 days in total).')
|
283
269
|
|
284
270
|
sub_command = self.add_sub_command(
|
285
|
-
subparser, 'get-io-stats', '
|
271
|
+
subparser, 'get-io-stats', 'Returns cluster IO statistics.')
|
286
272
|
sub_command.add_argument("cluster_id", help='the cluster UUID')
|
287
273
|
sub_command.add_argument("--records", help='Number of records, default: 20', type=int, default=20)
|
288
274
|
sub_command.add_argument("--history", help='(XXdYYh), list history records (one for every 15 minutes) '
|
289
275
|
'for XX days and YY hours (up to 10 days in total).')
|
290
276
|
|
291
|
-
|
292
|
-
|
293
|
-
|
277
|
+
sub_command = self.add_sub_command(
|
278
|
+
subparser, 'get-cli-ssh-pass', 'returns the ssh password for the CLI ssh connection')
|
279
|
+
sub_command.add_argument("cluster_id", help='the cluster UUID')
|
294
280
|
|
295
281
|
# get-logs
|
296
282
|
sub_command = self.add_sub_command(subparser, 'get-logs', 'Returns cluster status logs')
|
297
283
|
sub_command.add_argument("cluster_id", help='cluster uuid')
|
298
284
|
|
299
285
|
# get-secret
|
300
|
-
sub_command = self.add_sub_command(subparser, 'get-secret', '
|
286
|
+
sub_command = self.add_sub_command(subparser, 'get-secret', 'Returns auto generated, 20 characters secret.')
|
301
287
|
sub_command.add_argument("cluster_id", help='cluster uuid')
|
302
288
|
|
303
289
|
# set-secret
|
304
|
-
sub_command = self.add_sub_command(subparser, 'upd-secret', 'Updates the
|
290
|
+
sub_command = self.add_sub_command(subparser, 'upd-secret', 'Updates the secret (replaces the existing '
|
291
|
+
'one with a new one) and returns the new one.')
|
305
292
|
sub_command.add_argument("cluster_id", help='cluster uuid')
|
306
293
|
sub_command.add_argument("secret", help='new 20 characters password')
|
307
294
|
|
@@ -325,16 +312,6 @@ class CLIWrapper:
|
|
325
312
|
sub_command = self.add_sub_command(subparser, "list-tasks", 'List tasks by cluster ID')
|
326
313
|
sub_command.add_argument("cluster_id", help='UUID of the cluster')
|
327
314
|
|
328
|
-
# cancel task
|
329
|
-
sub_command = self.add_sub_command(subparser, "cancel-task", 'Cancel task by ID')
|
330
|
-
sub_command.add_argument("id", help='UUID of the Task')
|
331
|
-
|
332
|
-
# delete cluster
|
333
|
-
sub_command = self.add_sub_command(
|
334
|
-
subparser, 'delete', 'Delete Cluster',
|
335
|
-
usage="This is only possible, if no storage nodes and pools are attached to the cluster")
|
336
|
-
sub_command.add_argument("id", help='cluster UUID')
|
337
|
-
|
338
315
|
|
339
316
|
#
|
340
317
|
# ----------------- lvol -----------------
|
@@ -385,9 +362,8 @@ class CLIWrapper:
|
|
385
362
|
sub_command.add_argument("--max-w-mbytes", help='Maximum Write Mega Bytes Per Second', type=int)
|
386
363
|
|
387
364
|
# list lvols
|
388
|
-
sub_command = self.add_sub_command(subparser, 'list', 'List LVols')
|
389
|
-
sub_command.add_argument("--cluster-id", help='List LVols in particular cluster'
|
390
|
-
sub_command.add_argument("--pool", help='List LVols in particular Pool ID or name', dest="pool")
|
365
|
+
sub_command = self.add_sub_command(subparser, 'list', 'List all LVols')
|
366
|
+
sub_command.add_argument("--cluster-id", help='List LVols in particular cluster')
|
391
367
|
sub_command.add_argument("--json", help='Print outputs in json format', required=False, action='store_true')
|
392
368
|
|
393
369
|
# Get the size and max_size of the lvol
|
@@ -402,7 +378,7 @@ class CLIWrapper:
|
|
402
378
|
|
403
379
|
# delete lvol
|
404
380
|
sub_command = self.add_sub_command(
|
405
|
-
subparser, 'delete', 'Delete LVol', usage='This is only possible, if no more snapshots and non-inflated clones '
|
381
|
+
subparser, 'delete', 'Delete LVol.', usage='This is only possible, if no more snapshots and non-inflated clones '
|
406
382
|
'of the volume exist. The volume must be suspended before it can be deleted. ')
|
407
383
|
sub_command.add_argument("id", help='LVol id or ids', nargs='+')
|
408
384
|
sub_command.add_argument("--force", help='Force delete LVol from the cluster', required=False,
|
@@ -410,13 +386,13 @@ class CLIWrapper:
|
|
410
386
|
|
411
387
|
# show connection string
|
412
388
|
sub_command = self.add_sub_command(
|
413
|
-
subparser, 'connect', '
|
389
|
+
subparser, 'connect', 'show connection strings to cluster.', usage='Multiple connections to the cluster are '
|
414
390
|
'always available for multi-pathing and high-availability.')
|
415
391
|
sub_command.add_argument("id", help='LVol id')
|
416
392
|
|
417
393
|
# lvol resize
|
418
394
|
sub_command = self.add_sub_command(
|
419
|
-
subparser, 'resize', 'Resize LVol', usage='The lvol cannot be exceed the maximum size for lvols. It cannot '
|
395
|
+
subparser, 'resize', 'Resize LVol.', usage='The lvol cannot be exceed the maximum size for lvols. It cannot '
|
420
396
|
'exceed total remaining provisioned space in pool. It cannot drop below the '
|
421
397
|
'current utilization.')
|
422
398
|
sub_command.add_argument("id", help='LVol id')
|
@@ -443,22 +419,23 @@ class CLIWrapper:
|
|
443
419
|
|
444
420
|
# lvol get-capacity
|
445
421
|
sub_command = self.add_sub_command(
|
446
|
-
subparser, 'get-capacity',
|
422
|
+
subparser, 'get-capacity', 'Returns the current (or historic) provisioned and utilized '
|
423
|
+
'(in percent and absolute) capacity.')
|
447
424
|
sub_command.add_argument("id", help='LVol id')
|
448
425
|
sub_command.add_argument("--history", help='(XXdYYh), list history records (one for every 15 minutes) '
|
449
426
|
'for XX days and YY hours (up to 10 days in total).')
|
450
427
|
|
451
428
|
# lvol get-io-stats
|
452
429
|
sub_command = self.add_sub_command(
|
453
|
-
subparser, 'get-io-stats', help="
|
430
|
+
subparser, 'get-io-stats', help="Returns LVol IO statistics")
|
454
431
|
sub_command.add_argument("id", help='LVol id')
|
455
432
|
sub_command.add_argument("--history", help='(XXdYYh), list history records (one for every 15 minutes) '
|
456
433
|
'for XX days and YY hours (up to 10 days in total).')
|
457
434
|
|
458
|
-
sub_command = self.add_sub_command(subparser, 'send-cluster-map', 'send cluster map')
|
435
|
+
sub_command = self.add_sub_command(subparser, 'send-cluster-map', 'send distr cluster map')
|
459
436
|
sub_command.add_argument("id", help='LVol id')
|
460
437
|
|
461
|
-
sub_command = self.add_sub_command(subparser, 'get-cluster-map', 'get cluster map')
|
438
|
+
sub_command = self.add_sub_command(subparser, 'get-cluster-map', 'get distr cluster map')
|
462
439
|
sub_command.add_argument("id", help='LVol id')
|
463
440
|
|
464
441
|
# check lvol
|
@@ -469,7 +446,7 @@ class CLIWrapper:
|
|
469
446
|
# mgmt-node ops
|
470
447
|
subparser = self.add_command('mgmt', 'Management node commands')
|
471
448
|
|
472
|
-
sub_command = self.add_sub_command(subparser, 'add', 'Add Management node to the cluster
|
449
|
+
sub_command = self.add_sub_command(subparser, 'add', 'Add Management node to the cluster')
|
473
450
|
sub_command.add_argument("cluster_ip", help='the cluster IP address')
|
474
451
|
sub_command.add_argument("cluster_id", help='the cluster UUID')
|
475
452
|
sub_command.add_argument("ifname", help='Management interface name')
|
@@ -485,7 +462,6 @@ class CLIWrapper:
|
|
485
462
|
# add pool
|
486
463
|
sub_command = self.add_sub_command(subparser, 'add', 'Add a new Pool')
|
487
464
|
sub_command.add_argument("name", help='Pool name')
|
488
|
-
sub_command.add_argument("cluster_id", help='Cluster UUID')
|
489
465
|
sub_command.add_argument("--pool-max", help='Pool maximum size: 20M, 20G, 0(default)', default="0")
|
490
466
|
sub_command.add_argument("--lvol-max", help='LVol maximum size: 20M, 20G, 0(default)', default="0")
|
491
467
|
sub_command.add_argument("--max-rw-iops", help='Maximum Read Write IO Per Second', type=int)
|
@@ -509,8 +485,7 @@ class CLIWrapper:
|
|
509
485
|
# list pools
|
510
486
|
sub_command = self.add_sub_command(subparser, 'list', 'List pools')
|
511
487
|
sub_command.add_argument("--json", help='Print outputs in json format', required=False, action='store_true')
|
512
|
-
sub_command.add_argument("--cluster-id", help='ID of the cluster',
|
513
|
-
|
488
|
+
sub_command.add_argument("--cluster-id", help='ID of the cluster', required=False, action='store_true')
|
514
489
|
# get pool
|
515
490
|
sub_command = self.add_sub_command(subparser, 'get', 'get pool details')
|
516
491
|
sub_command.add_argument("id", help='pool uuid')
|
@@ -531,21 +506,24 @@ class CLIWrapper:
|
|
531
506
|
sub_command.add_argument("pool_id", help='pool uuid')
|
532
507
|
|
533
508
|
# get-secret
|
534
|
-
sub_command = self.add_sub_command(subparser, 'get-secret', '
|
509
|
+
sub_command = self.add_sub_command(subparser, 'get-secret', 'Returns auto generated, 20 characters secret.')
|
535
510
|
sub_command.add_argument("pool_id", help='pool uuid')
|
536
511
|
|
537
512
|
# get-secret
|
538
|
-
sub_command = self.add_sub_command(subparser, 'upd-secret', 'Updates
|
513
|
+
sub_command = self.add_sub_command(subparser, 'upd-secret', 'Updates the secret (replaces the existing '
|
514
|
+
'one with a new one) and returns the new one.')
|
539
515
|
sub_command.add_argument("pool_id", help='pool uuid')
|
540
516
|
sub_command.add_argument("secret", help='new 20 characters password')
|
541
517
|
|
542
518
|
# get-capacity
|
543
|
-
sub_command = self.add_sub_command(subparser, 'get-capacity', '
|
519
|
+
sub_command = self.add_sub_command(subparser, 'get-capacity', 'Return provisioned, utilized (absolute) '
|
520
|
+
'and utilized (percent) storage on the Pool.')
|
544
521
|
sub_command.add_argument("pool_id", help='pool uuid')
|
545
522
|
|
546
523
|
# get-io-stats
|
547
524
|
sub_command = self.add_sub_command(
|
548
|
-
subparser, 'get-io-stats', '
|
525
|
+
subparser, 'get-io-stats', 'Returns either the current or historic io statistics '
|
526
|
+
'(read-IO, write-IO, total-IO, read mbs, write mbs, total mbs).')
|
549
527
|
sub_command.add_argument("id", help='Pool id')
|
550
528
|
sub_command.add_argument("--history", help='(XXdYYh), list history records (one for every 15 minutes) '
|
551
529
|
'for XX days and YY hours (up to 10 days in total).')
|
@@ -599,7 +577,7 @@ class CLIWrapper:
|
|
599
577
|
sub_command.add_argument("node_id", help='Caching node UUID')
|
600
578
|
sub_command.add_argument("lvol_id", help='LVol UUID')
|
601
579
|
|
602
|
-
sub_command = self.add_sub_command(subparser, 'recreate', 'recreate Caching node bdevs')
|
580
|
+
sub_command = self.add_sub_command(subparser, 'recreate', 'recreate Caching node bdevs ')
|
603
581
|
sub_command.add_argument("node_id", help='Caching node UUID')
|
604
582
|
|
605
583
|
def init_parser(self):
|
@@ -635,6 +613,9 @@ class CLIWrapper:
|
|
635
613
|
elif sub_command == "deploy-cleaner":
|
636
614
|
ret = storage_ops.deploy_cleaner()
|
637
615
|
|
616
|
+
elif sub_command == "add":
|
617
|
+
ret = self.storage_node_add(args)
|
618
|
+
|
638
619
|
elif sub_command == "add-node":
|
639
620
|
cluster_id = args.cluster_id
|
640
621
|
node_ip = args.node_ip
|
@@ -647,8 +628,13 @@ class CLIWrapper:
|
|
647
628
|
large_pool_count = args.large_pool_count
|
648
629
|
small_bufsize = args.small_bufsize
|
649
630
|
large_bufsize = args.large_bufsize
|
650
|
-
|
651
|
-
|
631
|
+
|
632
|
+
spdk_cpu_mask = None
|
633
|
+
if args.spdk_cpu_mask:
|
634
|
+
if self.validate_cpu_mask(args.spdk_cpu_mask):
|
635
|
+
spdk_cpu_mask = args.spdk_cpu_mask
|
636
|
+
else:
|
637
|
+
return f"Invalid cpu mask value: {args.spdk_cpu_mask}"
|
652
638
|
|
653
639
|
spdk_mem = None
|
654
640
|
if args.spdk_mem:
|
@@ -657,15 +643,15 @@ class CLIWrapper:
|
|
657
643
|
return f"SPDK memory:{args.spdk_mem} must be larger than 1G"
|
658
644
|
|
659
645
|
out = storage_ops.add_node(
|
660
|
-
cluster_id, node_ip, ifname, data_nics, spdk_mem, spdk_image, spdk_debug,
|
661
|
-
small_pool_count, large_pool_count, small_bufsize, large_bufsize,
|
646
|
+
cluster_id, node_ip, ifname, data_nics, spdk_cpu_mask, spdk_mem, spdk_image, spdk_debug,
|
647
|
+
small_pool_count, large_pool_count, small_bufsize, large_bufsize, args.jm_pcie)
|
662
648
|
return out
|
663
649
|
|
664
650
|
elif sub_command == "list":
|
665
|
-
ret = storage_ops.list_storage_nodes(
|
651
|
+
ret = storage_ops.list_storage_nodes(self.db_store, args.json)
|
666
652
|
|
667
653
|
elif sub_command == "remove":
|
668
|
-
ret = storage_ops.remove_storage_node(args.node_id, args.force_remove
|
654
|
+
ret = storage_ops.remove_storage_node(args.node_id, args.force_remove)
|
669
655
|
|
670
656
|
elif sub_command == "delete":
|
671
657
|
ret = storage_ops.delete_storage_node(args.node_id)
|
@@ -676,6 +662,13 @@ class CLIWrapper:
|
|
676
662
|
spdk_image = args.spdk_image
|
677
663
|
spdk_debug = args.spdk_debug
|
678
664
|
|
665
|
+
cpu_mask = None
|
666
|
+
if args.spdk_cpu_mask:
|
667
|
+
if self.validate_cpu_mask(args.spdk_cpu_mask):
|
668
|
+
cpu_mask = args.spdk_cpu_mask
|
669
|
+
else:
|
670
|
+
return f"Invalid cpu mask value: {args.spdk_cpu_mask}"
|
671
|
+
|
679
672
|
spdk_mem = None
|
680
673
|
if args.spdk_mem:
|
681
674
|
spdk_mem = self.parse_size(args.spdk_mem)
|
@@ -689,7 +682,7 @@ class CLIWrapper:
|
|
689
682
|
large_bufsize = args.large_bufsize
|
690
683
|
|
691
684
|
ret = storage_ops.restart_storage_node(
|
692
|
-
node_id, spdk_mem,
|
685
|
+
node_id, cpu_mask, spdk_mem,
|
693
686
|
spdk_image, spdk_debug,
|
694
687
|
small_pool_count, large_pool_count,
|
695
688
|
small_bufsize, large_bufsize)
|
@@ -800,8 +793,8 @@ class CLIWrapper:
|
|
800
793
|
sub_command = args_dict[args.command]
|
801
794
|
if sub_command == 'create':
|
802
795
|
ret = self.cluster_create(args)
|
803
|
-
elif sub_command == '
|
804
|
-
ret = self.
|
796
|
+
elif sub_command == 'join':
|
797
|
+
ret = self.cluster_join(args)
|
805
798
|
elif sub_command == 'status':
|
806
799
|
cluster_id = args.cluster_id
|
807
800
|
ret = cluster_ops.show_cluster(cluster_id)
|
@@ -851,10 +844,7 @@ class CLIWrapper:
|
|
851
844
|
ret = cluster_ops.update_cluster(args.id)
|
852
845
|
|
853
846
|
elif sub_command == "list-tasks":
|
854
|
-
ret =
|
855
|
-
|
856
|
-
elif sub_command == "cancel-task":
|
857
|
-
ret = tasks_controller.cancel_task(args.id)
|
847
|
+
ret = cluster_ops.list_tasks(args.cluster_id)
|
858
848
|
|
859
849
|
elif sub_command == "graceful-shutdown":
|
860
850
|
ret = cluster_ops.cluster_grace_shutdown(args.id)
|
@@ -862,9 +852,6 @@ class CLIWrapper:
|
|
862
852
|
elif sub_command == "graceful-startup":
|
863
853
|
ret = cluster_ops.cluster_grace_startup(args.id)
|
864
854
|
|
865
|
-
elif sub_command == "delete":
|
866
|
-
ret = cluster_ops.delete_cluster(args.id)
|
867
|
-
|
868
855
|
else:
|
869
856
|
self.parser.print_help()
|
870
857
|
|
@@ -909,7 +896,7 @@ class CLIWrapper:
|
|
909
896
|
args.id, args.max_rw_iops, args.max_rw_mbytes,
|
910
897
|
args.max_r_mbytes, args.max_w_mbytes)
|
911
898
|
elif sub_command == "list":
|
912
|
-
ret = lvol_controller.list_lvols(args.json
|
899
|
+
ret = lvol_controller.list_lvols(args.json)
|
913
900
|
elif sub_command == "list-mem":
|
914
901
|
ret = lvol_controller.list_lvols_mem(args.json, args.csv)
|
915
902
|
elif sub_command == "get":
|
@@ -968,7 +955,7 @@ class CLIWrapper:
|
|
968
955
|
cluster_id = args.cluster_id
|
969
956
|
cluster_ip = args.cluster_ip
|
970
957
|
ifname = args.ifname
|
971
|
-
ret =
|
958
|
+
ret = cluster_ops.join_cluster(cluster_ip, cluster_id, "management", ifname, [], None, None)
|
972
959
|
elif sub_command == "list":
|
973
960
|
ret = mgmt_ops.list_mgmt_nodes(args.json)
|
974
961
|
elif sub_command == "remove":
|
@@ -987,9 +974,7 @@ class CLIWrapper:
|
|
987
974
|
args.max_rw_mbytes,
|
988
975
|
args.max_r_mbytes,
|
989
976
|
args.max_w_mbytes,
|
990
|
-
args.has_secret
|
991
|
-
args.cluster_id
|
992
|
-
)
|
977
|
+
args.has_secret)
|
993
978
|
|
994
979
|
elif sub_command == "set":
|
995
980
|
pool_max = None
|
@@ -1011,7 +996,7 @@ class CLIWrapper:
|
|
1011
996
|
ret = pool_controller.get_pool(args.id, args.json)
|
1012
997
|
|
1013
998
|
elif sub_command == "list":
|
1014
|
-
ret = pool_controller.list_pools(args.json
|
999
|
+
ret = pool_controller.list_pools(args.json)
|
1015
1000
|
|
1016
1001
|
elif sub_command == "delete":
|
1017
1002
|
ret = pool_controller.delete_pool(args.id)
|
@@ -1107,6 +1092,14 @@ class CLIWrapper:
|
|
1107
1092
|
out = storage_ops.list_storage_nodes(self.db_store, args.json)
|
1108
1093
|
return out
|
1109
1094
|
|
1095
|
+
def storage_node_add(self, args):
|
1096
|
+
cluster_id = args.cluster_id
|
1097
|
+
ifname = args.ifname
|
1098
|
+
data_nics = args.data_nics
|
1099
|
+
# TODO: Validate the inputs
|
1100
|
+
out = storage_ops.add_storage_node(cluster_id, ifname, data_nics)
|
1101
|
+
return out
|
1102
|
+
|
1110
1103
|
def storage_node_list_devices(self, args):
|
1111
1104
|
node_id = args.node_id
|
1112
1105
|
sort = args.sort
|
@@ -1116,17 +1109,6 @@ class CLIWrapper:
|
|
1116
1109
|
out = storage_ops.list_storage_devices(self.db_store, node_id, sort, is_json)
|
1117
1110
|
return out
|
1118
1111
|
|
1119
|
-
def cluster_add(self, args):
|
1120
|
-
page_size_in_blocks = args.page_size
|
1121
|
-
blk_size = args.blk_size
|
1122
|
-
cap_warn = args.cap_warn
|
1123
|
-
cap_crit = args.cap_crit
|
1124
|
-
prov_cap_warn = args.prov_cap_warn
|
1125
|
-
prov_cap_crit = args.prov_cap_crit
|
1126
|
-
|
1127
|
-
return cluster_ops.add_cluster(
|
1128
|
-
blk_size, page_size_in_blocks, cap_warn, cap_crit, prov_cap_warn, prov_cap_crit)
|
1129
|
-
|
1130
1112
|
def cluster_create(self, args):
|
1131
1113
|
page_size_in_blocks = args.page_size
|
1132
1114
|
blk_size = args.blk_size
|
@@ -1138,13 +1120,33 @@ class CLIWrapper:
|
|
1138
1120
|
ifname = args.ifname
|
1139
1121
|
log_del_interval = args.log_del_interval
|
1140
1122
|
metrics_retention_period = args.metrics_retention_period
|
1141
|
-
contact_point = args.contact_point
|
1142
|
-
grafana_endpoint = args.grafana_endpoint
|
1143
1123
|
|
1124
|
+
# TODO: Validate the inputs
|
1144
1125
|
return cluster_ops.create_cluster(
|
1145
1126
|
blk_size, page_size_in_blocks,
|
1146
1127
|
CLI_PASS, cap_warn, cap_crit, prov_cap_warn, prov_cap_crit,
|
1147
|
-
ifname, log_del_interval, metrics_retention_period
|
1128
|
+
ifname, log_del_interval, metrics_retention_period)
|
1129
|
+
|
1130
|
+
def cluster_join(self, args):
|
1131
|
+
cluster_id = args.cluster_id
|
1132
|
+
cluster_ip = args.cluster_ip
|
1133
|
+
role = args.role
|
1134
|
+
ifname = args.ifname
|
1135
|
+
data_nics = args.data_nics
|
1136
|
+
spdk_cpu_mask = None
|
1137
|
+
if args.spdk_cpu_mask:
|
1138
|
+
if self.validate_cpu_mask(args.spdk_cpu_mask):
|
1139
|
+
spdk_cpu_mask = args.spdk_cpu_mask
|
1140
|
+
else:
|
1141
|
+
return f"Invalid cpu mask value: {args.spdk_cpu_mask}"
|
1142
|
+
|
1143
|
+
spdk_mem = None
|
1144
|
+
if args.spdk_mem:
|
1145
|
+
spdk_mem = self.parse_size(args.spdk_mem)
|
1146
|
+
if spdk_mem < 1 * 1024 * 1024:
|
1147
|
+
return f"SPDK memory:{args.spdk_mem} must be larger than 1G"
|
1148
|
+
|
1149
|
+
return cluster_ops.join_cluster(cluster_ip, cluster_id, role, ifname, data_nics, spdk_cpu_mask, spdk_mem)
|
1148
1150
|
|
1149
1151
|
def query_yes_no(self, question, default="yes"):
|
1150
1152
|
"""Ask a yes/no question via raw_input() and return their answer.
|