sbcli-pre 1.2.6__zip → 1.2.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_pre-1.2.6 → sbcli_pre-1.2.7}/PKG-INFO +1 -1
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/env_var +1 -1
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/sbcli_pre.egg-info/PKG-INFO +1 -1
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_cli/cli.py +28 -24
- sbcli_pre-1.2.7/simplyblock_core/constants.py +91 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/controllers/lvol_controller.py +26 -3
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/controllers/snapshot_controller.py +27 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/kv_store.py +15 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/models/storage_node.py +5 -1
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/services/tasks_runner_restart.py +1 -1
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/storage_node_ops.py +115 -32
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/utils.py +80 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/blueprints/web_api_storage_node.py +14 -7
- sbcli_pre-1.2.6/simplyblock_core/constants.py +0 -63
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/README.md +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/pyproject.toml +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/sbcli_pre.egg-info/SOURCES.txt +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/sbcli_pre.egg-info/dependency_links.txt +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/sbcli_pre.egg-info/entry_points.txt +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/sbcli_pre.egg-info/requires.txt +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/sbcli_pre.egg-info/top_level.txt +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/setup.cfg +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/setup.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_cli/main.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/__init__.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/cluster_ops.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/compute_node_ops.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/controllers/device_controller.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/controllers/events_controller.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/controllers/health_controller.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/controllers/pool_controller.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/controllers/tasks_controller.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/distr_controller.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/mgmt_node_ops.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/models/cluster.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/models/compute_node.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/models/deployer.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/models/events.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/models/global_settings.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/models/iface.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/models/job_schedule.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/models/lvol_model.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/models/nvme_device.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/models/pool.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/models/stats.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/rpc_client.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/scripts/__init__.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/scripts/deploy_stack.sh +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/scripts/docker-compose-swarm.yml +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/scripts/prometheus.yml +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/services/capacity_and_stats_collector.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/services/distr_event_collector.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/services/health_check_service.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/services/log_agg_service.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/services/lvol_stat_collector.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/services/port_stat_collector.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/services/storage_node_monitor.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/services/tasks_runner_migration.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_core/snode_client.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/__init__.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/app.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/blueprints/snode_ops.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/blueprints/web_api_cluster.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/blueprints/web_api_lvol.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/blueprints/web_api_pool.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/caching_node_app.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/caching_node_app_k8s.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/node_utils.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/snode_app.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/static/delete.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/static/tst.py +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/templates/deploy_spdk.yaml.j2 +0 -0
- {sbcli_pre-1.2.6 → sbcli_pre-1.2.7}/simplyblock_web/utils.py +0 -0
@@ -325,3 +325,83 @@ def generate_mask(cores):
|
|
325
325
|
for core in cores:
|
326
326
|
mask |= (1 << core)
|
327
327
|
return f'0x{mask:X}'
|
328
|
+
|
329
|
+
def calculate_pool_count(alceml_count, lvol_count, snap_count, cpu_count, poller_count):
|
330
|
+
'''
|
331
|
+
Small pool count Large pool count
|
332
|
+
Create JM 256 32 For each JM
|
333
|
+
|
334
|
+
Create Alceml 256 32 For each Alceml
|
335
|
+
|
336
|
+
Create Distrib 256 32 For each distrib
|
337
|
+
|
338
|
+
First Send cluster map 256 32 Calculated or one time
|
339
|
+
|
340
|
+
NVMF transport TCP 127 * poll_groups_mask||CPUCount + 384 15 * poll_groups_mask||CPUCount + 384 Calculated or one time
|
341
|
+
|
342
|
+
Subsystem add NS 128 * poll_groups_mask||CPUCount 16 * poll_groups_mask||CPUCount Calculated or one time
|
343
|
+
|
344
|
+
Create snapshot 512 64 For each snapshot
|
345
|
+
|
346
|
+
Clone lvol 256 32 For each clone
|
347
|
+
'''
|
348
|
+
poller_number = poller_count if poller_count else cpu_count
|
349
|
+
small_pool_count = (3 + alceml_count + lvol_count + 2 * snap_count + 1) * 256 + poller_number * 127 + 384 + 128 * poller_number + constants.EXTRA_SMALL_POOL_COUNT
|
350
|
+
large_pool_count = (3 + alceml_count + lvol_count + 2 * snap_count + 1) * 32 + poller_number * 15 + 384 + 16 * poller_number + constants.EXTRA_LARGE_POOL_COUNT
|
351
|
+
return small_pool_count, large_pool_count
|
352
|
+
|
353
|
+
|
354
|
+
def calculate_minimum_hp_memory(small_pool_count, large_pool_count, lvol_count, snap_count, cpu_count):
|
355
|
+
'''
|
356
|
+
1092 (initial consumption) + 4 * CPU + 1.0277 * POOL_COUNT(Sum in MB) + (7 + 6) * lvol_count + 12 * snap_count
|
357
|
+
then you can amend the expected memory need for the creation of lvols (6MB),
|
358
|
+
connection number over lvols (7MB per connection), creation of snaps (12MB),
|
359
|
+
extra buffer 2GB
|
360
|
+
return: minimum_hp_memory in bytes
|
361
|
+
'''
|
362
|
+
pool_consumption = (small_pool_count * 8 + large_pool_count * 128) / 1024 + 1092
|
363
|
+
memory_consumption = (4 * cpu_count + 1.0277 * pool_consumption + (6 + 7) * lvol_count + 12 * snap_count) * (1024 * 1024) + constants.EXTRA_HUGE_PAGE_MEMORY
|
364
|
+
return memory_consumption
|
365
|
+
|
366
|
+
|
367
|
+
def calculate_minimum_sys_memory(max_prov):
|
368
|
+
max_prov_tb = max_prov / (1024 * 1024 * 1024 * 1024)
|
369
|
+
minimum_sys_memory = (250 * 1024 * 1024) * 1.1 * max_prov_tb + constants.EXTRA_SYS_MEMORY
|
370
|
+
logger.debug(f"Minimum system memory is {humanbytes(minimum_sys_memory)}")
|
371
|
+
return minimum_sys_memory
|
372
|
+
|
373
|
+
|
374
|
+
def calculate_spdk_memory(minimum_hp_memory, minimum_sys_memory, free_sys_memory, huge_total_memory):
|
375
|
+
total_free_memory = free_sys_memory + huge_total_memory
|
376
|
+
if total_free_memory < (minimum_hp_memory + minimum_sys_memory):
|
377
|
+
logger.warning(f"Total free memory:{humanbytes(total_free_memory)}, "
|
378
|
+
f"Minimum huge pages memory: {humanbytes(minimum_hp_memory)}, "
|
379
|
+
f"Minimum system memory: {humanbytes(minimum_sys_memory)}")
|
380
|
+
return False, 0
|
381
|
+
spdk_mem = minimum_hp_memory + (total_free_memory - minimum_hp_memory - minimum_sys_memory) * 0.2
|
382
|
+
logger.debug(f"SPDK memory is {humanbytes(spdk_mem)}")
|
383
|
+
return True, spdk_mem
|
384
|
+
|
385
|
+
|
386
|
+
def get_total_size_per_instance_type(instance_type):
|
387
|
+
instance_storage_data = constants.INSTANCE_STORAGE_DATA
|
388
|
+
if instance_type in instance_storage_data:
|
389
|
+
number_of_devices = instance_storage_data[instance_type]["number_of_devices"]
|
390
|
+
device_size = instance_storage_data[instance_type]["size_per_device_gb"]
|
391
|
+
return True, number_of_devices, device_size
|
392
|
+
|
393
|
+
return False, 0, 0
|
394
|
+
|
395
|
+
|
396
|
+
def validate_add_lvol_or_snap_on_node(memory_free, huge_free, max_lvol_or_snap,
|
397
|
+
lvol_or_snap_size, node_capacity, node_lvol_or_snap_count):
|
398
|
+
min_sys_memory = 2 / 4096 * lvol_or_snap_size + 1 / 4096 * node_capacity + constants.MIN_SYS_MEMORY_FOR_LVOL
|
399
|
+
if huge_free < constants.MIN_HUGE_PAGE_MEMORY_FOR_LVOL:
|
400
|
+
return f"No enough huge pages memory on the node, Free memory: {humanbytes(huge_free)}, " \
|
401
|
+
f"Min Huge memory required: {humanbytes(constants.MIN_HUGE_PAGE_MEMORY_FOR_LVOL)}"
|
402
|
+
if memory_free < min_sys_memory:
|
403
|
+
return f"No enough system memory on the node, Free Memory: {humanbytes(memory_free)}, " \
|
404
|
+
f"Min Sys memory required: {humanbytes(min_sys_memory)}"
|
405
|
+
if node_lvol_or_snap_count >= max_lvol_or_snap:
|
406
|
+
return f"You have exceeded the max number of lvol/snap {max_lvol_or_snap}"
|
407
|
+
return ""
|
@@ -163,9 +163,21 @@ def storage_node_add():
|
|
163
163
|
if 'ifname' not in req_data:
|
164
164
|
return utils.get_response_error("missing required param: ifname", 400)
|
165
165
|
|
166
|
+
if 'max_lvol' not in req_data:
|
167
|
+
return utils.get_response_error("missing required param: max_lvol", 400)
|
168
|
+
|
169
|
+
if 'max_snap' not in req_data:
|
170
|
+
return utils.get_response_error("missing required param: max_snap", 400)
|
171
|
+
|
172
|
+
if 'max_prov' not in req_data:
|
173
|
+
return utils.get_response_error("missing required param: max_prov", 400)
|
174
|
+
|
166
175
|
cluster_id = req_data['cluster_id']
|
167
176
|
node_ip = req_data['node_ip']
|
168
177
|
ifname = req_data['ifname']
|
178
|
+
max_lvol = req_data['max_lvol']
|
179
|
+
max_snap = req_data['max_snap']
|
180
|
+
max_prov = req_data['max_prov']
|
169
181
|
|
170
182
|
spdk_image = None
|
171
183
|
if 'spdk_image' in req_data:
|
@@ -180,15 +192,10 @@ def storage_node_add():
|
|
180
192
|
data_nics = req_data['data_nics']
|
181
193
|
data_nics = data_nics.split(",")
|
182
194
|
|
183
|
-
|
184
|
-
if 'spdk_mem' in req_data:
|
185
|
-
mem = req_data['spdk_mem']
|
186
|
-
spdk_mem = utils.parse_size(mem)
|
187
|
-
if spdk_mem < 1 * 1024 * 1024:
|
188
|
-
return utils.get_response_error(f"SPDK memory:{mem} must be larger than 1G", 400)
|
195
|
+
|
189
196
|
|
190
197
|
out = storage_node_ops.add_node(
|
191
|
-
cluster_id, node_ip, ifname, data_nics,
|
198
|
+
cluster_id, node_ip, ifname, data_nics, max_lvol, max_snap, max_prov,
|
192
199
|
spdk_image=spdk_image, spdk_debug=spdk_debug)
|
193
200
|
|
194
201
|
return utils.get_response(out)
|
@@ -1,63 +0,0 @@
|
|
1
|
-
import logging
|
2
|
-
import os
|
3
|
-
|
4
|
-
KVD_DB_VERSION = 730
|
5
|
-
KVD_DB_FILE_PATH = '/etc/foundationdb/fdb.cluster'
|
6
|
-
KVD_DB_TIMEOUT_MS = 10000
|
7
|
-
SPK_DIR = '/home/ec2-user/spdk'
|
8
|
-
RPC_HTTP_PROXY_PORT = 8080
|
9
|
-
LOG_LEVEL = logging.INFO
|
10
|
-
LOG_WEB_DEBUG = True
|
11
|
-
|
12
|
-
INSTALL_DIR = os.path.dirname(os.path.realpath(__file__))
|
13
|
-
|
14
|
-
NODE_MONITOR_INTERVAL_SEC = 3
|
15
|
-
DEVICE_MONITOR_INTERVAL_SEC = 5
|
16
|
-
STAT_COLLECTOR_INTERVAL_SEC = 60*5 # 5 minutes
|
17
|
-
LVOL_STAT_COLLECTOR_INTERVAL_SEC = 2
|
18
|
-
LVOL_MONITOR_INTERVAL_SEC = 60
|
19
|
-
DEV_MONITOR_INTERVAL_SEC = 10
|
20
|
-
DEV_STAT_COLLECTOR_INTERVAL_SEC = 2
|
21
|
-
PROT_STAT_COLLECTOR_INTERVAL_SEC = 2
|
22
|
-
DISTR_EVENT_COLLECTOR_INTERVAL_SEC = 2
|
23
|
-
DISTR_EVENT_COLLECTOR_NUM_OF_EVENTS = 10
|
24
|
-
CAP_MONITOR_INTERVAL_SEC = 30
|
25
|
-
SSD_VENDOR_WHITE_LIST = ["1d0f:cd01", "1d0f:cd00"]
|
26
|
-
|
27
|
-
PMEM_DIR = '/tmp/pmem'
|
28
|
-
|
29
|
-
NVME_PROGRAM_FAIL_COUNT = 50
|
30
|
-
NVME_ERASE_FAIL_COUNT = 50
|
31
|
-
NVME_CRC_ERROR_COUNT = 50
|
32
|
-
DEVICE_OVERLOAD_STDEV_VALUE = 50
|
33
|
-
DEVICE_OVERLOAD_CAPACITY_THRESHOLD = 50
|
34
|
-
|
35
|
-
CLUSTER_NQN = "nqn.2023-02.io.simplyblock"
|
36
|
-
|
37
|
-
weights = {
|
38
|
-
"lvol": 50,
|
39
|
-
"cpu": 10,
|
40
|
-
"r_io": 10,
|
41
|
-
"w_io": 10,
|
42
|
-
"r_b": 10,
|
43
|
-
"w_b": 10
|
44
|
-
}
|
45
|
-
|
46
|
-
# To use 75% of hugepages to calculate ssd size to use for the ocf bdev
|
47
|
-
CACHING_NODE_MEMORY_FACTOR = 0.75
|
48
|
-
|
49
|
-
HEALTH_CHECK_INTERVAL_SEC = 60
|
50
|
-
|
51
|
-
GRAYLOG_CHECK_INTERVAL_SEC = 60
|
52
|
-
|
53
|
-
FDB_CHECK_INTERVAL_SEC = 60
|
54
|
-
|
55
|
-
SIMPLY_BLOCK_DOCKER_IMAGE = "simplyblock/simplyblock:pre-release"
|
56
|
-
SIMPLY_BLOCK_CLI_NAME = "sbcli"
|
57
|
-
TASK_EXEC_INTERVAL_SEC = 30
|
58
|
-
TASK_EXEC_RETRY_COUNT = 8
|
59
|
-
|
60
|
-
SIMPLY_BLOCK_SPDK_CORE_IMAGE = "simplyblock/spdk-core:latest"
|
61
|
-
SIMPLY_BLOCK_SPDK_ULTRA_IMAGE = "simplyblock/spdk:prerelease-latest"
|
62
|
-
|
63
|
-
GELF_PORT = 12201
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
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.2.6 → sbcli_pre-1.2.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
|
{sbcli_pre-1.2.6 → sbcli_pre-1.2.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
|
{sbcli_pre-1.2.6 → sbcli_pre-1.2.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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|