sbcli-dev 3.8.84__zip → 3.8.86__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.86}/PKG-INFO +1 -1
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/env_var +1 -1
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/sbcli_dev.egg-info/PKG-INFO +1 -1
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_cli/cli.py +13 -13
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/controllers/lvol_controller.py +0 -36
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/models/storage_node.py +2 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/rpc_client.py +5 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/storage_node_ops.py +123 -89
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/utils.py +21 -10
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2 +3 -3
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/README.md +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/pyproject.toml +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/sbcli_dev.egg-info/SOURCES.txt +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/sbcli_dev.egg-info/dependency_links.txt +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/sbcli_dev.egg-info/entry_points.txt +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/sbcli_dev.egg-info/requires.txt +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/sbcli_dev.egg-info/top_level.txt +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/setup.cfg +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/setup.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_cli/main.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/__init__.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/cluster_ops.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/compute_node_ops.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/constants.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/controllers/device_controller.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/controllers/events_controller.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/controllers/health_controller.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/controllers/pool_controller.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/controllers/snapshot_controller.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/controllers/tasks_controller.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/distr_controller.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/kv_store.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/mgmt_node_ops.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/models/cluster.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/models/compute_node.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/models/deployer.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/models/events.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/models/global_settings.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/models/iface.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/models/job_schedule.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/models/lvol_model.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/models/nvme_device.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/models/pool.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/models/stats.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/scripts/__init__.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/scripts/dashboard.yml +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/scripts/deploy_stack.sh +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/scripts/docker-compose-swarm.yml +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/scripts/objstore.yml +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/scripts/prometheus.yml +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/services/cached_lvol_stat_collector.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/services/capacity_and_stats_collector.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/services/distr_event_collector.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/services/health_check_service.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/services/log_agg_service.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/services/lvol_stat_collector.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/services/main_distr_event_collector.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/services/new_device_discovery.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/services/port_stat_collector.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/services/spdk_http_proxy_server.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/services/storage_node_monitor.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/services/tasks_runner_failed_migration.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/services/tasks_runner_migration.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/services/tasks_runner_new_dev_migration.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/services/tasks_runner_node_add.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/services/tasks_runner_restart.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/snode_client.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/__init__.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/app.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/blueprints/snode_ops.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/blueprints/snode_ops_k8s.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/blueprints/web_api_cluster.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/blueprints/web_api_lvol.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/blueprints/web_api_pool.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/blueprints/web_api_storage_node.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/caching_node_app.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/caching_node_app_k8s.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/node_utils.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/snode_app.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/snode_app_k8s.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/static/delete.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/static/tst.py +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/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)
|
|
@@ -91,6 +91,8 @@ class StorageNode(BaseModel):
|
|
|
91
91
|
"alceml_cpu_index": {"type": int, "default": 0},
|
|
92
92
|
"alceml_worker_cpu_index": {"type": int, "default": 0},
|
|
93
93
|
"distrib_cpu_index": {"type": int, "default": 0},
|
|
94
|
+
"jc_singleton_mask": {"type": int, "default": 0},
|
|
95
|
+
|
|
94
96
|
|
|
95
97
|
"distrib_cpu_mask": {"type": str, "default": ""},
|
|
96
98
|
|
|
@@ -728,6 +728,11 @@ class RPCClient:
|
|
|
728
728
|
params = {"poll_groups_mask": poll_groups_mask}
|
|
729
729
|
return self._request("nvmf_set_config", params)
|
|
730
730
|
|
|
731
|
+
def jc_set_hint_lcpu_mask(self, jc_singleton_mask):
|
|
732
|
+
params = {"hint_lcpu_mask": int(jc_singleton_mask, 16)}
|
|
733
|
+
return self._request("jc_set_hint_lcpu_mask", params)
|
|
734
|
+
|
|
735
|
+
|
|
731
736
|
def thread_get_stats(self):
|
|
732
737
|
return self._request("thread_get_stats")
|
|
733
738
|
|
|
@@ -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
|
|
@@ -578,10 +578,13 @@ def _prepare_cluster_devices_partitions(snode, devices):
|
|
|
578
578
|
if not new_device:
|
|
579
579
|
logger.error("failed to create dev stack")
|
|
580
580
|
return False
|
|
581
|
-
|
|
582
|
-
|
|
581
|
+
if nvme.status == NVMeDevice.STATUS_NEW:
|
|
582
|
+
new_device.status = NVMeDevice.STATUS_NEW
|
|
583
|
+
else:
|
|
584
|
+
new_device.cluster_device_order = dev_order
|
|
585
|
+
dev_order += 1
|
|
586
|
+
device_events.device_create(new_device)
|
|
583
587
|
new_devices.append(new_device)
|
|
584
|
-
device_events.device_create(new_device)
|
|
585
588
|
|
|
586
589
|
snode.nvme_devices = new_devices
|
|
587
590
|
|
|
@@ -877,6 +880,7 @@ def add_node(cluster_id, node_ip, iface_name, data_nics_list,
|
|
|
877
880
|
alceml_worker_cpu_index = 0
|
|
878
881
|
distrib_cpu_index = 0
|
|
879
882
|
|
|
883
|
+
|
|
880
884
|
poller_cpu_cores = []
|
|
881
885
|
|
|
882
886
|
if not spdk_cpu_mask:
|
|
@@ -890,11 +894,13 @@ def add_node(cluster_id, node_ip, iface_name, data_nics_list,
|
|
|
890
894
|
print(f"ERROR: The provided cpu mask {spdk_cpu_mask} has values greater than 63, which is not allowed")
|
|
891
895
|
return False
|
|
892
896
|
if len(spdk_cores) >= 4:
|
|
893
|
-
app_thread_core, jm_cpu_core, poller_cpu_cores, alceml_cpu_cores, alceml_worker_cpu_cores, distrib_cpu_cores = utils.calculate_core_allocation(
|
|
897
|
+
app_thread_core, jm_cpu_core, poller_cpu_cores, alceml_cpu_cores, alceml_worker_cpu_cores, distrib_cpu_cores, jc_singleton_core = utils.calculate_core_allocation(
|
|
894
898
|
spdk_cores)
|
|
895
899
|
|
|
896
900
|
pollers_mask = utils.generate_mask(poller_cpu_cores)
|
|
897
901
|
app_thread_mask = utils.generate_mask(app_thread_core)
|
|
902
|
+
if jc_singleton_core:
|
|
903
|
+
jc_singleton_mask = utils.decimal_to_hex_power_of_2(jc_singleton_core[0])
|
|
898
904
|
#spdk_cpu_mask = utils.generate_mask(spdk_cores)
|
|
899
905
|
jm_cpu_mask = utils.generate_mask(jm_cpu_core)
|
|
900
906
|
#distrib_cpu_mask = utils.generate_mask(distrib_cpu_cores)
|
|
@@ -1057,6 +1063,7 @@ def add_node(cluster_id, node_ip, iface_name, data_nics_list,
|
|
|
1057
1063
|
snode.alceml_cpu_cores = alceml_cpu_cores
|
|
1058
1064
|
snode.alceml_worker_cpu_cores = alceml_worker_cpu_cores
|
|
1059
1065
|
snode.distrib_cpu_cores = distrib_cpu_cores
|
|
1066
|
+
snode.jc_singleton_mask = jc_singleton_mask or 0
|
|
1060
1067
|
|
|
1061
1068
|
snode.poller_cpu_cores = poller_cpu_cores or []
|
|
1062
1069
|
|
|
@@ -1127,6 +1134,13 @@ def add_node(cluster_id, node_ip, iface_name, data_nics_list,
|
|
|
1127
1134
|
logger.error("Failed to set nvme options")
|
|
1128
1135
|
return False
|
|
1129
1136
|
|
|
1137
|
+
# 7- set jc singleton mask
|
|
1138
|
+
if snode.jc_singleton_mask:
|
|
1139
|
+
ret = rpc_client.jc_set_hint_lcpu_mask(snode.jc_singleton_mask)
|
|
1140
|
+
if not ret:
|
|
1141
|
+
logger.error("Failed to set jc singleton mask")
|
|
1142
|
+
return False
|
|
1143
|
+
|
|
1130
1144
|
# get new node info after starting spdk
|
|
1131
1145
|
node_info, _ = snode_api.info()
|
|
1132
1146
|
|
|
@@ -1258,7 +1272,7 @@ def delete_storage_node(node_id):
|
|
|
1258
1272
|
|
|
1259
1273
|
for lvol in db_controller.get_lvols(snode.cluster_id):
|
|
1260
1274
|
logger.info(f"Sending cluster map to LVol: {lvol.get_id()}")
|
|
1261
|
-
|
|
1275
|
+
send_cluster_map(lvol.get_id())
|
|
1262
1276
|
|
|
1263
1277
|
storage_events.snode_delete(snode)
|
|
1264
1278
|
logger.info("done")
|
|
@@ -1313,13 +1327,9 @@ def remove_storage_node(node_id, force_remove=False, force_migrate=False):
|
|
|
1313
1327
|
for dev in snode.nvme_devices:
|
|
1314
1328
|
if dev.status == NVMeDevice.STATUS_JM:
|
|
1315
1329
|
continue
|
|
1316
|
-
if dev.status ==
|
|
1330
|
+
if dev.status == NVMeDevice.STATUS_ONLINE:
|
|
1317
1331
|
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())
|
|
1332
|
+
device_controller.device_set_failed(dev.get_id())
|
|
1323
1333
|
|
|
1324
1334
|
logger.info("Removing storage node")
|
|
1325
1335
|
|
|
@@ -1332,24 +1342,20 @@ def remove_storage_node(node_id, force_remove=False, force_migrate=False):
|
|
|
1332
1342
|
pass
|
|
1333
1343
|
|
|
1334
1344
|
try:
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1345
|
+
if health_controller._check_node_api(snode.mgmt_ip):
|
|
1346
|
+
snode_api = SNodeClient(snode.api_endpoint, timeout=20)
|
|
1347
|
+
snode_api.spdk_process_kill()
|
|
1348
|
+
snode_api.leave_swarm()
|
|
1349
|
+
pci_address = []
|
|
1350
|
+
for dev in snode.nvme_devices:
|
|
1351
|
+
if dev.pcie_address not in pci_address:
|
|
1352
|
+
ret = snode_api.delete_dev_gpt_partitions(dev.pcie_address)
|
|
1353
|
+
logger.debug(ret)
|
|
1354
|
+
pci_address.append(dev.pcie_address)
|
|
1344
1355
|
except Exception as e:
|
|
1345
1356
|
logger.exception(e)
|
|
1346
1357
|
|
|
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)
|
|
1358
|
+
set_node_status(node_id, StorageNode.STATUS_REMOVED)
|
|
1353
1359
|
logger.info("done")
|
|
1354
1360
|
|
|
1355
1361
|
|
|
@@ -1411,15 +1417,9 @@ def restart_storage_node(
|
|
|
1411
1417
|
snode.data_nics = data_nics
|
|
1412
1418
|
|
|
1413
1419
|
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)
|
|
1420
|
+
set_node_status(node_id, StorageNode.STATUS_RESTARTING)
|
|
1420
1421
|
|
|
1421
1422
|
logger.info(f"Restarting Storage node: {snode.mgmt_ip}")
|
|
1422
|
-
|
|
1423
1423
|
snode_api = SNodeClient(snode.api_endpoint, timeout=5*60, retry=3)
|
|
1424
1424
|
node_info, _ = snode_api.info()
|
|
1425
1425
|
logger.debug(f"Node info: {node_info}")
|
|
@@ -1577,6 +1577,13 @@ def restart_storage_node(
|
|
|
1577
1577
|
logger.error("Failed to set nvme options")
|
|
1578
1578
|
return False
|
|
1579
1579
|
|
|
1580
|
+
# 7- set jc singleton mask
|
|
1581
|
+
if snode.jc_singleton_mask:
|
|
1582
|
+
ret = rpc_client.jc_set_hint_lcpu_mask(snode.jc_singleton_mask)
|
|
1583
|
+
if not ret:
|
|
1584
|
+
logger.error("Failed to set jc singleton mask")
|
|
1585
|
+
return False
|
|
1586
|
+
|
|
1580
1587
|
node_info, _ = snode_api.info()
|
|
1581
1588
|
nvme_devs = addNvmeDevices(snode, node_info['spdk_pcie_list'])
|
|
1582
1589
|
if not nvme_devs:
|
|
@@ -1647,11 +1654,7 @@ def restart_storage_node(
|
|
|
1647
1654
|
snode.remote_jm_devices = _connect_to_remote_jm_devs(snode)
|
|
1648
1655
|
|
|
1649
1656
|
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
|
-
|
|
1657
|
+
set_node_status(node_id, StorageNode.STATUS_ONLINE)
|
|
1655
1658
|
|
|
1656
1659
|
# make other nodes connect to the new devices
|
|
1657
1660
|
logger.info("Make other nodes connect to the node devices")
|
|
@@ -1847,52 +1850,37 @@ def shutdown_storage_node(node_id, force=False):
|
|
|
1847
1850
|
return False
|
|
1848
1851
|
|
|
1849
1852
|
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)
|
|
1853
|
+
set_node_status(node_id, StorageNode.STATUS_IN_SHUTDOWN)
|
|
1854
1854
|
|
|
1855
|
-
|
|
1856
|
-
|
|
1855
|
+
if health_controller._check_node_rpc(snode.mgmt_ip, snode.rpc_port, snode.rpc_username, snode.rpc_password):
|
|
1856
|
+
|
|
1857
|
+
rpc_client = RPCClient(
|
|
1858
|
+
snode.mgmt_ip, snode.rpc_port, snode.rpc_username, snode.rpc_password, timeout=10, retry=1)
|
|
1859
|
+
|
|
1860
|
+
logger.debug("Removing LVols")
|
|
1861
|
+
_remove_bdev_stack(snode.lvstore_stack, rpc_client, remove_distr_only=True)
|
|
1857
1862
|
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
# lvol = db_controller.get_lvol_by_id(lvol_id)
|
|
1863
|
-
# lvol_controller._remove_bdev_stack([lvol.bdev_stack[0]], rpc_client)
|
|
1864
|
-
# time.sleep(1)
|
|
1863
|
+
if snode.jm_device:
|
|
1864
|
+
# delete jm
|
|
1865
|
+
logger.info("Removing JM")
|
|
1866
|
+
rpc_client.bdev_jm_delete(snode.jm_device.jm_bdev)
|
|
1865
1867
|
|
|
1866
1868
|
for dev in snode.nvme_devices:
|
|
1867
1869
|
if dev.status in [NVMeDevice.STATUS_ONLINE, NVMeDevice.STATUS_READONLY]:
|
|
1868
1870
|
device_controller.device_set_unavailable(dev.get_id())
|
|
1869
|
-
distr_controller.send_node_status_event(snode, StorageNode.STATUS_IN_SHUTDOWN)
|
|
1870
1871
|
|
|
1871
|
-
# shutdown node
|
|
1872
1872
|
# make other nodes disconnect from this node
|
|
1873
1873
|
logger.info("disconnect all other nodes connections to this node")
|
|
1874
1874
|
for dev in snode.nvme_devices:
|
|
1875
1875
|
distr_controller.disconnect_device(dev)
|
|
1876
1876
|
|
|
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
1877
|
logger.info("Stopping SPDK")
|
|
1883
|
-
|
|
1884
|
-
|
|
1878
|
+
if health_controller._check_node_api(snode.mgmt_ip):
|
|
1879
|
+
snode_api = SNodeClient(snode.api_endpoint)
|
|
1880
|
+
results, err = snode_api.spdk_process_kill()
|
|
1885
1881
|
|
|
1886
1882
|
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)
|
|
1883
|
+
set_node_status(node_id, StorageNode.STATUS_OFFLINE)
|
|
1896
1884
|
|
|
1897
1885
|
tasks = db_controller.get_job_tasks(snode.cluster_id)
|
|
1898
1886
|
for task in tasks:
|
|
@@ -1900,8 +1888,6 @@ def shutdown_storage_node(node_id, force=False):
|
|
|
1900
1888
|
task.canceled = True
|
|
1901
1889
|
task.write_to_db(db_controller.kv_store)
|
|
1902
1890
|
|
|
1903
|
-
# send event log
|
|
1904
|
-
storage_events.snode_status_change(snode, snode.status, old_status)
|
|
1905
1891
|
logger.info("Done")
|
|
1906
1892
|
return True
|
|
1907
1893
|
|
|
@@ -1943,7 +1929,6 @@ def suspend_storage_node(node_id, force=False):
|
|
|
1943
1929
|
return False
|
|
1944
1930
|
|
|
1945
1931
|
logger.info("Suspending node")
|
|
1946
|
-
distr_controller.send_node_status_event(snode, StorageNode.STATUS_SUSPENDED)
|
|
1947
1932
|
for dev in snode.nvme_devices:
|
|
1948
1933
|
if dev.status == NVMeDevice.STATUS_ONLINE:
|
|
1949
1934
|
device_controller.device_set_unavailable(dev.get_id())
|
|
@@ -1962,12 +1947,7 @@ def suspend_storage_node(node_id, force=False):
|
|
|
1962
1947
|
lvol.write_to_db(db_controller.kv_store)
|
|
1963
1948
|
|
|
1964
1949
|
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)
|
|
1950
|
+
set_node_status(node_id, StorageNode.STATUS_SUSPENDED)
|
|
1971
1951
|
logger.info("Done")
|
|
1972
1952
|
return True
|
|
1973
1953
|
|
|
@@ -1990,10 +1970,6 @@ def resume_storage_node(node_id):
|
|
|
1990
1970
|
return False
|
|
1991
1971
|
|
|
1992
1972
|
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
1973
|
for dev in snode.nvme_devices:
|
|
1998
1974
|
if dev.status == NVMeDevice.STATUS_UNAVAILABLE:
|
|
1999
1975
|
device_controller.device_set_online(dev.get_id())
|
|
@@ -2012,12 +1988,7 @@ def resume_storage_node(node_id):
|
|
|
2012
1988
|
lvol.write_to_db(db_controller.kv_store)
|
|
2013
1989
|
|
|
2014
1990
|
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)
|
|
1991
|
+
set_node_status(node_id, StorageNode.STATUS_ONLINE)
|
|
2021
1992
|
logger.info("Done")
|
|
2022
1993
|
return True
|
|
2023
1994
|
|
|
@@ -2550,6 +2521,31 @@ def recreate_lvstore(snode):
|
|
|
2550
2521
|
return True
|
|
2551
2522
|
|
|
2552
2523
|
|
|
2524
|
+
def get_next_ha_jm_names(current_node):
|
|
2525
|
+
db_controller = DBController(KVStore())
|
|
2526
|
+
jm_list = []
|
|
2527
|
+
if current_node.jm_device:
|
|
2528
|
+
jm_list.append(current_node.jm_device.jm_bdev)
|
|
2529
|
+
else:
|
|
2530
|
+
jm_list.append("JM_LOCAL")
|
|
2531
|
+
|
|
2532
|
+
jm_count = {}
|
|
2533
|
+
for node in db_controller.get_storage_nodes_by_cluster_id(current_node.cluster_id):
|
|
2534
|
+
if node.get_id() == current_node.get_id() or node.status != StorageNode.STATUS_ONLINE:
|
|
2535
|
+
continue
|
|
2536
|
+
if node.jm_device:
|
|
2537
|
+
jm_count[node.jm_device.jm_bdev] = 1 + jm_count.get(node.jm_device.jm_bdev, 0)
|
|
2538
|
+
for rem_jm_device in node.remote_jm_devices:
|
|
2539
|
+
jm_count[rem_jm_device.jm_bdev] = 1 + jm_count.get(rem_jm_device.jm_bdev, 0)
|
|
2540
|
+
|
|
2541
|
+
jm_count = dict(sorted(jm_count.items(), key=lambda x: x[1]))
|
|
2542
|
+
|
|
2543
|
+
jm_list.append(f"remote_{list(jm_count.keys())[0].jm_bdev}n1")
|
|
2544
|
+
jm_list.append(f"remote_{list(jm_count.keys())[1].jm_bdev}n1")
|
|
2545
|
+
|
|
2546
|
+
return jm_list
|
|
2547
|
+
|
|
2548
|
+
|
|
2553
2549
|
def create_lvstore(snode, ndcs, npcs, distr_bs, distr_chunk_bs, page_size_in_blocks, max_size, nodes):
|
|
2554
2550
|
lvstore_stack = []
|
|
2555
2551
|
distrib_list = []
|
|
@@ -2742,3 +2738,41 @@ def _remove_bdev_stack(bdev_stack, rpc_client, remove_distr_only=False):
|
|
|
2742
2738
|
|
|
2743
2739
|
bdev['status'] = 'deleted'
|
|
2744
2740
|
time.sleep(1)
|
|
2741
|
+
|
|
2742
|
+
|
|
2743
|
+
def send_cluster_map(node_id):
|
|
2744
|
+
db_controller = DBController()
|
|
2745
|
+
snode = db_controller.get_storage_node_by_id(node_id)
|
|
2746
|
+
if not snode:
|
|
2747
|
+
logger.error(f"snode not found: {node_id}")
|
|
2748
|
+
return False
|
|
2749
|
+
|
|
2750
|
+
logger.info("Sending cluster map")
|
|
2751
|
+
return distr_controller.send_cluster_map_to_node(snode)
|
|
2752
|
+
|
|
2753
|
+
|
|
2754
|
+
def get_cluster_map(node_id):
|
|
2755
|
+
db_controller = DBController()
|
|
2756
|
+
snode = db_controller.get_storage_node_by_id(node_id)
|
|
2757
|
+
if not snode:
|
|
2758
|
+
logger.error(f"snode not found: {node_id}")
|
|
2759
|
+
return False
|
|
2760
|
+
|
|
2761
|
+
rpc_client = RPCClient(snode.mgmt_ip, snode.rpc_port, snode.rpc_username, snode.rpc_password)
|
|
2762
|
+
distribs_list = []
|
|
2763
|
+
for bdev in snode.lvstore_stack:
|
|
2764
|
+
type = bdev['type']
|
|
2765
|
+
if type == "bdev_raid":
|
|
2766
|
+
distribs_list = bdev["distribs_list"]
|
|
2767
|
+
if not distribs_list:
|
|
2768
|
+
logger.error(f"Failed to get cluster map: {node_id}")
|
|
2769
|
+
for distr in distribs_list:
|
|
2770
|
+
ret = rpc_client.distr_get_cluster_map(distr)
|
|
2771
|
+
if not ret:
|
|
2772
|
+
logger.error(f"Failed to get distr cluster map: {distr}")
|
|
2773
|
+
return False
|
|
2774
|
+
logger.debug(ret)
|
|
2775
|
+
print("*"*100)
|
|
2776
|
+
results, is_passed = distr_controller.parse_distr_cluster_map(ret)
|
|
2777
|
+
print(utils.print_table(results))
|
|
2778
|
+
return True
|
|
@@ -350,59 +350,67 @@ def calculate_core_allocation(cpu_cores):
|
|
|
350
350
|
if len(cpu_cores) == 23:
|
|
351
351
|
app_thread_core = [cpu_cores[pos - 1] for pos in [16]]
|
|
352
352
|
jm_cpu_core = [cpu_cores[pos - 1] for pos in [17, 22]]
|
|
353
|
-
poller_cpu_cores = [cpu_cores[pos - 1] for pos in [6, 7, 8, 14, 15, 18, 19, 20
|
|
353
|
+
poller_cpu_cores = [cpu_cores[pos - 1] for pos in [6, 7, 8, 14, 15, 18, 19, 20]]
|
|
354
354
|
alceml_cpu_cores = [cpu_cores[pos - 1] for pos in [1, 2, 3]]
|
|
355
355
|
alceml_cpu_worker_cores = [cpu_cores[pos - 1] for pos in [13, 21]]
|
|
356
356
|
distrib_cpu_cores = [cpu_cores[pos - 1] for pos in [4, 5, 9, 10, 11, 12]]
|
|
357
|
+
jc_singleton_core = [cpu_cores[pos - 1] for pos in [23]]
|
|
357
358
|
elif len(cpu_cores) == 21:
|
|
358
359
|
app_thread_core = [cpu_cores[pos - 1] for pos in [14]]
|
|
359
360
|
jm_cpu_core = [cpu_cores[pos - 1] for pos in [15, 21]]
|
|
360
|
-
poller_cpu_cores = [cpu_cores[pos - 1] for pos in [4, 5, 6, 7, 13, 16, 17
|
|
361
|
+
poller_cpu_cores = [cpu_cores[pos - 1] for pos in [4, 5, 6, 7, 13, 16, 17]]
|
|
361
362
|
alceml_cpu_cores = [cpu_cores[pos - 1] for pos in [1, 2]]
|
|
362
363
|
alceml_cpu_worker_cores = [cpu_cores[pos - 1] for pos in [12, 20]]
|
|
363
364
|
distrib_cpu_cores = [cpu_cores[pos - 1] for pos in [3, 8, 9, 10, 11, 19]]
|
|
365
|
+
jc_singleton_core = [cpu_cores[pos - 1] for pos in [18]]
|
|
364
366
|
elif len(cpu_cores) == 19:
|
|
365
367
|
app_thread_core = [cpu_cores[pos - 1] for pos in [13]]
|
|
366
368
|
jm_cpu_core = [cpu_cores[pos - 1] for pos in [14]]
|
|
367
|
-
poller_cpu_cores = [cpu_cores[pos - 1] for pos in [5, 6, 7, 12, 15, 16
|
|
369
|
+
poller_cpu_cores = [cpu_cores[pos - 1] for pos in [5, 6, 7, 12, 15, 16]]
|
|
368
370
|
alceml_cpu_cores = [cpu_cores[pos - 1] for pos in [1, 2]]
|
|
369
371
|
alceml_cpu_worker_cores = [cpu_cores[pos - 1] for pos in [11, 19]]
|
|
370
372
|
distrib_cpu_cores = [cpu_cores[pos - 1] for pos in [3, 4, 8, 9, 10, 18]]
|
|
373
|
+
jc_singleton_core = [cpu_cores[pos - 1] for pos in [17]]
|
|
371
374
|
elif len(cpu_cores) == 17:
|
|
372
375
|
app_thread_core = [cpu_cores[pos - 1] for pos in [12]]
|
|
373
376
|
jm_cpu_core = [cpu_cores[pos - 1] for pos in [13]]
|
|
374
|
-
poller_cpu_cores = [cpu_cores[pos - 1] for pos in [4, 5, 6, 11, 14
|
|
377
|
+
poller_cpu_cores = [cpu_cores[pos - 1] for pos in [4, 5, 6, 11, 14]]
|
|
375
378
|
alceml_cpu_cores = [cpu_cores[pos - 1] for pos in [1, 2]]
|
|
376
379
|
alceml_cpu_worker_cores = [cpu_cores[pos - 1] for pos in [10]]
|
|
377
380
|
distrib_cpu_cores = [cpu_cores[pos - 1] for pos in [3, 7, 8, 9, 16, 17]]
|
|
381
|
+
jc_singleton_core = [cpu_cores[pos - 1] for pos in [15]]
|
|
378
382
|
elif len(cpu_cores) == 15:
|
|
379
383
|
app_thread_core = [cpu_cores[pos - 1] for pos in [11]]
|
|
380
384
|
jm_cpu_core = [cpu_cores[pos - 1] for pos in [12]]
|
|
381
|
-
poller_cpu_cores = [cpu_cores[pos - 1] for pos in [5, 6, 10, 13
|
|
385
|
+
poller_cpu_cores = [cpu_cores[pos - 1] for pos in [5, 6, 10, 13]]
|
|
382
386
|
alceml_cpu_cores = [cpu_cores[pos - 1] for pos in [1, 2]]
|
|
383
387
|
alceml_cpu_worker_cores = [cpu_cores[pos - 1] for pos in [9]]
|
|
384
388
|
distrib_cpu_cores = [cpu_cores[pos - 1] for pos in [3, 4, 7, 8, 15]]
|
|
389
|
+
jc_singleton_core = [cpu_cores[pos - 1] for pos in [14]]
|
|
385
390
|
elif len(cpu_cores) == 13:
|
|
386
391
|
app_thread_core = [cpu_cores[pos - 1] for pos in [9]]
|
|
387
392
|
jm_cpu_core = [cpu_cores[pos - 1] for pos in [10]]
|
|
388
|
-
poller_cpu_cores = [cpu_cores[pos - 1] for pos in [3, 4, 5, 11
|
|
393
|
+
poller_cpu_cores = [cpu_cores[pos - 1] for pos in [3, 4, 5, 11]]
|
|
389
394
|
alceml_cpu_cores = [cpu_cores[pos - 1] for pos in [1]]
|
|
390
395
|
alceml_cpu_worker_cores = [cpu_cores[pos - 1] for pos in [8]]
|
|
391
396
|
distrib_cpu_cores = [cpu_cores[pos - 1] for pos in [2, 6, 7, 13]]
|
|
397
|
+
jc_singleton_core = [cpu_cores[pos - 1] for pos in [12]]
|
|
392
398
|
elif len(cpu_cores) == 11:
|
|
393
399
|
app_thread_core = [cpu_cores[pos - 1] for pos in [8]]
|
|
394
400
|
jm_cpu_core = [cpu_cores[pos - 1] for pos in [9]]
|
|
395
|
-
poller_cpu_cores = [cpu_cores[pos - 1] for pos in [3, 4, 10
|
|
401
|
+
poller_cpu_cores = [cpu_cores[pos - 1] for pos in [3, 4, 10]]
|
|
396
402
|
alceml_cpu_cores = [cpu_cores[pos - 1] for pos in [1]]
|
|
397
403
|
alceml_cpu_worker_cores = [cpu_cores[pos - 1] for pos in [7]]
|
|
398
404
|
distrib_cpu_cores = [cpu_cores[pos - 1] for pos in [2, 5, 6]]
|
|
405
|
+
jc_singleton_core = [cpu_cores[pos - 1] for pos in [11]]
|
|
399
406
|
elif len(cpu_cores) == 9:
|
|
400
407
|
app_thread_core = [cpu_cores[pos - 1] for pos in [7]]
|
|
401
408
|
jm_cpu_core = [cpu_cores[pos - 1] for pos in [8]]
|
|
402
|
-
poller_cpu_cores = [cpu_cores[pos - 1] for pos in [3, 4
|
|
409
|
+
poller_cpu_cores = [cpu_cores[pos - 1] for pos in [3, 4]]
|
|
403
410
|
alceml_cpu_cores = [cpu_cores[pos - 1] for pos in [1]]
|
|
404
411
|
alceml_cpu_worker_cores = [cpu_cores[pos - 1] for pos in [4, 9]]
|
|
405
412
|
distrib_cpu_cores = [cpu_cores[pos - 1] for pos in [2, 5, 6]]
|
|
413
|
+
jc_singleton_core = [cpu_cores[pos - 1] for pos in [7]]
|
|
406
414
|
elif len(cpu_cores) == 7:
|
|
407
415
|
app_thread_core = [cpu_cores[pos - 1] for pos in [6]]
|
|
408
416
|
jm_cpu_core = [cpu_cores[pos - 1] for pos in [7]]
|
|
@@ -410,6 +418,7 @@ def calculate_core_allocation(cpu_cores):
|
|
|
410
418
|
alceml_cpu_cores = [cpu_cores[pos - 1] for pos in [1]]
|
|
411
419
|
alceml_cpu_worker_cores = [cpu_cores[pos - 1] for pos in [1]]
|
|
412
420
|
distrib_cpu_cores = [cpu_cores[pos - 1] for pos in [2, 4]]
|
|
421
|
+
jc_singleton_core = [cpu_cores[pos - 1] for pos in [6]]
|
|
413
422
|
elif len(cpu_cores) == 5:
|
|
414
423
|
app_thread_core = [cpu_cores[pos - 1] for pos in [5]]
|
|
415
424
|
jm_cpu_core = [cpu_cores[pos - 1] for pos in [4]]
|
|
@@ -417,6 +426,7 @@ def calculate_core_allocation(cpu_cores):
|
|
|
417
426
|
alceml_cpu_cores = [cpu_cores[pos - 1] for pos in [1]]
|
|
418
427
|
alceml_cpu_worker_cores = [cpu_cores[pos - 1] for pos in [1]]
|
|
419
428
|
distrib_cpu_cores = [cpu_cores[pos - 1] for pos in [2, 3]]
|
|
429
|
+
jc_singleton_core = [cpu_cores[pos - 1] for pos in [5]]
|
|
420
430
|
elif len(cpu_cores) == 4:
|
|
421
431
|
app_thread_core = [cpu_cores[pos - 1] for pos in [4]]
|
|
422
432
|
jm_cpu_core = [cpu_cores[pos - 1] for pos in [4]]
|
|
@@ -424,10 +434,11 @@ def calculate_core_allocation(cpu_cores):
|
|
|
424
434
|
alceml_cpu_cores = [cpu_cores[pos - 1] for pos in [1]]
|
|
425
435
|
alceml_cpu_worker_cores = [cpu_cores[pos - 1] for pos in [1]]
|
|
426
436
|
distrib_cpu_cores = [cpu_cores[pos - 1] for pos in [2, 3]]
|
|
437
|
+
jc_singleton_core = [cpu_cores[pos - 1] for pos in [4]]
|
|
427
438
|
else:
|
|
428
|
-
app_thread_core = jm_cpu_core = poller_cpu_cores = alceml_cpu_cores = alceml_cpu_worker_cores = distrib_cpu_cores = []
|
|
439
|
+
app_thread_core = jm_cpu_core = poller_cpu_cores = alceml_cpu_cores = alceml_cpu_worker_cores = distrib_cpu_cores = jc_singleton_core = []
|
|
429
440
|
|
|
430
|
-
return app_thread_core, jm_cpu_core, poller_cpu_cores, alceml_cpu_cores, alceml_cpu_worker_cores, distrib_cpu_cores
|
|
441
|
+
return app_thread_core, jm_cpu_core, poller_cpu_cores, alceml_cpu_cores, alceml_cpu_worker_cores, distrib_cpu_cores, jc_singleton_core
|
|
431
442
|
|
|
432
443
|
|
|
433
444
|
def generate_mask(cores):
|
|
@@ -89,10 +89,10 @@ spec:
|
|
|
89
89
|
mountPath: /script
|
|
90
90
|
resources:
|
|
91
91
|
limits:
|
|
92
|
-
hugepages-2Mi:
|
|
93
|
-
memory:
|
|
92
|
+
hugepages-2Mi: 20Gi
|
|
93
|
+
memory: 10Gi
|
|
94
94
|
requests:
|
|
95
|
-
memory:
|
|
95
|
+
memory: 10Gi
|
|
96
96
|
|
|
97
97
|
- name: spdk-proxy-container
|
|
98
98
|
image: {{ SIMPLYBLOCK_DOCKER_IMAGE }}
|
|
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.86}/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
|
{sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/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.86}/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.86}/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.86}/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.86}/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.86}/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.86}/simplyblock_core/services/tasks_runner_failed_migration.py
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-3.8.84 → sbcli_dev-3.8.86}/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
|