sbcli-dev 4.0.65__zip → 4.0.67__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-4.0.65 → sbcli_dev-4.0.67}/PKG-INFO +1 -1
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/env_var +1 -1
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/sbcli_dev.egg-info/PKG-INFO +1 -1
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_cli/cli.py +7 -8
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/cluster_ops.py +3 -6
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/constants.py +2 -2
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/controllers/device_controller.py +1 -1
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/controllers/health_controller.py +11 -9
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/controllers/lvol_controller.py +2 -4
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/controllers/snapshot_controller.py +1 -2
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/distr_controller.py +2 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/models/cluster.py +0 -2
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/models/job_schedule.py +1 -1
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/models/storage_node.py +1 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/rpc_client.py +8 -2
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/services/tasks_runner_failed_migration.py +6 -5
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/services/tasks_runner_migration.py +5 -5
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/services/tasks_runner_new_dev_migration.py +5 -5
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/storage_node_ops.py +72 -43
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/blueprints/snode_ops_k8s.py +10 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/blueprints/web_api_cluster.py +1 -2
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/blueprints/web_api_storage_node.py +4 -1
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2 +9 -1
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/README.md +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/pyproject.toml +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/sbcli_dev.egg-info/SOURCES.txt +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/sbcli_dev.egg-info/dependency_links.txt +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/sbcli_dev.egg-info/entry_points.txt +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/sbcli_dev.egg-info/requires.txt +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/sbcli_dev.egg-info/top_level.txt +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/setup.cfg +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/setup.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_cli/main.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/__init__.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/compute_node_ops.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/controllers/events_controller.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/controllers/pool_controller.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/controllers/tasks_controller.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/kv_store.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/mgmt_node_ops.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/models/compute_node.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/models/deployer.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/models/events.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/models/global_settings.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/models/iface.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/models/lvol_model.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/models/nvme_device.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/models/pool.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/models/stats.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/scripts/__init__.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/scripts/dashboard.yml +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/scripts/deploy_stack.sh +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/scripts/docker-compose-swarm.yml +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/scripts/objstore.yml +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/scripts/prometheus.yml +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/services/cached_lvol_stat_collector.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/services/capacity_and_stats_collector.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/services/health_check_service.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/services/log_agg_service.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/services/lvol_stat_collector.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/services/main_distr_event_collector.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/services/new_device_discovery.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/services/port_stat_collector.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/services/spdk_http_proxy_server.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/services/storage_node_monitor.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/services/tasks_runner_node_add.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/services/tasks_runner_restart.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/snode_client.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/utils.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/__init__.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/app.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/blueprints/snode_ops.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/blueprints/web_api_lvol.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/blueprints/web_api_pool.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/caching_node_app.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/caching_node_app_k8s.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/node_utils.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/snode_app.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/snode_app_k8s.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/static/delete.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/static/tst.py +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_web/utils.py +0 -0
|
@@ -440,7 +440,6 @@ def _create_jm_stack_on_device(rpc_client, nvme, snode, after_restart):
|
|
|
440
440
|
|
|
441
441
|
|
|
442
442
|
def _create_storage_device_stack(rpc_client, nvme, snode, after_restart):
|
|
443
|
-
db_controller = DBController()
|
|
444
443
|
nvme_bdev = nvme.nvme_bdev
|
|
445
444
|
if snode.enable_test_device:
|
|
446
445
|
test_name = f"{nvme.nvme_bdev}_test"
|
|
@@ -479,7 +478,6 @@ def _create_storage_device_stack(rpc_client, nvme, snode, after_restart):
|
|
|
479
478
|
logger.error(f"Failed to create pt noexcl bdev: {pt_name}")
|
|
480
479
|
return False
|
|
481
480
|
|
|
482
|
-
cluster = db_controller.get_cluster_by_id(snode.cluster_id)
|
|
483
481
|
subsystem_nqn = snode.subsystem + ":dev:" + alceml_id
|
|
484
482
|
logger.info("creating subsystem %s", subsystem_nqn)
|
|
485
483
|
ret = rpc_client.subsystem_create(subsystem_nqn, 'sbcli-cn', alceml_id)
|
|
@@ -494,7 +492,7 @@ def _create_storage_device_stack(rpc_client, nvme, snode, after_restart):
|
|
|
494
492
|
if ty['trtype'] == tr_type:
|
|
495
493
|
found = True
|
|
496
494
|
if found is False:
|
|
497
|
-
ret = rpc_client.transport_create(tr_type
|
|
495
|
+
ret = rpc_client.transport_create(tr_type)
|
|
498
496
|
logger.info("adding listener for %s on IP %s" % (subsystem_nqn, iface.ip4_address))
|
|
499
497
|
ret = rpc_client.listeners_create(subsystem_nqn, tr_type, iface.ip4_address, "4420")
|
|
500
498
|
IP = iface.ip4_address
|
|
@@ -541,7 +539,7 @@ def _create_device_partitions(rpc_client, nvme, snode, num_partitions_per_dev, j
|
|
|
541
539
|
return True
|
|
542
540
|
|
|
543
541
|
|
|
544
|
-
def _prepare_cluster_devices_partitions(snode, devices):
|
|
542
|
+
def _prepare_cluster_devices_partitions(snode, devices, without_jm=False):
|
|
545
543
|
db_controller = DBController()
|
|
546
544
|
rpc_client = RPCClient(
|
|
547
545
|
snode.mgmt_ip, snode.rpc_port,
|
|
@@ -596,17 +594,20 @@ def _prepare_cluster_devices_partitions(snode, devices):
|
|
|
596
594
|
if not jm_device:
|
|
597
595
|
logger.error(f"Failed to create JM device")
|
|
598
596
|
return False
|
|
597
|
+
if without_jm:
|
|
598
|
+
jm_device.status = JMDevice.STATUS_REMOVED
|
|
599
599
|
snode.jm_device = jm_device
|
|
600
600
|
|
|
601
601
|
return True
|
|
602
602
|
|
|
603
603
|
|
|
604
|
-
def _prepare_cluster_devices_jm_on_dev(snode, devices):
|
|
604
|
+
def _prepare_cluster_devices_jm_on_dev(snode, devices, without_jm=False):
|
|
605
605
|
db_controller = DBController()
|
|
606
606
|
|
|
607
|
-
jm_device = devices[0]
|
|
608
607
|
# Set device cluster order
|
|
609
608
|
dev_order = get_next_cluster_device_order(db_controller, snode.cluster_id)
|
|
609
|
+
|
|
610
|
+
jm_device = devices[0]
|
|
610
611
|
for index, nvme in enumerate(devices):
|
|
611
612
|
if nvme.size < jm_device.size:
|
|
612
613
|
jm_device = nvme
|
|
@@ -626,6 +627,8 @@ def _prepare_cluster_devices_jm_on_dev(snode, devices):
|
|
|
626
627
|
if not jm_device:
|
|
627
628
|
logger.error(f"Failed to create JM device")
|
|
628
629
|
return False
|
|
630
|
+
if without_jm:
|
|
631
|
+
jm_device.status = JMDevice.STATUS_REMOVED
|
|
629
632
|
snode.jm_device = jm_device
|
|
630
633
|
else:
|
|
631
634
|
new_device = _create_storage_device_stack(rpc_client, nvme, snode, after_restart=False)
|
|
@@ -653,7 +656,8 @@ def _prepare_cluster_devices_on_restart(snode):
|
|
|
653
656
|
|
|
654
657
|
for index, nvme in enumerate(snode.nvme_devices):
|
|
655
658
|
|
|
656
|
-
if nvme.status not in [NVMeDevice.STATUS_ONLINE, NVMeDevice.STATUS_UNAVAILABLE,
|
|
659
|
+
if nvme.status not in [NVMeDevice.STATUS_ONLINE, NVMeDevice.STATUS_UNAVAILABLE,
|
|
660
|
+
NVMeDevice.STATUS_READONLY, NVMeDevice.STATUS_NEW]:
|
|
657
661
|
logger.debug(f"Device is skipped: {nvme.get_id()}, status: {nvme.status}")
|
|
658
662
|
continue
|
|
659
663
|
|
|
@@ -661,11 +665,14 @@ def _prepare_cluster_devices_on_restart(snode):
|
|
|
661
665
|
if not dev:
|
|
662
666
|
logger.error(f"Failed to create dev stack {nvme.get_id()}")
|
|
663
667
|
return False
|
|
664
|
-
nvme.status
|
|
665
|
-
|
|
668
|
+
if nvme.status == NVMeDevice.STATUS_ONLINE:
|
|
669
|
+
device_events.device_restarted(dev)
|
|
666
670
|
|
|
667
671
|
# prepare JM device
|
|
668
672
|
jm_device = snode.jm_device
|
|
673
|
+
if jm_device is None or jm_device.status == JMDevice.STATUS_REMOVED:
|
|
674
|
+
return True
|
|
675
|
+
|
|
669
676
|
if jm_device.jm_nvme_bdev_list:
|
|
670
677
|
all_bdevs_found = True
|
|
671
678
|
for bdev_name in jm_device.jm_nvme_bdev_list:
|
|
@@ -722,7 +729,6 @@ def _prepare_cluster_devices_on_restart(snode):
|
|
|
722
729
|
logger.error(f"Failed to create pt noexcl bdev: {pt_name}")
|
|
723
730
|
return False
|
|
724
731
|
|
|
725
|
-
cluster = db_controller.get_cluster_by_id(snode.cluster_id)
|
|
726
732
|
subsystem_nqn = snode.subsystem + ":dev:" + jm_bdev
|
|
727
733
|
logger.info("creating subsystem %s", subsystem_nqn)
|
|
728
734
|
ret = rpc_client.subsystem_create(subsystem_nqn, 'sbcli-cn', jm_bdev)
|
|
@@ -737,7 +743,7 @@ def _prepare_cluster_devices_on_restart(snode):
|
|
|
737
743
|
if ty['trtype'] == tr_type:
|
|
738
744
|
found = True
|
|
739
745
|
if found is False:
|
|
740
|
-
ret = rpc_client.transport_create(tr_type
|
|
746
|
+
ret = rpc_client.transport_create(tr_type)
|
|
741
747
|
logger.info("adding listener for %s on IP %s" % (subsystem_nqn, iface.ip4_address))
|
|
742
748
|
ret = rpc_client.listeners_create(subsystem_nqn, tr_type, iface.ip4_address, "4420")
|
|
743
749
|
IP = iface.ip4_address
|
|
@@ -1483,6 +1489,8 @@ def restart_storage_node(
|
|
|
1483
1489
|
'net_type': device['net_type']}))
|
|
1484
1490
|
snode.data_nics = data_nics
|
|
1485
1491
|
snode.hostname = node_info['hostname']
|
|
1492
|
+
else:
|
|
1493
|
+
node_ip = None
|
|
1486
1494
|
|
|
1487
1495
|
logger.info(f"Restarting Storage node: {snode.mgmt_ip}")
|
|
1488
1496
|
snode_api = SNodeClient(snode.api_endpoint, timeout=5*60, retry=3)
|
|
@@ -1678,6 +1686,7 @@ def restart_storage_node(
|
|
|
1678
1686
|
known_devices_sn = []
|
|
1679
1687
|
devices_sn = [d.serial_number for d in nvme_devs]
|
|
1680
1688
|
for db_dev in snode.nvme_devices:
|
|
1689
|
+
# if db_dev.status != NVMeDevice.STATUS_NEW:
|
|
1681
1690
|
known_devices_sn.append(db_dev.serial_number)
|
|
1682
1691
|
if db_dev.status == NVMeDevice.STATUS_FAILED_AND_MIGRATED:
|
|
1683
1692
|
continue
|
|
@@ -1706,9 +1715,9 @@ def restart_storage_node(
|
|
|
1706
1715
|
if node_ip:
|
|
1707
1716
|
# prepare devices on new node
|
|
1708
1717
|
if snode.num_partitions_per_dev == 0 or snode.jm_percent == 0:
|
|
1709
|
-
ret = _prepare_cluster_devices_jm_on_dev(snode, nvme_devs)
|
|
1718
|
+
ret = _prepare_cluster_devices_jm_on_dev(snode, nvme_devs, without_jm=False)
|
|
1710
1719
|
else:
|
|
1711
|
-
ret = _prepare_cluster_devices_partitions(snode, nvme_devs)
|
|
1720
|
+
ret = _prepare_cluster_devices_partitions(snode, nvme_devs, without_jm=False)
|
|
1712
1721
|
if not ret:
|
|
1713
1722
|
logger.error("Failed to prepare cluster devices")
|
|
1714
1723
|
# return False
|
|
@@ -2062,6 +2071,9 @@ def resume_storage_node(node_id):
|
|
|
2062
2071
|
logger.info("Connecting to remote devices")
|
|
2063
2072
|
snode = db_controller.get_storage_node_by_id(node_id)
|
|
2064
2073
|
snode.remote_devices = _connect_to_remote_devs(snode)
|
|
2074
|
+
if snode.enable_ha_jm:
|
|
2075
|
+
snode.remote_jm_devices = _connect_to_remote_jm_devs(snode)
|
|
2076
|
+
|
|
2065
2077
|
snode.write_to_db(db_controller.kv_store)
|
|
2066
2078
|
|
|
2067
2079
|
rpc_client = RPCClient(
|
|
@@ -2658,7 +2670,7 @@ def get_next_ha_jms(current_node):
|
|
|
2658
2670
|
|
|
2659
2671
|
def get_node_jm_names(current_node):
|
|
2660
2672
|
jm_list = []
|
|
2661
|
-
if current_node.jm_device:
|
|
2673
|
+
if current_node.jm_device and current_node.jm_device.status == JMDevice.STATUS_ONLINE:
|
|
2662
2674
|
jm_list.append(current_node.jm_device.jm_bdev)
|
|
2663
2675
|
else:
|
|
2664
2676
|
jm_list.append("JM_LOCAL")
|
|
@@ -2683,6 +2695,7 @@ def create_lvstore(snode, ndcs, npcs, distr_bs, distr_chunk_bs, page_size_in_blo
|
|
|
2683
2695
|
online_jms = get_next_ha_jms(snode)
|
|
2684
2696
|
logger.debug(f"online_jms: {str(online_jms)}")
|
|
2685
2697
|
snode.remote_jm_devices = _connect_to_remote_jm_devs(snode, online_jms)
|
|
2698
|
+
snode.jm_vuid = jm_vuid
|
|
2686
2699
|
snode.write_to_db()
|
|
2687
2700
|
|
|
2688
2701
|
for _ in range(snode.number_of_distribs):
|
|
@@ -2787,6 +2800,11 @@ def _create_bdev_stack(snode, lvstore_stack=None):
|
|
|
2787
2800
|
ret = rpc_client.bdev_PT_NoExcl_create(**params)
|
|
2788
2801
|
|
|
2789
2802
|
elif type == "bdev_raid":
|
|
2803
|
+
# sync jm
|
|
2804
|
+
if snode.jm_vuid:
|
|
2805
|
+
ret = rpc_client.jc_explicit_synchronization(snode.jm_vuid)
|
|
2806
|
+
logger.info(f"JM Sync res: {ret}")
|
|
2807
|
+
time.sleep(10)
|
|
2790
2808
|
distribs_list = bdev["distribs_list"]
|
|
2791
2809
|
strip_size_kb = params["strip_size_kb"]
|
|
2792
2810
|
ret = rpc_client.bdev_raid_create(name, distribs_list, strip_size_kb=strip_size_kb)
|
|
@@ -2877,13 +2895,25 @@ def make_sec_new_primary(node_id):
|
|
|
2877
2895
|
logger.error(f"snode not found: {node_id}")
|
|
2878
2896
|
return False
|
|
2879
2897
|
|
|
2898
|
+
dev_order = get_next_cluster_device_order(db_controller, snode.cluster_id)
|
|
2880
2899
|
for dev in snode.nvme_devices:
|
|
2881
|
-
if dev.status == NVMeDevice.
|
|
2882
|
-
|
|
2900
|
+
if dev.status == NVMeDevice.STATUS_NEW:
|
|
2901
|
+
dev.cluster_device_order = dev_order
|
|
2902
|
+
dev_order += 1
|
|
2903
|
+
snode.write_to_db()
|
|
2883
2904
|
|
|
2884
2905
|
for dev in snode.nvme_devices:
|
|
2885
2906
|
if dev.status == NVMeDevice.STATUS_NEW:
|
|
2886
|
-
device_controller.
|
|
2907
|
+
device_controller.device_set_state(dev.get_id(), NVMeDevice.STATUS_ONLINE)
|
|
2908
|
+
tasks_controller.add_new_device_mig_task(dev.get_id())
|
|
2909
|
+
|
|
2910
|
+
for node in db_controller.get_storage_nodes_by_cluster_id(snode.cluster_id):
|
|
2911
|
+
if node.status == StorageNode.STATUS_ONLINE:
|
|
2912
|
+
send_cluster_map(node.get_id())
|
|
2913
|
+
|
|
2914
|
+
for dev in snode.nvme_devices:
|
|
2915
|
+
if dev.status == NVMeDevice.STATUS_REMOVED:
|
|
2916
|
+
device_controller.device_set_failed(dev.get_id())
|
|
2887
2917
|
|
|
2888
2918
|
snode = db_controller.get_storage_node_by_id(node_id)
|
|
2889
2919
|
snode.primary_ip = snode.mgmt_ip
|
|
@@ -2892,29 +2922,28 @@ def make_sec_new_primary(node_id):
|
|
|
2892
2922
|
|
|
2893
2923
|
|
|
2894
2924
|
def dump_lvstore(node_id):
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
# return file_content
|
|
2925
|
+
db_controller = DBController()
|
|
2926
|
+
|
|
2927
|
+
snode = db_controller.get_storage_node_by_id(node_id)
|
|
2928
|
+
if not snode:
|
|
2929
|
+
logger.error(f"Can not find storage node: {node_id}")
|
|
2930
|
+
return False
|
|
2931
|
+
|
|
2932
|
+
if not snode.lvstore:
|
|
2933
|
+
logger.error("Storage node does not have lvstore")
|
|
2934
|
+
return False
|
|
2935
|
+
|
|
2936
|
+
rpc_client = RPCClient(snode.mgmt_ip, snode.rpc_port, snode.rpc_username, snode.rpc_password, timeout=180)
|
|
2937
|
+
logger.info(f"Dumping lvstore data on node: {snode.get_id()}")
|
|
2938
|
+
file_name = f"LVS_dump_{snode.hostname}_{snode.lvstore}_{str(datetime.datetime.now().isoformat())}.txt"
|
|
2939
|
+
file_path = f"/etc/simplyblock/{file_name}"
|
|
2940
|
+
ret = rpc_client.bdev_lvs_dump(snode.lvstore, file_path)
|
|
2941
|
+
if not ret:
|
|
2942
|
+
logger.error("faild to dump lvstore data")
|
|
2943
|
+
return False
|
|
2944
|
+
|
|
2945
|
+
logger.info(f"LVS dump file path: {file_name}")
|
|
2946
|
+
snode_api = SNodeClient(f"{snode.mgmt_ip}:5000")
|
|
2947
|
+
file_content, _ = snode_api.get_file_content(file_name)
|
|
2948
|
+
|
|
2949
|
+
return file_content
|
|
@@ -446,3 +446,13 @@ def spdk_process_is_up():
|
|
|
446
446
|
else:
|
|
447
447
|
return utils.get_response(False, f"SPDK container is not running")
|
|
448
448
|
|
|
449
|
+
|
|
450
|
+
@bp.route('/get_file_content/<string:file_name>', methods=['GET'])
|
|
451
|
+
def get_file_content(file_name):
|
|
452
|
+
out, err, _ = node_utils.run_command(f"cat /etc/simplyblock/{file_name}")
|
|
453
|
+
if out:
|
|
454
|
+
return utils.get_response(out)
|
|
455
|
+
elif err:
|
|
456
|
+
err = err.decode("utf-8")
|
|
457
|
+
logger.debug(err)
|
|
458
|
+
return utils.get_response(None, err)
|
|
@@ -45,10 +45,9 @@ def add_cluster():
|
|
|
45
45
|
distr_chunk_bs = cl_data.get('distr_chunk_bs', 4096)
|
|
46
46
|
ha_type = cl_data.get('ha_type', 'single')
|
|
47
47
|
enable_node_affinity = cl_data.get('enable_node_affinity', False)
|
|
48
|
-
qpair_count = cl_data.get('qpair_count', 256)
|
|
49
48
|
|
|
50
49
|
ret = cluster_ops.add_cluster(blk_size, page_size_in_blocks, cap_warn, cap_crit, prov_cap_warn, prov_cap_crit,
|
|
51
|
-
distr_ndcs, distr_npcs, distr_bs, distr_chunk_bs, ha_type, enable_node_affinity
|
|
50
|
+
distr_ndcs, distr_npcs, distr_bs, distr_chunk_bs, ha_type, enable_node_affinity)
|
|
52
51
|
|
|
53
52
|
return utils.get_response(ret)
|
|
54
53
|
|
|
@@ -198,7 +198,10 @@ def storage_node_add():
|
|
|
198
198
|
max_snap = int(req_data.get('max_snap', 500))
|
|
199
199
|
max_prov = req_data['max_prov']
|
|
200
200
|
number_of_distribs = int(req_data.get('number_of_distribs', 4))
|
|
201
|
-
|
|
201
|
+
if req_data.get('disable_ha_jm', "") == "true":
|
|
202
|
+
disable_ha_jm = True
|
|
203
|
+
else:
|
|
204
|
+
disable_ha_jm = False
|
|
202
205
|
enable_test_device = bool(req_data.get('enable_test_device', False))
|
|
203
206
|
|
|
204
207
|
spdk_image = None
|
|
@@ -33,6 +33,9 @@ spec:
|
|
|
33
33
|
- name: foundationdb
|
|
34
34
|
hostPath:
|
|
35
35
|
path: /etc/foundationdb
|
|
36
|
+
- name: etc-simplyblock
|
|
37
|
+
hostPath:
|
|
38
|
+
path: /etc/simplyblock
|
|
36
39
|
- name: host-modules
|
|
37
40
|
hostPath:
|
|
38
41
|
path: /lib/modules
|
|
@@ -94,6 +97,8 @@ spec:
|
|
|
94
97
|
mountPath: /dev
|
|
95
98
|
- name: script-volume
|
|
96
99
|
mountPath: /script
|
|
100
|
+
- name: etc-simplyblock
|
|
101
|
+
mountPath: /etc/simplyblock
|
|
97
102
|
resources:
|
|
98
103
|
limits:
|
|
99
104
|
hugepages-2Mi: {{ MEM_GEGA }}Gi
|
|
@@ -117,7 +122,10 @@ spec:
|
|
|
117
122
|
value: "{{ RPC_USERNAME }}"
|
|
118
123
|
- name: RPC_PASSWORD
|
|
119
124
|
value: "{{ RPC_PASSWORD }}"
|
|
120
|
-
|
|
125
|
+
- name: MULTI_THREADING_ENABLED
|
|
126
|
+
value: "True"
|
|
127
|
+
- name: TIMEOUT
|
|
128
|
+
value: "300"
|
|
121
129
|
- name: fluentd
|
|
122
130
|
image: fluent/fluentd-kubernetes-daemonset:v1.17.1-debian-graylog-1.2
|
|
123
131
|
imagePullPolicy: "Always"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/controllers/caching_node_controller.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
|
{sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/scripts/clean_local_storage_deploy.sh
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/scripts/dashboards/node-exporter.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/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
|
{sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/services/cached_lvol_stat_collector.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/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
|
{sbcli_dev-4.0.65 → sbcli_dev-4.0.67}/simplyblock_core/services/main_distr_event_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
|