sbcli-dev 10.1.98__tar.gz → 10.2.0__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.1.98 → sbcli_dev-10.2.0}/PKG-INFO +1 -1
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/sbcli_dev.egg-info/PKG-INFO +1 -1
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_cli/cli.py +1 -1
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/controllers/lvol_controller.py +20 -18
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/controllers/pool_controller.py +3 -2
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/controllers/snapshot_controller.py +8 -7
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/controllers/tasks_controller.py +5 -1
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/env_var +1 -1
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/storage_node_ops.py +12 -11
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/blueprints/web_api_pool.py +5 -2
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/blueprints/web_api_storage_node.py +2 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/README.md +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/pyproject.toml +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/requirements.txt +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/sbcli_dev.egg-info/SOURCES.txt +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/sbcli_dev.egg-info/dependency_links.txt +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/sbcli_dev.egg-info/entry_points.txt +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/sbcli_dev.egg-info/requires.txt +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/sbcli_dev.egg-info/top_level.txt +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/setup.cfg +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/setup.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_cli/__init__.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_cli/main.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/__init__.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/cluster_ops.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/constants.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/controllers/device_controller.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/controllers/events_controller.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/controllers/health_controller.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/db_controller.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/distr_controller.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/mgmt_node_ops.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/models/cluster.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/models/deployer.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/models/events.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/models/iface.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/models/job_schedule.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/models/lvol_model.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/models/nvme_device.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/models/pool.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/models/stats.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/models/storage_node.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/rpc_client.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/scripts/__init__.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/scripts/dashboard.yml +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/scripts/deploy_fdb.sh +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/scripts/deploy_stack.sh +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/scripts/docker-compose-swarm.yml +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/scripts/foundation.yml +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/scripts/objstore.yml +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/scripts/prepare_fdb.sh +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/scripts/prometheus.yml +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/services/cached_lvol_stat_collector.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/services/capacity_and_stats_collector.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/services/health_check_service.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/services/log_agg_service.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/services/lvol_stat_collector.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/services/main_distr_event_collector.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/services/new_device_discovery.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/services/port_stat_collector.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/services/spdk_http_proxy_server.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/services/storage_node_monitor.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/services/tasks_runner_failed_migration.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/services/tasks_runner_migration.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/services/tasks_runner_new_dev_migration.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/services/tasks_runner_node_add.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/services/tasks_runner_restart.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/snode_client.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/utils.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/workers/cleanup_foundationdb.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/README.md +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/__init__.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/app.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/blueprints/snode_ops.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/blueprints/snode_ops_k8s.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/blueprints/web_api_cluster.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/blueprints/web_api_lvol.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/caching_node_app.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/caching_node_app_k8s.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/node_utils.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/requirements.txt +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/snode_app.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/snode_app_k8s.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/static/delete.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/static/tst.py +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/utils.py +0 -0
|
@@ -300,7 +300,7 @@ class CLIWrapper:
|
|
|
300
300
|
default=0, choices=range(128))
|
|
301
301
|
sub_command.add_argument("--max-queue-size", help='The max size the queue will grow', type=int, default=128)
|
|
302
302
|
sub_command.add_argument("--inflight-io-threshold", help='The number of inflight IOs allowed before the IO queuing starts', type=int, default=4)
|
|
303
|
-
sub_command.add_argument("--
|
|
303
|
+
sub_command.add_argument("--enable-qos", help='Enable qos bdev for storage nodes', action='store_true', dest='enable_qos')
|
|
304
304
|
sub_command.add_argument("--strict-node-anti-affinity", help='Enable strict node anti affinity for storage nodes', action='store_true')
|
|
305
305
|
|
|
306
306
|
|
|
@@ -187,10 +187,11 @@ def _get_next_3_nodes(cluster_id, lvol_size=0):
|
|
|
187
187
|
# continue
|
|
188
188
|
#
|
|
189
189
|
online_nodes.append(node)
|
|
190
|
+
lvols = db_controller.get_lvols_by_node_id(node.get_id()) or []
|
|
190
191
|
# node_stat_list = db_controller.get_node_stats(node, limit=1000)
|
|
191
192
|
# combined_record = utils.sum_records(node_stat_list)
|
|
192
193
|
node_st = {
|
|
193
|
-
"lvol":
|
|
194
|
+
"lvol": len(lvols)+1,
|
|
194
195
|
# "cpu": 1 + (node.cpu * node.cpu_hz),
|
|
195
196
|
# "r_io": combined_record.read_io_ps,
|
|
196
197
|
# "w_io": combined_record.write_io_ps,
|
|
@@ -523,14 +524,14 @@ def add_lvol_ha(name, size, host_id_or_name, ha_type, pool_id_or_name, use_comp,
|
|
|
523
524
|
host_node.secondary_node_id]
|
|
524
525
|
lvol.nodes = nodes_ids
|
|
525
526
|
|
|
526
|
-
host_node = db_controller.get_storage_node_by_id(host_node.get_id())
|
|
527
|
-
host_node.lvols += 1
|
|
528
|
-
host_node.write_to_db(db_controller.kv_store)
|
|
527
|
+
# host_node = db_controller.get_storage_node_by_id(host_node.get_id())
|
|
528
|
+
# host_node.lvols += 1
|
|
529
|
+
# host_node.write_to_db(db_controller.kv_store)
|
|
529
530
|
|
|
530
|
-
pool = db_controller.get_pool_by_id(pool.get_id())
|
|
531
|
+
# pool = db_controller.get_pool_by_id(pool.get_id())
|
|
531
532
|
lvol.pool_uuid = pool.get_id()
|
|
532
|
-
pool.lvols += 1
|
|
533
|
-
pool.write_to_db(db_controller.kv_store)
|
|
533
|
+
# pool.lvols += 1
|
|
534
|
+
# pool.write_to_db(db_controller.kv_store)
|
|
534
535
|
|
|
535
536
|
lvol.write_to_db(db_controller.kv_store)
|
|
536
537
|
lvol_events.lvol_create(lvol)
|
|
@@ -608,7 +609,8 @@ def add_lvol_on_node(lvol, snode, ha_comm_addrs=None, ha_inode_self=0):
|
|
|
608
609
|
huge_free = result["memory_details"]["huge_free"]
|
|
609
610
|
|
|
610
611
|
total_node_capacity = db_controller.get_snode_size(snode.get_id())
|
|
611
|
-
|
|
612
|
+
lvols = len(db_controller.get_lvols_by_node_id(snode.get_id()))
|
|
613
|
+
error = utils.validate_add_lvol_or_snap_on_node(memory_free, huge_free, snode.max_lvol, lvol.size, total_node_capacity, lvols)
|
|
612
614
|
if error:
|
|
613
615
|
logger.error(error)
|
|
614
616
|
return False, f"Failed to add lvol on node {snode.get_id()}"
|
|
@@ -929,16 +931,16 @@ def delete_lvol(id_or_name, force_delete=False):
|
|
|
929
931
|
return False
|
|
930
932
|
|
|
931
933
|
# remove from db
|
|
932
|
-
snode = db_controller.get_storage_node_by_id(lvol.node_id)
|
|
933
|
-
# logger.debug(snode)
|
|
934
|
-
logger.debug(f"removing lvol: {lvol.get_id()} from node {snode.get_id()}")
|
|
935
|
-
snode.lvols -= 1
|
|
936
|
-
snode.write_to_db(db_controller.kv_store)
|
|
937
|
-
|
|
938
|
-
# remove from pool
|
|
939
|
-
pool = db_controller.get_pool_by_id(lvol.pool_uuid)
|
|
940
|
-
pool.lvols -= 1
|
|
941
|
-
pool.write_to_db(db_controller.kv_store)
|
|
934
|
+
# snode = db_controller.get_storage_node_by_id(lvol.node_id)
|
|
935
|
+
# # logger.debug(snode)
|
|
936
|
+
# logger.debug(f"removing lvol: {lvol.get_id()} from node {snode.get_id()}")
|
|
937
|
+
# snode.lvols -= 1
|
|
938
|
+
# snode.write_to_db(db_controller.kv_store)
|
|
939
|
+
|
|
940
|
+
# # remove from pool
|
|
941
|
+
# pool = db_controller.get_pool_by_id(lvol.pool_uuid)
|
|
942
|
+
# pool.lvols -= 1
|
|
943
|
+
# pool.write_to_db(db_controller.kv_store)
|
|
942
944
|
|
|
943
945
|
lvol_events.lvol_delete(lvol)
|
|
944
946
|
lvol.remove(db_controller.kv_store)
|
|
@@ -144,13 +144,14 @@ def list_pools(is_json, cluster_id=None):
|
|
|
144
144
|
pools = db_controller.get_pools(cluster_id)
|
|
145
145
|
data = []
|
|
146
146
|
for pool in pools:
|
|
147
|
+
lvs = db_controller.get_lvols_by_pool_id(pool.get_id()) or []
|
|
147
148
|
data.append({
|
|
148
149
|
"UUID": pool.get_id(),
|
|
149
150
|
"Name": pool.pool_name,
|
|
150
151
|
"Capacity": utils.humanbytes(get_pool_total_capacity(pool.get_id())),
|
|
151
152
|
"Max size": utils.humanbytes(pool.pool_max_size),
|
|
152
153
|
"LVol Max Size": utils.humanbytes(pool.lvol_max_size),
|
|
153
|
-
"LVols": f"{
|
|
154
|
+
"LVols": f"{len(lvs)}",
|
|
154
155
|
"QOS": f"{pool.has_qos()}",
|
|
155
156
|
"Status": pool.status,
|
|
156
157
|
})
|
|
@@ -202,7 +203,7 @@ def get_capacity(pool_id):
|
|
|
202
203
|
"util_percent": 0,
|
|
203
204
|
"util": 0,
|
|
204
205
|
})
|
|
205
|
-
if
|
|
206
|
+
if total_size:
|
|
206
207
|
out.append({
|
|
207
208
|
"device name": "Total",
|
|
208
209
|
"provisioned": utils.humanbytes(total_size),
|
|
@@ -291,8 +291,9 @@ def clone(snapshot_id, clone_name, new_size=0):
|
|
|
291
291
|
memory_free = result["memory_details"]["free"]
|
|
292
292
|
huge_free = result["memory_details"]["huge_free"]
|
|
293
293
|
total_node_capacity = db_controller.get_snode_size(snode.get_id())
|
|
294
|
+
lvols = db_controller.get_lvols_by_node_id(snode.get_id())
|
|
294
295
|
error = utils.validate_add_lvol_or_snap_on_node(
|
|
295
|
-
memory_free, huge_free, snode.max_lvol, snap.lvol.size, total_node_capacity,
|
|
296
|
+
memory_free, huge_free, snode.max_lvol, snap.lvol.size, total_node_capacity, len(lvols))
|
|
296
297
|
if error:
|
|
297
298
|
logger.error(error)
|
|
298
299
|
return False, f"Failed to add lvol on node {snode.get_id()}"
|
|
@@ -417,12 +418,12 @@ def clone(snapshot_id, clone_name, new_size=0):
|
|
|
417
418
|
# lvol.mem_diff = diff
|
|
418
419
|
# lvol.write_to_db(db_controller.kv_store)
|
|
419
420
|
|
|
420
|
-
pool = db_controller.get_pool_by_id(snap.lvol.pool_uuid)
|
|
421
|
-
pool.lvols += 1
|
|
422
|
-
pool.write_to_db(db_controller.kv_store)
|
|
423
|
-
snode = db_controller.get_storage_node_by_id(snode.get_id())
|
|
424
|
-
snode.lvols += 1
|
|
425
|
-
snode.write_to_db(db_controller.kv_store)
|
|
421
|
+
# pool = db_controller.get_pool_by_id(snap.lvol.pool_uuid)
|
|
422
|
+
# pool.lvols += 1
|
|
423
|
+
# pool.write_to_db(db_controller.kv_store)
|
|
424
|
+
# snode = db_controller.get_storage_node_by_id(snode.get_id())
|
|
425
|
+
# snode.lvols += 1
|
|
426
|
+
# snode.write_to_db(db_controller.kv_store)
|
|
426
427
|
|
|
427
428
|
if snap.snap_ref_id:
|
|
428
429
|
ref_snap = db_controller.get_snapshot_by_id(snap.snap_ref_id)
|
|
@@ -79,8 +79,12 @@ def _add_task(function_name, cluster_id, node_id, device_id,
|
|
|
79
79
|
def add_device_mig_task(device_id):
|
|
80
80
|
device = db_controller.get_storage_device_by_id(device_id)
|
|
81
81
|
for node in db_controller.get_storage_nodes_by_cluster_id(device.cluster_id):
|
|
82
|
-
if node.status == StorageNode.STATUS_REMOVED
|
|
82
|
+
if node.status == StorageNode.STATUS_REMOVED:
|
|
83
|
+
continue
|
|
84
|
+
lvols = db_controller.get_lvols_by_node_id(node.get_id())
|
|
85
|
+
if not lvols:
|
|
83
86
|
continue
|
|
87
|
+
|
|
84
88
|
for bdev in node.lvstore_stack:
|
|
85
89
|
if bdev['type'] == "bdev_distr":
|
|
86
90
|
_add_task(JobSchedule.FN_DEV_MIG, device.cluster_id, node.get_id(), device.get_id(),
|
|
@@ -1463,13 +1463,14 @@ def remove_storage_node(node_id, force_remove=False, force_migrate=False):
|
|
|
1463
1463
|
if task.status != JobSchedule.STATUS_DONE and task.canceled is False:
|
|
1464
1464
|
tasks_controller.cancel_task(task.get_id())
|
|
1465
1465
|
|
|
1466
|
-
|
|
1466
|
+
lvols = db_controller.get_lvols_by_node_id(node_id)
|
|
1467
|
+
if lvols:
|
|
1467
1468
|
if force_migrate:
|
|
1468
|
-
for lvol in
|
|
1469
|
+
for lvol in lvols:
|
|
1469
1470
|
pass
|
|
1470
1471
|
# lvol_controller.migrate(lvol_id)
|
|
1471
1472
|
elif force_remove:
|
|
1472
|
-
for lvol in
|
|
1473
|
+
for lvol in lvols:
|
|
1473
1474
|
lvol_controller.delete_lvol(lvol.get_id(), True)
|
|
1474
1475
|
else:
|
|
1475
1476
|
logger.error("LVols found on the storage node, use --force-remove or --force-migrate")
|
|
@@ -1943,12 +1944,13 @@ def list_storage_nodes(is_json, cluster_id=None):
|
|
|
1943
1944
|
for dev in node.nvme_devices:
|
|
1944
1945
|
if dev.status == NVMeDevice.STATUS_ONLINE:
|
|
1945
1946
|
online_devices += 1
|
|
1947
|
+
lvs = db_controller.get_lvols_by_node_id(node.get_id()) or []
|
|
1946
1948
|
data.append({
|
|
1947
1949
|
"UUID": node.uuid,
|
|
1948
1950
|
"Hostname": node.hostname,
|
|
1949
1951
|
"Management IP": node.mgmt_ip,
|
|
1950
1952
|
"Devices": f"{total_devices}/{online_devices}",
|
|
1951
|
-
"LVols": f"{
|
|
1953
|
+
"LVols": f"{len(lvs)}",
|
|
1952
1954
|
"Status": node.status,
|
|
1953
1955
|
"Health": node.health_check,
|
|
1954
1956
|
"Up time": uptime,
|
|
@@ -2161,18 +2163,16 @@ def suspend_storage_node(node_id, force=False):
|
|
|
2161
2163
|
snode.rpc_username, snode.rpc_password, timeout=5, retry=1)
|
|
2162
2164
|
|
|
2163
2165
|
nodes = []
|
|
2166
|
+
lvols = db_controller.get_lvols_by_node_id(node_id)
|
|
2164
2167
|
if snode.is_secondary_node:
|
|
2165
2168
|
ret = db_controller.get_primary_storage_nodes_by_secondary_node_id(node_id)
|
|
2166
2169
|
if ret:
|
|
2167
2170
|
nodes.extend(ret)
|
|
2168
|
-
elif
|
|
2171
|
+
elif lvols:
|
|
2169
2172
|
nodes.append(snode)
|
|
2170
2173
|
|
|
2171
2174
|
|
|
2172
2175
|
for node in nodes:
|
|
2173
|
-
if node.lvols==0:
|
|
2174
|
-
continue
|
|
2175
|
-
|
|
2176
2176
|
for lvol in db_controller.get_lvols_by_node_id(node.get_id()):
|
|
2177
2177
|
for iface in snode.data_nics:
|
|
2178
2178
|
if iface.ip4_address:
|
|
@@ -2235,15 +2235,16 @@ def resume_storage_node(node_id):
|
|
|
2235
2235
|
snode.rpc_username, snode.rpc_password)
|
|
2236
2236
|
|
|
2237
2237
|
nodes = []
|
|
2238
|
+
lvols = db_controller.get_lvols_by_node_id(node_id)
|
|
2238
2239
|
if snode.is_secondary_node:
|
|
2239
2240
|
ret = db_controller.get_primary_storage_nodes_by_secondary_node_id(node_id)
|
|
2240
2241
|
if ret:
|
|
2241
2242
|
nodes.extend(ret)
|
|
2242
|
-
elif
|
|
2243
|
+
elif lvols:
|
|
2243
2244
|
nodes.append(snode)
|
|
2244
2245
|
|
|
2245
2246
|
for node in nodes:
|
|
2246
|
-
if
|
|
2247
|
+
if not node.lvstore:
|
|
2247
2248
|
continue
|
|
2248
2249
|
|
|
2249
2250
|
if node.get_id() != snode.get_id():
|
|
@@ -2255,7 +2256,7 @@ def resume_storage_node(node_id):
|
|
|
2255
2256
|
lvol.nqn, iface.ip4_address, "4420", False)
|
|
2256
2257
|
|
|
2257
2258
|
|
|
2258
|
-
if not snode.is_secondary_node
|
|
2259
|
+
if not snode.is_secondary_node:
|
|
2259
2260
|
for lvol in db_controller.get_lvols_by_node_id(snode.get_id()):
|
|
2260
2261
|
for iface in snode.data_nics:
|
|
2261
2262
|
if iface.ip4_address:
|
|
@@ -31,7 +31,10 @@ def list_pools(uuid):
|
|
|
31
31
|
pools = db_controller.get_pools(cluster_id)
|
|
32
32
|
data = []
|
|
33
33
|
for pool in pools:
|
|
34
|
-
|
|
34
|
+
d = pool.get_clean_dict()
|
|
35
|
+
lvs = db_controller.get_lvols_by_pool_id(pool.get_id()) or []
|
|
36
|
+
d['lvols'] = len(lvs)
|
|
37
|
+
data.append(d)
|
|
35
38
|
return utils.get_response(data)
|
|
36
39
|
|
|
37
40
|
|
|
@@ -168,7 +171,7 @@ def pool_capacity(uuid):
|
|
|
168
171
|
"util_percent": 0,
|
|
169
172
|
"util": 0,
|
|
170
173
|
})
|
|
171
|
-
if
|
|
174
|
+
if total_size:
|
|
172
175
|
out.append({
|
|
173
176
|
"device name": "Total",
|
|
174
177
|
"provisioned": total_size,
|
|
@@ -34,6 +34,8 @@ def list_storage_nodes(uuid):
|
|
|
34
34
|
for node in nodes:
|
|
35
35
|
d = node.get_clean_dict()
|
|
36
36
|
d['status_code'] = node.get_status_code()
|
|
37
|
+
lvs = db_controller.get_lvols_by_node_id(node.get_id()) or []
|
|
38
|
+
d['lvols'] = len(lvs)
|
|
37
39
|
data.append(d)
|
|
38
40
|
return utils.get_response(data)
|
|
39
41
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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.1.98 → sbcli_dev-10.2.0}/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
|
{sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/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.1.98 → sbcli_dev-10.2.0}/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.1.98 → sbcli_dev-10.2.0}/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.1.98 → sbcli_dev-10.2.0}/simplyblock_core/services/cached_lvol_stat_collector.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/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.1.98 → sbcli_dev-10.2.0}/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.1.98 → sbcli_dev-10.2.0}/simplyblock_core/services/tasks_runner_failed_migration.py
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/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
|
{sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/blueprints/node_api_caching_docker.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
|
{sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2
RENAMED
|
File without changes
|
{sbcli_dev-10.1.98 → sbcli_dev-10.2.0}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2
RENAMED
|
File without changes
|
|
File without changes
|