sbcli-pre 1.2.5__zip → 1.2.6__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.5 → sbcli_pre-1.2.6}/PKG-INFO +1 -1
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/env_var +1 -1
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/sbcli_pre.egg-info/PKG-INFO +1 -1
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/sbcli_pre.egg-info/SOURCES.txt +5 -3
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_cli/cli.py +113 -115
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/cluster_ops.py +138 -235
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/constants.py +5 -7
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/controllers/caching_node_controller.py +8 -6
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/controllers/cluster_events.py +9 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/controllers/device_controller.py +56 -63
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/controllers/events_controller.py +5 -3
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/controllers/health_controller.py +30 -40
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/controllers/lvol_controller.py +51 -38
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/controllers/pool_controller.py +8 -4
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/controllers/snapshot_controller.py +9 -3
- sbcli_pre-1.2.6/simplyblock_core/controllers/tasks_controller.py +103 -0
- sbcli_pre-1.2.6/simplyblock_core/controllers/tasks_events.py +37 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/distr_controller.py +13 -9
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/kv_store.py +47 -20
- sbcli_pre-1.2.6/simplyblock_core/mgmt_node_ops.py +205 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/models/events.py +9 -1
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/models/job_schedule.py +6 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/models/nvme_device.py +42 -4
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/models/storage_node.py +9 -1
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/rpc_client.py +55 -10
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/scripts/__init__.py +0 -4
- sbcli_pre-1.2.5/simplyblock_core/scripts/alerting/alert_resources.yaml → sbcli_pre-1.2.6/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +54 -5
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/scripts/dashboards/cluster.json +1 -1
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/scripts/deploy_stack.sh +9 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +32 -15
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/scripts/docker-compose-swarm.yml +17 -2
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/scripts/haproxy.cfg +15 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/scripts/install_deps.sh +3 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/scripts/stack_deploy_wait.sh +1 -1
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/services/capacity_and_stats_collector.py +1 -1
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/services/device_monitor.py +5 -46
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/services/distr_event_collector.py +10 -11
- sbcli_pre-1.2.6/simplyblock_core/services/health_check_service.py +134 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/services/lvol_monitor.py +1 -1
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/services/lvol_stat_collector.py +1 -1
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/services/port_stat_collector.py +0 -1
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/services/storage_node_monitor.py +49 -44
- sbcli_pre-1.2.6/simplyblock_core/services/tasks_runner_migration.py +61 -0
- sbcli_pre-1.2.5/simplyblock_core/services/job_tasks.py → sbcli_pre-1.2.6/simplyblock_core/services/tasks_runner_restart.py +95 -46
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/snode_client.py +12 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/storage_node_ops.py +525 -336
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/utils.py +46 -1
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/blueprints/snode_ops.py +103 -25
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/blueprints/web_api_cluster.py +20 -43
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/blueprints/web_api_device.py +10 -7
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/blueprints/web_api_lvol.py +9 -5
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/blueprints/web_api_pool.py +14 -5
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/blueprints/web_api_storage_node.py +3 -10
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/node_utils.py +0 -2
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/utils.py +8 -0
- sbcli_pre-1.2.5/simplyblock_core/mgmt_node_ops.py +0 -80
- sbcli_pre-1.2.5/simplyblock_core/scripts/apply_dashboard.sh +0 -22
- sbcli_pre-1.2.5/simplyblock_core/services/health_check_service.py +0 -136
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/README.md +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/pyproject.toml +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/sbcli_pre.egg-info/dependency_links.txt +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/sbcli_pre.egg-info/entry_points.txt +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/sbcli_pre.egg-info/requires.txt +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/sbcli_pre.egg-info/top_level.txt +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/setup.cfg +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/setup.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_cli/main.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/__init__.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/compute_node_ops.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/models/cluster.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/models/compute_node.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/models/deployer.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/models/global_settings.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/models/iface.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/models/lvol_model.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/models/pool.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/models/stats.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/scripts/prometheus.yml +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/services/log_agg_service.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/__init__.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/app.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/caching_node_app.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/caching_node_app_k8s.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/snode_app.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/static/delete.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/static/tst.py +0 -0
- {sbcli_pre-1.2.5 → sbcli_pre-1.2.6}/simplyblock_web/templates/deploy_spdk.yaml.j2 +0 -0
@@ -39,6 +39,8 @@ simplyblock_core/controllers/pool_events.py
|
|
39
39
|
simplyblock_core/controllers/snapshot_controller.py
|
40
40
|
simplyblock_core/controllers/snapshot_events.py
|
41
41
|
simplyblock_core/controllers/storage_events.py
|
42
|
+
simplyblock_core/controllers/tasks_controller.py
|
43
|
+
simplyblock_core/controllers/tasks_events.py
|
42
44
|
simplyblock_core/models/__init__.py
|
43
45
|
simplyblock_core/models/base_model.py
|
44
46
|
simplyblock_core/models/caching_node.py
|
@@ -58,7 +60,6 @@ simplyblock_core/models/snapshot.py
|
|
58
60
|
simplyblock_core/models/stats.py
|
59
61
|
simplyblock_core/models/storage_node.py
|
60
62
|
simplyblock_core/scripts/__init__.py
|
61
|
-
simplyblock_core/scripts/apply_dashboard.sh
|
62
63
|
simplyblock_core/scripts/clean_local_storage_deploy.sh
|
63
64
|
simplyblock_core/scripts/config_docker.sh
|
64
65
|
simplyblock_core/scripts/datasource.yml
|
@@ -73,7 +74,7 @@ simplyblock_core/scripts/prometheus.yml
|
|
73
74
|
simplyblock_core/scripts/run_ssh.sh
|
74
75
|
simplyblock_core/scripts/set_db_config.sh
|
75
76
|
simplyblock_core/scripts/stack_deploy_wait.sh
|
76
|
-
simplyblock_core/scripts/alerting/alert_resources.yaml
|
77
|
+
simplyblock_core/scripts/alerting/alert_resources.yaml.j2
|
77
78
|
simplyblock_core/scripts/alerting/alert_rules.yaml
|
78
79
|
simplyblock_core/scripts/dashboards/cluster.json
|
79
80
|
simplyblock_core/scripts/dashboards/devices.json
|
@@ -89,7 +90,6 @@ simplyblock_core/services/device_monitor.py
|
|
89
90
|
simplyblock_core/services/distr_event_collector.py
|
90
91
|
simplyblock_core/services/health_check_service.py
|
91
92
|
simplyblock_core/services/install_service.sh
|
92
|
-
simplyblock_core/services/job_tasks.py
|
93
93
|
simplyblock_core/services/log_agg_service.py
|
94
94
|
simplyblock_core/services/lvol_monitor.py
|
95
95
|
simplyblock_core/services/lvol_stat_collector.py
|
@@ -98,6 +98,8 @@ simplyblock_core/services/port_stat_collector.py
|
|
98
98
|
simplyblock_core/services/remove_service.sh
|
99
99
|
simplyblock_core/services/service_template.service
|
100
100
|
simplyblock_core/services/storage_node_monitor.py
|
101
|
+
simplyblock_core/services/tasks_runner_migration.py
|
102
|
+
simplyblock_core/services/tasks_runner_restart.py
|
101
103
|
simplyblock_web/__init__.py
|
102
104
|
simplyblock_web/app.py
|
103
105
|
simplyblock_web/auth_middleware.py
|
@@ -10,7 +10,8 @@ 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
|
13
|
+
from simplyblock_core.controllers import pool_controller, lvol_controller, snapshot_controller, device_controller, \
|
14
|
+
tasks_controller
|
14
15
|
from simplyblock_core.controllers import caching_node_controller, health_controller
|
15
16
|
from simplyblock_core.models.pool import Pool
|
16
17
|
|
@@ -38,10 +39,10 @@ class CLIWrapper:
|
|
38
39
|
sub_command.add_argument("cluster_id", help='UUID of the cluster to which the node will belong')
|
39
40
|
sub_command.add_argument("node_ip", help='IP of storage node to add')
|
40
41
|
sub_command.add_argument("ifname", help='Management interface name')
|
41
|
-
sub_command.add_argument("--
|
42
|
+
sub_command.add_argument("--partitions", help='Number of partitions to create per device', type=int, default=0)
|
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')
|
42
45
|
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')
|
45
46
|
sub_command.add_argument("--memory", help='SPDK huge memory allocation, default is 4G', dest='spdk_mem')
|
46
47
|
sub_command.add_argument("--spdk-image", help='SPDK image uri', dest='spdk_image')
|
47
48
|
sub_command.add_argument("--spdk-debug", help='Enable spdk debug logs', dest='spdk_debug', required=False, action='store_true')
|
@@ -64,7 +65,7 @@ class CLIWrapper:
|
|
64
65
|
dest='force_migrate', required=False, action='store_true')
|
65
66
|
# List all storage nodes
|
66
67
|
sub_command = self.add_sub_command(subparser, "list", 'List storage nodes')
|
67
|
-
sub_command.add_argument("--cluster-id", help='id of the cluster for which nodes are listed')
|
68
|
+
sub_command.add_argument("--cluster-id", help='id of the cluster for which nodes are listed', dest='cluster_id')
|
68
69
|
sub_command.add_argument("--json", help='Print outputs in json format', action='store_true')
|
69
70
|
|
70
71
|
sub_command = self.add_sub_command(subparser, "get", 'Get storage node info')
|
@@ -72,11 +73,10 @@ class CLIWrapper:
|
|
72
73
|
|
73
74
|
# Restart storage node
|
74
75
|
sub_command = self.add_sub_command(
|
75
|
-
subparser, "restart", 'Restart a storage node
|
76
|
+
subparser, "restart", 'Restart a storage node', usage='All functions and device drivers will be reset. '
|
76
77
|
'During restart, the node does not accept IO. In a high-availability setup, '
|
77
|
-
'this will not impact operations
|
78
|
+
'this will not impact operations')
|
78
79
|
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
|
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
|
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", 'Get node IO statistics')
|
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', 'Get node capacity statistics')
|
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 device testing 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", 'Restart 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,30 +157,29 @@ 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
|
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
|
-
sub_command = self.add_sub_command(
|
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', '
|
177
|
-
'the device in bytes')
|
176
|
+
subparser, 'get-capacity-device', 'Get device capacity')
|
178
177
|
sub_command.add_argument("device_id", help='Storage device ID')
|
179
178
|
sub_command.add_argument("--history", help='list history records -one for every 15 minutes- '
|
180
179
|
'for XX days and YY hours -up to 10 days in total-, format: XXdYYh')
|
181
180
|
|
182
181
|
sub_command = self.add_sub_command(
|
183
|
-
subparser, 'get-io-stats-device', '
|
182
|
+
subparser, 'get-io-stats-device', 'Get device IO statistics')
|
184
183
|
sub_command.add_argument("device_id", help='Storage device ID')
|
185
184
|
sub_command.add_argument("--history", help='list history records -one for every 15 minutes- '
|
186
185
|
'for XX days and YY hours -up to 10 days in total-, format: XXdYYh')
|
@@ -237,6 +236,23 @@ class CLIWrapper:
|
|
237
236
|
dest='log_del_interval', default='7d')
|
238
237
|
sub_command.add_argument("--metrics-retention-period", help='retention period for prometheus metrics, default: 7d',
|
239
238
|
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")
|
240
256
|
|
241
257
|
# show cluster list
|
242
258
|
self.add_sub_command(subparser, 'list', 'Show clusters list')
|
@@ -259,36 +275,33 @@ class CLIWrapper:
|
|
259
275
|
sub_command.add_argument("cluster_id", help='the cluster UUID')
|
260
276
|
|
261
277
|
sub_command = self.add_sub_command(
|
262
|
-
subparser, 'get-capacity', '
|
263
|
-
'(in percent and absolute) and provisioned capacity (in percent and absolute) '
|
264
|
-
'in GB in the cluster.')
|
278
|
+
subparser, 'get-capacity', 'Get cluster capacity')
|
265
279
|
sub_command.add_argument("cluster_id", help='the cluster UUID')
|
266
280
|
sub_command.add_argument("--json", help='Print json output', required=False, action='store_true')
|
267
281
|
sub_command.add_argument("--history", help='(XXdYYh), list history records (one for every 15 minutes) '
|
268
282
|
'for XX days and YY hours (up to 10 days in total).')
|
269
283
|
|
270
284
|
sub_command = self.add_sub_command(
|
271
|
-
subparser, 'get-io-stats', '
|
285
|
+
subparser, 'get-io-stats', 'Get cluster IO statistics')
|
272
286
|
sub_command.add_argument("cluster_id", help='the cluster UUID')
|
273
287
|
sub_command.add_argument("--records", help='Number of records, default: 20', type=int, default=20)
|
274
288
|
sub_command.add_argument("--history", help='(XXdYYh), list history records (one for every 15 minutes) '
|
275
289
|
'for XX days and YY hours (up to 10 days in total).')
|
276
290
|
|
277
|
-
sub_command = self.add_sub_command(
|
278
|
-
|
279
|
-
sub_command.add_argument("cluster_id", help='the cluster UUID')
|
291
|
+
# sub_command = self.add_sub_command(
|
292
|
+
# subparser, 'get-cli-ssh-pass', 'returns the ssh password for the CLI ssh connection')
|
293
|
+
# sub_command.add_argument("cluster_id", help='the cluster UUID')
|
280
294
|
|
281
295
|
# get-logs
|
282
296
|
sub_command = self.add_sub_command(subparser, 'get-logs', 'Returns cluster status logs')
|
283
297
|
sub_command.add_argument("cluster_id", help='cluster uuid')
|
284
298
|
|
285
299
|
# get-secret
|
286
|
-
sub_command = self.add_sub_command(subparser, 'get-secret', '
|
300
|
+
sub_command = self.add_sub_command(subparser, 'get-secret', 'Get cluster secret')
|
287
301
|
sub_command.add_argument("cluster_id", help='cluster uuid')
|
288
302
|
|
289
303
|
# set-secret
|
290
|
-
sub_command = self.add_sub_command(subparser, 'upd-secret', 'Updates the secret
|
291
|
-
'one with a new one) and returns the new one.')
|
304
|
+
sub_command = self.add_sub_command(subparser, 'upd-secret', 'Updates the cluster secret')
|
292
305
|
sub_command.add_argument("cluster_id", help='cluster uuid')
|
293
306
|
sub_command.add_argument("secret", help='new 20 characters password')
|
294
307
|
|
@@ -312,6 +325,16 @@ class CLIWrapper:
|
|
312
325
|
sub_command = self.add_sub_command(subparser, "list-tasks", 'List tasks by cluster ID')
|
313
326
|
sub_command.add_argument("cluster_id", help='UUID of the cluster')
|
314
327
|
|
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
|
+
|
315
338
|
|
316
339
|
#
|
317
340
|
# ----------------- lvol -----------------
|
@@ -362,8 +385,9 @@ class CLIWrapper:
|
|
362
385
|
sub_command.add_argument("--max-w-mbytes", help='Maximum Write Mega Bytes Per Second', type=int)
|
363
386
|
|
364
387
|
# list lvols
|
365
|
-
sub_command = self.add_sub_command(subparser, 'list', 'List
|
366
|
-
sub_command.add_argument("--cluster-id", help='List LVols in particular cluster')
|
388
|
+
sub_command = self.add_sub_command(subparser, 'list', 'List LVols')
|
389
|
+
sub_command.add_argument("--cluster-id", help='List LVols in particular cluster', dest="cluster_id")
|
390
|
+
sub_command.add_argument("--pool", help='List LVols in particular Pool ID or name', dest="pool")
|
367
391
|
sub_command.add_argument("--json", help='Print outputs in json format', required=False, action='store_true')
|
368
392
|
|
369
393
|
# Get the size and max_size of the lvol
|
@@ -378,7 +402,7 @@ class CLIWrapper:
|
|
378
402
|
|
379
403
|
# delete lvol
|
380
404
|
sub_command = self.add_sub_command(
|
381
|
-
subparser, 'delete', 'Delete LVol
|
405
|
+
subparser, 'delete', 'Delete LVol', usage='This is only possible, if no more snapshots and non-inflated clones '
|
382
406
|
'of the volume exist. The volume must be suspended before it can be deleted. ')
|
383
407
|
sub_command.add_argument("id", help='LVol id or ids', nargs='+')
|
384
408
|
sub_command.add_argument("--force", help='Force delete LVol from the cluster', required=False,
|
@@ -386,13 +410,13 @@ class CLIWrapper:
|
|
386
410
|
|
387
411
|
# show connection string
|
388
412
|
sub_command = self.add_sub_command(
|
389
|
-
subparser, 'connect', '
|
413
|
+
subparser, 'connect', 'Get lvol connection strings', usage='Multiple connections to the cluster are '
|
390
414
|
'always available for multi-pathing and high-availability.')
|
391
415
|
sub_command.add_argument("id", help='LVol id')
|
392
416
|
|
393
417
|
# lvol resize
|
394
418
|
sub_command = self.add_sub_command(
|
395
|
-
subparser, 'resize', 'Resize LVol
|
419
|
+
subparser, 'resize', 'Resize LVol', usage='The lvol cannot be exceed the maximum size for lvols. It cannot '
|
396
420
|
'exceed total remaining provisioned space in pool. It cannot drop below the '
|
397
421
|
'current utilization.')
|
398
422
|
sub_command.add_argument("id", help='LVol id')
|
@@ -419,23 +443,22 @@ class CLIWrapper:
|
|
419
443
|
|
420
444
|
# lvol get-capacity
|
421
445
|
sub_command = self.add_sub_command(
|
422
|
-
subparser, 'get-capacity',
|
423
|
-
'(in percent and absolute) capacity.')
|
446
|
+
subparser, 'get-capacity',"Get LVol capacity")
|
424
447
|
sub_command.add_argument("id", help='LVol id')
|
425
448
|
sub_command.add_argument("--history", help='(XXdYYh), list history records (one for every 15 minutes) '
|
426
449
|
'for XX days and YY hours (up to 10 days in total).')
|
427
450
|
|
428
451
|
# lvol get-io-stats
|
429
452
|
sub_command = self.add_sub_command(
|
430
|
-
subparser, 'get-io-stats', help="
|
453
|
+
subparser, 'get-io-stats', help="Get LVol IO statistics")
|
431
454
|
sub_command.add_argument("id", help='LVol id')
|
432
455
|
sub_command.add_argument("--history", help='(XXdYYh), list history records (one for every 15 minutes) '
|
433
456
|
'for XX days and YY hours (up to 10 days in total).')
|
434
457
|
|
435
|
-
sub_command = self.add_sub_command(subparser, 'send-cluster-map', 'send
|
458
|
+
sub_command = self.add_sub_command(subparser, 'send-cluster-map', 'send cluster map')
|
436
459
|
sub_command.add_argument("id", help='LVol id')
|
437
460
|
|
438
|
-
sub_command = self.add_sub_command(subparser, 'get-cluster-map', 'get
|
461
|
+
sub_command = self.add_sub_command(subparser, 'get-cluster-map', 'get cluster map')
|
439
462
|
sub_command.add_argument("id", help='LVol id')
|
440
463
|
|
441
464
|
# check lvol
|
@@ -446,7 +469,7 @@ class CLIWrapper:
|
|
446
469
|
# mgmt-node ops
|
447
470
|
subparser = self.add_command('mgmt', 'Management node commands')
|
448
471
|
|
449
|
-
sub_command = self.add_sub_command(subparser, 'add', 'Add Management node to the cluster')
|
472
|
+
sub_command = self.add_sub_command(subparser, 'add', 'Add Management node to the cluster (local run)')
|
450
473
|
sub_command.add_argument("cluster_ip", help='the cluster IP address')
|
451
474
|
sub_command.add_argument("cluster_id", help='the cluster UUID')
|
452
475
|
sub_command.add_argument("ifname", help='Management interface name')
|
@@ -462,6 +485,7 @@ class CLIWrapper:
|
|
462
485
|
# add pool
|
463
486
|
sub_command = self.add_sub_command(subparser, 'add', 'Add a new Pool')
|
464
487
|
sub_command.add_argument("name", help='Pool name')
|
488
|
+
sub_command.add_argument("cluster_id", help='Cluster UUID')
|
465
489
|
sub_command.add_argument("--pool-max", help='Pool maximum size: 20M, 20G, 0(default)', default="0")
|
466
490
|
sub_command.add_argument("--lvol-max", help='LVol maximum size: 20M, 20G, 0(default)', default="0")
|
467
491
|
sub_command.add_argument("--max-rw-iops", help='Maximum Read Write IO Per Second', type=int)
|
@@ -485,7 +509,8 @@ class CLIWrapper:
|
|
485
509
|
# list pools
|
486
510
|
sub_command = self.add_sub_command(subparser, 'list', 'List pools')
|
487
511
|
sub_command.add_argument("--json", help='Print outputs in json format', required=False, action='store_true')
|
488
|
-
sub_command.add_argument("--cluster-id", help='ID of the cluster',
|
512
|
+
sub_command.add_argument("--cluster-id", help='ID of the cluster', dest="cluster_id")
|
513
|
+
|
489
514
|
# get pool
|
490
515
|
sub_command = self.add_sub_command(subparser, 'get', 'get pool details')
|
491
516
|
sub_command.add_argument("id", help='pool uuid')
|
@@ -506,24 +531,21 @@ class CLIWrapper:
|
|
506
531
|
sub_command.add_argument("pool_id", help='pool uuid')
|
507
532
|
|
508
533
|
# get-secret
|
509
|
-
sub_command = self.add_sub_command(subparser, 'get-secret', '
|
534
|
+
sub_command = self.add_sub_command(subparser, 'get-secret', 'Get pool secret')
|
510
535
|
sub_command.add_argument("pool_id", help='pool uuid')
|
511
536
|
|
512
537
|
# get-secret
|
513
|
-
sub_command = self.add_sub_command(subparser, 'upd-secret', 'Updates
|
514
|
-
'one with a new one) and returns the new one.')
|
538
|
+
sub_command = self.add_sub_command(subparser, 'upd-secret', 'Updates pool secret')
|
515
539
|
sub_command.add_argument("pool_id", help='pool uuid')
|
516
540
|
sub_command.add_argument("secret", help='new 20 characters password')
|
517
541
|
|
518
542
|
# get-capacity
|
519
|
-
sub_command = self.add_sub_command(subparser, 'get-capacity', '
|
520
|
-
'and utilized (percent) storage on the Pool.')
|
543
|
+
sub_command = self.add_sub_command(subparser, 'get-capacity', 'Get pool capacity')
|
521
544
|
sub_command.add_argument("pool_id", help='pool uuid')
|
522
545
|
|
523
546
|
# get-io-stats
|
524
547
|
sub_command = self.add_sub_command(
|
525
|
-
subparser, 'get-io-stats', '
|
526
|
-
'(read-IO, write-IO, total-IO, read mbs, write mbs, total mbs).')
|
548
|
+
subparser, 'get-io-stats', 'Get pool IO statistics')
|
527
549
|
sub_command.add_argument("id", help='Pool id')
|
528
550
|
sub_command.add_argument("--history", help='(XXdYYh), list history records (one for every 15 minutes) '
|
529
551
|
'for XX days and YY hours (up to 10 days in total).')
|
@@ -577,7 +599,7 @@ class CLIWrapper:
|
|
577
599
|
sub_command.add_argument("node_id", help='Caching node UUID')
|
578
600
|
sub_command.add_argument("lvol_id", help='LVol UUID')
|
579
601
|
|
580
|
-
sub_command = self.add_sub_command(subparser, 'recreate', 'recreate Caching node bdevs
|
602
|
+
sub_command = self.add_sub_command(subparser, 'recreate', 'recreate Caching node bdevs')
|
581
603
|
sub_command.add_argument("node_id", help='Caching node UUID')
|
582
604
|
|
583
605
|
def init_parser(self):
|
@@ -613,9 +635,6 @@ class CLIWrapper:
|
|
613
635
|
elif sub_command == "deploy-cleaner":
|
614
636
|
ret = storage_ops.deploy_cleaner()
|
615
637
|
|
616
|
-
elif sub_command == "add":
|
617
|
-
ret = self.storage_node_add(args)
|
618
|
-
|
619
638
|
elif sub_command == "add-node":
|
620
639
|
cluster_id = args.cluster_id
|
621
640
|
node_ip = args.node_ip
|
@@ -628,13 +647,8 @@ class CLIWrapper:
|
|
628
647
|
large_pool_count = args.large_pool_count
|
629
648
|
small_bufsize = args.small_bufsize
|
630
649
|
large_bufsize = args.large_bufsize
|
631
|
-
|
632
|
-
|
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}"
|
650
|
+
num_partitions_per_dev = args.partitions
|
651
|
+
jm_percent = args.jm_percent
|
638
652
|
|
639
653
|
spdk_mem = None
|
640
654
|
if args.spdk_mem:
|
@@ -643,15 +657,15 @@ class CLIWrapper:
|
|
643
657
|
return f"SPDK memory:{args.spdk_mem} must be larger than 1G"
|
644
658
|
|
645
659
|
out = storage_ops.add_node(
|
646
|
-
cluster_id, node_ip, ifname, data_nics,
|
647
|
-
small_pool_count, large_pool_count, small_bufsize, large_bufsize,
|
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, num_partitions_per_dev, jm_percent)
|
648
662
|
return out
|
649
663
|
|
650
664
|
elif sub_command == "list":
|
651
|
-
ret = storage_ops.list_storage_nodes(
|
665
|
+
ret = storage_ops.list_storage_nodes(args.json, args.cluster_id)
|
652
666
|
|
653
667
|
elif sub_command == "remove":
|
654
|
-
ret = storage_ops.remove_storage_node(args.node_id, args.force_remove)
|
668
|
+
ret = storage_ops.remove_storage_node(args.node_id, args.force_remove, args.force_migrate)
|
655
669
|
|
656
670
|
elif sub_command == "delete":
|
657
671
|
ret = storage_ops.delete_storage_node(args.node_id)
|
@@ -662,13 +676,6 @@ class CLIWrapper:
|
|
662
676
|
spdk_image = args.spdk_image
|
663
677
|
spdk_debug = args.spdk_debug
|
664
678
|
|
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
|
-
|
672
679
|
spdk_mem = None
|
673
680
|
if args.spdk_mem:
|
674
681
|
spdk_mem = self.parse_size(args.spdk_mem)
|
@@ -682,7 +689,7 @@ class CLIWrapper:
|
|
682
689
|
large_bufsize = args.large_bufsize
|
683
690
|
|
684
691
|
ret = storage_ops.restart_storage_node(
|
685
|
-
node_id,
|
692
|
+
node_id, spdk_mem,
|
686
693
|
spdk_image, spdk_debug,
|
687
694
|
small_pool_count, large_pool_count,
|
688
695
|
small_bufsize, large_bufsize)
|
@@ -793,8 +800,8 @@ class CLIWrapper:
|
|
793
800
|
sub_command = args_dict[args.command]
|
794
801
|
if sub_command == 'create':
|
795
802
|
ret = self.cluster_create(args)
|
796
|
-
elif sub_command == '
|
797
|
-
ret = self.
|
803
|
+
elif sub_command == 'add':
|
804
|
+
ret = self.cluster_add(args)
|
798
805
|
elif sub_command == 'status':
|
799
806
|
cluster_id = args.cluster_id
|
800
807
|
ret = cluster_ops.show_cluster(cluster_id)
|
@@ -844,7 +851,10 @@ class CLIWrapper:
|
|
844
851
|
ret = cluster_ops.update_cluster(args.id)
|
845
852
|
|
846
853
|
elif sub_command == "list-tasks":
|
847
|
-
ret =
|
854
|
+
ret = tasks_controller.list_tasks(args.cluster_id)
|
855
|
+
|
856
|
+
elif sub_command == "cancel-task":
|
857
|
+
ret = tasks_controller.cancel_task(args.id)
|
848
858
|
|
849
859
|
elif sub_command == "graceful-shutdown":
|
850
860
|
ret = cluster_ops.cluster_grace_shutdown(args.id)
|
@@ -852,6 +862,9 @@ class CLIWrapper:
|
|
852
862
|
elif sub_command == "graceful-startup":
|
853
863
|
ret = cluster_ops.cluster_grace_startup(args.id)
|
854
864
|
|
865
|
+
elif sub_command == "delete":
|
866
|
+
ret = cluster_ops.delete_cluster(args.id)
|
867
|
+
|
855
868
|
else:
|
856
869
|
self.parser.print_help()
|
857
870
|
|
@@ -896,7 +909,7 @@ class CLIWrapper:
|
|
896
909
|
args.id, args.max_rw_iops, args.max_rw_mbytes,
|
897
910
|
args.max_r_mbytes, args.max_w_mbytes)
|
898
911
|
elif sub_command == "list":
|
899
|
-
ret = lvol_controller.list_lvols(args.json)
|
912
|
+
ret = lvol_controller.list_lvols(args.json, args.cluster_id, args.pool)
|
900
913
|
elif sub_command == "list-mem":
|
901
914
|
ret = lvol_controller.list_lvols_mem(args.json, args.csv)
|
902
915
|
elif sub_command == "get":
|
@@ -955,7 +968,7 @@ class CLIWrapper:
|
|
955
968
|
cluster_id = args.cluster_id
|
956
969
|
cluster_ip = args.cluster_ip
|
957
970
|
ifname = args.ifname
|
958
|
-
ret =
|
971
|
+
ret = mgmt_ops.deploy_mgmt_node(cluster_ip, cluster_id, ifname)
|
959
972
|
elif sub_command == "list":
|
960
973
|
ret = mgmt_ops.list_mgmt_nodes(args.json)
|
961
974
|
elif sub_command == "remove":
|
@@ -974,7 +987,9 @@ class CLIWrapper:
|
|
974
987
|
args.max_rw_mbytes,
|
975
988
|
args.max_r_mbytes,
|
976
989
|
args.max_w_mbytes,
|
977
|
-
args.has_secret
|
990
|
+
args.has_secret,
|
991
|
+
args.cluster_id
|
992
|
+
)
|
978
993
|
|
979
994
|
elif sub_command == "set":
|
980
995
|
pool_max = None
|
@@ -996,7 +1011,7 @@ class CLIWrapper:
|
|
996
1011
|
ret = pool_controller.get_pool(args.id, args.json)
|
997
1012
|
|
998
1013
|
elif sub_command == "list":
|
999
|
-
ret = pool_controller.list_pools(args.json)
|
1014
|
+
ret = pool_controller.list_pools(args.json, args.cluster_id)
|
1000
1015
|
|
1001
1016
|
elif sub_command == "delete":
|
1002
1017
|
ret = pool_controller.delete_pool(args.id)
|
@@ -1092,14 +1107,6 @@ class CLIWrapper:
|
|
1092
1107
|
out = storage_ops.list_storage_nodes(self.db_store, args.json)
|
1093
1108
|
return out
|
1094
1109
|
|
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
|
-
|
1103
1110
|
def storage_node_list_devices(self, args):
|
1104
1111
|
node_id = args.node_id
|
1105
1112
|
sort = args.sort
|
@@ -1109,6 +1116,17 @@ class CLIWrapper:
|
|
1109
1116
|
out = storage_ops.list_storage_devices(self.db_store, node_id, sort, is_json)
|
1110
1117
|
return out
|
1111
1118
|
|
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
|
+
|
1112
1130
|
def cluster_create(self, args):
|
1113
1131
|
page_size_in_blocks = args.page_size
|
1114
1132
|
blk_size = args.blk_size
|
@@ -1120,33 +1138,13 @@ class CLIWrapper:
|
|
1120
1138
|
ifname = args.ifname
|
1121
1139
|
log_del_interval = args.log_del_interval
|
1122
1140
|
metrics_retention_period = args.metrics_retention_period
|
1141
|
+
contact_point = args.contact_point
|
1142
|
+
grafana_endpoint = args.grafana_endpoint
|
1123
1143
|
|
1124
|
-
# TODO: Validate the inputs
|
1125
1144
|
return cluster_ops.create_cluster(
|
1126
1145
|
blk_size, page_size_in_blocks,
|
1127
1146
|
CLI_PASS, cap_warn, cap_crit, prov_cap_warn, prov_cap_crit,
|
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)
|
1147
|
+
ifname, log_del_interval, metrics_retention_period, contact_point, grafana_endpoint)
|
1150
1148
|
|
1151
1149
|
def query_yes_no(self, question, default="yes"):
|
1152
1150
|
"""Ask a yes/no question via raw_input() and return their answer.
|