sbcli-dev 3.8.92__zip → 3.8.94__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.92 → sbcli_dev-3.8.94}/PKG-INFO +1 -1
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/env_var +1 -1
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/sbcli_dev.egg-info/PKG-INFO +1 -1
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/cluster_ops.py +16 -6
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/constants.py +6 -6
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/controllers/lvol_controller.py +22 -21
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/controllers/tasks_controller.py +7 -1
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/rpc_client.py +7 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/storage_node_ops.py +4 -3
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/utils.py +11 -11
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/web_api_cluster.py +13 -2
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2 +1 -1
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/README.md +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/pyproject.toml +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/sbcli_dev.egg-info/SOURCES.txt +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/sbcli_dev.egg-info/dependency_links.txt +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/sbcli_dev.egg-info/entry_points.txt +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/sbcli_dev.egg-info/requires.txt +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/sbcli_dev.egg-info/top_level.txt +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/setup.cfg +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/setup.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_cli/cli.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_cli/main.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/__init__.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/compute_node_ops.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/controllers/device_controller.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/controllers/events_controller.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/controllers/health_controller.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/controllers/pool_controller.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/controllers/snapshot_controller.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/distr_controller.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/kv_store.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/mgmt_node_ops.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/models/cluster.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/models/compute_node.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/models/deployer.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/models/events.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/models/global_settings.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/models/iface.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/models/job_schedule.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/models/lvol_model.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/models/nvme_device.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/models/pool.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/models/stats.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/models/storage_node.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/scripts/__init__.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/scripts/dashboard.yml +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/scripts/deploy_stack.sh +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/scripts/docker-compose-swarm.yml +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/scripts/objstore.yml +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/scripts/prometheus.yml +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/services/cached_lvol_stat_collector.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/services/capacity_and_stats_collector.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/services/distr_event_collector.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/services/health_check_service.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/services/log_agg_service.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/services/lvol_stat_collector.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/services/main_distr_event_collector.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/services/new_device_discovery.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/services/port_stat_collector.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/services/spdk_http_proxy_server.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/services/storage_node_monitor.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/services/tasks_runner_failed_migration.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/services/tasks_runner_migration.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/services/tasks_runner_new_dev_migration.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/services/tasks_runner_node_add.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/services/tasks_runner_restart.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_core/snode_client.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/__init__.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/app.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/snode_ops.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/snode_ops_k8s.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/web_api_lvol.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/web_api_pool.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/web_api_storage_node.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/caching_node_app.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/caching_node_app_k8s.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/node_utils.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/snode_app.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/snode_app_k8s.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/static/delete.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/static/tst.py +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/simplyblock_web/utils.py +0 -0
|
@@ -456,9 +456,14 @@ def cluster_set_read_only(cl_id):
|
|
|
456
456
|
if ret:
|
|
457
457
|
st = db_controller.get_storage_nodes_by_cluster_id(cl_id)
|
|
458
458
|
for node in st:
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
459
|
+
rpc_client = RPCClient(
|
|
460
|
+
node.mgmt_ip, node.rpc_port,
|
|
461
|
+
node.rpc_username, node.rpc_password, timeout=5, retry=2)
|
|
462
|
+
|
|
463
|
+
for bdev in node.lvstore_stack:
|
|
464
|
+
if bdev['type'] == "bdev_distr":
|
|
465
|
+
rpc_client.bdev_distrib_toggle_cluster_full(bdev['name'], cluster_full=True)
|
|
466
|
+
|
|
462
467
|
return True
|
|
463
468
|
|
|
464
469
|
|
|
@@ -476,9 +481,14 @@ def cluster_set_active(cl_id):
|
|
|
476
481
|
if ret:
|
|
477
482
|
st = db_controller.get_storage_nodes_by_cluster_id(cl_id)
|
|
478
483
|
for node in st:
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
484
|
+
rpc_client = RPCClient(
|
|
485
|
+
node.mgmt_ip, node.rpc_port,
|
|
486
|
+
node.rpc_username, node.rpc_password, timeout=5, retry=2)
|
|
487
|
+
|
|
488
|
+
for bdev in node.lvstore_stack:
|
|
489
|
+
if bdev['type'] == "bdev_distr":
|
|
490
|
+
rpc_client.bdev_distrib_toggle_cluster_full(bdev['name'], cluster_full=False)
|
|
491
|
+
|
|
482
492
|
return True
|
|
483
493
|
|
|
484
494
|
|
|
@@ -37,12 +37,12 @@ DEVICE_OVERLOAD_CAPACITY_THRESHOLD = 50
|
|
|
37
37
|
CLUSTER_NQN = "nqn.2023-02.io.simplyblock"
|
|
38
38
|
|
|
39
39
|
weights = {
|
|
40
|
-
"lvol":
|
|
41
|
-
"cpu": 10,
|
|
42
|
-
"r_io": 10,
|
|
43
|
-
"w_io": 10,
|
|
44
|
-
"r_b": 10,
|
|
45
|
-
"w_b": 10
|
|
40
|
+
"lvol": 100,
|
|
41
|
+
# "cpu": 10,
|
|
42
|
+
# "r_io": 10,
|
|
43
|
+
# "w_io": 10,
|
|
44
|
+
# "r_b": 10,
|
|
45
|
+
# "w_b": 10
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
|
|
@@ -186,31 +186,32 @@ def get_ha_jm_names(current_node, snode_list):
|
|
|
186
186
|
|
|
187
187
|
def _get_next_3_nodes(cluster_id, lvol_size=0):
|
|
188
188
|
snodes = db_controller.get_storage_nodes_by_cluster_id(cluster_id)
|
|
189
|
-
online_nodes = []
|
|
189
|
+
# online_nodes = []
|
|
190
190
|
node_stats = {}
|
|
191
191
|
for node in snodes:
|
|
192
192
|
if node.status == node.STATUS_ONLINE:
|
|
193
193
|
# Validate Eligible nodes for adding lvol
|
|
194
|
-
snode_api = SNodeClient(node.api_endpoint)
|
|
195
|
-
result, _ = snode_api.info()
|
|
196
|
-
memory_free = result["memory_details"]["free"]
|
|
197
|
-
huge_free = result["memory_details"]["huge_free"]
|
|
198
|
-
total_node_capacity = db_controller.get_snode_size(node.get_id())
|
|
199
|
-
error = utils.validate_add_lvol_or_snap_on_node(memory_free, huge_free, node.max_lvol, lvol_size, total_node_capacity, len(node.lvols))
|
|
200
|
-
if error:
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
online_nodes.append(node)
|
|
205
|
-
node_stat_list = db_controller.get_node_stats(node, limit=1000)
|
|
206
|
-
combined_record = utils.sum_records(node_stat_list)
|
|
194
|
+
# snode_api = SNodeClient(node.api_endpoint)
|
|
195
|
+
# result, _ = snode_api.info()
|
|
196
|
+
# memory_free = result["memory_details"]["free"]
|
|
197
|
+
# huge_free = result["memory_details"]["huge_free"]
|
|
198
|
+
# total_node_capacity = db_controller.get_snode_size(node.get_id())
|
|
199
|
+
# error = utils.validate_add_lvol_or_snap_on_node(memory_free, huge_free, node.max_lvol, lvol_size, total_node_capacity, len(node.lvols))
|
|
200
|
+
# if error:
|
|
201
|
+
# logger.warning(error)
|
|
202
|
+
# continue
|
|
203
|
+
#
|
|
204
|
+
# online_nodes.append(node)
|
|
205
|
+
# node_stat_list = db_controller.get_node_stats(node, limit=1000)
|
|
206
|
+
# combined_record = utils.sum_records(node_stat_list)
|
|
207
207
|
node_st = {
|
|
208
|
-
"lvol": len(node.lvols),
|
|
209
|
-
"cpu": 1 + (node.cpu * node.cpu_hz),
|
|
210
|
-
"r_io": combined_record.read_io_ps,
|
|
211
|
-
"w_io": combined_record.write_io_ps,
|
|
212
|
-
"r_b": combined_record.read_bytes_ps,
|
|
213
|
-
"w_b": combined_record.write_bytes_ps
|
|
208
|
+
"lvol": len(node.lvols) or 1,
|
|
209
|
+
# "cpu": 1 + (node.cpu * node.cpu_hz),
|
|
210
|
+
# "r_io": combined_record.read_io_ps,
|
|
211
|
+
# "w_io": combined_record.write_io_ps,
|
|
212
|
+
# "r_b": combined_record.read_bytes_ps,
|
|
213
|
+
# "w_b": combined_record.write_bytes_ps
|
|
214
|
+
}
|
|
214
215
|
|
|
215
216
|
node_stats[node.get_id()] = node_st
|
|
216
217
|
|
|
@@ -243,7 +244,7 @@ def _get_next_3_nodes(cluster_id, lvol_size=0):
|
|
|
243
244
|
#############
|
|
244
245
|
|
|
245
246
|
selected_node_ids = []
|
|
246
|
-
while len(selected_node_ids) < min(len(
|
|
247
|
+
while len(selected_node_ids) < min(len(node_stats), 3):
|
|
247
248
|
r_index = random.randint(0, n_start)
|
|
248
249
|
print(f"Random is {r_index}/{n_start}")
|
|
249
250
|
for node_id in node_start_end:
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
+
import json
|
|
2
3
|
import logging
|
|
3
4
|
import time
|
|
4
5
|
import uuid
|
|
@@ -80,7 +81,7 @@ def add_node_to_auto_restart(node):
|
|
|
80
81
|
return _add_task(JobSchedule.FN_NODE_RESTART, node.cluster_id, node.get_id(), "")
|
|
81
82
|
|
|
82
83
|
|
|
83
|
-
def list_tasks(cluster_id):
|
|
84
|
+
def list_tasks(cluster_id, is_json=False):
|
|
84
85
|
cluster = db_controller.get_cluster_by_id(cluster_id)
|
|
85
86
|
if not cluster:
|
|
86
87
|
logger.error("Cluster not found: %s", cluster_id)
|
|
@@ -88,6 +89,11 @@ def list_tasks(cluster_id):
|
|
|
88
89
|
|
|
89
90
|
data = []
|
|
90
91
|
tasks = db_controller.get_job_tasks(cluster_id)
|
|
92
|
+
if tasks and is_json is True:
|
|
93
|
+
for t in tasks:
|
|
94
|
+
data.append(t.get_clean_dict())
|
|
95
|
+
return json.dumps(data, indent=2)
|
|
96
|
+
|
|
91
97
|
for task in tasks:
|
|
92
98
|
data.append({
|
|
93
99
|
"Task ID": task.uuid,
|
|
@@ -795,3 +795,10 @@ class RPCClient:
|
|
|
795
795
|
def bdev_lvol_inflate(self, name):
|
|
796
796
|
params = {"name": name}
|
|
797
797
|
return self._request("bdev_lvol_inflate", params)
|
|
798
|
+
|
|
799
|
+
def bdev_distrib_toggle_cluster_full(self, name, cluster_full=False):
|
|
800
|
+
params = {
|
|
801
|
+
"name": name,
|
|
802
|
+
"cluster_full": cluster_full,
|
|
803
|
+
}
|
|
804
|
+
return self._request("bdev_distrib_toggle_cluster_full", params)
|
|
@@ -1396,6 +1396,10 @@ def restart_storage_node(
|
|
|
1396
1396
|
if force is False:
|
|
1397
1397
|
return False
|
|
1398
1398
|
|
|
1399
|
+
logger.info("Setting node state to restarting")
|
|
1400
|
+
set_node_status(node_id, StorageNode.STATUS_RESTARTING)
|
|
1401
|
+
snode = db_controller.get_storage_node_by_id(node_id)
|
|
1402
|
+
|
|
1399
1403
|
if node_ip:
|
|
1400
1404
|
if node_ip != snode.api_endpoint:
|
|
1401
1405
|
logger.info(f"Restarting on new node with ip: {node_ip}")
|
|
@@ -1419,9 +1423,6 @@ def restart_storage_node(
|
|
|
1419
1423
|
snode.data_nics = data_nics
|
|
1420
1424
|
snode.hostname = node_info['hostname']
|
|
1421
1425
|
|
|
1422
|
-
logger.info("Setting node state to restarting")
|
|
1423
|
-
set_node_status(node_id, StorageNode.STATUS_RESTARTING)
|
|
1424
|
-
|
|
1425
1426
|
logger.info(f"Restarting Storage node: {snode.mgmt_ip}")
|
|
1426
1427
|
snode_api = SNodeClient(snode.api_endpoint, timeout=5*60, retry=3)
|
|
1427
1428
|
node_info, _ = snode_api.info()
|
|
@@ -347,7 +347,7 @@ def calculate_core_allocation(cpu_cores):
|
|
|
347
347
|
https://docs.google.com/spreadsheets/d/14vxL9W31-7oFT6tEeLNuaJJO0FwG9cZK/edit?gid=1468847899#gid=1468847899
|
|
348
348
|
'''
|
|
349
349
|
|
|
350
|
-
if len(cpu_cores)
|
|
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
353
|
poller_cpu_cores = [cpu_cores[pos - 1] for pos in [6, 7, 8, 14, 15, 18, 19, 20]]
|
|
@@ -355,7 +355,7 @@ def calculate_core_allocation(cpu_cores):
|
|
|
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
357
|
jc_singleton_core = [cpu_cores[pos - 1] for pos in [23]]
|
|
358
|
-
elif len(cpu_cores)
|
|
358
|
+
elif len(cpu_cores) >= 21:
|
|
359
359
|
app_thread_core = [cpu_cores[pos - 1] for pos in [14]]
|
|
360
360
|
jm_cpu_core = [cpu_cores[pos - 1] for pos in [15, 21]]
|
|
361
361
|
poller_cpu_cores = [cpu_cores[pos - 1] for pos in [4, 5, 6, 7, 13, 16, 17]]
|
|
@@ -363,7 +363,7 @@ def calculate_core_allocation(cpu_cores):
|
|
|
363
363
|
alceml_cpu_worker_cores = [cpu_cores[pos - 1] for pos in [12, 20]]
|
|
364
364
|
distrib_cpu_cores = [cpu_cores[pos - 1] for pos in [3, 8, 9, 10, 11, 19]]
|
|
365
365
|
jc_singleton_core = [cpu_cores[pos - 1] for pos in [18]]
|
|
366
|
-
elif len(cpu_cores)
|
|
366
|
+
elif len(cpu_cores) >= 19:
|
|
367
367
|
app_thread_core = [cpu_cores[pos - 1] for pos in [13]]
|
|
368
368
|
jm_cpu_core = [cpu_cores[pos - 1] for pos in [14]]
|
|
369
369
|
poller_cpu_cores = [cpu_cores[pos - 1] for pos in [5, 6, 7, 12, 15, 16]]
|
|
@@ -371,7 +371,7 @@ def calculate_core_allocation(cpu_cores):
|
|
|
371
371
|
alceml_cpu_worker_cores = [cpu_cores[pos - 1] for pos in [11, 19]]
|
|
372
372
|
distrib_cpu_cores = [cpu_cores[pos - 1] for pos in [3, 4, 8, 9, 10, 18]]
|
|
373
373
|
jc_singleton_core = [cpu_cores[pos - 1] for pos in [17]]
|
|
374
|
-
elif len(cpu_cores)
|
|
374
|
+
elif len(cpu_cores) >= 17:
|
|
375
375
|
app_thread_core = [cpu_cores[pos - 1] for pos in [12]]
|
|
376
376
|
jm_cpu_core = [cpu_cores[pos - 1] for pos in [13]]
|
|
377
377
|
poller_cpu_cores = [cpu_cores[pos - 1] for pos in [4, 5, 6, 11, 14]]
|
|
@@ -379,7 +379,7 @@ def calculate_core_allocation(cpu_cores):
|
|
|
379
379
|
alceml_cpu_worker_cores = [cpu_cores[pos - 1] for pos in [10]]
|
|
380
380
|
distrib_cpu_cores = [cpu_cores[pos - 1] for pos in [3, 7, 8, 9, 16, 17]]
|
|
381
381
|
jc_singleton_core = [cpu_cores[pos - 1] for pos in [15]]
|
|
382
|
-
elif len(cpu_cores)
|
|
382
|
+
elif len(cpu_cores) >= 15:
|
|
383
383
|
app_thread_core = [cpu_cores[pos - 1] for pos in [11]]
|
|
384
384
|
jm_cpu_core = [cpu_cores[pos - 1] for pos in [12]]
|
|
385
385
|
poller_cpu_cores = [cpu_cores[pos - 1] for pos in [5, 6, 10, 13]]
|
|
@@ -387,7 +387,7 @@ def calculate_core_allocation(cpu_cores):
|
|
|
387
387
|
alceml_cpu_worker_cores = [cpu_cores[pos - 1] for pos in [9]]
|
|
388
388
|
distrib_cpu_cores = [cpu_cores[pos - 1] for pos in [3, 4, 7, 8, 15]]
|
|
389
389
|
jc_singleton_core = [cpu_cores[pos - 1] for pos in [14]]
|
|
390
|
-
elif len(cpu_cores)
|
|
390
|
+
elif len(cpu_cores) >= 13:
|
|
391
391
|
app_thread_core = [cpu_cores[pos - 1] for pos in [9]]
|
|
392
392
|
jm_cpu_core = [cpu_cores[pos - 1] for pos in [10]]
|
|
393
393
|
poller_cpu_cores = [cpu_cores[pos - 1] for pos in [3, 4, 5, 11]]
|
|
@@ -395,7 +395,7 @@ def calculate_core_allocation(cpu_cores):
|
|
|
395
395
|
alceml_cpu_worker_cores = [cpu_cores[pos - 1] for pos in [8]]
|
|
396
396
|
distrib_cpu_cores = [cpu_cores[pos - 1] for pos in [2, 6, 7, 13]]
|
|
397
397
|
jc_singleton_core = [cpu_cores[pos - 1] for pos in [12]]
|
|
398
|
-
elif len(cpu_cores)
|
|
398
|
+
elif len(cpu_cores) >= 11:
|
|
399
399
|
app_thread_core = [cpu_cores[pos - 1] for pos in [8]]
|
|
400
400
|
jm_cpu_core = [cpu_cores[pos - 1] for pos in [9]]
|
|
401
401
|
poller_cpu_cores = [cpu_cores[pos - 1] for pos in [3, 4, 10]]
|
|
@@ -403,7 +403,7 @@ def calculate_core_allocation(cpu_cores):
|
|
|
403
403
|
alceml_cpu_worker_cores = [cpu_cores[pos - 1] for pos in [7]]
|
|
404
404
|
distrib_cpu_cores = [cpu_cores[pos - 1] for pos in [2, 5, 6]]
|
|
405
405
|
jc_singleton_core = [cpu_cores[pos - 1] for pos in [11]]
|
|
406
|
-
elif len(cpu_cores)
|
|
406
|
+
elif len(cpu_cores) >= 9:
|
|
407
407
|
app_thread_core = [cpu_cores[pos - 1] for pos in [7]]
|
|
408
408
|
jm_cpu_core = [cpu_cores[pos - 1] for pos in [8]]
|
|
409
409
|
poller_cpu_cores = [cpu_cores[pos - 1] for pos in [3, 4]]
|
|
@@ -411,7 +411,7 @@ def calculate_core_allocation(cpu_cores):
|
|
|
411
411
|
alceml_cpu_worker_cores = [cpu_cores[pos - 1] for pos in [4, 9]]
|
|
412
412
|
distrib_cpu_cores = [cpu_cores[pos - 1] for pos in [2, 5, 6]]
|
|
413
413
|
jc_singleton_core = [cpu_cores[pos - 1] for pos in [7]]
|
|
414
|
-
elif len(cpu_cores)
|
|
414
|
+
elif len(cpu_cores) >= 7:
|
|
415
415
|
app_thread_core = [cpu_cores[pos - 1] for pos in [6]]
|
|
416
416
|
jm_cpu_core = [cpu_cores[pos - 1] for pos in [7]]
|
|
417
417
|
poller_cpu_cores = [cpu_cores[pos - 1] for pos in [3, 5]]
|
|
@@ -419,7 +419,7 @@ def calculate_core_allocation(cpu_cores):
|
|
|
419
419
|
alceml_cpu_worker_cores = [cpu_cores[pos - 1] for pos in [1]]
|
|
420
420
|
distrib_cpu_cores = [cpu_cores[pos - 1] for pos in [2, 4]]
|
|
421
421
|
jc_singleton_core = [cpu_cores[pos - 1] for pos in [6]]
|
|
422
|
-
elif len(cpu_cores)
|
|
422
|
+
elif len(cpu_cores) >= 5:
|
|
423
423
|
app_thread_core = [cpu_cores[pos - 1] for pos in [5]]
|
|
424
424
|
jm_cpu_core = [cpu_cores[pos - 1] for pos in [4]]
|
|
425
425
|
poller_cpu_cores = [cpu_cores[pos - 1] for pos in [2, 3]]
|
|
@@ -427,7 +427,7 @@ def calculate_core_allocation(cpu_cores):
|
|
|
427
427
|
alceml_cpu_worker_cores = [cpu_cores[pos - 1] for pos in [1]]
|
|
428
428
|
distrib_cpu_cores = [cpu_cores[pos - 1] for pos in [2, 3]]
|
|
429
429
|
jc_singleton_core = [cpu_cores[pos - 1] for pos in [5]]
|
|
430
|
-
elif len(cpu_cores)
|
|
430
|
+
elif len(cpu_cores) >= 4:
|
|
431
431
|
app_thread_core = [cpu_cores[pos - 1] for pos in [4]]
|
|
432
432
|
jm_cpu_core = [cpu_cores[pos - 1] for pos in [4]]
|
|
433
433
|
poller_cpu_cores = [cpu_cores[pos - 1] for pos in [2, 3]]
|
|
@@ -3,12 +3,11 @@
|
|
|
3
3
|
import json
|
|
4
4
|
import logging
|
|
5
5
|
import threading
|
|
6
|
-
import time
|
|
7
|
-
import uuid
|
|
8
6
|
|
|
9
7
|
from flask import Blueprint
|
|
10
8
|
from flask import request
|
|
11
9
|
|
|
10
|
+
from simplyblock_core.controllers import tasks_controller
|
|
12
11
|
from simplyblock_web import utils
|
|
13
12
|
|
|
14
13
|
from simplyblock_core import kv_store, cluster_ops
|
|
@@ -126,6 +125,18 @@ def cluster_get_logs(uuid):
|
|
|
126
125
|
return utils.get_response(json.loads(data))
|
|
127
126
|
|
|
128
127
|
|
|
128
|
+
@bp.route('/cluster/get-tasks/<string:uuid>', methods=['GET'])
|
|
129
|
+
def cluster_get_tasks(uuid):
|
|
130
|
+
cluster = db_controller.get_cluster_by_id(uuid)
|
|
131
|
+
if not cluster:
|
|
132
|
+
return utils.get_response_error(f"Cluster not found: {uuid}", 404)
|
|
133
|
+
if cluster.status == Cluster.STATUS_INACTIVE:
|
|
134
|
+
return utils.get_response("Cluster is inactive")
|
|
135
|
+
|
|
136
|
+
tasks = tasks_controller.list_tasks(uuid, is_json=True)
|
|
137
|
+
return utils.get_response(json.loads(tasks))
|
|
138
|
+
|
|
139
|
+
|
|
129
140
|
@bp.route('/cluster/gracefulshutdown/<string:uuid>', methods=['PUT'])
|
|
130
141
|
def cluster_grace_shutdown(uuid):
|
|
131
142
|
cluster = db_controller.get_cluster_by_id(uuid)
|
|
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.92 → sbcli_dev-3.8.94}/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.92 → sbcli_dev-3.8.94}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/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.92 → sbcli_dev-3.8.94}/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.92 → sbcli_dev-3.8.94}/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.92 → sbcli_dev-3.8.94}/simplyblock_core/services/cached_lvol_stat_collector.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/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.92 → sbcli_dev-3.8.94}/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.92 → sbcli_dev-3.8.94}/simplyblock_core/services/tasks_runner_failed_migration.py
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-3.8.92 → sbcli_dev-3.8.94}/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
|