sbcli-dev 10.4.4__tar.gz → 10.4.5__tar.gz
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-10.4.4 → sbcli_dev-10.4.5}/PKG-INFO +1 -1
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/sbcli_dev.egg-info/PKG-INFO +1 -1
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/controllers/device_controller.py +161 -134
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/env_var +1 -1
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/README.md +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/pyproject.toml +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/requirements.txt +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/sbcli_dev.egg-info/SOURCES.txt +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/sbcli_dev.egg-info/dependency_links.txt +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/sbcli_dev.egg-info/entry_points.txt +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/sbcli_dev.egg-info/requires.txt +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/sbcli_dev.egg-info/top_level.txt +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/setup.cfg +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/setup.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_cli/__init__.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_cli/cli.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_cli/main.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/__init__.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/cluster_ops.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/constants.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/controllers/events_controller.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/controllers/health_controller.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/controllers/lvol_controller.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/controllers/pool_controller.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/controllers/snapshot_controller.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/controllers/tasks_controller.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/db_controller.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/distr_controller.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/mgmt_node_ops.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/models/cluster.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/models/deployer.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/models/events.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/models/iface.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/models/job_schedule.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/models/lvol_model.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/models/nvme_device.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/models/pool.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/models/stats.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/models/storage_node.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/rpc_client.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/scripts/__init__.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/scripts/dashboard.yml +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/scripts/deploy_fdb.sh +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/scripts/deploy_stack.sh +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/scripts/docker-compose-swarm.yml +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/scripts/foundation.yml +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/scripts/objstore.yml +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/scripts/prepare_fdb.sh +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/scripts/prometheus.yml +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/services/cached_lvol_stat_collector.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/services/capacity_and_stats_collector.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/services/health_check_service.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/services/log_agg_service.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/services/lvol_stat_collector.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/services/main_distr_event_collector.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/services/new_device_discovery.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/services/port_stat_collector.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/services/spdk_http_proxy_server.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/services/storage_node_monitor.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/services/tasks_runner_failed_migration.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/services/tasks_runner_migration.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/services/tasks_runner_new_dev_migration.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/services/tasks_runner_node_add.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/services/tasks_runner_restart.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/snode_client.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/storage_node_ops.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/utils.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/workers/cleanup_foundationdb.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/README.md +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/__init__.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/app.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/blueprints/snode_ops.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/blueprints/snode_ops_k8s.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/blueprints/web_api_cluster.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/blueprints/web_api_lvol.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/blueprints/web_api_pool.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/blueprints/web_api_storage_node.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/caching_node_app.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/caching_node_app_k8s.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/node_utils.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/requirements.txt +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/snode_app.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/snode_app_k8s.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/static/delete.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/static/tst.py +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_web/utils.py +0 -0
|
@@ -118,64 +118,92 @@ def _def_create_device_stack(device_obj, snode, force=False):
|
|
|
118
118
|
rpc_client = RPCClient(
|
|
119
119
|
snode.mgmt_ip, snode.rpc_port,
|
|
120
120
|
snode.rpc_username, snode.rpc_password,
|
|
121
|
-
timeout=600
|
|
122
|
-
|
|
121
|
+
timeout=600)
|
|
122
|
+
|
|
123
|
+
bdev_names = []
|
|
124
|
+
for dev in rpc_client.get_bdevs():
|
|
125
|
+
bdev_names.append(dev['name'])
|
|
126
|
+
|
|
123
127
|
nvme_bdev = device_obj.nvme_bdev
|
|
124
128
|
if snode.enable_test_device:
|
|
125
129
|
test_name = f"{device_obj.nvme_bdev}_test"
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
if test_name not in bdev_names:
|
|
131
|
+
# create testing bdev
|
|
132
|
+
ret = rpc_client.bdev_passtest_create(test_name, device_obj.nvme_bdev)
|
|
133
|
+
if not ret:
|
|
134
|
+
logger.error(f"Failed to create bdev: {test_name}")
|
|
135
|
+
if not force:
|
|
136
|
+
return False
|
|
137
|
+
else:
|
|
138
|
+
logger.info(f"bdev already exists {test_name}")
|
|
139
|
+
device_obj.testing_bdev = test_name
|
|
132
140
|
nvme_bdev = test_name
|
|
133
141
|
|
|
134
142
|
alceml_id = device_obj.get_id()
|
|
135
143
|
alceml_name = get_alceml_name(alceml_id)
|
|
136
|
-
logger.info(f"adding {alceml_name}")
|
|
137
144
|
|
|
138
|
-
if
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
+
if alceml_name not in bdev_names:
|
|
146
|
+
logger.info(f"adding {alceml_name}")
|
|
147
|
+
if snode.alceml_cpu_cores:
|
|
148
|
+
alceml_cpu_mask = utils.decimal_to_hex_power_of_2(snode.alceml_cpu_cores[snode.alceml_cpu_index])
|
|
149
|
+
ret = rpc_client.bdev_alceml_create(alceml_name, nvme_bdev, alceml_id, pba_init_mode=2,
|
|
150
|
+
alceml_cpu_mask=alceml_cpu_mask)
|
|
151
|
+
snode.alceml_cpu_index = (snode.alceml_cpu_index + 1) % len(snode.alceml_cpu_cores)
|
|
152
|
+
else:
|
|
153
|
+
ret = rpc_client.bdev_alceml_create(alceml_name, nvme_bdev, alceml_id, pba_init_mode=2)
|
|
145
154
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
155
|
+
if not ret:
|
|
156
|
+
logger.error(f"Failed to create alceml bdev: {alceml_name}")
|
|
157
|
+
if not force:
|
|
158
|
+
return False
|
|
159
|
+
else:
|
|
160
|
+
logger.info(f"bdev already exists {alceml_name}")
|
|
150
161
|
|
|
151
162
|
# add pass through
|
|
152
163
|
pt_name = f"{alceml_name}_PT"
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
164
|
+
if pt_name not in bdev_names:
|
|
165
|
+
ret = rpc_client.bdev_PT_NoExcl_create(pt_name, alceml_name)
|
|
166
|
+
if not ret:
|
|
167
|
+
logger.error(f"Failed to create pt noexcl bdev: {pt_name}")
|
|
168
|
+
if not force:
|
|
169
|
+
return False
|
|
170
|
+
else:
|
|
171
|
+
logger.info(f"bdev already exists {pt_name}")
|
|
158
172
|
|
|
159
173
|
subsystem_nqn = snode.subsystem + ":dev:" + alceml_id
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
174
|
+
namespace_found = False
|
|
175
|
+
subsys_found = False
|
|
176
|
+
ret = rpc_client.subsystem_list(subsystem_nqn)
|
|
177
|
+
if ret :
|
|
178
|
+
subsys_found = True
|
|
179
|
+
if ret[0]["namespaces"]:
|
|
180
|
+
for ns in ret[0]["namespaces"]:
|
|
181
|
+
if ns['name'] == pt_name:
|
|
182
|
+
namespace_found = True
|
|
183
|
+
break
|
|
184
|
+
|
|
185
|
+
if not subsys_found:
|
|
186
|
+
logger.info("Creating subsystem %s", subsystem_nqn)
|
|
187
|
+
ret = rpc_client.subsystem_create(subsystem_nqn, 'sbcli-cn', alceml_id)
|
|
188
|
+
for iface in snode.data_nics:
|
|
189
|
+
if iface.ip4_address:
|
|
190
|
+
tr_type = iface.get_transport_type()
|
|
191
|
+
ret = rpc_client.listeners_create(subsystem_nqn, tr_type, iface.ip4_address, "4420")
|
|
192
|
+
device_obj.nvmf_ip = iface.ip4_address
|
|
193
|
+
break
|
|
194
|
+
else:
|
|
195
|
+
logger.info(f"subsystem already exists {subsys_found}")
|
|
196
|
+
|
|
197
|
+
if not namespace_found:
|
|
198
|
+
logger.info(f"Adding {pt_name} to the subsystem")
|
|
199
|
+
ret = rpc_client.nvmf_subsystem_add_ns(subsystem_nqn, pt_name)
|
|
200
|
+
else:
|
|
201
|
+
logger.info(f"bdev already added to subsys {pt_name}")
|
|
171
202
|
|
|
172
|
-
if snode.enable_test_device:
|
|
173
|
-
device_obj.testing_bdev = test_name
|
|
174
203
|
device_obj.alceml_bdev = alceml_name
|
|
175
204
|
device_obj.alceml_name = alceml_name
|
|
176
205
|
device_obj.pt_bdev = pt_name
|
|
177
206
|
device_obj.nvmf_nqn = subsystem_nqn
|
|
178
|
-
device_obj.nvmf_ip = IP
|
|
179
207
|
device_obj.nvmf_port = 4420
|
|
180
208
|
return True
|
|
181
209
|
|
|
@@ -592,110 +620,109 @@ def add_device(device_id):
|
|
|
592
620
|
break
|
|
593
621
|
|
|
594
622
|
logger.info(f"Adding device {device_id}")
|
|
595
|
-
if snode.num_partitions_per_dev == 0:
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
return False
|
|
600
|
-
dev_order = storage_node_ops.get_next_cluster_device_order(db_controller, snode.cluster_id)
|
|
601
|
-
device_obj.cluster_device_order = dev_order
|
|
602
|
-
logger.info("Setting device online")
|
|
603
|
-
device_obj.status = NVMeDevice.STATUS_ONLINE
|
|
604
|
-
snode.write_to_db(db_controller.kv_store)
|
|
605
|
-
device_events.device_create(device_obj)
|
|
606
|
-
|
|
607
|
-
logger.info("Make other nodes connect to the node devices")
|
|
608
|
-
snodes = db_controller.get_storage_nodes_by_cluster_id(snode.cluster_id)
|
|
609
|
-
for node in snodes:
|
|
610
|
-
if node.get_id() == snode.get_id() or node.status != StorageNode.STATUS_ONLINE:
|
|
611
|
-
continue
|
|
612
|
-
node.remote_devices = storage_node_ops._connect_to_remote_devs(node, force_conect_restarting_nodes=True)
|
|
613
|
-
node.write_to_db()
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
snodes = db_controller.get_storage_nodes_by_cluster_id(snode.cluster_id)
|
|
617
|
-
for node in snodes:
|
|
618
|
-
if node.status != StorageNode.STATUS_ONLINE:
|
|
619
|
-
continue
|
|
620
|
-
distr_controller.send_cluster_map_add_device(device_obj, node)
|
|
621
|
-
|
|
622
|
-
tasks_controller.add_new_device_mig_task(device_id)
|
|
623
|
-
return device_id
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
# create partitions
|
|
627
|
-
partitions = snode.num_partitions_per_dev
|
|
628
|
-
rpc_client = RPCClient(snode.mgmt_ip, snode.rpc_port, snode.rpc_username, snode.rpc_password)
|
|
629
|
-
# look for partitions
|
|
630
|
-
partitioned_devices = storage_node_ops._search_for_partitions(rpc_client, device_obj)
|
|
631
|
-
logger.debug("partitioned_devices")
|
|
632
|
-
logger.debug(partitioned_devices)
|
|
633
|
-
if len(partitioned_devices) == partitions+1:
|
|
634
|
-
logger.info("Partitioned devices found")
|
|
635
|
-
else:
|
|
636
|
-
logger.info(f"Creating partitions for {device_obj.nvme_bdev}")
|
|
637
|
-
storage_node_ops._create_device_partitions(rpc_client, device_obj, snode, partitions, snode.jm_percent)
|
|
638
|
-
partitioned_devices = storage_node_ops._search_for_partitions(rpc_client, device_obj)
|
|
639
|
-
if len(partitioned_devices) == partitions+1:
|
|
640
|
-
logger.info("Device partitions created")
|
|
641
|
-
else:
|
|
642
|
-
logger.error("Failed to create partitions")
|
|
643
|
-
return False
|
|
644
|
-
|
|
645
|
-
jm_part = partitioned_devices.pop(0)
|
|
646
|
-
new_devices = []
|
|
647
|
-
dev_order = storage_node_ops.get_next_cluster_device_order(db_controller, snode.cluster_id)
|
|
648
|
-
for dev in partitioned_devices:
|
|
649
|
-
new_device = storage_node_ops._create_storage_device_stack(rpc_client, dev, snode, after_restart=False)
|
|
650
|
-
if not new_device:
|
|
651
|
-
logger.error("failed to create dev stack")
|
|
652
|
-
continue
|
|
653
|
-
|
|
654
|
-
new_device.cluster_device_order = dev_order
|
|
655
|
-
dev_order += 1
|
|
656
|
-
device_events.device_create(new_device)
|
|
657
|
-
new_devices.append(new_device)
|
|
658
|
-
|
|
659
|
-
if new_devices:
|
|
660
|
-
snode.nvme_devices.remove(device_obj)
|
|
661
|
-
snode.nvme_devices.extend(new_devices)
|
|
662
|
-
snode.write_to_db(db_controller.kv_store)
|
|
663
|
-
else:
|
|
664
|
-
logger.error("failed to create devices")
|
|
623
|
+
# if snode.num_partitions_per_dev == 0 or device_obj.is_partition:
|
|
624
|
+
ret = _def_create_device_stack(device_obj, snode, force=True)
|
|
625
|
+
if not ret:
|
|
626
|
+
logger.error("Failed to create device stack")
|
|
665
627
|
return False
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
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)
|
|
669
634
|
|
|
670
635
|
logger.info("Make other nodes connect to the node devices")
|
|
671
636
|
snodes = db_controller.get_storage_nodes_by_cluster_id(snode.cluster_id)
|
|
672
637
|
for node in snodes:
|
|
673
638
|
if node.get_id() == snode.get_id() or node.status != StorageNode.STATUS_ONLINE:
|
|
674
639
|
continue
|
|
675
|
-
node.remote_devices = storage_node_ops._connect_to_remote_devs(node)
|
|
640
|
+
node.remote_devices = storage_node_ops._connect_to_remote_devs(node, force_conect_restarting_nodes=True)
|
|
676
641
|
node.write_to_db()
|
|
677
|
-
for dev in new_devices:
|
|
678
|
-
distr_controller.send_cluster_map_add_device(dev, node)
|
|
679
|
-
|
|
680
|
-
for dev in new_devices:
|
|
681
|
-
tasks_controller.add_new_device_mig_task(dev.get_id())
|
|
682
|
-
|
|
683
|
-
# add to jm raid
|
|
684
|
-
if snode.jm_device and snode.jm_device.raid_bdev and jm_part:
|
|
685
|
-
# looking for jm partition
|
|
686
|
-
jm_dev_part = jm_part.nvme_bdev
|
|
687
|
-
ret = rpc_client.get_bdevs(jm_dev_part)
|
|
688
|
-
if ret:
|
|
689
|
-
logger.info(f"JM part found: {jm_dev_part}")
|
|
690
|
-
if snode.jm_device.status in [JMDevice.STATUS_UNAVAILABLE, JMDevice.STATUS_REMOVED]:
|
|
691
|
-
restart_jm_device(snode.jm_device.get_id(), force=True, format_alceml=True)
|
|
692
|
-
|
|
693
|
-
if snode.jm_device.status == JMDevice.STATUS_ONLINE and \
|
|
694
|
-
jm_dev_part not in snode.jm_device.jm_nvme_bdev_list:
|
|
695
|
-
remove_jm_device(snode.jm_device.get_id(), force=True)
|
|
696
|
-
restart_jm_device(snode.jm_device.get_id(), force=True)
|
|
697
642
|
|
|
698
|
-
|
|
643
|
+
snodes = db_controller.get_storage_nodes_by_cluster_id(snode.cluster_id)
|
|
644
|
+
for node in snodes:
|
|
645
|
+
if node.status != StorageNode.STATUS_ONLINE:
|
|
646
|
+
continue
|
|
647
|
+
distr_controller.send_cluster_map_add_device(device_obj, node)
|
|
648
|
+
|
|
649
|
+
tasks_controller.add_new_device_mig_task(device_id)
|
|
650
|
+
return device_id
|
|
651
|
+
|
|
652
|
+
#
|
|
653
|
+
# # create partitions
|
|
654
|
+
# partitions = snode.num_partitions_per_dev
|
|
655
|
+
# rpc_client = RPCClient(snode.mgmt_ip, snode.rpc_port, snode.rpc_username, snode.rpc_password)
|
|
656
|
+
# # look for partitions
|
|
657
|
+
# partitioned_devices = storage_node_ops._search_for_partitions(rpc_client, device_obj)
|
|
658
|
+
# logger.debug("partitioned_devices")
|
|
659
|
+
# logger.debug(partitioned_devices)
|
|
660
|
+
# if len(partitioned_devices) == partitions+1:
|
|
661
|
+
# logger.info("Partitioned devices found")
|
|
662
|
+
# else:
|
|
663
|
+
# logger.info(f"Creating partitions for {device_obj.nvme_bdev}")
|
|
664
|
+
# storage_node_ops._create_device_partitions(rpc_client, device_obj, snode, partitions, snode.jm_percent)
|
|
665
|
+
# partitioned_devices = storage_node_ops._search_for_partitions(rpc_client, device_obj)
|
|
666
|
+
# if len(partitioned_devices) == partitions+1:
|
|
667
|
+
# logger.info("Device partitions created")
|
|
668
|
+
# else:
|
|
669
|
+
# logger.error("Failed to create partitions")
|
|
670
|
+
# return False
|
|
671
|
+
#
|
|
672
|
+
# jm_part = partitioned_devices.pop(0)
|
|
673
|
+
# new_devices = []
|
|
674
|
+
# dev_order = storage_node_ops.get_next_cluster_device_order(db_controller, snode.cluster_id)
|
|
675
|
+
# for dev in partitioned_devices:
|
|
676
|
+
# new_device = storage_node_ops._create_storage_device_stack(rpc_client, dev, snode, after_restart=False)
|
|
677
|
+
# if not new_device:
|
|
678
|
+
# logger.error("failed to create dev stack")
|
|
679
|
+
# continue
|
|
680
|
+
#
|
|
681
|
+
# new_device.cluster_device_order = dev_order
|
|
682
|
+
# dev_order += 1
|
|
683
|
+
# device_events.device_create(new_device)
|
|
684
|
+
# new_devices.append(new_device)
|
|
685
|
+
#
|
|
686
|
+
# if new_devices:
|
|
687
|
+
# snode.nvme_devices.remove(device_obj)
|
|
688
|
+
# snode.nvme_devices.extend(new_devices)
|
|
689
|
+
# snode.write_to_db(db_controller.kv_store)
|
|
690
|
+
# else:
|
|
691
|
+
# logger.error("failed to create devices")
|
|
692
|
+
# return False
|
|
693
|
+
#
|
|
694
|
+
# for dev in new_devices:
|
|
695
|
+
# distr_controller.send_cluster_map_add_device(dev, snode)
|
|
696
|
+
#
|
|
697
|
+
# logger.info("Make other nodes connect to the node devices")
|
|
698
|
+
# snodes = db_controller.get_storage_nodes_by_cluster_id(snode.cluster_id)
|
|
699
|
+
# for node in snodes:
|
|
700
|
+
# if node.get_id() == snode.get_id() or node.status != StorageNode.STATUS_ONLINE:
|
|
701
|
+
# continue
|
|
702
|
+
# node.remote_devices = storage_node_ops._connect_to_remote_devs(node)
|
|
703
|
+
# node.write_to_db()
|
|
704
|
+
# for dev in new_devices:
|
|
705
|
+
# distr_controller.send_cluster_map_add_device(dev, node)
|
|
706
|
+
#
|
|
707
|
+
# for dev in new_devices:
|
|
708
|
+
# tasks_controller.add_new_device_mig_task(dev.get_id())
|
|
709
|
+
#
|
|
710
|
+
# # add to jm raid
|
|
711
|
+
# if snode.jm_device and snode.jm_device.raid_bdev and jm_part:
|
|
712
|
+
# # looking for jm partition
|
|
713
|
+
# jm_dev_part = jm_part.nvme_bdev
|
|
714
|
+
# ret = rpc_client.get_bdevs(jm_dev_part)
|
|
715
|
+
# if ret:
|
|
716
|
+
# logger.info(f"JM part found: {jm_dev_part}")
|
|
717
|
+
# if snode.jm_device.status in [JMDevice.STATUS_UNAVAILABLE, JMDevice.STATUS_REMOVED]:
|
|
718
|
+
# restart_jm_device(snode.jm_device.get_id(), force=True, format_alceml=True)
|
|
719
|
+
#
|
|
720
|
+
# if snode.jm_device.status == JMDevice.STATUS_ONLINE and \
|
|
721
|
+
# jm_dev_part not in snode.jm_device.jm_nvme_bdev_list:
|
|
722
|
+
# remove_jm_device(snode.jm_device.get_id(), force=True)
|
|
723
|
+
# restart_jm_device(snode.jm_device.get_id(), force=True)
|
|
724
|
+
#
|
|
725
|
+
# return "Done"
|
|
699
726
|
|
|
700
727
|
|
|
701
728
|
def device_set_failed_and_migrated(device_id):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/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-10.4.4 → sbcli_dev-10.4.5}/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
|
|
File without changes
|
{sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/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
|
{sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/services/cached_lvol_stat_collector.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/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-10.4.4 → sbcli_dev-10.4.5}/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
|
{sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/simplyblock_core/services/tasks_runner_failed_migration.py
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-10.4.4 → sbcli_dev-10.4.5}/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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|