sbcli-pre 1.1.5__zip → 1.1.6__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_pre-1.1.5 → sbcli_pre-1.1.6}/PKG-INFO +1 -1
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/env_var +1 -1
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/sbcli_pre.egg-info/PKG-INFO +1 -1
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_cli/cli.py +2 -2
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/models/nvme_device.py +1 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/storage_node_ops.py +87 -27
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/README.md +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/pyproject.toml +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/sbcli_pre.egg-info/SOURCES.txt +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/sbcli_pre.egg-info/dependency_links.txt +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/sbcli_pre.egg-info/entry_points.txt +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/sbcli_pre.egg-info/requires.txt +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/sbcli_pre.egg-info/top_level.txt +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/setup.cfg +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/setup.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_cli/main.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/__init__.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/cluster_ops.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/compute_node_ops.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/constants.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/controllers/device_controller.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/controllers/events_controller.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/controllers/health_controller.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/controllers/lvol_controller.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/controllers/pool_controller.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/controllers/snapshot_controller.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/controllers/tasks_controller.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/distr_controller.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/kv_store.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/mgmt_node_ops.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/models/cluster.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/models/compute_node.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/models/events.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/models/global_settings.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/models/iface.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/models/job_schedule.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/models/lvol_model.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/models/pool.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/models/stats.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/models/storage_node.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/rpc_client.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/scripts/__init__.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/scripts/deploy_stack.sh +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/scripts/docker-compose-swarm.yml +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/scripts/prometheus.yml +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/services/capacity_and_stats_collector.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/services/distr_event_collector.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/services/health_check_service.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/services/log_agg_service.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/services/lvol_stat_collector.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/services/port_stat_collector.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/services/storage_node_monitor.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/services/tasks_runner_migration.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/services/tasks_runner_restart.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/snode_client.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_core/utils.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/__init__.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/app.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/blueprints/snode_ops.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/blueprints/web_api_cluster.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/blueprints/web_api_lvol.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/blueprints/web_api_pool.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/blueprints/web_api_storage_node.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/caching_node_app.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/caching_node_app_k8s.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/node_utils.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/snode_app.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/static/delete.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/static/tst.py +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/templates/deploy_spdk.yaml.j2 +0 -0
- {sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/simplyblock_web/utils.py +0 -0
@@ -38,9 +38,9 @@ class CLIWrapper:
|
|
38
38
|
sub_command.add_argument("cluster_id", help='UUID of the cluster to which the node will belong')
|
39
39
|
sub_command.add_argument("node_ip", help='IP of storage node to add')
|
40
40
|
sub_command.add_argument("ifname", help='Management interface name')
|
41
|
-
sub_command.add_argument("--partitions", help='Number of partitions to create per device', type=int, default=
|
41
|
+
sub_command.add_argument("--partitions", help='Number of partitions to create per device', type=int, default=0)
|
42
42
|
sub_command.add_argument("--jm-percent", help='Number in percent to use for JM from each device',
|
43
|
-
type=int, default=
|
43
|
+
type=int, default=0, dest='jm_percent')
|
44
44
|
sub_command.add_argument("--data-nics", help='Data interface names', nargs='+', dest='data_nics')
|
45
45
|
sub_command.add_argument("--memory", help='SPDK huge memory allocation, default is 4G', dest='spdk_mem')
|
46
46
|
sub_command.add_argument("--spdk-image", help='SPDK image uri', dest='spdk_image')
|
@@ -82,6 +82,7 @@ class JMDevice(BaseModel):
|
|
82
82
|
"raid_bdev": {"type": str, 'default': ""},
|
83
83
|
"alceml_bdev": {"type": str, 'default': ""},
|
84
84
|
"jm_bdev": {"type": str, 'default': ""},
|
85
|
+
"nvme_device": {"type": NVMeDevice, 'default': None},
|
85
86
|
|
86
87
|
"health_check": {"type": bool, "default": True},
|
87
88
|
"io_error": {"type": bool, 'default': False},
|
@@ -231,7 +231,7 @@ def _search_for_partitions(rpc_client, nvme_device):
|
|
231
231
|
return partitioned_devices
|
232
232
|
|
233
233
|
|
234
|
-
def
|
234
|
+
def _create_jm_stack_on_raid(rpc_client, jm_nvme_bdevs, snode, after_restart):
|
235
235
|
raid_bdev = f"raid_jm_{snode.get_id()}"
|
236
236
|
ret = rpc_client.bdev_raid_create(raid_bdev, jm_nvme_bdevs)
|
237
237
|
if not ret:
|
@@ -265,6 +265,37 @@ def _create_jm_device_stack(rpc_client, jm_nvme_bdevs, snode, after_restart):
|
|
265
265
|
})
|
266
266
|
|
267
267
|
|
268
|
+
def _create_jm_stack_on_device(rpc_client, nvme, snode, after_restart):
|
269
|
+
|
270
|
+
alceml_id = nvme.get_id()
|
271
|
+
alceml_name = device_controller.get_alceml_name(alceml_id)
|
272
|
+
logger.info(f"adding {alceml_name}")
|
273
|
+
|
274
|
+
pba_init_mode = 3
|
275
|
+
if after_restart:
|
276
|
+
pba_init_mode = 2
|
277
|
+
ret = rpc_client.bdev_alceml_create(alceml_name, nvme.nvme_bdev, alceml_id, pba_init_mode=pba_init_mode)
|
278
|
+
if not ret:
|
279
|
+
logger.error(f"Failed to create alceml bdev: {alceml_name}")
|
280
|
+
return False
|
281
|
+
|
282
|
+
jm_bdev = f"jm_{snode.get_id()}"
|
283
|
+
ret = rpc_client.bdev_jm_create(jm_bdev, alceml_name)
|
284
|
+
if not ret:
|
285
|
+
logger.error(f"Failed to create {jm_bdev}")
|
286
|
+
return False
|
287
|
+
|
288
|
+
return JMDevice({
|
289
|
+
'uuid': str(uuid.uuid4()),
|
290
|
+
'device_name': jm_bdev,
|
291
|
+
'nvme_device': nvme,
|
292
|
+
'size': nvme.size,
|
293
|
+
'status': JMDevice.STATUS_ONLINE,
|
294
|
+
'alceml_bdev': alceml_name,
|
295
|
+
'jm_bdev': jm_bdev
|
296
|
+
})
|
297
|
+
|
298
|
+
|
268
299
|
def _create_storage_device_stack(rpc_client, nvme, snode, after_restart):
|
269
300
|
test_name = f"{nvme.nvme_bdev}_test"
|
270
301
|
ret = rpc_client.bdev_passtest_create(test_name, nvme.nvme_bdev)
|
@@ -322,11 +353,8 @@ def _create_storage_device_stack(rpc_client, nvme, snode, after_restart):
|
|
322
353
|
nvme.nvmf_ip = IP
|
323
354
|
nvme.nvmf_port = 4420
|
324
355
|
nvme.io_error = False
|
325
|
-
# old_status = nvme.status
|
326
356
|
nvme.status = NVMeDevice.STATUS_ONLINE
|
327
357
|
return nvme
|
328
|
-
# device_events.device_status_change(nvme, nvme.status, old_status)
|
329
|
-
# snode.write_to_db(db_controller.kv_store)
|
330
358
|
|
331
359
|
|
332
360
|
def _create_device_partitions(rpc_client, nvme, snode):
|
@@ -354,7 +382,7 @@ def _create_device_partitions(rpc_client, nvme, snode):
|
|
354
382
|
return True
|
355
383
|
|
356
384
|
|
357
|
-
def
|
385
|
+
def _prepare_cluster_devices_partitions(snode, devices):
|
358
386
|
db_controller = DBController()
|
359
387
|
rpc_client = RPCClient(
|
360
388
|
snode.mgmt_ip, snode.rpc_port,
|
@@ -374,9 +402,6 @@ def _prepare_cluster_devices_2(snode, devices, after_restart=False):
|
|
374
402
|
logger.debug(partitioned_devices)
|
375
403
|
if len(partitioned_devices) == (1 + snode.num_partitions_per_dev):
|
376
404
|
logger.info("Partitioned devices found")
|
377
|
-
elif after_restart:
|
378
|
-
logger.error("Partitions count mismatch")
|
379
|
-
return False
|
380
405
|
else:
|
381
406
|
logger.info(f"Creating partitions for {nvme.nvme_bdev}")
|
382
407
|
_create_device_partitions(rpc_client, nvme, snode)
|
@@ -390,7 +415,7 @@ def _prepare_cluster_devices_2(snode, devices, after_restart=False):
|
|
390
415
|
jm_devices.append(partitioned_devices.pop(0))
|
391
416
|
|
392
417
|
for dev in partitioned_devices:
|
393
|
-
new_device = _create_storage_device_stack(rpc_client, dev, snode, after_restart)
|
418
|
+
new_device = _create_storage_device_stack(rpc_client, dev, snode, after_restart=False)
|
394
419
|
if not new_device:
|
395
420
|
logger.error("failed to create dev stack")
|
396
421
|
return False
|
@@ -403,7 +428,7 @@ def _prepare_cluster_devices_2(snode, devices, after_restart=False):
|
|
403
428
|
|
404
429
|
if jm_devices:
|
405
430
|
jm_nvme_bdevs = [dev.nvme_bdev for dev in jm_devices]
|
406
|
-
jm_device =
|
431
|
+
jm_device = _create_jm_stack_on_raid(rpc_client, jm_nvme_bdevs, snode, after_restart=False)
|
407
432
|
if not jm_device:
|
408
433
|
logger.error(f"Failed to create JM device")
|
409
434
|
return False
|
@@ -412,6 +437,49 @@ def _prepare_cluster_devices_2(snode, devices, after_restart=False):
|
|
412
437
|
return True
|
413
438
|
|
414
439
|
|
440
|
+
def _prepare_cluster_devices_jm_on_dev(snode, devices):
|
441
|
+
db_controller = DBController()
|
442
|
+
|
443
|
+
jm_device = devices[0]
|
444
|
+
# Set device cluster order
|
445
|
+
dev_order = get_next_cluster_device_order(db_controller, snode.cluster_id)
|
446
|
+
for index, nvme in enumerate(devices):
|
447
|
+
nvme.cluster_device_order = dev_order
|
448
|
+
dev_order += 1
|
449
|
+
if nvme.size < jm_device.size:
|
450
|
+
jm_device = nvme
|
451
|
+
device_events.device_create(nvme)
|
452
|
+
jm_device.status = NVMeDevice.STATUS_JM
|
453
|
+
|
454
|
+
rpc_client = RPCClient(snode.mgmt_ip, snode.rpc_port, snode.rpc_username, snode.rpc_password)
|
455
|
+
|
456
|
+
new_devices = []
|
457
|
+
for index, nvme in enumerate(devices):
|
458
|
+
if nvme.status not in [NVMeDevice.STATUS_ONLINE, NVMeDevice.STATUS_UNAVAILABLE,
|
459
|
+
NVMeDevice.STATUS_JM, NVMeDevice.STATUS_READONLY]:
|
460
|
+
logger.debug(f"Device is not online or unavailable: {nvme.get_id()}, status: {nvme.status}")
|
461
|
+
continue
|
462
|
+
|
463
|
+
if nvme.status == NVMeDevice.STATUS_JM:
|
464
|
+
jm_device = _create_jm_stack_on_device(rpc_client, nvme, snode, after_restart=False)
|
465
|
+
if not jm_device:
|
466
|
+
logger.error(f"Failed to create JM device")
|
467
|
+
return False
|
468
|
+
snode.jm_device = jm_device
|
469
|
+
else:
|
470
|
+
new_device = _create_storage_device_stack(rpc_client, nvme, snode, after_restart=False)
|
471
|
+
if not new_device:
|
472
|
+
logger.error("failed to create dev stack")
|
473
|
+
return False
|
474
|
+
new_device.cluster_device_order = dev_order
|
475
|
+
dev_order += 1
|
476
|
+
new_devices.append(new_device)
|
477
|
+
device_events.device_create(new_device)
|
478
|
+
|
479
|
+
snode.nvme_devices = new_devices
|
480
|
+
return True
|
481
|
+
|
482
|
+
|
415
483
|
def _prepare_cluster_devices_on_restart(snode):
|
416
484
|
|
417
485
|
rpc_client = RPCClient(
|
@@ -423,11 +491,6 @@ def _prepare_cluster_devices_on_restart(snode):
|
|
423
491
|
logger.debug(f"Device is skipped: {nvme.get_id()}, status: {nvme.status}")
|
424
492
|
continue
|
425
493
|
|
426
|
-
ret = rpc_client.get_bdevs(nvme.nvme_bdev)
|
427
|
-
if not ret:
|
428
|
-
logger.error(f"Device partition not found {nvme.nvme_bdev}")
|
429
|
-
nvme_dict = ret[0]
|
430
|
-
|
431
494
|
dev = _create_storage_device_stack(rpc_client, nvme, snode, after_restart=True)
|
432
495
|
if not dev:
|
433
496
|
logger.error(f"Failed to create dev stack {nvme.get_id()}")
|
@@ -436,17 +499,12 @@ def _prepare_cluster_devices_on_restart(snode):
|
|
436
499
|
|
437
500
|
# prepare JM device
|
438
501
|
jm_device = snode.jm_device
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
ret = rpc_client.bdev_alceml_create(jm_device.alceml_bdev, jm_device.raid_bdev, str(uuid.uuid4()), pba_init_mode=2)
|
444
|
-
if not ret:
|
445
|
-
logger.error(f"Failed to create alceml bdev: {jm_device.alceml_bdev}")
|
446
|
-
return False
|
447
|
-
ret = rpc_client.bdev_jm_create(jm_device.jm_bdev, jm_device.alceml_bdev)
|
502
|
+
if jm_device.jm_nvme_bdev_list:
|
503
|
+
ret = _create_jm_stack_on_raid(rpc_client, jm_device.jm_nvme_bdev_list, snode, after_restart=False)
|
504
|
+
else:
|
505
|
+
ret = _create_jm_stack_on_device(rpc_client, jm_device.nvme_device, snode, after_restart=True)
|
448
506
|
if not ret:
|
449
|
-
logger.error(f"Failed to create
|
507
|
+
logger.error(f"Failed to create JM device")
|
450
508
|
return False
|
451
509
|
|
452
510
|
return True
|
@@ -732,7 +790,10 @@ def add_node(cluster_id, node_ip, iface_name, data_nics_list,
|
|
732
790
|
return False
|
733
791
|
|
734
792
|
# prepare devices
|
735
|
-
|
793
|
+
if snode.num_partitions_per_dev == 0 or snode.jm_percent == 0:
|
794
|
+
ret = _prepare_cluster_devices_jm_on_dev(snode, nvme_devs)
|
795
|
+
else:
|
796
|
+
ret = _prepare_cluster_devices_partitions(snode, nvme_devs)
|
736
797
|
if not ret:
|
737
798
|
logger.error("Failed to prepare cluster devices")
|
738
799
|
return False
|
@@ -904,7 +965,6 @@ def remove_storage_node(node_id, force_remove=False, force_migrate=False):
|
|
904
965
|
|
905
966
|
def restart_storage_node(
|
906
967
|
node_id,
|
907
|
-
spdk_cpu_mask=None,
|
908
968
|
spdk_mem=None,
|
909
969
|
spdk_image=None,
|
910
970
|
set_spdk_debug=None,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
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_pre-1.1.5 → sbcli_pre-1.1.6}/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
|
{sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/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
|
{sbcli_pre-1.1.5 → sbcli_pre-1.1.6}/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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|