sbcli-dev 4.0.16__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.16 → sbcli_dev-4.0.17}/PKG-INFO +1 -1
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/env_var +1 -1
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/sbcli_dev.egg-info/PKG-INFO +1 -1
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/cluster_ops.py +9 -8
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/rpc_client.py +12 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/services/health_check_service.py +41 -1
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/storage_node_ops.py +28 -19
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/README.md +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/pyproject.toml +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/sbcli_dev.egg-info/SOURCES.txt +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/sbcli_dev.egg-info/dependency_links.txt +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/sbcli_dev.egg-info/entry_points.txt +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/sbcli_dev.egg-info/requires.txt +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/sbcli_dev.egg-info/top_level.txt +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/setup.cfg +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/setup.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_cli/cli.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_cli/main.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/__init__.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/compute_node_ops.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/constants.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/controllers/device_controller.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/controllers/events_controller.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/controllers/health_controller.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/controllers/lvol_controller.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/controllers/pool_controller.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/controllers/snapshot_controller.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/controllers/tasks_controller.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/distr_controller.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/kv_store.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/mgmt_node_ops.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/models/cluster.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/models/compute_node.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/models/deployer.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/models/events.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/models/global_settings.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/models/iface.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/models/job_schedule.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/models/lvol_model.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/models/nvme_device.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/models/pool.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/models/stats.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/models/storage_node.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/scripts/__init__.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/scripts/dashboard.yml +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/scripts/deploy_stack.sh +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/scripts/docker-compose-swarm.yml +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/scripts/objstore.yml +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/scripts/prometheus.yml +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/services/cached_lvol_stat_collector.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/services/capacity_and_stats_collector.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/services/log_agg_service.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/services/lvol_stat_collector.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/services/main_distr_event_collector.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/services/new_device_discovery.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/services/port_stat_collector.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/services/spdk_http_proxy_server.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/services/storage_node_monitor.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/services/tasks_runner_failed_migration.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/services/tasks_runner_migration.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/services/tasks_runner_new_dev_migration.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/services/tasks_runner_node_add.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/services/tasks_runner_restart.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/snode_client.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/utils.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/__init__.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/app.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/snode_ops.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/snode_ops_k8s.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/web_api_cluster.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/web_api_lvol.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/web_api_pool.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/blueprints/web_api_storage_node.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/caching_node_app.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/caching_node_app_k8s.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/node_utils.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/snode_app.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/snode_app_k8s.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/static/delete.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/static/tst.py +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/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")
|
|
@@ -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,
|
|
@@ -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
|
|
@@ -1245,7 +1245,8 @@ def add_node(cluster_id, node_ip, iface_name, data_nics_list,
|
|
|
1245
1245
|
logger.info(f"connected to devices count: {len(node.remote_devices)}")
|
|
1246
1246
|
time.sleep(3)
|
|
1247
1247
|
|
|
1248
|
-
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")
|
|
1249
1250
|
logger.info("Done")
|
|
1250
1251
|
return "Success"
|
|
1251
1252
|
|
|
@@ -1737,7 +1738,8 @@ def restart_storage_node(
|
|
|
1737
1738
|
continue
|
|
1738
1739
|
tasks_controller.add_device_mig_task(dev.get_id())
|
|
1739
1740
|
|
|
1740
|
-
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")
|
|
1741
1743
|
logger.info("Done")
|
|
1742
1744
|
return "Success"
|
|
1743
1745
|
# Create distribs, raid0, and lvstore and expose lvols to the fabrics
|
|
@@ -1747,23 +1749,7 @@ def restart_storage_node(
|
|
|
1747
1749
|
snode.rpc_username, snode.rpc_password)
|
|
1748
1750
|
ret = recreate_lvstore(snode)
|
|
1749
1751
|
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)
|
|
1752
|
+
return False, "Failed to recreate lvstore on node"
|
|
1767
1753
|
|
|
1768
1754
|
logger.info("Done")
|
|
1769
1755
|
return "Success"
|
|
@@ -2583,11 +2569,34 @@ def set_node_status(node_id, status):
|
|
|
2583
2569
|
|
|
2584
2570
|
|
|
2585
2571
|
def recreate_lvstore(snode):
|
|
2572
|
+
|
|
2586
2573
|
ret, err = _create_bdev_stack(snode)
|
|
2587
2574
|
if err:
|
|
2588
2575
|
logger.error(f"Failed to recreate lvstore on node {snode.get_id()}")
|
|
2589
2576
|
logger.error(err)
|
|
2590
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
|
+
|
|
2591
2600
|
return True
|
|
2592
2601
|
|
|
2593
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.16 → 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.16 → sbcli_dev-4.0.17}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-4.0.16 → 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.16 → 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.16 → 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.16 → 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.16 → 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
|
{sbcli_dev-4.0.16 → sbcli_dev-4.0.17}/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-4.0.16 → sbcli_dev-4.0.17}/simplyblock_core/services/tasks_runner_failed_migration.py
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-4.0.16 → 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
|