sbcli-dev 4.0.6__zip → 4.0.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_dev-4.0.6 → sbcli_dev-4.0.7}/PKG-INFO +1 -1
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/env_var +1 -1
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/sbcli_dev.egg-info/PKG-INFO +1 -1
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/controllers/device_controller.py +72 -44
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/storage_node_ops.py +3 -4
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/README.md +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/pyproject.toml +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/sbcli_dev.egg-info/SOURCES.txt +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/sbcli_dev.egg-info/dependency_links.txt +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/sbcli_dev.egg-info/entry_points.txt +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/sbcli_dev.egg-info/requires.txt +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/sbcli_dev.egg-info/top_level.txt +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/setup.cfg +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/setup.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_cli/cli.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_cli/main.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/__init__.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/cluster_ops.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/compute_node_ops.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/constants.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/controllers/events_controller.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/controllers/health_controller.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/controllers/lvol_controller.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/controllers/pool_controller.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/controllers/snapshot_controller.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/controllers/tasks_controller.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/distr_controller.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/kv_store.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/mgmt_node_ops.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/models/cluster.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/models/compute_node.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/models/deployer.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/models/events.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/models/global_settings.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/models/iface.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/models/job_schedule.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/models/lvol_model.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/models/nvme_device.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/models/pool.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/models/stats.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/models/storage_node.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/rpc_client.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/scripts/__init__.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/scripts/dashboard.yml +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/scripts/deploy_stack.sh +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/scripts/docker-compose-swarm.yml +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/scripts/objstore.yml +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/scripts/prometheus.yml +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/services/cached_lvol_stat_collector.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/services/capacity_and_stats_collector.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/services/health_check_service.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/services/log_agg_service.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/services/lvol_stat_collector.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/services/main_distr_event_collector.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/services/new_device_discovery.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/services/port_stat_collector.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/services/spdk_http_proxy_server.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/services/storage_node_monitor.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/services/tasks_runner_failed_migration.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/services/tasks_runner_migration.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/services/tasks_runner_new_dev_migration.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/services/tasks_runner_node_add.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/services/tasks_runner_restart.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/snode_client.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/utils.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/__init__.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/app.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/blueprints/snode_ops.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/blueprints/snode_ops_k8s.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/blueprints/web_api_cluster.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/blueprints/web_api_lvol.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/blueprints/web_api_pool.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/blueprints/web_api_storage_node.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/caching_node_app.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/caching_node_app_k8s.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/node_utils.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/snode_app.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/snode_app_k8s.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/static/delete.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/static/tst.py +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_web/utils.py +0 -0
|
@@ -620,64 +620,91 @@ def add_device(device_id):
|
|
|
620
620
|
break
|
|
621
621
|
|
|
622
622
|
logger.info(f"Adding device {device_id}")
|
|
623
|
+
if snode.num_partitions_per_dev == 0:
|
|
624
|
+
ret = _def_create_device_stack(device_obj, snode)
|
|
625
|
+
if not ret:
|
|
626
|
+
logger.error("Failed to create device stack")
|
|
627
|
+
return False
|
|
628
|
+
dev_order = storage_node_ops.get_next_cluster_device_order(db_controller, snode.cluster_id)
|
|
629
|
+
device_obj.cluster_device_order = dev_order
|
|
630
|
+
logger.info("Setting device online")
|
|
631
|
+
device_obj.status = NVMeDevice.STATUS_ONLINE
|
|
632
|
+
snode.write_to_db(db_controller.kv_store)
|
|
633
|
+
device_events.device_create(device_obj)
|
|
623
634
|
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
635
|
+
logger.info("Make other nodes connect to the node devices")
|
|
636
|
+
snodes = db_controller.get_storage_nodes_by_cluster_id(snode.cluster_id)
|
|
637
|
+
for node in snodes:
|
|
638
|
+
if node.get_id() == snode.get_id() or node.status != StorageNode.STATUS_ONLINE:
|
|
639
|
+
continue
|
|
640
|
+
node.remote_devices = storage_node_ops._connect_to_remote_devs(node)
|
|
641
|
+
node.write_to_db()
|
|
628
642
|
|
|
629
|
-
|
|
630
|
-
|
|
643
|
+
tasks_controller.add_new_device_mig_task(device_id)
|
|
644
|
+
return device_id
|
|
631
645
|
|
|
632
|
-
logger.info("Setting device online")
|
|
633
|
-
device_obj.status = NVMeDevice.STATUS_ONLINE
|
|
634
|
-
snode.write_to_db(db_controller.kv_store)
|
|
635
646
|
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
647
|
+
# create partitions
|
|
648
|
+
partitions = snode.num_partitions_per_dev
|
|
649
|
+
rpc_client = RPCClient(snode.mgmt_ip, snode.rpc_port, snode.rpc_username, snode.rpc_password)
|
|
650
|
+
# look for partitions
|
|
651
|
+
partitioned_devices = storage_node_ops._search_for_partitions(rpc_client, device_obj)
|
|
652
|
+
logger.debug("partitioned_devices")
|
|
653
|
+
logger.debug(partitioned_devices)
|
|
654
|
+
if len(partitioned_devices) == partitions+1:
|
|
655
|
+
logger.info("Partitioned devices found")
|
|
656
|
+
else:
|
|
657
|
+
logger.info(f"Creating partitions for {device_obj.nvme_bdev}")
|
|
658
|
+
storage_node_ops._create_device_partitions(rpc_client, device_obj, snode, partitions, snode.jm_percent)
|
|
659
|
+
partitioned_devices = storage_node_ops._search_for_partitions(rpc_client, device_obj)
|
|
660
|
+
if len(partitioned_devices) == partitions+1:
|
|
661
|
+
logger.info("Device partitions created")
|
|
662
|
+
else:
|
|
663
|
+
logger.error("Failed to create partitions")
|
|
664
|
+
return False
|
|
643
665
|
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
666
|
+
jm_part = partitioned_devices.pop(0)
|
|
667
|
+
new_devices = []
|
|
668
|
+
dev_order = storage_node_ops.get_next_cluster_device_order(db_controller, snode.cluster_id)
|
|
669
|
+
for dev in partitioned_devices:
|
|
670
|
+
new_device = storage_node_ops._create_storage_device_stack(rpc_client, dev, snode, after_restart=False)
|
|
671
|
+
if not new_device:
|
|
672
|
+
logger.error("failed to create dev stack")
|
|
650
673
|
continue
|
|
651
674
|
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
idx = i
|
|
657
|
-
break
|
|
658
|
-
if idx >= 0:
|
|
659
|
-
node.remote_devices[idx] = device_obj
|
|
660
|
-
else:
|
|
661
|
-
node.remote_devices.append(device_obj)
|
|
662
|
-
node.write_to_db(db_controller.kv_store)
|
|
663
|
-
time.sleep(1)
|
|
675
|
+
new_device.cluster_device_order = dev_order
|
|
676
|
+
dev_order += 1
|
|
677
|
+
device_events.device_create(new_device)
|
|
678
|
+
new_devices.append(new_device)
|
|
664
679
|
|
|
665
|
-
|
|
680
|
+
if new_devices:
|
|
681
|
+
snode.nvme_devices.remove(device_obj)
|
|
682
|
+
snode.nvme_devices.extend(new_devices)
|
|
683
|
+
snode.write_to_db(db_controller.kv_store)
|
|
684
|
+
else:
|
|
685
|
+
logger.error("failed to create devices")
|
|
686
|
+
return False
|
|
666
687
|
|
|
667
|
-
|
|
688
|
+
logger.info("Make other nodes connect to the node devices")
|
|
689
|
+
snodes = db_controller.get_storage_nodes_by_cluster_id(snode.cluster_id)
|
|
690
|
+
for node in snodes:
|
|
691
|
+
if node.get_id() == snode.get_id() or node.status != StorageNode.STATUS_ONLINE:
|
|
692
|
+
continue
|
|
693
|
+
node.remote_devices = storage_node_ops._connect_to_remote_devs(node)
|
|
694
|
+
node.write_to_db()
|
|
668
695
|
|
|
669
|
-
|
|
696
|
+
for dev in new_devices:
|
|
697
|
+
tasks_controller.add_new_device_mig_task(dev.get_id())
|
|
670
698
|
|
|
671
699
|
# add to jm raid
|
|
672
|
-
if snode.jm_device and snode.jm_device.raid_bdev:
|
|
700
|
+
if snode.jm_device and snode.jm_device.raid_bdev and jm_part:
|
|
673
701
|
# looking for jm partition
|
|
674
|
-
|
|
675
|
-
jm_dev_part = f"{dev.nvme_bdev[:-2]}p1"
|
|
702
|
+
jm_dev_part = jm_part.nvme_bdev
|
|
676
703
|
ret = rpc_client.get_bdevs(jm_dev_part)
|
|
677
704
|
if ret:
|
|
678
705
|
logger.info(f"JM part found: {jm_dev_part}")
|
|
679
|
-
if snode.jm_device.status
|
|
680
|
-
restart_jm_device(snode.jm_device.get_id(), force=True)
|
|
706
|
+
if snode.jm_device.status in [JMDevice.STATUS_UNAVAILABLE, JMDevice.STATUS_REMOVED]:
|
|
707
|
+
restart_jm_device(snode.jm_device.get_id(), force=True, format_alceml=True)
|
|
681
708
|
|
|
682
709
|
if snode.jm_device.status == JMDevice.STATUS_ONLINE and \
|
|
683
710
|
jm_dev_part not in snode.jm_device.jm_nvme_bdev_list:
|
|
@@ -774,7 +801,7 @@ def remove_jm_device(device_id, force=False):
|
|
|
774
801
|
return True
|
|
775
802
|
|
|
776
803
|
|
|
777
|
-
def restart_jm_device(device_id, force=False):
|
|
804
|
+
def restart_jm_device(device_id, force=False, format_alceml=False):
|
|
778
805
|
db_controller = DBController()
|
|
779
806
|
jm_device = None
|
|
780
807
|
snode = None
|
|
@@ -806,7 +833,8 @@ def restart_jm_device(device_id, force=False):
|
|
|
806
833
|
jm_nvme_bdevs.append(dev_part)
|
|
807
834
|
|
|
808
835
|
if len(jm_nvme_bdevs) > 0:
|
|
809
|
-
new_jm = storage_node_ops._create_jm_stack_on_raid(
|
|
836
|
+
new_jm = storage_node_ops._create_jm_stack_on_raid(
|
|
837
|
+
rpc_client, jm_nvme_bdevs, snode, after_restart=not format_alceml)
|
|
810
838
|
if not new_jm:
|
|
811
839
|
logger.error("failed to create jm stack")
|
|
812
840
|
return False
|
|
@@ -514,15 +514,14 @@ def _create_storage_device_stack(rpc_client, nvme, snode, after_restart):
|
|
|
514
514
|
return nvme
|
|
515
515
|
|
|
516
516
|
|
|
517
|
-
def _create_device_partitions(rpc_client, nvme, snode):
|
|
517
|
+
def _create_device_partitions(rpc_client, nvme, snode, num_partitions_per_dev, jm_percent):
|
|
518
518
|
nbd_device = rpc_client.nbd_start_disk(nvme.nvme_bdev)
|
|
519
519
|
time.sleep(3)
|
|
520
520
|
if not nbd_device:
|
|
521
521
|
logger.error(f"Failed to start nbd dev")
|
|
522
522
|
return False
|
|
523
523
|
snode_api = SNodeClient(snode.api_endpoint)
|
|
524
|
-
result, error = snode_api.make_gpt_partitions(
|
|
525
|
-
nbd_device, snode.jm_percent, snode.num_partitions_per_dev)
|
|
524
|
+
result, error = snode_api.make_gpt_partitions(nbd_device, jm_percent, num_partitions_per_dev)
|
|
526
525
|
if error:
|
|
527
526
|
logger.error(f"Failed to make partitions")
|
|
528
527
|
logger.error(error)
|
|
@@ -563,7 +562,7 @@ def _prepare_cluster_devices_partitions(snode, devices):
|
|
|
563
562
|
logger.info("Partitioned devices found")
|
|
564
563
|
else:
|
|
565
564
|
logger.info(f"Creating partitions for {nvme.nvme_bdev}")
|
|
566
|
-
_create_device_partitions(rpc_client, nvme, snode)
|
|
565
|
+
_create_device_partitions(rpc_client, nvme, snode, snode.num_partitions_per_dev, snode.jm_percent)
|
|
567
566
|
partitioned_devices = _search_for_partitions(rpc_client, nvme)
|
|
568
567
|
if len(partitioned_devices) == (1 + snode.num_partitions_per_dev):
|
|
569
568
|
logger.info("Device partitions created")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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.6 → sbcli_dev-4.0.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
|
|
File without changes
|
{sbcli_dev-4.0.6 → sbcli_dev-4.0.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
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-4.0.6 → sbcli_dev-4.0.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
|
{sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/simplyblock_core/services/tasks_runner_failed_migration.py
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-4.0.6 → sbcli_dev-4.0.7}/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
|