sbcli-dev 4.0.15__zip → 4.0.17__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.15 → sbcli_dev-4.0.17}/PKG-INFO +1 -1
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/env_var +1 -1
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/sbcli_dev.egg-info/PKG-INFO +1 -1
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/cluster_ops.py +9 -14
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/rpc_client.py +18 -2
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/services/health_check_service.py +41 -1
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/services/main_distr_event_collector.py +3 -3
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/storage_node_ops.py +35 -20
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/README.md +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/pyproject.toml +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/sbcli_dev.egg-info/SOURCES.txt +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/sbcli_dev.egg-info/dependency_links.txt +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/sbcli_dev.egg-info/entry_points.txt +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/sbcli_dev.egg-info/requires.txt +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/sbcli_dev.egg-info/top_level.txt +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/setup.cfg +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/setup.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_cli/cli.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_cli/main.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/__init__.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/compute_node_ops.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/constants.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/controllers/device_controller.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/controllers/events_controller.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/controllers/health_controller.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/controllers/lvol_controller.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/controllers/pool_controller.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/controllers/snapshot_controller.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/controllers/tasks_controller.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/distr_controller.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/kv_store.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/mgmt_node_ops.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/models/cluster.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/models/compute_node.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/models/deployer.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/models/events.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/models/global_settings.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/models/iface.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/models/job_schedule.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/models/lvol_model.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/models/nvme_device.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/models/pool.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/models/stats.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/models/storage_node.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/scripts/__init__.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/scripts/dashboard.yml +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/scripts/deploy_stack.sh +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/scripts/docker-compose-swarm.yml +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/scripts/objstore.yml +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/scripts/prometheus.yml +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/services/cached_lvol_stat_collector.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/services/capacity_and_stats_collector.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/services/log_agg_service.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/services/lvol_stat_collector.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/services/new_device_discovery.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/services/port_stat_collector.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/services/spdk_http_proxy_server.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/services/storage_node_monitor.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/services/tasks_runner_failed_migration.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/services/tasks_runner_migration.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/services/tasks_runner_new_dev_migration.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/services/tasks_runner_node_add.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/services/tasks_runner_restart.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/snode_client.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/utils.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/__init__.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/app.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/snode_ops.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/snode_ops_k8s.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/web_api_cluster.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/web_api_lvol.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/web_api_pool.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/web_api_storage_node.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/caching_node_app.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/caching_node_app_k8s.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/node_utils.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/snode_app.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/snode_app_k8s.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/static/delete.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/static/tst.py +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_web/utils.py +0 -0
|
@@ -26,12 +26,6 @@ TOP_DIR = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
def _create_update_user(cluster_id, grafana_url, grafana_secret, user_secret, update_secret=False):
|
|
29
|
-
if not grafana_url.startswith("https://"):
|
|
30
|
-
if grafana_url.startswith("http://"):
|
|
31
|
-
grafana_url = grafana_url.replace("http://", "https://", 1)
|
|
32
|
-
else:
|
|
33
|
-
grafana_url = "https://" + grafana_url
|
|
34
|
-
|
|
35
29
|
session = requests.session()
|
|
36
30
|
session.auth = ("admin", grafana_secret)
|
|
37
31
|
headers = {
|
|
@@ -348,9 +342,10 @@ def cluster_activate(cl_id, force=False):
|
|
|
348
342
|
if not cluster:
|
|
349
343
|
logger.error(f"Cluster not found {cl_id}")
|
|
350
344
|
return False
|
|
351
|
-
if cluster.status
|
|
352
|
-
logger.
|
|
345
|
+
if cluster.status == Cluster.STATUS_ACTIVE:
|
|
346
|
+
logger.warning("Cluster is not in an ACTIVE state")
|
|
353
347
|
if not force:
|
|
348
|
+
logger.warning(f"Failed to activate cluster, Cluster is in an ACTIVE state, use --force to reactivate")
|
|
354
349
|
return False
|
|
355
350
|
set_cluster_status(cl_id, Cluster.STATUS_IN_ACTIVATION)
|
|
356
351
|
snodes = db_controller.get_storage_nodes_by_cluster_id(cl_id)
|
|
@@ -373,17 +368,17 @@ def cluster_activate(cl_id, force=False):
|
|
|
373
368
|
|
|
374
369
|
for snode in snodes:
|
|
375
370
|
if snode.lvstore:
|
|
376
|
-
logger.
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
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,
|
|
380
375
|
cluster.distr_chunk_bs, cluster.page_size_in_blocks, max_size, snodes)
|
|
381
376
|
if not ret:
|
|
382
377
|
logger.error("Failed to activate cluster")
|
|
383
378
|
set_cluster_status(cl_id, Cluster.STATUS_UNREADY)
|
|
384
379
|
return False
|
|
385
|
-
|
|
386
|
-
|
|
380
|
+
if not cluster.cluster_max_size:
|
|
381
|
+
cluster.cluster_max_size = max_size
|
|
387
382
|
cluster.write_to_db(db_controller.kv_store)
|
|
388
383
|
set_cluster_status(cl_id, Cluster.STATUS_ACTIVE)
|
|
389
384
|
logger.info("Cluster activated successfully")
|
|
@@ -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,
|
|
@@ -472,7 +484,9 @@ class RPCClient:
|
|
|
472
484
|
"fabrics_connect_timeout_us": 100000,
|
|
473
485
|
"fast_io_fail_timeout_sec": 1,
|
|
474
486
|
"num_io_queues": 16384,
|
|
475
|
-
"ctrlr_loss_timeout_sec":
|
|
487
|
+
"ctrlr_loss_timeout_sec": 1,
|
|
488
|
+
"multipath":"disable",
|
|
489
|
+
"reconnect_delay_sec":1
|
|
476
490
|
}
|
|
477
491
|
return self._request("bdev_nvme_attach_controller", params)
|
|
478
492
|
|
|
@@ -485,8 +499,10 @@ class RPCClient:
|
|
|
485
499
|
"trsvcid": str(port),
|
|
486
500
|
"subnqn": nqn,
|
|
487
501
|
"fast_io_fail_timeout_sec": 1,
|
|
488
|
-
"ctrlr_loss_timeout_sec":
|
|
502
|
+
"ctrlr_loss_timeout_sec": 3,
|
|
489
503
|
"reconnect_delay_sec": 1,
|
|
504
|
+
"fabrics_connect_timeout_us": 100000,
|
|
505
|
+
"multipath":"disable"
|
|
490
506
|
}
|
|
491
507
|
return self._request("bdev_nvme_attach_controller", params)
|
|
492
508
|
|
|
@@ -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,47 @@ 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_attach_controller_tcp(
|
|
119
|
+
remote_device.remote_bdev, remote_device.nvmf_nqn, remote_device.nvmf_ip, remote_device.nvmf_port)
|
|
120
|
+
if ret:
|
|
121
|
+
logger.info(f"Successfully connected to device: {remote_device.get_id()}")
|
|
122
|
+
connected_devices.append(remote_device.get_id())
|
|
123
|
+
distr_controller.send_dev_status_event(remote_device, NVMeDevice.STATUS_ONLINE, snode)
|
|
124
|
+
else:
|
|
125
|
+
logger.error(f"Failed to connect to device: {remote_device.get_id()}")
|
|
126
|
+
|
|
117
127
|
node_remote_devices_check &= bool(ret)
|
|
118
128
|
|
|
129
|
+
for node in db_controller.get_storage_nodes_by_cluster_id(snode.cluster_id):
|
|
130
|
+
if node.status != StorageNode.STATUS_ONLINE:
|
|
131
|
+
continue
|
|
132
|
+
for dev in node.nvme_devices:
|
|
133
|
+
if dev.status == StorageNode.STATUS_ONLINE:
|
|
134
|
+
if dev.get_id() not in connected_devices:
|
|
135
|
+
logger.info(f"connecting to online device: {dev.get_id()}")
|
|
136
|
+
name = f"remote_{dev.alceml_bdev}"
|
|
137
|
+
bdev_name = f"{name}n1"
|
|
138
|
+
ret = rpc_client.bdev_nvme_attach_controller_tcp(
|
|
139
|
+
name, dev.nvmf_nqn, dev.nvmf_ip,
|
|
140
|
+
dev.nvmf_port)
|
|
141
|
+
if ret:
|
|
142
|
+
logger.info(f"Successfully connected to device: {dev.get_id()}")
|
|
143
|
+
dev.remote_bdev = bdev_name
|
|
144
|
+
snode.remote_devices.append(dev)
|
|
145
|
+
snode.write_to_db()
|
|
146
|
+
distr_controller.send_dev_status_event(dev, NVMeDevice.STATUS_ONLINE, snode)
|
|
147
|
+
else:
|
|
148
|
+
logger.error(f"Failed to connect to device: {dev.get_id()}")
|
|
149
|
+
|
|
119
150
|
if snode.jm_device:
|
|
120
151
|
jm_device = snode.jm_device
|
|
121
152
|
logger.info(f"Node JM: {jm_device}")
|
|
@@ -124,6 +155,7 @@ while True:
|
|
|
124
155
|
logger.info(f"Checking jm bdev: {jm_device.jm_bdev} ... ok")
|
|
125
156
|
else:
|
|
126
157
|
logger.info(f"Checking jm bdev: {jm_device.jm_bdev} ... not found")
|
|
158
|
+
# todo: try add
|
|
127
159
|
node_devices_check &= ret
|
|
128
160
|
|
|
129
161
|
if snode.enable_ha_jm:
|
|
@@ -134,6 +166,14 @@ while True:
|
|
|
134
166
|
logger.info(f"Checking bdev: {remote_device.remote_bdev} ... ok")
|
|
135
167
|
else:
|
|
136
168
|
logger.info(f"Checking bdev: {remote_device.remote_bdev} ... not found")
|
|
169
|
+
ret = rpc_client.bdev_nvme_attach_controller_tcp(
|
|
170
|
+
remote_device.remote_bdev, remote_device.nvmf_nqn, remote_device.nvmf_ip,
|
|
171
|
+
remote_device.nvmf_port)
|
|
172
|
+
if ret:
|
|
173
|
+
logger.info(f"Successfully connected to device: {remote_device.get_id()}")
|
|
174
|
+
else:
|
|
175
|
+
logger.error(f"Failed to connect to device: {remote_device.get_id()}")
|
|
176
|
+
|
|
137
177
|
# node_remote_devices_check &= bool(ret)
|
|
138
178
|
|
|
139
179
|
lvstore_check = True
|
{sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/services/main_distr_event_collector.py
RENAMED
|
@@ -50,9 +50,9 @@ def process_device_event(event):
|
|
|
50
50
|
if device.node_id != node_id:
|
|
51
51
|
logger.info(f"Setting storage id: {storage_id} unavailable")
|
|
52
52
|
distr_controller.send_dev_status_event(device, NVMeDevice.STATUS_UNAVAILABLE, node)
|
|
53
|
-
if device.status == NVMeDevice.STATUS_ONLINE:
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
# if device.status == NVMeDevice.STATUS_ONLINE:
|
|
54
|
+
# device_controller.device_set_io_error(device_id, True)
|
|
55
|
+
# device_controller.device_set_unavailable(device_id)
|
|
56
56
|
|
|
57
57
|
else:
|
|
58
58
|
if node.status not in [StorageNode.STATUS_ONLINE, StorageNode.STATUS_SUSPENDED]:
|
|
@@ -829,7 +829,10 @@ def _connect_to_remote_jm_devs(this_node, jm_ids=[]):
|
|
|
829
829
|
logger.debug(f"bdev found {bdev_name}")
|
|
830
830
|
jm_dev.status = JMDevice.STATUS_ONLINE
|
|
831
831
|
else:
|
|
832
|
-
|
|
832
|
+
|
|
833
|
+
logger.info(f"Connecting {name} to {this_node.get_id()}")
|
|
834
|
+
ret = rpc_client.bdev_nvme_detach_controller(name)
|
|
835
|
+
time.sleep(1)
|
|
833
836
|
ret = rpc_client.bdev_nvme_attach_controller_tcp(
|
|
834
837
|
name, jm_dev.nvmf_nqn, jm_dev.nvmf_ip, jm_dev.nvmf_port)
|
|
835
838
|
if ret:
|
|
@@ -1242,7 +1245,8 @@ def add_node(cluster_id, node_ip, iface_name, data_nics_list,
|
|
|
1242
1245
|
logger.info(f"connected to devices count: {len(node.remote_devices)}")
|
|
1243
1246
|
time.sleep(3)
|
|
1244
1247
|
|
|
1245
|
-
if cluster.status
|
|
1248
|
+
if cluster.status != cluster.STATUS_ACTIVE:
|
|
1249
|
+
logger.warning(f"The cluster status is not active ({cluster.status}), adding the node without distribs and lvstore")
|
|
1246
1250
|
logger.info("Done")
|
|
1247
1251
|
return "Success"
|
|
1248
1252
|
|
|
@@ -1704,8 +1708,11 @@ def restart_storage_node(
|
|
|
1704
1708
|
|
|
1705
1709
|
if snode.enable_ha_jm:
|
|
1706
1710
|
logger.info("Connecting to remote JMs")
|
|
1711
|
+
snode.remote_jm_devices = []
|
|
1707
1712
|
snode.remote_jm_devices = _connect_to_remote_jm_devs(snode)
|
|
1708
1713
|
|
|
1714
|
+
snode.write_to_db(db_controller.kv_store)
|
|
1715
|
+
|
|
1709
1716
|
logger.info("Setting node status to Online")
|
|
1710
1717
|
set_node_status(node_id, StorageNode.STATUS_ONLINE)
|
|
1711
1718
|
|
|
@@ -1731,7 +1738,8 @@ def restart_storage_node(
|
|
|
1731
1738
|
continue
|
|
1732
1739
|
tasks_controller.add_device_mig_task(dev.get_id())
|
|
1733
1740
|
|
|
1734
|
-
if cluster.status
|
|
1741
|
+
if cluster.status != cluster.STATUS_ACTIVE:
|
|
1742
|
+
logger.warning(f"The cluster status is not active ({cluster.status}), adding the node without distribs and lvstore")
|
|
1735
1743
|
logger.info("Done")
|
|
1736
1744
|
return "Success"
|
|
1737
1745
|
# Create distribs, raid0, and lvstore and expose lvols to the fabrics
|
|
@@ -1741,23 +1749,7 @@ def restart_storage_node(
|
|
|
1741
1749
|
snode.rpc_username, snode.rpc_password)
|
|
1742
1750
|
ret = recreate_lvstore(snode)
|
|
1743
1751
|
if not ret:
|
|
1744
|
-
return False, "Failed to
|
|
1745
|
-
time.sleep(1)
|
|
1746
|
-
ret = temp_rpc_client.bdev_examine(snode.raid)
|
|
1747
|
-
time.sleep(1)
|
|
1748
|
-
ret = temp_rpc_client.bdev_wait_for_examine()
|
|
1749
|
-
time.sleep(1)
|
|
1750
|
-
|
|
1751
|
-
if snode.lvols:
|
|
1752
|
-
for lvol_id in snode.lvols:
|
|
1753
|
-
lvol = lvol_controller.recreate_lvol(lvol_id, snode)
|
|
1754
|
-
if not lvol:
|
|
1755
|
-
logger.error(f"Failed to create LVol: {lvol_id}")
|
|
1756
|
-
return False
|
|
1757
|
-
lvol.status = lvol.STATUS_ONLINE
|
|
1758
|
-
lvol.io_error = False
|
|
1759
|
-
lvol.health_check = True
|
|
1760
|
-
lvol.write_to_db(db_controller.kv_store)
|
|
1752
|
+
return False, "Failed to recreate lvstore on node"
|
|
1761
1753
|
|
|
1762
1754
|
logger.info("Done")
|
|
1763
1755
|
return "Success"
|
|
@@ -2577,11 +2569,34 @@ def set_node_status(node_id, status):
|
|
|
2577
2569
|
|
|
2578
2570
|
|
|
2579
2571
|
def recreate_lvstore(snode):
|
|
2572
|
+
|
|
2580
2573
|
ret, err = _create_bdev_stack(snode)
|
|
2581
2574
|
if err:
|
|
2582
2575
|
logger.error(f"Failed to recreate lvstore on node {snode.get_id()}")
|
|
2583
2576
|
logger.error(err)
|
|
2584
2577
|
return False
|
|
2578
|
+
|
|
2579
|
+
temp_rpc_client = RPCClient(
|
|
2580
|
+
snode.mgmt_ip, snode.rpc_port,
|
|
2581
|
+
snode.rpc_username, snode.rpc_password)
|
|
2582
|
+
time.sleep(1)
|
|
2583
|
+
ret = temp_rpc_client.bdev_examine(snode.raid)
|
|
2584
|
+
time.sleep(1)
|
|
2585
|
+
ret = temp_rpc_client.bdev_wait_for_examine()
|
|
2586
|
+
time.sleep(1)
|
|
2587
|
+
|
|
2588
|
+
if snode.lvols:
|
|
2589
|
+
db_controller = DBController()
|
|
2590
|
+
for lvol_id in snode.lvols:
|
|
2591
|
+
lvol = lvol_controller.recreate_lvol(lvol_id, snode)
|
|
2592
|
+
if not lvol:
|
|
2593
|
+
logger.error(f"Failed to create LVol: {lvol_id}")
|
|
2594
|
+
return False
|
|
2595
|
+
lvol.status = lvol.STATUS_ONLINE
|
|
2596
|
+
lvol.io_error = False
|
|
2597
|
+
lvol.health_check = True
|
|
2598
|
+
lvol.write_to_db(db_controller.kv_store)
|
|
2599
|
+
|
|
2585
2600
|
return True
|
|
2586
2601
|
|
|
2587
2602
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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.15 → sbcli_dev-4.0.17}/simplyblock_core/controllers/caching_node_controller.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/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.15 → sbcli_dev-4.0.17}/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.15 → sbcli_dev-4.0.17}/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.15 → sbcli_dev-4.0.17}/simplyblock_core/services/cached_lvol_stat_collector.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/simplyblock_core/services/tasks_runner_failed_migration.py
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-4.0.15 → sbcli_dev-4.0.17}/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
|