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