sbcli-dev 4.0.16__zip → 4.0.18__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.
Potentially problematic release.
This version of sbcli-dev might be problematic. Click here for more details.
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/PKG-INFO +1 -1
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/env_var +1 -1
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/sbcli_dev.egg-info/PKG-INFO +1 -1
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/cluster_ops.py +9 -8
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/controllers/health_controller.py +1 -1
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/controllers/tasks_controller.py +18 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/rpc_client.py +17 -4
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/services/health_check_service.py +45 -1
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/services/storage_node_monitor.py +6 -2
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/storage_node_ops.py +36 -21
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/README.md +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/pyproject.toml +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/sbcli_dev.egg-info/SOURCES.txt +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/sbcli_dev.egg-info/dependency_links.txt +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/sbcli_dev.egg-info/entry_points.txt +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/sbcli_dev.egg-info/requires.txt +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/sbcli_dev.egg-info/top_level.txt +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/setup.cfg +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/setup.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_cli/cli.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_cli/main.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/__init__.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/compute_node_ops.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/constants.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/controllers/device_controller.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/controllers/events_controller.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/controllers/lvol_controller.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/controllers/pool_controller.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/controllers/snapshot_controller.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/distr_controller.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/kv_store.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/mgmt_node_ops.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/models/cluster.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/models/compute_node.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/models/deployer.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/models/events.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/models/global_settings.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/models/iface.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/models/job_schedule.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/models/lvol_model.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/models/nvme_device.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/models/pool.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/models/stats.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/models/storage_node.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/scripts/__init__.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/scripts/dashboard.yml +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/scripts/deploy_stack.sh +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/scripts/docker-compose-swarm.yml +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/scripts/objstore.yml +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/scripts/prometheus.yml +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/services/cached_lvol_stat_collector.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/services/capacity_and_stats_collector.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/services/log_agg_service.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/services/lvol_stat_collector.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/services/main_distr_event_collector.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/services/new_device_discovery.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/services/port_stat_collector.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/services/spdk_http_proxy_server.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/services/tasks_runner_failed_migration.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/services/tasks_runner_migration.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/services/tasks_runner_new_dev_migration.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/services/tasks_runner_node_add.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/services/tasks_runner_restart.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/snode_client.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/utils.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/__init__.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/app.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/blueprints/snode_ops.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/blueprints/snode_ops_k8s.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/blueprints/web_api_cluster.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/blueprints/web_api_lvol.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/blueprints/web_api_pool.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/blueprints/web_api_storage_node.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/caching_node_app.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/caching_node_app_k8s.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/node_utils.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/snode_app.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/snode_app_k8s.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/static/delete.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/static/tst.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_web/utils.py +0 -0
|
@@ -342,9 +342,10 @@ def cluster_activate(cl_id, force=False):
|
|
|
342
342
|
if not cluster:
|
|
343
343
|
logger.error(f"Cluster not found {cl_id}")
|
|
344
344
|
return False
|
|
345
|
-
if cluster.status
|
|
346
|
-
logger.
|
|
345
|
+
if cluster.status == Cluster.STATUS_ACTIVE:
|
|
346
|
+
logger.warning("Cluster is not in an ACTIVE state")
|
|
347
347
|
if not force:
|
|
348
|
+
logger.warning(f"Failed to activate cluster, Cluster is in an ACTIVE state, use --force to reactivate")
|
|
348
349
|
return False
|
|
349
350
|
set_cluster_status(cl_id, Cluster.STATUS_IN_ACTIVATION)
|
|
350
351
|
snodes = db_controller.get_storage_nodes_by_cluster_id(cl_id)
|
|
@@ -367,17 +368,17 @@ def cluster_activate(cl_id, force=False):
|
|
|
367
368
|
|
|
368
369
|
for snode in snodes:
|
|
369
370
|
if snode.lvstore:
|
|
370
|
-
logger.
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
371
|
+
logger.warning(f"Node {snode.get_id()} already has lvstore {snode.lvstore}")
|
|
372
|
+
ret = storage_node_ops.recreate_lvstore(snode)
|
|
373
|
+
else:
|
|
374
|
+
ret = storage_node_ops.create_lvstore(snode, cluster.distr_ndcs, cluster.distr_npcs, cluster.distr_bs,
|
|
374
375
|
cluster.distr_chunk_bs, cluster.page_size_in_blocks, max_size, snodes)
|
|
375
376
|
if not ret:
|
|
376
377
|
logger.error("Failed to activate cluster")
|
|
377
378
|
set_cluster_status(cl_id, Cluster.STATUS_UNREADY)
|
|
378
379
|
return False
|
|
379
|
-
|
|
380
|
-
|
|
380
|
+
if not cluster.cluster_max_size:
|
|
381
|
+
cluster.cluster_max_size = max_size
|
|
381
382
|
cluster.write_to_db(db_controller.kv_store)
|
|
382
383
|
set_cluster_status(cl_id, Cluster.STATUS_ACTIVE)
|
|
383
384
|
logger.info("Cluster activated successfully")
|
|
@@ -446,7 +446,7 @@ def check_jm_device(device_id):
|
|
|
446
446
|
try:
|
|
447
447
|
rpc_client = RPCClient(
|
|
448
448
|
snode.mgmt_ip, snode.rpc_port,
|
|
449
|
-
snode.rpc_username, snode.rpc_password)
|
|
449
|
+
snode.rpc_username, snode.rpc_password, timeout=3, retry=2)
|
|
450
450
|
|
|
451
451
|
ret = rpc_client.get_bdevs(jm_device.jm_bdev)
|
|
452
452
|
if ret:
|
|
@@ -52,6 +52,11 @@ def _add_task(function_name, cluster_id, node_id, device_id,
|
|
|
52
52
|
if task_id:
|
|
53
53
|
logger.info(f"Task found, skip adding new task: {task_id}")
|
|
54
54
|
return False
|
|
55
|
+
elif function_name == JobSchedule.FN_DEV_MIG:
|
|
56
|
+
task_id = get_device_mig_task(cluster_id, node_id, function_params['distr_name'])
|
|
57
|
+
if task_id:
|
|
58
|
+
logger.info(f"Task found, skip adding new task: {task_id}")
|
|
59
|
+
return False
|
|
55
60
|
|
|
56
61
|
task_obj = JobSchedule()
|
|
57
62
|
task_obj.uuid = str(uuid.uuid4())
|
|
@@ -72,6 +77,8 @@ def _add_task(function_name, cluster_id, node_id, device_id,
|
|
|
72
77
|
def add_device_mig_task(device_id):
|
|
73
78
|
device = db_controller.get_storage_devices(device_id)
|
|
74
79
|
for node in db_controller.get_storage_nodes_by_cluster_id(device.cluster_id):
|
|
80
|
+
if not node.lvols:
|
|
81
|
+
continue
|
|
75
82
|
for bdev in node.lvstore_stack:
|
|
76
83
|
if bdev['type'] == "bdev_distr":
|
|
77
84
|
_add_task(JobSchedule.FN_DEV_MIG, device.cluster_id, node.get_id(), device.get_id(),
|
|
@@ -190,6 +197,7 @@ def get_active_node_task(cluster_id, node_id):
|
|
|
190
197
|
return task.uuid
|
|
191
198
|
return False
|
|
192
199
|
|
|
200
|
+
|
|
193
201
|
def get_new_device_mig_task(cluster_id, node_id, distr_name):
|
|
194
202
|
tasks = db_controller.get_job_tasks(cluster_id)
|
|
195
203
|
for task in tasks:
|
|
@@ -198,3 +206,13 @@ def get_new_device_mig_task(cluster_id, node_id, distr_name):
|
|
|
198
206
|
and "distr_name" in task.function_params and task.function_params["distr_name"] == distr_name:
|
|
199
207
|
return task.uuid
|
|
200
208
|
return False
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
def get_device_mig_task(cluster_id, node_id, distr_name):
|
|
212
|
+
tasks = db_controller.get_job_tasks(cluster_id)
|
|
213
|
+
for task in tasks:
|
|
214
|
+
if task.function_name == JobSchedule.FN_DEV_MIG and task.node_id == node_id:
|
|
215
|
+
if task.status != JobSchedule.STATUS_DONE and task.canceled is False \
|
|
216
|
+
and "distr_name" in task.function_params and task.function_params["distr_name"] == distr_name:
|
|
217
|
+
return task.uuid
|
|
218
|
+
return False
|
|
@@ -377,6 +377,12 @@ class RPCClient:
|
|
|
377
377
|
// This node (device) number, in the group, defined by ha_comm_addrs.
|
|
378
378
|
"ha_inode_self": 1
|
|
379
379
|
"""
|
|
380
|
+
try:
|
|
381
|
+
ret = self.get_bdevs(name)
|
|
382
|
+
if ret:
|
|
383
|
+
return ret
|
|
384
|
+
except:
|
|
385
|
+
pass
|
|
380
386
|
params = {
|
|
381
387
|
"name": name,
|
|
382
388
|
"jm_names": ",".join(jm_names),
|
|
@@ -417,6 +423,12 @@ class RPCClient:
|
|
|
417
423
|
return self._request("bdev_get_iostat", params)
|
|
418
424
|
|
|
419
425
|
def bdev_raid_create(self, name, bdevs_list, raid_level="0", strip_size_kb=4):
|
|
426
|
+
try:
|
|
427
|
+
ret = self.get_bdevs(name)
|
|
428
|
+
if ret:
|
|
429
|
+
return ret
|
|
430
|
+
except:
|
|
431
|
+
pass
|
|
420
432
|
params = {
|
|
421
433
|
"name": name,
|
|
422
434
|
"raid_level": raid_level,
|
|
@@ -470,11 +482,11 @@ class RPCClient:
|
|
|
470
482
|
"trsvcid": str(port),
|
|
471
483
|
"subnqn": nqn,
|
|
472
484
|
"fabrics_connect_timeout_us": 100000,
|
|
473
|
-
"fast_io_fail_timeout_sec": 1,
|
|
485
|
+
# "fast_io_fail_timeout_sec": 1,
|
|
474
486
|
"num_io_queues": 16384,
|
|
475
|
-
"ctrlr_loss_timeout_sec": 1,
|
|
487
|
+
# "ctrlr_loss_timeout_sec": 1,
|
|
476
488
|
"multipath":"disable",
|
|
477
|
-
"reconnect_delay_sec":1
|
|
489
|
+
# "reconnect_delay_sec":1
|
|
478
490
|
}
|
|
479
491
|
return self._request("bdev_nvme_attach_controller", params)
|
|
480
492
|
|
|
@@ -487,7 +499,7 @@ class RPCClient:
|
|
|
487
499
|
"trsvcid": str(port),
|
|
488
500
|
"subnqn": nqn,
|
|
489
501
|
"fast_io_fail_timeout_sec": 1,
|
|
490
|
-
"ctrlr_loss_timeout_sec":
|
|
502
|
+
"ctrlr_loss_timeout_sec": 1,
|
|
491
503
|
"reconnect_delay_sec": 1,
|
|
492
504
|
"fabrics_connect_timeout_us": 100000,
|
|
493
505
|
"multipath":"disable"
|
|
@@ -547,6 +559,7 @@ class RPCClient:
|
|
|
547
559
|
|
|
548
560
|
def bdev_nvme_set_options(self):
|
|
549
561
|
params = {
|
|
562
|
+
# "action_on_timeout": "abort",
|
|
550
563
|
"bdev_retry_count": 0,
|
|
551
564
|
"transport_retry_count": 0,
|
|
552
565
|
"ctrlr_loss_timeout_sec": 2,
|
|
@@ -82,7 +82,6 @@ while True:
|
|
|
82
82
|
|
|
83
83
|
health_check_status = is_node_online
|
|
84
84
|
if not node_rpc_check:
|
|
85
|
-
logger.info("Putting all devices to unavailable state because RPC check failed")
|
|
86
85
|
for dev in snode.nvme_devices:
|
|
87
86
|
if dev.io_error:
|
|
88
87
|
logger.debug(f"Skipping Device action because of io_error {dev.get_id()}")
|
|
@@ -107,15 +106,51 @@ while True:
|
|
|
107
106
|
snode.mgmt_ip, snode.rpc_port,
|
|
108
107
|
snode.rpc_username, snode.rpc_password,
|
|
109
108
|
timeout=10, retry=1)
|
|
109
|
+
connected_devices = []
|
|
110
110
|
for remote_device in snode.remote_devices:
|
|
111
111
|
if db_controller.get_storage_device_by_id(remote_device.get_id()).status == NVMeDevice.STATUS_ONLINE:
|
|
112
112
|
ret = rpc_client.get_bdevs(remote_device.remote_bdev)
|
|
113
113
|
if ret:
|
|
114
114
|
logger.info(f"Checking bdev: {remote_device.remote_bdev} ... ok")
|
|
115
|
+
connected_devices.append(remote_device.get_id())
|
|
115
116
|
else:
|
|
116
117
|
logger.info(f"Checking bdev: {remote_device.remote_bdev} ... not found")
|
|
118
|
+
ret = rpc_client.bdev_nvme_detach_controller(remote_device.remote_bdev)
|
|
119
|
+
time.sleep(1)
|
|
120
|
+
ret = rpc_client.bdev_nvme_attach_controller_tcp(
|
|
121
|
+
remote_device.remote_bdev, remote_device.nvmf_nqn, remote_device.nvmf_ip, remote_device.nvmf_port)
|
|
122
|
+
if ret:
|
|
123
|
+
logger.info(f"Successfully connected to device: {remote_device.get_id()}")
|
|
124
|
+
connected_devices.append(remote_device.get_id())
|
|
125
|
+
distr_controller.send_dev_status_event(remote_device, NVMeDevice.STATUS_ONLINE, snode)
|
|
126
|
+
else:
|
|
127
|
+
logger.error(f"Failed to connect to device: {remote_device.get_id()}")
|
|
128
|
+
|
|
117
129
|
node_remote_devices_check &= bool(ret)
|
|
118
130
|
|
|
131
|
+
for node in db_controller.get_storage_nodes_by_cluster_id(snode.cluster_id):
|
|
132
|
+
if node.status != StorageNode.STATUS_ONLINE:
|
|
133
|
+
continue
|
|
134
|
+
for dev in node.nvme_devices:
|
|
135
|
+
if dev.status == StorageNode.STATUS_ONLINE:
|
|
136
|
+
if dev.get_id() not in connected_devices:
|
|
137
|
+
logger.info(f"connecting to online device: {dev.get_id()}")
|
|
138
|
+
name = f"remote_{dev.alceml_bdev}"
|
|
139
|
+
bdev_name = f"{name}n1"
|
|
140
|
+
ret = rpc_client.bdev_nvme_detach_controller(name)
|
|
141
|
+
time.sleep(1)
|
|
142
|
+
ret = rpc_client.bdev_nvme_attach_controller_tcp(
|
|
143
|
+
name, dev.nvmf_nqn, dev.nvmf_ip,
|
|
144
|
+
dev.nvmf_port)
|
|
145
|
+
if ret:
|
|
146
|
+
logger.info(f"Successfully connected to device: {dev.get_id()}")
|
|
147
|
+
dev.remote_bdev = bdev_name
|
|
148
|
+
snode.remote_devices.append(dev)
|
|
149
|
+
snode.write_to_db()
|
|
150
|
+
distr_controller.send_dev_status_event(dev, NVMeDevice.STATUS_ONLINE, snode)
|
|
151
|
+
else:
|
|
152
|
+
logger.error(f"Failed to connect to device: {dev.get_id()}")
|
|
153
|
+
|
|
119
154
|
if snode.jm_device:
|
|
120
155
|
jm_device = snode.jm_device
|
|
121
156
|
logger.info(f"Node JM: {jm_device}")
|
|
@@ -124,6 +159,7 @@ while True:
|
|
|
124
159
|
logger.info(f"Checking jm bdev: {jm_device.jm_bdev} ... ok")
|
|
125
160
|
else:
|
|
126
161
|
logger.info(f"Checking jm bdev: {jm_device.jm_bdev} ... not found")
|
|
162
|
+
# todo: try add
|
|
127
163
|
node_devices_check &= ret
|
|
128
164
|
|
|
129
165
|
if snode.enable_ha_jm:
|
|
@@ -134,6 +170,14 @@ while True:
|
|
|
134
170
|
logger.info(f"Checking bdev: {remote_device.remote_bdev} ... ok")
|
|
135
171
|
else:
|
|
136
172
|
logger.info(f"Checking bdev: {remote_device.remote_bdev} ... not found")
|
|
173
|
+
ret = rpc_client.bdev_nvme_attach_controller_tcp(
|
|
174
|
+
remote_device.remote_bdev, remote_device.nvmf_nqn, remote_device.nvmf_ip,
|
|
175
|
+
remote_device.nvmf_port)
|
|
176
|
+
if ret:
|
|
177
|
+
logger.info(f"Successfully connected to device: {remote_device.get_id()}")
|
|
178
|
+
else:
|
|
179
|
+
logger.error(f"Failed to connect to device: {remote_device.get_id()}")
|
|
180
|
+
|
|
137
181
|
# node_remote_devices_check &= bool(ret)
|
|
138
182
|
|
|
139
183
|
lvstore_check = True
|
|
@@ -154,7 +154,6 @@ while True:
|
|
|
154
154
|
logger.info(f"Check 2: ping mgmt ip {snode.mgmt_ip} ... {ping_check}")
|
|
155
155
|
|
|
156
156
|
# 2- check node API
|
|
157
|
-
|
|
158
157
|
node_api_check = health_controller._check_node_api(snode.mgmt_ip)
|
|
159
158
|
logger.info(f"Check: node API {snode.mgmt_ip}:5000 ... {node_api_check}")
|
|
160
159
|
|
|
@@ -162,7 +161,12 @@ while True:
|
|
|
162
161
|
spdk_process = health_controller._check_spdk_process_up(snode.mgmt_ip)
|
|
163
162
|
logger.info(f"Check: spdk process {snode.mgmt_ip}:5000 ... {spdk_process}")
|
|
164
163
|
|
|
165
|
-
|
|
164
|
+
# 4- check rpc
|
|
165
|
+
node_rpc_check = health_controller._check_node_rpc(
|
|
166
|
+
snode.mgmt_ip, snode.rpc_port, snode.rpc_username, snode.rpc_password)
|
|
167
|
+
logger.info(f"Check: node RPC {snode.mgmt_ip}:{snode.rpc_port} ... {node_rpc_check}")
|
|
168
|
+
|
|
169
|
+
is_node_online = ping_check and node_api_check and spdk_process and node_rpc_check
|
|
166
170
|
if is_node_online:
|
|
167
171
|
set_node_online(snode)
|
|
168
172
|
|
|
@@ -751,7 +751,7 @@ def _connect_to_remote_devs(this_node):
|
|
|
751
751
|
|
|
752
752
|
rpc_client = RPCClient(
|
|
753
753
|
this_node.mgmt_ip, this_node.rpc_port,
|
|
754
|
-
this_node.rpc_username, this_node.rpc_password, timeout=
|
|
754
|
+
this_node.rpc_username, this_node.rpc_password, timeout=5, retry=2)
|
|
755
755
|
|
|
756
756
|
remote_devices = []
|
|
757
757
|
# connect to remote devs
|
|
@@ -771,6 +771,8 @@ def _connect_to_remote_devs(this_node):
|
|
|
771
771
|
if ret:
|
|
772
772
|
logger.info(f"bdev found {bdev_name}")
|
|
773
773
|
else:
|
|
774
|
+
ret = rpc_client.bdev_nvme_detach_controller(name)
|
|
775
|
+
time.sleep(1)
|
|
774
776
|
ret = rpc_client.bdev_nvme_attach_controller_tcp(name, dev.nvmf_nqn, dev.nvmf_ip, dev.nvmf_port)
|
|
775
777
|
if not ret:
|
|
776
778
|
logger.error(f"Failed to connect to device: {dev.get_id()}")
|
|
@@ -786,7 +788,7 @@ def _connect_to_remote_jm_devs(this_node, jm_ids=[]):
|
|
|
786
788
|
|
|
787
789
|
rpc_client = RPCClient(
|
|
788
790
|
this_node.mgmt_ip, this_node.rpc_port,
|
|
789
|
-
this_node.rpc_username, this_node.rpc_password, timeout=
|
|
791
|
+
this_node.rpc_username, this_node.rpc_password, timeout=5, retry=2)
|
|
790
792
|
|
|
791
793
|
node_bdevs = rpc_client.get_bdevs()
|
|
792
794
|
if node_bdevs:
|
|
@@ -1245,7 +1247,8 @@ def add_node(cluster_id, node_ip, iface_name, data_nics_list,
|
|
|
1245
1247
|
logger.info(f"connected to devices count: {len(node.remote_devices)}")
|
|
1246
1248
|
time.sleep(3)
|
|
1247
1249
|
|
|
1248
|
-
if cluster.status
|
|
1250
|
+
if cluster.status != cluster.STATUS_ACTIVE:
|
|
1251
|
+
logger.warning(f"The cluster status is not active ({cluster.status}), adding the node without distribs and lvstore")
|
|
1249
1252
|
logger.info("Done")
|
|
1250
1253
|
return "Success"
|
|
1251
1254
|
|
|
@@ -1737,7 +1740,8 @@ def restart_storage_node(
|
|
|
1737
1740
|
continue
|
|
1738
1741
|
tasks_controller.add_device_mig_task(dev.get_id())
|
|
1739
1742
|
|
|
1740
|
-
if cluster.status
|
|
1743
|
+
if cluster.status != cluster.STATUS_ACTIVE:
|
|
1744
|
+
logger.warning(f"The cluster status is not active ({cluster.status}), adding the node without distribs and lvstore")
|
|
1741
1745
|
logger.info("Done")
|
|
1742
1746
|
return "Success"
|
|
1743
1747
|
# Create distribs, raid0, and lvstore and expose lvols to the fabrics
|
|
@@ -1747,23 +1751,7 @@ def restart_storage_node(
|
|
|
1747
1751
|
snode.rpc_username, snode.rpc_password)
|
|
1748
1752
|
ret = recreate_lvstore(snode)
|
|
1749
1753
|
if not ret:
|
|
1750
|
-
return False, "Failed to
|
|
1751
|
-
time.sleep(1)
|
|
1752
|
-
ret = temp_rpc_client.bdev_examine(snode.raid)
|
|
1753
|
-
time.sleep(1)
|
|
1754
|
-
ret = temp_rpc_client.bdev_wait_for_examine()
|
|
1755
|
-
time.sleep(1)
|
|
1756
|
-
|
|
1757
|
-
if snode.lvols:
|
|
1758
|
-
for lvol_id in snode.lvols:
|
|
1759
|
-
lvol = lvol_controller.recreate_lvol(lvol_id, snode)
|
|
1760
|
-
if not lvol:
|
|
1761
|
-
logger.error(f"Failed to create LVol: {lvol_id}")
|
|
1762
|
-
return False
|
|
1763
|
-
lvol.status = lvol.STATUS_ONLINE
|
|
1764
|
-
lvol.io_error = False
|
|
1765
|
-
lvol.health_check = True
|
|
1766
|
-
lvol.write_to_db(db_controller.kv_store)
|
|
1754
|
+
return False, "Failed to recreate lvstore on node"
|
|
1767
1755
|
|
|
1768
1756
|
logger.info("Done")
|
|
1769
1757
|
return "Success"
|
|
@@ -2043,6 +2031,10 @@ def resume_storage_node(node_id):
|
|
|
2043
2031
|
if snode.jm_device and snode.jm_device.status == JMDevice.STATUS_UNAVAILABLE:
|
|
2044
2032
|
device_controller.set_jm_device_state(snode.jm_device.get_id(), JMDevice.STATUS_ONLINE)
|
|
2045
2033
|
|
|
2034
|
+
logger.info("Connecting to remote devices")
|
|
2035
|
+
snode.remote_devices = _connect_to_remote_devs(snode)
|
|
2036
|
+
snode.write_to_db(db_controller.kv_store)
|
|
2037
|
+
|
|
2046
2038
|
rpc_client = RPCClient(
|
|
2047
2039
|
snode.mgmt_ip, snode.rpc_port,
|
|
2048
2040
|
snode.rpc_username, snode.rpc_password)
|
|
@@ -2583,11 +2575,34 @@ def set_node_status(node_id, status):
|
|
|
2583
2575
|
|
|
2584
2576
|
|
|
2585
2577
|
def recreate_lvstore(snode):
|
|
2578
|
+
|
|
2586
2579
|
ret, err = _create_bdev_stack(snode)
|
|
2587
2580
|
if err:
|
|
2588
2581
|
logger.error(f"Failed to recreate lvstore on node {snode.get_id()}")
|
|
2589
2582
|
logger.error(err)
|
|
2590
2583
|
return False
|
|
2584
|
+
|
|
2585
|
+
temp_rpc_client = RPCClient(
|
|
2586
|
+
snode.mgmt_ip, snode.rpc_port,
|
|
2587
|
+
snode.rpc_username, snode.rpc_password)
|
|
2588
|
+
time.sleep(1)
|
|
2589
|
+
ret = temp_rpc_client.bdev_examine(snode.raid)
|
|
2590
|
+
time.sleep(1)
|
|
2591
|
+
ret = temp_rpc_client.bdev_wait_for_examine()
|
|
2592
|
+
time.sleep(1)
|
|
2593
|
+
|
|
2594
|
+
if snode.lvols:
|
|
2595
|
+
db_controller = DBController()
|
|
2596
|
+
for lvol_id in snode.lvols:
|
|
2597
|
+
lvol = lvol_controller.recreate_lvol(lvol_id, snode)
|
|
2598
|
+
if not lvol:
|
|
2599
|
+
logger.error(f"Failed to create LVol: {lvol_id}")
|
|
2600
|
+
return False
|
|
2601
|
+
lvol.status = lvol.STATUS_ONLINE
|
|
2602
|
+
lvol.io_error = False
|
|
2603
|
+
lvol.health_check = True
|
|
2604
|
+
lvol.write_to_db(db_controller.kv_store)
|
|
2605
|
+
|
|
2591
2606
|
return True
|
|
2592
2607
|
|
|
2593
2608
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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-4.0.16 → sbcli_dev-4.0.18}/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-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/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-4.0.16 → sbcli_dev-4.0.18}/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-4.0.16 → sbcli_dev-4.0.18}/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-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/services/cached_lvol_stat_collector.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/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
|
{sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/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
|
{sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/services/tasks_runner_failed_migration.py
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-4.0.16 → sbcli_dev-4.0.18}/simplyblock_core/services/tasks_runner_new_dev_migration.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|