sbcli-dev 5.0.8__zip → 5.0.9__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-5.0.8 → sbcli_dev-5.0.9}/PKG-INFO +1 -1
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/env_var +1 -1
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/sbcli_dev.egg-info/PKG-INFO +1 -1
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/controllers/device_controller.py +3 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/models/nvme_device.py +1 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/storage_node_ops.py +75 -59
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/README.md +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/pyproject.toml +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/sbcli_dev.egg-info/SOURCES.txt +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/sbcli_dev.egg-info/dependency_links.txt +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/sbcli_dev.egg-info/entry_points.txt +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/sbcli_dev.egg-info/requires.txt +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/sbcli_dev.egg-info/top_level.txt +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/setup.cfg +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/setup.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_cli/cli.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_cli/main.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/__init__.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/cluster_ops.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/compute_node_ops.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/constants.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/controllers/events_controller.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/controllers/health_controller.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/controllers/lvol_controller.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/controllers/pool_controller.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/controllers/snapshot_controller.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/controllers/tasks_controller.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/distr_controller.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/kv_store.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/mgmt_node_ops.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/models/cluster.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/models/compute_node.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/models/deployer.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/models/events.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/models/global_settings.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/models/iface.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/models/job_schedule.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/models/lvol_model.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/models/pool.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/models/stats.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/models/storage_node.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/rpc_client.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/scripts/__init__.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/scripts/dashboard.yml +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/scripts/deploy_stack.sh +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/scripts/docker-compose-swarm.yml +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/scripts/objstore.yml +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/scripts/prometheus.yml +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/services/cached_lvol_stat_collector.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/services/capacity_and_stats_collector.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/services/health_check_service.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/services/log_agg_service.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/services/lvol_stat_collector.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/services/main_distr_event_collector.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/services/new_device_discovery.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/services/port_stat_collector.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/services/spdk_http_proxy_server.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/services/storage_node_monitor.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/services/tasks_runner_failed_migration.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/services/tasks_runner_migration.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/services/tasks_runner_new_dev_migration.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/services/tasks_runner_node_add.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/services/tasks_runner_restart.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/snode_client.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/utils.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/__init__.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/app.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/blueprints/snode_ops.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/blueprints/snode_ops_k8s.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/blueprints/web_api_cluster.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/blueprints/web_api_lvol.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/blueprints/web_api_pool.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/blueprints/web_api_storage_node.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/caching_node_app.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/caching_node_app_k8s.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/node_utils.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/snode_app.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/snode_app_k8s.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/static/delete.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/static/tst.py +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_web/utils.py +0 -0
|
@@ -35,6 +35,9 @@ def device_set_state(device_id, state):
|
|
|
35
35
|
if state == NVMeDevice.STATUS_ONLINE:
|
|
36
36
|
device.retries_exhausted = False
|
|
37
37
|
|
|
38
|
+
if state == NVMeDevice.STATUS_REMOVED:
|
|
39
|
+
device.deleted = True
|
|
40
|
+
|
|
38
41
|
old_status = dev.status
|
|
39
42
|
device.status = state
|
|
40
43
|
snode.write_to_db(db_controller.kv_store)
|
|
@@ -22,7 +22,7 @@ from simplyblock_core.models.iface import IFace
|
|
|
22
22
|
from simplyblock_core.models.job_schedule import JobSchedule
|
|
23
23
|
from simplyblock_core.models.nvme_device import NVMeDevice, JMDevice
|
|
24
24
|
from simplyblock_core.models.storage_node import StorageNode
|
|
25
|
-
from simplyblock_core.pci_utils import
|
|
25
|
+
from simplyblock_core.pci_utils import bind_spdk_driver
|
|
26
26
|
from simplyblock_core.rpc_client import RPCClient
|
|
27
27
|
from simplyblock_core.snode_client import SNodeClient
|
|
28
28
|
|
|
@@ -237,6 +237,7 @@ def _search_for_partitions(rpc_client, nvme_device):
|
|
|
237
237
|
new_dev.uuid = str(uuid.uuid4())
|
|
238
238
|
new_dev.device_name = name
|
|
239
239
|
new_dev.nvme_bdev = name
|
|
240
|
+
new_dev.is_partition = True
|
|
240
241
|
new_dev.size = bdev['block_size'] * bdev['num_blocks']
|
|
241
242
|
partitioned_devices.append(new_dev)
|
|
242
243
|
return partitioned_devices
|
|
@@ -551,29 +552,34 @@ def _prepare_cluster_devices_partitions(snode, devices, without_jm=False):
|
|
|
551
552
|
jm_devices = []
|
|
552
553
|
dev_order = get_next_cluster_device_order(db_controller, snode.cluster_id)
|
|
553
554
|
for index, nvme in enumerate(devices):
|
|
554
|
-
if nvme.status
|
|
555
|
-
|
|
555
|
+
if nvme.status == "not_found":
|
|
556
|
+
continue
|
|
557
|
+
|
|
558
|
+
if nvme.status not in [NVMeDevice.STATUS_ONLINE, NVMeDevice.STATUS_NEW]:
|
|
556
559
|
logger.debug(f"Device is skipped: {nvme.get_id()}, status: {nvme.status}")
|
|
557
560
|
new_devices.append(nvme)
|
|
558
561
|
continue
|
|
559
562
|
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
logger.debug("partitioned_devices")
|
|
563
|
-
logger.debug(partitioned_devices)
|
|
564
|
-
if len(partitioned_devices) == (1 + snode.num_partitions_per_dev):
|
|
565
|
-
logger.info("Partitioned devices found")
|
|
563
|
+
if nvme.is_partition:
|
|
564
|
+
partitioned_devices = [nvme]
|
|
566
565
|
else:
|
|
567
|
-
|
|
568
|
-
_create_device_partitions(rpc_client, nvme, snode, snode.num_partitions_per_dev, snode.jm_percent)
|
|
566
|
+
# look for partitions
|
|
569
567
|
partitioned_devices = _search_for_partitions(rpc_client, nvme)
|
|
568
|
+
logger.debug("partitioned_devices")
|
|
569
|
+
logger.debug(partitioned_devices)
|
|
570
570
|
if len(partitioned_devices) == (1 + snode.num_partitions_per_dev):
|
|
571
|
-
logger.info("
|
|
571
|
+
logger.info("Partitioned devices found")
|
|
572
572
|
else:
|
|
573
|
-
logger.
|
|
574
|
-
|
|
573
|
+
logger.info(f"Creating partitions for {nvme.nvme_bdev}")
|
|
574
|
+
_create_device_partitions(rpc_client, nvme, snode, snode.num_partitions_per_dev, snode.jm_percent)
|
|
575
|
+
partitioned_devices = _search_for_partitions(rpc_client, nvme)
|
|
576
|
+
if len(partitioned_devices) == (1 + snode.num_partitions_per_dev):
|
|
577
|
+
logger.info("Device partitions created")
|
|
578
|
+
else:
|
|
579
|
+
logger.error("Failed to create partitions")
|
|
580
|
+
return False
|
|
575
581
|
|
|
576
|
-
|
|
582
|
+
jm_devices.append(partitioned_devices.pop(0))
|
|
577
583
|
|
|
578
584
|
for dev in partitioned_devices:
|
|
579
585
|
new_device = _create_storage_device_stack(rpc_client, dev, snode, after_restart=False)
|
|
@@ -583,6 +589,7 @@ def _prepare_cluster_devices_partitions(snode, devices, without_jm=False):
|
|
|
583
589
|
if nvme.status == NVMeDevice.STATUS_NEW:
|
|
584
590
|
new_device.status = NVMeDevice.STATUS_NEW
|
|
585
591
|
else:
|
|
592
|
+
new_device.status = NVMeDevice.STATUS_ONLINE
|
|
586
593
|
new_device.cluster_device_order = dev_order
|
|
587
594
|
dev_order += 1
|
|
588
595
|
device_events.device_create(new_device)
|
|
@@ -603,25 +610,13 @@ def _prepare_cluster_devices_partitions(snode, devices, without_jm=False):
|
|
|
603
610
|
return True
|
|
604
611
|
|
|
605
612
|
|
|
606
|
-
def _prepare_cluster_devices_jm_on_dev(snode, devices
|
|
613
|
+
def _prepare_cluster_devices_jm_on_dev(snode, devices):
|
|
607
614
|
db_controller = DBController()
|
|
608
|
-
|
|
609
|
-
# Set device cluster order
|
|
610
615
|
dev_order = get_next_cluster_device_order(db_controller, snode.cluster_id)
|
|
611
|
-
|
|
612
|
-
jm_device = devices[0]
|
|
613
|
-
for index, nvme in enumerate(devices):
|
|
614
|
-
if nvme.size < jm_device.size:
|
|
615
|
-
jm_device = nvme
|
|
616
|
-
jm_device.status = NVMeDevice.STATUS_JM
|
|
617
|
-
|
|
618
616
|
rpc_client = RPCClient(snode.mgmt_ip, snode.rpc_port, snode.rpc_username, snode.rpc_password)
|
|
619
|
-
|
|
620
617
|
new_devices = []
|
|
621
618
|
for index, nvme in enumerate(devices):
|
|
622
|
-
if nvme.status
|
|
623
|
-
NVMeDevice.STATUS_JM, NVMeDevice.STATUS_READONLY, NVMeDevice.STATUS_NEW]:
|
|
624
|
-
logger.debug(f"Device is not online or unavailable: {nvme.get_id()}, status: {nvme.status}")
|
|
619
|
+
if nvme.status == "not_found":
|
|
625
620
|
continue
|
|
626
621
|
|
|
627
622
|
if nvme.status == NVMeDevice.STATUS_JM:
|
|
@@ -629,21 +624,22 @@ def _prepare_cluster_devices_jm_on_dev(snode, devices, without_jm=False):
|
|
|
629
624
|
if not jm_device:
|
|
630
625
|
logger.error(f"Failed to create JM device")
|
|
631
626
|
return False
|
|
632
|
-
if without_jm:
|
|
633
|
-
jm_device.status = JMDevice.STATUS_REMOVED
|
|
634
627
|
snode.jm_device = jm_device
|
|
628
|
+
continue
|
|
629
|
+
|
|
630
|
+
new_devices.append(nvme)
|
|
631
|
+
if nvme.status not in [NVMeDevice.STATUS_ONLINE, NVMeDevice.STATUS_NEW]:
|
|
632
|
+
logger.debug(f"Device is not online : {nvme.get_id()}, status: {nvme.status}")
|
|
635
633
|
else:
|
|
636
|
-
|
|
637
|
-
if not
|
|
634
|
+
nvme = _create_storage_device_stack(rpc_client, nvme, snode, after_restart=False)
|
|
635
|
+
if not nvme:
|
|
638
636
|
logger.error("failed to create dev stack")
|
|
639
637
|
return False
|
|
640
|
-
if nvme.status == NVMeDevice.
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
device_events.device_create(new_device)
|
|
646
|
-
new_devices.append(new_device)
|
|
638
|
+
if nvme.status == NVMeDevice.STATUS_ONLINE:
|
|
639
|
+
if nvme.cluster_device_order <= 0 :
|
|
640
|
+
nvme.cluster_device_order = dev_order
|
|
641
|
+
dev_order += 1
|
|
642
|
+
device_events.device_create(nvme)
|
|
647
643
|
|
|
648
644
|
snode.nvme_devices = new_devices
|
|
649
645
|
return True
|
|
@@ -1213,6 +1209,12 @@ def add_node(cluster_id, node_ip, iface_name, data_nics_list,
|
|
|
1213
1209
|
logger.error("No NVMe devices was found!")
|
|
1214
1210
|
return False
|
|
1215
1211
|
|
|
1212
|
+
jm_device = nvme_devs[0]
|
|
1213
|
+
for nvme in nvme_devs[1:]:
|
|
1214
|
+
if nvme.size < jm_device.size:
|
|
1215
|
+
jm_device = nvme
|
|
1216
|
+
jm_device.status = NVMeDevice.STATUS_JM
|
|
1217
|
+
|
|
1216
1218
|
# prepare devices
|
|
1217
1219
|
if snode.num_partitions_per_dev == 0 or snode.jm_percent == 0:
|
|
1218
1220
|
ret = _prepare_cluster_devices_jm_on_dev(snode, nvme_devs)
|
|
@@ -1683,48 +1685,62 @@ def restart_storage_node(
|
|
|
1683
1685
|
logger.info(f"Devices in db: {len(snode.nvme_devices)}")
|
|
1684
1686
|
logger.debug(snode.nvme_devices)
|
|
1685
1687
|
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1688
|
+
jm_device_found = False
|
|
1689
|
+
jm_device_sn = ""
|
|
1690
|
+
if snode.jm_device and "serial_number" in snode.jm_device.device_data_dict:
|
|
1691
|
+
jm_device_sn = snode.jm_device.device_data_dict['serial_number']
|
|
1692
|
+
|
|
1689
1693
|
known_devices_sn = []
|
|
1694
|
+
new_devices = []
|
|
1690
1695
|
devices_sn = [d.serial_number for d in nvme_devs]
|
|
1691
1696
|
for db_dev in snode.nvme_devices:
|
|
1692
|
-
# if db_dev.status != NVMeDevice.STATUS_NEW:
|
|
1693
1697
|
known_devices_sn.append(db_dev.serial_number)
|
|
1694
|
-
if db_dev.status in [NVMeDevice.STATUS_FAILED_AND_MIGRATED, NVMeDevice.STATUS_REMOVED]:
|
|
1695
|
-
continue
|
|
1696
1698
|
if db_dev.serial_number in devices_sn:
|
|
1697
1699
|
logger.info(f"Device found: {db_dev.get_id()}, status {db_dev.status}")
|
|
1698
|
-
if db_dev.status
|
|
1700
|
+
if db_dev.status in [NVMeDevice.STATUS_UNAVAILABLE, NVMeDevice.STATUS_READONLY]:
|
|
1701
|
+
db_dev.status = NVMeDevice.STATUS_ONLINE
|
|
1702
|
+
elif db_dev.status == NVMeDevice.STATUS_NEW:
|
|
1703
|
+
new_devices.append(db_dev)
|
|
1704
|
+
elif db_dev.status == NVMeDevice.STATUS_REMOVED and db_dev.deleted is False:
|
|
1699
1705
|
db_dev.status = NVMeDevice.STATUS_ONLINE
|
|
1700
|
-
|
|
1706
|
+
|
|
1701
1707
|
else:
|
|
1702
1708
|
logger.info(f"Device not found: {db_dev.get_id()}")
|
|
1703
|
-
db_dev.status
|
|
1704
|
-
|
|
1705
|
-
distr_controller.send_dev_status_event(db_dev, db_dev.status)
|
|
1709
|
+
if db_dev.status in [NVMeDevice.STATUS_ONLINE, NVMeDevice.STATUS_READONLY, NVMeDevice.STATUS_UNAVAILABLE]:
|
|
1710
|
+
db_dev.status = NVMeDevice.STATUS_REMOVED
|
|
1706
1711
|
|
|
1707
|
-
|
|
1708
|
-
|
|
1712
|
+
elif db_dev.status == NVMeDevice.STATUS_NEW:
|
|
1713
|
+
db_dev.status = "not_found"
|
|
1709
1714
|
|
|
1710
1715
|
for dev in nvme_devs:
|
|
1711
1716
|
if dev.serial_number not in known_devices_sn:
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1717
|
+
if not jm_device_found and jm_device_sn and dev.serial_number == jm_device_sn:
|
|
1718
|
+
dev.status = NVMeDevice.STATUS_JM
|
|
1719
|
+
jm_device_found = True
|
|
1720
|
+
else:
|
|
1721
|
+
logger.info(f"New device found: {dev.get_id()}")
|
|
1722
|
+
dev.status = NVMeDevice.STATUS_NEW
|
|
1723
|
+
new_devices.append(dev)
|
|
1715
1724
|
snode.nvme_devices.append(dev)
|
|
1716
1725
|
|
|
1726
|
+
if not jm_device_found and jm_device_sn and new_devices:
|
|
1727
|
+
jm_device = new_devices[0]
|
|
1728
|
+
for nvme in new_devices[1:]:
|
|
1729
|
+
if nvme.size < jm_device.size:
|
|
1730
|
+
jm_device = nvme
|
|
1731
|
+
jm_device.status = NVMeDevice.STATUS_JM
|
|
1732
|
+
|
|
1717
1733
|
snode.write_to_db(db_controller.kv_store)
|
|
1718
1734
|
if node_ip:
|
|
1719
1735
|
# prepare devices on new node
|
|
1720
1736
|
if snode.num_partitions_per_dev == 0 or snode.jm_percent == 0:
|
|
1721
|
-
ret = _prepare_cluster_devices_jm_on_dev(snode,
|
|
1737
|
+
ret = _prepare_cluster_devices_jm_on_dev(snode, snode.nvme_devices)
|
|
1722
1738
|
else:
|
|
1723
|
-
ret = _prepare_cluster_devices_partitions(snode,
|
|
1739
|
+
ret = _prepare_cluster_devices_partitions(snode, snode.nvme_devices)
|
|
1724
1740
|
if not ret:
|
|
1725
1741
|
logger.error("Failed to prepare cluster devices")
|
|
1726
1742
|
# return False
|
|
1727
|
-
snode.nvme_devices.extend(removed_devices)
|
|
1743
|
+
# snode.nvme_devices.extend(removed_devices)
|
|
1728
1744
|
snode.write_to_db(kv_store)
|
|
1729
1745
|
|
|
1730
1746
|
for node in db_controller.get_storage_nodes_by_cluster_id(snode.cluster_id):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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-5.0.8 → sbcli_dev-5.0.9}/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-5.0.8 → sbcli_dev-5.0.9}/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-5.0.8 → sbcli_dev-5.0.9}/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
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/simplyblock_core/services/tasks_runner_failed_migration.py
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-5.0.8 → sbcli_dev-5.0.9}/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
|