sbcli-dev 3.9.5__zip → 3.9.7__zip
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/PKG-INFO +1 -1
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/env_var +1 -1
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/sbcli_dev.egg-info/PKG-INFO +1 -1
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/constants.py +1 -1
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/controllers/device_controller.py +0 -33
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/distr_controller.py +5 -4
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/services/health_check_service.py +8 -6
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/services/main_distr_event_collector.py +32 -1
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/storage_node_ops.py +6 -4
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/README.md +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/pyproject.toml +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/sbcli_dev.egg-info/SOURCES.txt +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/sbcli_dev.egg-info/dependency_links.txt +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/sbcli_dev.egg-info/entry_points.txt +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/sbcli_dev.egg-info/requires.txt +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/sbcli_dev.egg-info/top_level.txt +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/setup.cfg +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/setup.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_cli/cli.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_cli/main.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/__init__.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/cluster_ops.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/compute_node_ops.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/controllers/events_controller.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/controllers/health_controller.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/controllers/lvol_controller.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/controllers/pool_controller.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/controllers/snapshot_controller.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/controllers/tasks_controller.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/kv_store.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/mgmt_node_ops.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/models/cluster.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/models/compute_node.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/models/deployer.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/models/events.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/models/global_settings.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/models/iface.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/models/job_schedule.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/models/lvol_model.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/models/nvme_device.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/models/pool.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/models/stats.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/models/storage_node.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/rpc_client.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/scripts/__init__.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/scripts/dashboard.yml +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/scripts/deploy_stack.sh +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/scripts/docker-compose-swarm.yml +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/scripts/objstore.yml +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/scripts/prometheus.yml +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/services/cached_lvol_stat_collector.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/services/capacity_and_stats_collector.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/services/log_agg_service.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/services/lvol_stat_collector.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/services/new_device_discovery.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/services/port_stat_collector.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/services/spdk_http_proxy_server.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/services/storage_node_monitor.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/services/tasks_runner_failed_migration.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/services/tasks_runner_migration.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/services/tasks_runner_new_dev_migration.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/services/tasks_runner_node_add.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/services/tasks_runner_restart.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/snode_client.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/utils.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/__init__.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/app.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/blueprints/snode_ops.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/blueprints/snode_ops_k8s.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/blueprints/web_api_cluster.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/blueprints/web_api_lvol.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/blueprints/web_api_pool.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/blueprints/web_api_storage_node.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/caching_node_app.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/caching_node_app_k8s.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/node_utils.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/snode_app.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/snode_app_k8s.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/static/delete.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/static/tst.py +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_web/utils.py +0 -0
|
@@ -621,39 +621,6 @@ def add_device(device_id):
|
|
|
621
621
|
|
|
622
622
|
logger.info(f"Adding device {device_id}")
|
|
623
623
|
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
#######################################
|
|
627
|
-
|
|
628
|
-
rpc_client = RPCClient(snode.mgmt_ip, snode.rpc_port, snode.rpc_username, snode.rpc_password)
|
|
629
|
-
|
|
630
|
-
# look for partitions
|
|
631
|
-
partitioned_devices = storage_node_ops._search_for_partitions(rpc_client, device_obj)
|
|
632
|
-
logger.debug("partitioned_devices")
|
|
633
|
-
logger.debug(partitioned_devices)
|
|
634
|
-
|
|
635
|
-
if len(partitioned_devices) == 2:
|
|
636
|
-
logger.info("Partitioned devices found")
|
|
637
|
-
else:
|
|
638
|
-
logger.info(f"Creating partitions for {device_obj.nvme_bdev}")
|
|
639
|
-
storage_node_ops._create_device_partitions(rpc_client, device_obj, snode)
|
|
640
|
-
partitioned_devices = storage_node_ops._search_for_partitions(rpc_client, device_obj)
|
|
641
|
-
|
|
642
|
-
if len(partitioned_devices) == 2:
|
|
643
|
-
logger.info("Device partitions created")
|
|
644
|
-
else:
|
|
645
|
-
logger.error("Failed to create partitions")
|
|
646
|
-
return False
|
|
647
|
-
|
|
648
|
-
jm_part = partitioned_devices[0]
|
|
649
|
-
device_part = partitioned_devices[1]
|
|
650
|
-
|
|
651
|
-
device_obj.device_name = device_part.device_name
|
|
652
|
-
device_obj.nvme_bdev = device_part.nvme_bdev
|
|
653
|
-
device_obj.size = device_part.size
|
|
654
|
-
|
|
655
|
-
#######################################
|
|
656
|
-
|
|
657
624
|
ret = _def_create_device_stack(device_obj, snode)
|
|
658
625
|
if not ret:
|
|
659
626
|
logger.error("Failed to create device stack")
|
|
@@ -43,10 +43,10 @@ def send_dev_status_event(device, dev_status):
|
|
|
43
43
|
logger.debug(node_status_event)
|
|
44
44
|
snodes = db_controller.get_storage_nodes_by_cluster_id(device.cluster_id)
|
|
45
45
|
for node in snodes:
|
|
46
|
-
if node.status !=
|
|
46
|
+
if node.status != StorageNode.STATUS_ONLINE:
|
|
47
47
|
continue
|
|
48
48
|
logging.debug(f"Sending event updates, device: {storage_ID}, status: {dev_status}, node: {node.get_id()}")
|
|
49
|
-
rpc_client = RPCClient(node.mgmt_ip, node.rpc_port, node.rpc_username, node.rpc_password, timeout=
|
|
49
|
+
rpc_client = RPCClient(node.mgmt_ip, node.rpc_port, node.rpc_username, node.rpc_password, timeout=5, retry=2)
|
|
50
50
|
ret = rpc_client.distr_status_events_update(events)
|
|
51
51
|
if not ret:
|
|
52
52
|
logger.warning("Failed to send event update")
|
|
@@ -59,7 +59,7 @@ def disconnect_device(device):
|
|
|
59
59
|
if node.status != node.STATUS_ONLINE:
|
|
60
60
|
continue
|
|
61
61
|
new_remote_devices = []
|
|
62
|
-
rpc_client = RPCClient(node.mgmt_ip, node.rpc_port, node.rpc_username, node.rpc_password, timeout=5, retry=
|
|
62
|
+
rpc_client = RPCClient(node.mgmt_ip, node.rpc_port, node.rpc_username, node.rpc_password, timeout=5, retry=2)
|
|
63
63
|
for rem_dev in node.remote_devices:
|
|
64
64
|
if rem_dev.get_id() == device.get_id():
|
|
65
65
|
ctrl_name = rem_dev.remote_bdev[:-2]
|
|
@@ -98,7 +98,8 @@ def get_distr_cluster_map(snodes, target_node):
|
|
|
98
98
|
break
|
|
99
99
|
if not name:
|
|
100
100
|
name = f"remote_{dev.alceml_bdev}n1"
|
|
101
|
-
dev_status
|
|
101
|
+
if dev_status == NVMeDevice.STATUS_ONLINE:
|
|
102
|
+
dev_status = NVMeDevice.STATUS_UNAVAILABLE
|
|
102
103
|
logger.debug(f"Device: {dev.get_id()}, status: {dev_status}, bdev_name: {name}")
|
|
103
104
|
dev_map[dev.cluster_device_order] = {
|
|
104
105
|
"UUID": dev.get_id(),
|
|
@@ -4,6 +4,7 @@ from datetime import datetime
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
from simplyblock_core.controllers import health_controller, storage_events, device_events
|
|
7
|
+
from simplyblock_core.models.nvme_device import NVMeDevice
|
|
7
8
|
from simplyblock_core.models.storage_node import StorageNode
|
|
8
9
|
from simplyblock_core.rpc_client import RPCClient
|
|
9
10
|
from simplyblock_core import constants, kv_store, utils, distr_controller
|
|
@@ -107,12 +108,13 @@ while True:
|
|
|
107
108
|
snode.rpc_username, snode.rpc_password,
|
|
108
109
|
timeout=10, retry=1)
|
|
109
110
|
for remote_device in snode.remote_devices:
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
111
|
+
if db_controller.get_storage_device_by_id(remote_device.get_id()).status == NVMeDevice.STATUS_ONLINE:
|
|
112
|
+
ret = rpc_client.get_bdevs(remote_device.remote_bdev)
|
|
113
|
+
if ret:
|
|
114
|
+
logger.info(f"Checking bdev: {remote_device.remote_bdev} ... ok")
|
|
115
|
+
else:
|
|
116
|
+
logger.info(f"Checking bdev: {remote_device.remote_bdev} ... not found")
|
|
117
|
+
node_remote_devices_check &= bool(ret)
|
|
116
118
|
|
|
117
119
|
if snode.jm_device:
|
|
118
120
|
jm_device = snode.jm_device
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
+
import datetime
|
|
2
3
|
import threading
|
|
3
4
|
import time
|
|
4
5
|
|
|
@@ -9,6 +10,7 @@ from simplyblock_core.models.lvol_model import LVol
|
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
from simplyblock_core.models.nvme_device import NVMeDevice
|
|
13
|
+
from simplyblock_core.models.storage_node import StorageNode
|
|
12
14
|
from simplyblock_core.rpc_client import RPCClient
|
|
13
15
|
|
|
14
16
|
|
|
@@ -31,6 +33,17 @@ def process_device_event(event):
|
|
|
31
33
|
if dev.status not in [NVMeDevice.STATUS_ONLINE, NVMeDevice.STATUS_READONLY]:
|
|
32
34
|
logger.info(f"The storage device is not online, skipping. status: {dev.status}")
|
|
33
35
|
event.status = 'skipped'
|
|
36
|
+
node_status_event = {
|
|
37
|
+
"timestamp": datetime.datetime.now().isoformat("T", "seconds") + 'Z',
|
|
38
|
+
"event_type": "device_status",
|
|
39
|
+
"storage_ID": storage_id,
|
|
40
|
+
"status": dev.status}
|
|
41
|
+
events = {"events": [node_status_event]}
|
|
42
|
+
snode = db_controller.get_storage_node_by_id(node_id)
|
|
43
|
+
rpc_client = RPCClient(snode.mgmt_ip, snode.rpc_port, snode.rpc_username, snode.rpc_password)
|
|
44
|
+
ret = rpc_client.distr_status_events_update(events)
|
|
45
|
+
if not ret:
|
|
46
|
+
logger.warning("Failed to send event update")
|
|
34
47
|
return
|
|
35
48
|
|
|
36
49
|
device = dev
|
|
@@ -56,9 +69,27 @@ def process_device_event(event):
|
|
|
56
69
|
new_remote_devices.append(rem_dev)
|
|
57
70
|
node.remote_devices = new_remote_devices
|
|
58
71
|
node.write_to_db(db_controller.kv_store)
|
|
59
|
-
|
|
72
|
+
node_status_event = {
|
|
73
|
+
"timestamp": datetime.datetime.now().isoformat("T", "seconds") + 'Z',
|
|
74
|
+
"event_type": "device_status",
|
|
75
|
+
"storage_ID": storage_id,
|
|
76
|
+
"status": NVMeDevice.STATUS_UNAVAILABLE}
|
|
77
|
+
events = {"events": [node_status_event]}
|
|
78
|
+
ret = rpc_client.distr_status_events_update(events)
|
|
79
|
+
if not ret:
|
|
80
|
+
logger.warning("Failed to send event update")
|
|
81
|
+
|
|
82
|
+
dev_node = db_controller.get_storage_node_by_id(device.node_id)
|
|
83
|
+
if dev_node.status == StorageNode.STATUS_ONLINE:
|
|
84
|
+
device_controller.device_set_io_error(device_id, True)
|
|
85
|
+
device_controller.device_set_unavailable(device_id)
|
|
60
86
|
|
|
61
87
|
else:
|
|
88
|
+
if node.status not in [StorageNode.STATUS_ONLINE, StorageNode.STATUS_SUSPENDED]:
|
|
89
|
+
logger.info(f"Node is not online, skipping. status: {node.status}")
|
|
90
|
+
event.status = 'skipped'
|
|
91
|
+
return
|
|
92
|
+
|
|
62
93
|
if event.message == 'SPDK_BDEV_EVENT_REMOVE':
|
|
63
94
|
if device.node_id == node_id:
|
|
64
95
|
logger.info(f"Removing storage id: {storage_id} from node: {node_id}")
|
|
@@ -752,7 +752,7 @@ def _connect_to_remote_devs(this_node):
|
|
|
752
752
|
|
|
753
753
|
rpc_client = RPCClient(
|
|
754
754
|
this_node.mgmt_ip, this_node.rpc_port,
|
|
755
|
-
this_node.rpc_username, this_node.rpc_password, timeout=
|
|
755
|
+
this_node.rpc_username, this_node.rpc_password, timeout=10, retry=2)
|
|
756
756
|
|
|
757
757
|
remote_devices = []
|
|
758
758
|
# connect to remote devs
|
|
@@ -786,7 +786,7 @@ def _connect_to_remote_jm_devs(this_node, jm_ids=[]):
|
|
|
786
786
|
|
|
787
787
|
rpc_client = RPCClient(
|
|
788
788
|
this_node.mgmt_ip, this_node.rpc_port,
|
|
789
|
-
this_node.rpc_username, this_node.rpc_password, timeout=
|
|
789
|
+
this_node.rpc_username, this_node.rpc_password, timeout=10, retry=2)
|
|
790
790
|
|
|
791
791
|
node_bdevs = rpc_client.get_bdevs()
|
|
792
792
|
node_bdev_names = [b['name'] for b in node_bdevs]
|
|
@@ -1631,16 +1631,18 @@ def restart_storage_node(
|
|
|
1631
1631
|
devices_sn = [d.serial_number for d in nvme_devs]
|
|
1632
1632
|
for db_dev in snode.nvme_devices:
|
|
1633
1633
|
known_devices_sn.append(db_dev.serial_number)
|
|
1634
|
+
if db_dev.status == NVMeDevice.STATUS_FAILED_AND_MIGRATED:
|
|
1635
|
+
continue
|
|
1634
1636
|
if db_dev.serial_number in devices_sn:
|
|
1635
1637
|
logger.info(f"Device found: {db_dev.get_id()}, status {db_dev.status}")
|
|
1636
|
-
if db_dev.status not in [NVMeDevice.STATUS_JM, NVMeDevice.STATUS_FAILED]:
|
|
1638
|
+
if db_dev.status not in [NVMeDevice.STATUS_JM, NVMeDevice.STATUS_FAILED, NVMeDevice.STATUS_NEW]:
|
|
1637
1639
|
db_dev.status = NVMeDevice.STATUS_ONLINE
|
|
1638
1640
|
active_devices.append(db_dev)
|
|
1639
1641
|
else:
|
|
1640
1642
|
logger.info(f"Device not found: {db_dev.get_id()}")
|
|
1641
1643
|
db_dev.status = NVMeDevice.STATUS_REMOVED
|
|
1642
1644
|
removed_devices.append(db_dev)
|
|
1643
|
-
|
|
1645
|
+
distr_controller.send_dev_status_event(db_dev, db_dev.status)
|
|
1644
1646
|
|
|
1645
1647
|
if snode.jm_device and "serial_number" in snode.jm_device.device_data_dict:
|
|
1646
1648
|
known_devices_sn.append(snode.jm_device.device_data_dict['serial_number'])
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2
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
|
{sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/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-3.9.5 → sbcli_dev-3.9.7}/simplyblock_core/services/tasks_runner_failed_migration.py
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-3.9.5 → sbcli_dev-3.9.7}/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
|