sbcli-dev 3.8.93__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.93 → sbcli_dev-3.8.94}/PKG-INFO +1 -1
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/env_var +1 -1
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/sbcli_dev.egg-info/PKG-INFO +1 -1
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/cluster_ops.py +16 -6
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/constants.py +6 -6
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/controllers/lvol_controller.py +22 -21
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/controllers/tasks_controller.py +4 -2
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/rpc_client.py +7 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/storage_node_ops.py +4 -3
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/web_api_cluster.py +1 -4
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2 +2 -2
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/README.md +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/pyproject.toml +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/sbcli_dev.egg-info/SOURCES.txt +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/sbcli_dev.egg-info/dependency_links.txt +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/sbcli_dev.egg-info/entry_points.txt +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/sbcli_dev.egg-info/requires.txt +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/sbcli_dev.egg-info/top_level.txt +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/setup.cfg +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/setup.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_cli/cli.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_cli/main.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/__init__.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/compute_node_ops.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/controllers/device_controller.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/controllers/events_controller.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/controllers/health_controller.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/controllers/pool_controller.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/controllers/snapshot_controller.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/distr_controller.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/kv_store.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/mgmt_node_ops.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/models/cluster.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/models/compute_node.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/models/deployer.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/models/events.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/models/global_settings.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/models/iface.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/models/job_schedule.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/models/lvol_model.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/models/nvme_device.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/models/pool.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/models/stats.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/models/storage_node.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/scripts/__init__.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/scripts/dashboard.yml +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/scripts/deploy_stack.sh +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/scripts/docker-compose-swarm.yml +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/scripts/objstore.yml +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/scripts/prometheus.yml +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/services/cached_lvol_stat_collector.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/services/capacity_and_stats_collector.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/services/distr_event_collector.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/services/health_check_service.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/services/log_agg_service.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/services/lvol_stat_collector.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/services/main_distr_event_collector.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/services/new_device_discovery.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/services/port_stat_collector.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/services/spdk_http_proxy_server.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/services/storage_node_monitor.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/services/tasks_runner_failed_migration.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/services/tasks_runner_migration.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/services/tasks_runner_new_dev_migration.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/services/tasks_runner_node_add.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/services/tasks_runner_restart.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/snode_client.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_core/utils.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/__init__.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/app.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/snode_ops.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/snode_ops_k8s.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/web_api_lvol.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/web_api_pool.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/blueprints/web_api_storage_node.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/caching_node_app.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/caching_node_app_k8s.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/node_utils.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/snode_app.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/snode_app_k8s.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/static/delete.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/static/tst.py +0 -0
- {sbcli_dev-3.8.93 → sbcli_dev-3.8.94}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-3.8.93 → 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:
|
|
@@ -87,11 +87,13 @@ def list_tasks(cluster_id, is_json=False):
|
|
|
87
87
|
logger.error("Cluster not found: %s", cluster_id)
|
|
88
88
|
return False
|
|
89
89
|
|
|
90
|
+
data = []
|
|
90
91
|
tasks = db_controller.get_job_tasks(cluster_id)
|
|
91
92
|
if tasks and is_json is True:
|
|
92
|
-
|
|
93
|
+
for t in tasks:
|
|
94
|
+
data.append(t.get_clean_dict())
|
|
95
|
+
return json.dumps(data, indent=2)
|
|
93
96
|
|
|
94
|
-
data = []
|
|
95
97
|
for task in tasks:
|
|
96
98
|
data.append({
|
|
97
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()
|
|
@@ -133,11 +133,8 @@ def cluster_get_tasks(uuid):
|
|
|
133
133
|
if cluster.status == Cluster.STATUS_INACTIVE:
|
|
134
134
|
return utils.get_response("Cluster is inactive")
|
|
135
135
|
|
|
136
|
-
data = []
|
|
137
136
|
tasks = tasks_controller.list_tasks(uuid, is_json=True)
|
|
138
|
-
|
|
139
|
-
data.append(t.get_clean_dict())
|
|
140
|
-
return utils.get_response(data)
|
|
137
|
+
return utils.get_response(json.loads(tasks))
|
|
141
138
|
|
|
142
139
|
|
|
143
140
|
@bp.route('/cluster/gracefulshutdown/<string:uuid>', methods=['PUT'])
|
|
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.93 → 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.93 → sbcli_dev-3.8.94}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-3.8.93 → 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.93 → 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.93 → 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.93 → 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.93 → 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.93 → 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.93 → sbcli_dev-3.8.94}/simplyblock_core/services/tasks_runner_failed_migration.py
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-3.8.93 → 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
|
|
File without changes
|