sbcli-dev 3.8.84__zip → 3.8.85__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_dev-3.8.84 → sbcli_dev-3.8.85}/PKG-INFO +1 -1
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/env_var +1 -1
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/sbcli_dev.egg-info/PKG-INFO +1 -1
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_cli/cli.py +13 -13
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/controllers/lvol_controller.py +0 -36
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/storage_node_ops.py +73 -85
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/README.md +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/pyproject.toml +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/sbcli_dev.egg-info/SOURCES.txt +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/sbcli_dev.egg-info/dependency_links.txt +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/sbcli_dev.egg-info/entry_points.txt +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/sbcli_dev.egg-info/requires.txt +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/sbcli_dev.egg-info/top_level.txt +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/setup.cfg +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/setup.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_cli/main.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/__init__.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/cluster_ops.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/compute_node_ops.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/constants.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/controllers/device_controller.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/controllers/events_controller.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/controllers/health_controller.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/controllers/pool_controller.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/controllers/snapshot_controller.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/controllers/tasks_controller.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/distr_controller.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/kv_store.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/mgmt_node_ops.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/models/cluster.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/models/compute_node.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/models/deployer.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/models/events.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/models/global_settings.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/models/iface.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/models/job_schedule.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/models/lvol_model.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/models/nvme_device.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/models/pool.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/models/stats.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/models/storage_node.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/rpc_client.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/scripts/__init__.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/scripts/dashboard.yml +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/scripts/deploy_stack.sh +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/scripts/docker-compose-swarm.yml +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/scripts/objstore.yml +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/scripts/prometheus.yml +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/services/cached_lvol_stat_collector.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/services/capacity_and_stats_collector.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/services/distr_event_collector.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/services/health_check_service.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/services/log_agg_service.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/services/lvol_stat_collector.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/services/main_distr_event_collector.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/services/new_device_discovery.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/services/port_stat_collector.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/services/spdk_http_proxy_server.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/services/storage_node_monitor.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/services/tasks_runner_failed_migration.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/services/tasks_runner_migration.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/services/tasks_runner_new_dev_migration.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/services/tasks_runner_node_add.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/services/tasks_runner_restart.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/snode_client.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/utils.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/__init__.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/app.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/blueprints/snode_ops.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/blueprints/snode_ops_k8s.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/blueprints/web_api_cluster.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/blueprints/web_api_lvol.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/blueprints/web_api_pool.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/blueprints/web_api_storage_node.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/caching_node_app.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/caching_node_app_k8s.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/node_utils.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/snode_app.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/snode_app_k8s.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/static/delete.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/static/tst.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_web/utils.py +0 -0
|
@@ -238,6 +238,13 @@ class CLIWrapper:
|
|
|
238
238
|
sub_command.add_argument("jm_device_id", help='JM device ID')
|
|
239
239
|
sub_command.add_argument("--force", help='Force device remove', required=False, action='store_true')
|
|
240
240
|
|
|
241
|
+
sub_command = self.add_sub_command(subparser, 'send-cluster-map', 'send cluster map')
|
|
242
|
+
sub_command.add_argument("id", help='id')
|
|
243
|
+
|
|
244
|
+
sub_command = self.add_sub_command(subparser, 'get-cluster-map', 'get cluster map')
|
|
245
|
+
sub_command.add_argument("id", help='id')
|
|
246
|
+
|
|
247
|
+
# check lvol
|
|
241
248
|
#
|
|
242
249
|
# ----------------- cluster -----------------
|
|
243
250
|
#
|
|
@@ -502,13 +509,6 @@ class CLIWrapper:
|
|
|
502
509
|
sub_command.add_argument("--history", help='(XXdYYh), list history records (one for every 15 minutes) '
|
|
503
510
|
'for XX days and YY hours (up to 10 days in total).')
|
|
504
511
|
|
|
505
|
-
sub_command = self.add_sub_command(subparser, 'send-cluster-map', 'send cluster map')
|
|
506
|
-
sub_command.add_argument("id", help='LVol id')
|
|
507
|
-
|
|
508
|
-
sub_command = self.add_sub_command(subparser, 'get-cluster-map', 'get cluster map')
|
|
509
|
-
sub_command.add_argument("id", help='LVol id')
|
|
510
|
-
|
|
511
|
-
# check lvol
|
|
512
512
|
sub_command = self.add_sub_command(subparser, "check", 'Health check LVol')
|
|
513
513
|
sub_command.add_argument("id", help='UUID of LVol')
|
|
514
514
|
|
|
@@ -893,6 +893,12 @@ class CLIWrapper:
|
|
|
893
893
|
elif sub_command == "restart-jm-device":
|
|
894
894
|
ret = device_controller.restart_jm_device(args.jm_device_id, args.force)
|
|
895
895
|
|
|
896
|
+
elif sub_command == "send-cluster-map":
|
|
897
|
+
id = args.id
|
|
898
|
+
ret = storage_ops.send_cluster_map(id)
|
|
899
|
+
elif sub_command == "get-cluster-map":
|
|
900
|
+
id = args.id
|
|
901
|
+
ret = storage_ops.get_cluster_map(id)
|
|
896
902
|
else:
|
|
897
903
|
self.parser.print_help()
|
|
898
904
|
|
|
@@ -1045,12 +1051,6 @@ class CLIWrapper:
|
|
|
1045
1051
|
id = args.id
|
|
1046
1052
|
history = args.history
|
|
1047
1053
|
ret = lvol_controller.get_capacity(id, history)
|
|
1048
|
-
elif sub_command == "send-cluster-map":
|
|
1049
|
-
id = args.id
|
|
1050
|
-
ret = lvol_controller.send_cluster_map(id)
|
|
1051
|
-
elif sub_command == "get-cluster-map":
|
|
1052
|
-
id = args.id
|
|
1053
|
-
ret = lvol_controller.get_cluster_map(id)
|
|
1054
1054
|
elif sub_command == "check":
|
|
1055
1055
|
id = args.id
|
|
1056
1056
|
ret = health_controller.check_lvol(id)
|
|
@@ -1191,42 +1191,6 @@ def get_io_stats(lvol_uuid, history, records_count=20, parse_sizes=True):
|
|
|
1191
1191
|
return out
|
|
1192
1192
|
|
|
1193
1193
|
|
|
1194
|
-
def send_cluster_map(lvol_id):
|
|
1195
|
-
lvol = db_controller.get_lvol_by_id(lvol_id)
|
|
1196
|
-
if not lvol:
|
|
1197
|
-
logger.error(f"LVol not found: {lvol_id}")
|
|
1198
|
-
return False
|
|
1199
|
-
|
|
1200
|
-
snode = db_controller.get_storage_node_by_id(lvol.node_id)
|
|
1201
|
-
logger.info("Sending cluster map")
|
|
1202
|
-
return distr_controller.send_cluster_map_to_node(snode)
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
def get_cluster_map(lvol_id):
|
|
1206
|
-
lvol = db_controller.get_lvol_by_id(lvol_id)
|
|
1207
|
-
if not lvol:
|
|
1208
|
-
logger.error(f"LVol not found: {lvol_id}")
|
|
1209
|
-
return False
|
|
1210
|
-
|
|
1211
|
-
snode = db_controller.get_storage_node_by_id(lvol.node_id)
|
|
1212
|
-
rpc_client = RPCClient(snode.mgmt_ip, snode.rpc_port, snode.rpc_username, snode.rpc_password)
|
|
1213
|
-
distribs_list = []
|
|
1214
|
-
for bdev in snode.lvstore_stack:
|
|
1215
|
-
type = bdev['type']
|
|
1216
|
-
if type == "bdev_raid":
|
|
1217
|
-
distribs_list = bdev["distribs_list"]
|
|
1218
|
-
if not distribs_list:
|
|
1219
|
-
logger.error(f"Failed to get LVol cluster map: {lvol_id}")
|
|
1220
|
-
ret = rpc_client.distr_get_cluster_map(distribs_list[0])
|
|
1221
|
-
if not ret:
|
|
1222
|
-
logger.error(f"Failed to get LVol cluster map: {lvol_id}")
|
|
1223
|
-
return False
|
|
1224
|
-
logger.debug(ret)
|
|
1225
|
-
print("*"*100)
|
|
1226
|
-
results, is_passed = distr_controller.parse_distr_cluster_map(ret)
|
|
1227
|
-
return utils.print_table(results)
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
1194
|
def migrate(lvol_id, node_id):
|
|
1231
1195
|
|
|
1232
1196
|
lvol = db_controller.get_lvol_by_id(lvol_id)
|
|
@@ -15,7 +15,7 @@ import docker
|
|
|
15
15
|
from simplyblock_core import constants, scripts, distr_controller
|
|
16
16
|
from simplyblock_core import utils
|
|
17
17
|
from simplyblock_core.controllers import lvol_controller, storage_events, snapshot_controller, device_events, \
|
|
18
|
-
device_controller, tasks_controller
|
|
18
|
+
device_controller, tasks_controller, health_controller
|
|
19
19
|
from simplyblock_core.kv_store import DBController, KVStore
|
|
20
20
|
from simplyblock_core import shell_utils
|
|
21
21
|
from simplyblock_core.models.iface import IFace
|
|
@@ -1258,7 +1258,7 @@ def delete_storage_node(node_id):
|
|
|
1258
1258
|
|
|
1259
1259
|
for lvol in db_controller.get_lvols(snode.cluster_id):
|
|
1260
1260
|
logger.info(f"Sending cluster map to LVol: {lvol.get_id()}")
|
|
1261
|
-
|
|
1261
|
+
send_cluster_map(lvol.get_id())
|
|
1262
1262
|
|
|
1263
1263
|
storage_events.snode_delete(snode)
|
|
1264
1264
|
logger.info("done")
|
|
@@ -1313,13 +1313,9 @@ def remove_storage_node(node_id, force_remove=False, force_migrate=False):
|
|
|
1313
1313
|
for dev in snode.nvme_devices:
|
|
1314
1314
|
if dev.status == NVMeDevice.STATUS_JM:
|
|
1315
1315
|
continue
|
|
1316
|
-
if dev.status ==
|
|
1316
|
+
if dev.status == NVMeDevice.STATUS_ONLINE:
|
|
1317
1317
|
distr_controller.disconnect_device(dev)
|
|
1318
|
-
|
|
1319
|
-
dev.status = NVMeDevice.STATUS_FAILED
|
|
1320
|
-
distr_controller.send_dev_status_event(dev, NVMeDevice.STATUS_FAILED)
|
|
1321
|
-
device_events.device_status_change(dev, NVMeDevice.STATUS_FAILED, old_status)
|
|
1322
|
-
tasks_controller.add_device_failed_mig_task(dev.get_id())
|
|
1318
|
+
device_controller.device_set_failed(dev.get_id())
|
|
1323
1319
|
|
|
1324
1320
|
logger.info("Removing storage node")
|
|
1325
1321
|
|
|
@@ -1332,24 +1328,20 @@ def remove_storage_node(node_id, force_remove=False, force_migrate=False):
|
|
|
1332
1328
|
pass
|
|
1333
1329
|
|
|
1334
1330
|
try:
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1331
|
+
if health_controller._check_node_api(snode.mgmt_ip):
|
|
1332
|
+
snode_api = SNodeClient(snode.api_endpoint, timeout=20)
|
|
1333
|
+
snode_api.spdk_process_kill()
|
|
1334
|
+
snode_api.leave_swarm()
|
|
1335
|
+
pci_address = []
|
|
1336
|
+
for dev in snode.nvme_devices:
|
|
1337
|
+
if dev.pcie_address not in pci_address:
|
|
1338
|
+
ret = snode_api.delete_dev_gpt_partitions(dev.pcie_address)
|
|
1339
|
+
logger.debug(ret)
|
|
1340
|
+
pci_address.append(dev.pcie_address)
|
|
1344
1341
|
except Exception as e:
|
|
1345
1342
|
logger.exception(e)
|
|
1346
1343
|
|
|
1347
|
-
|
|
1348
|
-
snode.status = StorageNode.STATUS_REMOVED
|
|
1349
|
-
snode.write_to_db(db_controller.kv_store)
|
|
1350
|
-
logger.info("Sending node event update")
|
|
1351
|
-
distr_controller.send_node_status_event(snode, snode.status)
|
|
1352
|
-
storage_events.snode_status_change(snode, StorageNode.STATUS_REMOVED, old_status)
|
|
1344
|
+
set_node_status(node_id, StorageNode.STATUS_REMOVED)
|
|
1353
1345
|
logger.info("done")
|
|
1354
1346
|
|
|
1355
1347
|
|
|
@@ -1411,15 +1403,9 @@ def restart_storage_node(
|
|
|
1411
1403
|
snode.data_nics = data_nics
|
|
1412
1404
|
|
|
1413
1405
|
logger.info("Setting node state to restarting")
|
|
1414
|
-
|
|
1415
|
-
snode.status = StorageNode.STATUS_RESTARTING
|
|
1416
|
-
snode.write_to_db(kv_store)
|
|
1417
|
-
logger.info("Sending node event update")
|
|
1418
|
-
distr_controller.send_node_status_event(snode, snode.status)
|
|
1419
|
-
storage_events.snode_status_change(snode, snode.status, old_status)
|
|
1406
|
+
set_node_status(node_id, StorageNode.STATUS_RESTARTING)
|
|
1420
1407
|
|
|
1421
1408
|
logger.info(f"Restarting Storage node: {snode.mgmt_ip}")
|
|
1422
|
-
|
|
1423
1409
|
snode_api = SNodeClient(snode.api_endpoint, timeout=5*60, retry=3)
|
|
1424
1410
|
node_info, _ = snode_api.info()
|
|
1425
1411
|
logger.debug(f"Node info: {node_info}")
|
|
@@ -1647,11 +1633,7 @@ def restart_storage_node(
|
|
|
1647
1633
|
snode.remote_jm_devices = _connect_to_remote_jm_devs(snode)
|
|
1648
1634
|
|
|
1649
1635
|
logger.info("Setting node status to Online")
|
|
1650
|
-
|
|
1651
|
-
snode.status = StorageNode.STATUS_ONLINE
|
|
1652
|
-
snode.write_to_db(kv_store)
|
|
1653
|
-
storage_events.snode_status_change(snode, snode.status, old_status)
|
|
1654
|
-
|
|
1636
|
+
set_node_status(node_id, StorageNode.STATUS_ONLINE)
|
|
1655
1637
|
|
|
1656
1638
|
# make other nodes connect to the new devices
|
|
1657
1639
|
logger.info("Make other nodes connect to the node devices")
|
|
@@ -1847,52 +1829,37 @@ def shutdown_storage_node(node_id, force=False):
|
|
|
1847
1829
|
return False
|
|
1848
1830
|
|
|
1849
1831
|
logger.info("Shutting down node")
|
|
1850
|
-
|
|
1851
|
-
snode.status = StorageNode.STATUS_IN_SHUTDOWN
|
|
1852
|
-
snode.write_to_db(db_controller.kv_store)
|
|
1853
|
-
storage_events.snode_status_change(snode, snode.status, old_status)
|
|
1832
|
+
set_node_status(node_id, StorageNode.STATUS_IN_SHUTDOWN)
|
|
1854
1833
|
|
|
1855
|
-
|
|
1856
|
-
snode.mgmt_ip, snode.rpc_port, snode.rpc_username, snode.rpc_password, timeout=10, retry=1)
|
|
1834
|
+
if health_controller._check_node_rpc(snode.mgmt_ip, snode.rpc_port, snode.rpc_username, snode.rpc_password):
|
|
1857
1835
|
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1836
|
+
rpc_client = RPCClient(
|
|
1837
|
+
snode.mgmt_ip, snode.rpc_port, snode.rpc_username, snode.rpc_password, timeout=10, retry=1)
|
|
1838
|
+
|
|
1839
|
+
logger.debug("Removing LVols")
|
|
1840
|
+
_remove_bdev_stack(snode.lvstore_stack, rpc_client, remove_distr_only=True)
|
|
1841
|
+
|
|
1842
|
+
if snode.jm_device:
|
|
1843
|
+
# delete jm
|
|
1844
|
+
logger.info("Removing JM")
|
|
1845
|
+
rpc_client.bdev_jm_delete(snode.jm_device.jm_bdev)
|
|
1865
1846
|
|
|
1866
1847
|
for dev in snode.nvme_devices:
|
|
1867
1848
|
if dev.status in [NVMeDevice.STATUS_ONLINE, NVMeDevice.STATUS_READONLY]:
|
|
1868
1849
|
device_controller.device_set_unavailable(dev.get_id())
|
|
1869
|
-
distr_controller.send_node_status_event(snode, StorageNode.STATUS_IN_SHUTDOWN)
|
|
1870
1850
|
|
|
1871
|
-
# shutdown node
|
|
1872
1851
|
# make other nodes disconnect from this node
|
|
1873
1852
|
logger.info("disconnect all other nodes connections to this node")
|
|
1874
1853
|
for dev in snode.nvme_devices:
|
|
1875
1854
|
distr_controller.disconnect_device(dev)
|
|
1876
1855
|
|
|
1877
|
-
if snode.jm_device:
|
|
1878
|
-
# delete jm
|
|
1879
|
-
logger.info("Removing JM")
|
|
1880
|
-
rpc_client.bdev_jm_delete(snode.jm_device.jm_bdev)
|
|
1881
|
-
|
|
1882
1856
|
logger.info("Stopping SPDK")
|
|
1883
|
-
|
|
1884
|
-
|
|
1857
|
+
if health_controller._check_node_api(snode.mgmt_ip):
|
|
1858
|
+
snode_api = SNodeClient(snode.api_endpoint)
|
|
1859
|
+
results, err = snode_api.spdk_process_kill()
|
|
1885
1860
|
|
|
1886
1861
|
logger.info("Setting node status to offline")
|
|
1887
|
-
|
|
1888
|
-
old_status = snode.status
|
|
1889
|
-
snode.status = StorageNode.STATUS_OFFLINE
|
|
1890
|
-
snode.write_to_db(db_controller.kv_store)
|
|
1891
|
-
|
|
1892
|
-
for dev in snode.nvme_devices:
|
|
1893
|
-
if dev.status in [NVMeDevice.STATUS_ONLINE, NVMeDevice.STATUS_READONLY]:
|
|
1894
|
-
device_controller.device_set_unavailable(dev.get_id())
|
|
1895
|
-
distr_controller.send_node_status_event(snode, StorageNode.STATUS_OFFLINE)
|
|
1862
|
+
set_node_status(node_id, StorageNode.STATUS_OFFLINE)
|
|
1896
1863
|
|
|
1897
1864
|
tasks = db_controller.get_job_tasks(snode.cluster_id)
|
|
1898
1865
|
for task in tasks:
|
|
@@ -1900,8 +1867,6 @@ def shutdown_storage_node(node_id, force=False):
|
|
|
1900
1867
|
task.canceled = True
|
|
1901
1868
|
task.write_to_db(db_controller.kv_store)
|
|
1902
1869
|
|
|
1903
|
-
# send event log
|
|
1904
|
-
storage_events.snode_status_change(snode, snode.status, old_status)
|
|
1905
1870
|
logger.info("Done")
|
|
1906
1871
|
return True
|
|
1907
1872
|
|
|
@@ -1943,7 +1908,6 @@ def suspend_storage_node(node_id, force=False):
|
|
|
1943
1908
|
return False
|
|
1944
1909
|
|
|
1945
1910
|
logger.info("Suspending node")
|
|
1946
|
-
distr_controller.send_node_status_event(snode, StorageNode.STATUS_SUSPENDED)
|
|
1947
1911
|
for dev in snode.nvme_devices:
|
|
1948
1912
|
if dev.status == NVMeDevice.STATUS_ONLINE:
|
|
1949
1913
|
device_controller.device_set_unavailable(dev.get_id())
|
|
@@ -1962,12 +1926,7 @@ def suspend_storage_node(node_id, force=False):
|
|
|
1962
1926
|
lvol.write_to_db(db_controller.kv_store)
|
|
1963
1927
|
|
|
1964
1928
|
logger.info("Setting node status to suspended")
|
|
1965
|
-
|
|
1966
|
-
old_status = snode.status
|
|
1967
|
-
snode.status = StorageNode.STATUS_SUSPENDED
|
|
1968
|
-
snode.write_to_db(db_controller.kv_store)
|
|
1969
|
-
|
|
1970
|
-
storage_events.snode_status_change(snode, snode.status, old_status)
|
|
1929
|
+
set_node_status(node_id, StorageNode.STATUS_SUSPENDED)
|
|
1971
1930
|
logger.info("Done")
|
|
1972
1931
|
return True
|
|
1973
1932
|
|
|
@@ -1990,10 +1949,6 @@ def resume_storage_node(node_id):
|
|
|
1990
1949
|
return False
|
|
1991
1950
|
|
|
1992
1951
|
logger.info("Resuming node")
|
|
1993
|
-
|
|
1994
|
-
logger.info("Sending cluster event updates")
|
|
1995
|
-
distr_controller.send_node_status_event(snode, StorageNode.STATUS_ONLINE)
|
|
1996
|
-
|
|
1997
1952
|
for dev in snode.nvme_devices:
|
|
1998
1953
|
if dev.status == NVMeDevice.STATUS_UNAVAILABLE:
|
|
1999
1954
|
device_controller.device_set_online(dev.get_id())
|
|
@@ -2012,12 +1967,7 @@ def resume_storage_node(node_id):
|
|
|
2012
1967
|
lvol.write_to_db(db_controller.kv_store)
|
|
2013
1968
|
|
|
2014
1969
|
logger.info("Setting node status to online")
|
|
2015
|
-
|
|
2016
|
-
old_status = snode.status
|
|
2017
|
-
snode.status = StorageNode.STATUS_ONLINE
|
|
2018
|
-
snode.write_to_db(db_controller.kv_store)
|
|
2019
|
-
|
|
2020
|
-
storage_events.snode_status_change(snode, snode.status, old_status)
|
|
1970
|
+
set_node_status(node_id, StorageNode.STATUS_ONLINE)
|
|
2021
1971
|
logger.info("Done")
|
|
2022
1972
|
return True
|
|
2023
1973
|
|
|
@@ -2742,3 +2692,41 @@ def _remove_bdev_stack(bdev_stack, rpc_client, remove_distr_only=False):
|
|
|
2742
2692
|
|
|
2743
2693
|
bdev['status'] = 'deleted'
|
|
2744
2694
|
time.sleep(1)
|
|
2695
|
+
|
|
2696
|
+
|
|
2697
|
+
def send_cluster_map(node_id):
|
|
2698
|
+
db_controller = DBController()
|
|
2699
|
+
snode = db_controller.get_storage_node_by_id(node_id)
|
|
2700
|
+
if not snode:
|
|
2701
|
+
logger.error(f"snode not found: {node_id}")
|
|
2702
|
+
return False
|
|
2703
|
+
|
|
2704
|
+
logger.info("Sending cluster map")
|
|
2705
|
+
return distr_controller.send_cluster_map_to_node(snode)
|
|
2706
|
+
|
|
2707
|
+
|
|
2708
|
+
def get_cluster_map(node_id):
|
|
2709
|
+
db_controller = DBController()
|
|
2710
|
+
snode = db_controller.get_storage_node_by_id(node_id)
|
|
2711
|
+
if not snode:
|
|
2712
|
+
logger.error(f"snode not found: {node_id}")
|
|
2713
|
+
return False
|
|
2714
|
+
|
|
2715
|
+
rpc_client = RPCClient(snode.mgmt_ip, snode.rpc_port, snode.rpc_username, snode.rpc_password)
|
|
2716
|
+
distribs_list = []
|
|
2717
|
+
for bdev in snode.lvstore_stack:
|
|
2718
|
+
type = bdev['type']
|
|
2719
|
+
if type == "bdev_raid":
|
|
2720
|
+
distribs_list = bdev["distribs_list"]
|
|
2721
|
+
if not distribs_list:
|
|
2722
|
+
logger.error(f"Failed to get cluster map: {node_id}")
|
|
2723
|
+
for distr in distribs_list:
|
|
2724
|
+
ret = rpc_client.distr_get_cluster_map(distr)
|
|
2725
|
+
if not ret:
|
|
2726
|
+
logger.error(f"Failed to get distr cluster map: {distr}")
|
|
2727
|
+
return False
|
|
2728
|
+
logger.debug(ret)
|
|
2729
|
+
print("*"*100)
|
|
2730
|
+
results, is_passed = distr_controller.parse_distr_cluster_map(ret)
|
|
2731
|
+
print(utils.print_table(results))
|
|
2732
|
+
return True
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/controllers/caching_node_controller.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/scripts/clean_local_storage_deploy.sh
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/scripts/dashboards/node-exporter.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/services/cached_lvol_stat_collector.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/services/capacity_and_stats_collector.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/services/main_distr_event_collector.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/services/tasks_runner_failed_migration.py
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-3.8.84 → sbcli_dev-3.8.85}/simplyblock_core/services/tasks_runner_new_dev_migration.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|