sbcli-dev 11.0.4__tar.gz → 11.0.6__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-11.0.4 → sbcli_dev-11.0.6}/PKG-INFO +1 -1
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/sbcli_dev.egg-info/PKG-INFO +1 -1
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/controllers/lvol_controller.py +13 -14
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/controllers/snapshot_controller.py +29 -43
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/env_var +1 -1
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/storage_node_ops.py +65 -22
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/README.md +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/pyproject.toml +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/requirements.txt +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/sbcli_dev.egg-info/SOURCES.txt +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/sbcli_dev.egg-info/dependency_links.txt +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/sbcli_dev.egg-info/entry_points.txt +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/sbcli_dev.egg-info/requires.txt +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/sbcli_dev.egg-info/top_level.txt +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/setup.cfg +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/setup.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_cli/__init__.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_cli/cli.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_cli/main.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/__init__.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/cluster_ops.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/constants.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/controllers/device_controller.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/controllers/events_controller.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/controllers/health_controller.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/controllers/pool_controller.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/controllers/tasks_controller.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/db_controller.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/distr_controller.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/mgmt_node_ops.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/models/cluster.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/models/deployer.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/models/events.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/models/iface.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/models/job_schedule.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/models/lvol_model.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/models/nvme_device.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/models/pool.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/models/stats.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/models/storage_node.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/rpc_client.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/scripts/__init__.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/scripts/dashboard.yml +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/scripts/deploy_fdb.sh +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/scripts/deploy_stack.sh +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/scripts/docker-compose-swarm.yml +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/scripts/foundation.yml +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/scripts/objstore.yml +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/scripts/prepare_fdb.sh +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/scripts/prometheus.yml +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/services/cached_lvol_stat_collector.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/services/capacity_and_stats_collector.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/services/health_check_service.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/services/log_agg_service.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/services/lvol_stat_collector.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/services/main_distr_event_collector.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/services/new_device_discovery.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/services/port_stat_collector.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/services/spdk_http_proxy_server.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/services/storage_node_monitor.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/services/tasks_runner_failed_migration.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/services/tasks_runner_migration.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/services/tasks_runner_new_dev_migration.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/services/tasks_runner_node_add.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/services/tasks_runner_restart.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/snode_client.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/utils.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/workers/cleanup_foundationdb.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/README.md +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/__init__.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/app.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/blueprints/snode_ops.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/blueprints/snode_ops_k8s.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/blueprints/web_api_cluster.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/blueprints/web_api_lvol.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/blueprints/web_api_pool.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/blueprints/web_api_storage_node.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/caching_node_app.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/caching_node_app_k8s.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/node_utils.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/requirements.txt +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/snode_app.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/snode_app_k8s.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/static/delete.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/static/tst.py +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_web/utils.py +0 -0
|
@@ -10,7 +10,8 @@ from datetime import datetime
|
|
|
10
10
|
from typing import Tuple
|
|
11
11
|
|
|
12
12
|
from simplyblock_core import utils, constants, distr_controller
|
|
13
|
-
from simplyblock_core.controllers import snapshot_controller, pool_controller, lvol_events, caching_node_controller
|
|
13
|
+
from simplyblock_core.controllers import snapshot_controller, pool_controller, lvol_events, caching_node_controller, \
|
|
14
|
+
tasks_controller
|
|
14
15
|
from simplyblock_core.db_controller import DBController
|
|
15
16
|
from simplyblock_core.models.nvme_device import NVMeDevice
|
|
16
17
|
from simplyblock_core.models.pool import Pool
|
|
@@ -175,6 +176,11 @@ def _get_next_3_nodes(cluster_id, lvol_size=0):
|
|
|
175
176
|
continue
|
|
176
177
|
|
|
177
178
|
if node.status == node.STATUS_ONLINE:
|
|
179
|
+
|
|
180
|
+
lvol_count = len(db_controller.get_lvols_by_node_id(node.get_id()))
|
|
181
|
+
if lvol_count >= node.max_lvols:
|
|
182
|
+
continue
|
|
183
|
+
|
|
178
184
|
# Validate Eligible nodes for adding lvol
|
|
179
185
|
# snode_api = SNodeClient(node.api_endpoint)
|
|
180
186
|
# result, _ = snode_api.info()
|
|
@@ -187,11 +193,10 @@ def _get_next_3_nodes(cluster_id, lvol_size=0):
|
|
|
187
193
|
# continue
|
|
188
194
|
#
|
|
189
195
|
online_nodes.append(node)
|
|
190
|
-
lvols = db_controller.get_lvols_by_node_id(node.get_id()) or []
|
|
191
196
|
# node_stat_list = db_controller.get_node_stats(node, limit=1000)
|
|
192
197
|
# combined_record = utils.sum_records(node_stat_list)
|
|
193
198
|
node_st = {
|
|
194
|
-
"lvol":
|
|
199
|
+
"lvol": lvol_count+1,
|
|
195
200
|
# "cpu": 1 + (node.cpu * node.cpu_hz),
|
|
196
201
|
# "r_io": combined_record.read_io_ps,
|
|
197
202
|
# "w_io": combined_record.write_io_ps,
|
|
@@ -583,18 +588,12 @@ def add_lvol_on_node(lvol, snode, ha_comm_addrs=None, ha_inode_self=0):
|
|
|
583
588
|
rpc_client.bdev_lvol_set_leader(False, lvs_name=lvol.lvs_name)
|
|
584
589
|
|
|
585
590
|
else:
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
huge_free = result["memory_details"]["huge_free"]
|
|
591
|
-
|
|
592
|
-
total_node_capacity = db_controller.get_snode_size(snode.get_id())
|
|
593
|
-
lvols = len(db_controller.get_lvols_by_node_id(snode.get_id()))
|
|
594
|
-
error = utils.validate_add_lvol_or_snap_on_node(memory_free, huge_free, snode.max_lvol, lvol.size, total_node_capacity, lvols)
|
|
595
|
-
if error:
|
|
591
|
+
|
|
592
|
+
lvol_count = len(db_controller.get_lvols_by_node_id(snode.get_id()))
|
|
593
|
+
if lvol_count >= snode.max_lvols:
|
|
594
|
+
error = f"Too many lvols on node: {snode.get_id()}, max lvols reached: {lvol_count}"
|
|
596
595
|
logger.error(error)
|
|
597
|
-
return False,
|
|
596
|
+
return False, error
|
|
598
597
|
|
|
599
598
|
rpc_client.bdev_lvol_set_leader(True, lvs_name=lvol.lvs_name)
|
|
600
599
|
|
|
@@ -78,25 +78,25 @@ def add(lvol_id, snapshot_name):
|
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
##############################################################################
|
|
81
|
-
# Validate adding snap on storage node
|
|
82
|
-
snode_api = SNodeClient(snode.api_endpoint)
|
|
83
|
-
result, _ = snode_api.info()
|
|
84
|
-
memory_free = result["memory_details"]["free"]
|
|
85
|
-
huge_free = result["memory_details"]["huge_free"]
|
|
86
|
-
total_node_capacity = db_controller.get_snode_size(snode.get_id())
|
|
87
|
-
|
|
88
|
-
error = utils.validate_add_lvol_or_snap_on_node(
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
if error:
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
81
|
+
# # Validate adding snap on storage node
|
|
82
|
+
# snode_api = SNodeClient(snode.api_endpoint)
|
|
83
|
+
# result, _ = snode_api.info()
|
|
84
|
+
# memory_free = result["memory_details"]["free"]
|
|
85
|
+
# huge_free = result["memory_details"]["huge_free"]
|
|
86
|
+
# total_node_capacity = db_controller.get_snode_size(snode.get_id())
|
|
87
|
+
#
|
|
88
|
+
# error = utils.validate_add_lvol_or_snap_on_node(
|
|
89
|
+
# memory_free,
|
|
90
|
+
# huge_free,
|
|
91
|
+
# snode.max_snap,
|
|
92
|
+
# lvol.size,
|
|
93
|
+
# total_node_capacity,
|
|
94
|
+
# len(db_controller.get_snapshots_by_node_id(lvol.node_id)))
|
|
95
|
+
#
|
|
96
|
+
# if error:
|
|
97
|
+
# logger.error(f"Failed to add snap on node {lvol.node_id}")
|
|
98
|
+
# logger.error(error)
|
|
99
|
+
# return False
|
|
100
100
|
|
|
101
101
|
if pool.pool_max_size > 0:
|
|
102
102
|
total = pool_controller.get_pool_total_capacity(pool.get_id())
|
|
@@ -105,12 +105,12 @@ def add(lvol_id, snapshot_name):
|
|
|
105
105
|
logger.error(msg)
|
|
106
106
|
return False, msg
|
|
107
107
|
|
|
108
|
-
if snode.max_snap:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
108
|
+
# if snode.max_snap:
|
|
109
|
+
# cnt = db_controller.get_snapshots_by_node_id(snode.get_id())
|
|
110
|
+
# if cnt and len(cnt)+1 > snode.max_snap:
|
|
111
|
+
# msg = f"Storage node snapshots count must be less than max_snap:{snode.max_snap}"
|
|
112
|
+
# logger.error(msg)
|
|
113
|
+
# return False, msg
|
|
114
114
|
|
|
115
115
|
##############################################################################
|
|
116
116
|
|
|
@@ -337,19 +337,11 @@ def clone(snapshot_id, clone_name, new_size=0):
|
|
|
337
337
|
f"Pool max size has reached {utils.humanbytes(total+size)} of {utils.humanbytes(pool.pool_max_size)}")
|
|
338
338
|
return False
|
|
339
339
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
result, _ = snode_api.info()
|
|
344
|
-
memory_free = result["memory_details"]["free"]
|
|
345
|
-
huge_free = result["memory_details"]["huge_free"]
|
|
346
|
-
total_node_capacity = db_controller.get_snode_size(snode.get_id())
|
|
347
|
-
lvols = db_controller.get_lvols_by_node_id(snode.get_id())
|
|
348
|
-
error = utils.validate_add_lvol_or_snap_on_node(
|
|
349
|
-
memory_free, huge_free, snode.max_lvol, snap.lvol.size, total_node_capacity, len(lvols))
|
|
350
|
-
if error:
|
|
340
|
+
lvol_count = len(db_controller.get_lvols_by_node_id(snode.get_id()))
|
|
341
|
+
if lvol_count >= snode.max_lvols:
|
|
342
|
+
error = f"Too many lvols on node: {snode.get_id()}, max lvols reached: {lvol_count}"
|
|
351
343
|
logger.error(error)
|
|
352
|
-
return False,
|
|
344
|
+
return False, error
|
|
353
345
|
|
|
354
346
|
if pool.pool_max_size > 0:
|
|
355
347
|
total = pool_controller.get_pool_total_capacity(pool.get_id())
|
|
@@ -358,12 +350,6 @@ def clone(snapshot_id, clone_name, new_size=0):
|
|
|
358
350
|
logger.error(msg)
|
|
359
351
|
return False, msg
|
|
360
352
|
|
|
361
|
-
if snode.max_snap:
|
|
362
|
-
cnt = db_controller.get_snapshots_by_node_id(snode.get_id())
|
|
363
|
-
if cnt and len(cnt)+1 > snode.max_lvol:
|
|
364
|
-
msg = f"Storage node LVol count must be less than max_lvol:{snode.max_lvol}"
|
|
365
|
-
logger.error(msg)
|
|
366
|
-
return False, msg
|
|
367
353
|
|
|
368
354
|
cluster = db_controller.get_cluster_by_id(snode.cluster_id)
|
|
369
355
|
|
|
@@ -2830,25 +2830,6 @@ def recreate_lvstore(snode):
|
|
|
2830
2830
|
if snode.is_secondary_node:
|
|
2831
2831
|
return recreate_lvstore_on_sec(snode)
|
|
2832
2832
|
|
|
2833
|
-
sec_node = db_controller.get_storage_node_by_id(snode.secondary_node_id)
|
|
2834
|
-
prim_node_suspend = False
|
|
2835
|
-
lvol_list = db_controller.get_lvols_by_node_id(snode.get_id())
|
|
2836
|
-
if sec_node:
|
|
2837
|
-
if sec_node.status == StorageNode.STATUS_UNREACHABLE:
|
|
2838
|
-
prim_node_suspend = True
|
|
2839
|
-
elif sec_node.status == StorageNode.STATUS_ONLINE:
|
|
2840
|
-
sec_rpc_client = RPCClient(sec_node.mgmt_ip, sec_node.rpc_port, sec_node.rpc_username, sec_node.rpc_password)
|
|
2841
|
-
|
|
2842
|
-
for lvol in lvol_list:
|
|
2843
|
-
if lvol.ha_type == "ha":
|
|
2844
|
-
for iface in sec_node.data_nics:
|
|
2845
|
-
if iface.ip4_address:
|
|
2846
|
-
ret = sec_rpc_client.nvmf_subsystem_listener_set_ana_state(
|
|
2847
|
-
lvol.nqn, iface.ip4_address, "4420", False, "inaccessible")
|
|
2848
|
-
|
|
2849
|
-
sec_rpc_client.bdev_lvol_set_leader(False, lvs_name=snode.lvstore)
|
|
2850
|
-
sec_rpc_client.bdev_distrib_force_to_non_leader(snode.jm_vuid)
|
|
2851
|
-
|
|
2852
2833
|
rpc_client = RPCClient(
|
|
2853
2834
|
snode.mgmt_ip, snode.rpc_port,
|
|
2854
2835
|
snode.rpc_username, snode.rpc_password, retry=1, timeout=30)
|
|
@@ -2877,9 +2858,6 @@ def recreate_lvstore(snode):
|
|
|
2877
2858
|
|
|
2878
2859
|
time.sleep(2)
|
|
2879
2860
|
|
|
2880
|
-
if not lvol_list:
|
|
2881
|
-
prim_node_suspend = False
|
|
2882
|
-
|
|
2883
2861
|
ret, err = _create_bdev_stack(snode, [], primary_node=snode)
|
|
2884
2862
|
|
|
2885
2863
|
if err:
|
|
@@ -2890,6 +2868,71 @@ def recreate_lvstore(snode):
|
|
|
2890
2868
|
ret = rpc_client.bdev_examine(snode.raid)
|
|
2891
2869
|
ret = rpc_client.bdev_wait_for_examine()
|
|
2892
2870
|
ret = rpc_client.bdev_lvol_set_lvs_groupid(snode.lvstore, snode.jm_vuid)
|
|
2871
|
+
time.sleep(1)
|
|
2872
|
+
|
|
2873
|
+
|
|
2874
|
+
sec_node = db_controller.get_storage_node_by_id(snode.secondary_node_id)
|
|
2875
|
+
prim_node_suspend = False
|
|
2876
|
+
lvol_list = db_controller.get_lvols_by_node_id(snode.get_id())
|
|
2877
|
+
if sec_node:
|
|
2878
|
+
if sec_node.status == StorageNode.STATUS_UNREACHABLE:
|
|
2879
|
+
prim_node_suspend = True
|
|
2880
|
+
elif sec_node.status == StorageNode.STATUS_ONLINE:
|
|
2881
|
+
sec_rpc_client = RPCClient(sec_node.mgmt_ip, sec_node.rpc_port, sec_node.rpc_username, sec_node.rpc_password)
|
|
2882
|
+
|
|
2883
|
+
for lvol in lvol_list:
|
|
2884
|
+
if lvol.ha_type == "ha":
|
|
2885
|
+
for iface in sec_node.data_nics:
|
|
2886
|
+
if iface.ip4_address:
|
|
2887
|
+
ret = sec_rpc_client.nvmf_subsystem_listener_set_ana_state(
|
|
2888
|
+
lvol.nqn, iface.ip4_address, "4420", False, "inaccessible")
|
|
2889
|
+
|
|
2890
|
+
sec_rpc_client.bdev_lvol_set_leader(False, lvs_name=snode.lvstore)
|
|
2891
|
+
sec_rpc_client.bdev_distrib_force_to_non_leader(snode.jm_vuid)
|
|
2892
|
+
time.sleep(1)
|
|
2893
|
+
|
|
2894
|
+
#
|
|
2895
|
+
# rpc_client = RPCClient(
|
|
2896
|
+
# snode.mgmt_ip, snode.rpc_port,
|
|
2897
|
+
# snode.rpc_username, snode.rpc_password, retry=1, timeout=30)
|
|
2898
|
+
#
|
|
2899
|
+
# # connecting to remote devices
|
|
2900
|
+
# logger.info("Connecting to remote devices")
|
|
2901
|
+
# snode = db_controller.get_storage_node_by_id(snode.get_id())
|
|
2902
|
+
# snode.remote_devices = _connect_to_remote_devs(snode)
|
|
2903
|
+
# if snode.enable_ha_jm:
|
|
2904
|
+
# online_devs = []
|
|
2905
|
+
# for remote_device in snode.remote_jm_devices:
|
|
2906
|
+
# if remote_device.status == StorageNode.STATUS_ONLINE:
|
|
2907
|
+
# online_devs.append(remote_device)
|
|
2908
|
+
#
|
|
2909
|
+
# if len(online_devs) < 2:
|
|
2910
|
+
# devs = get_sorted_ha_jms(snode)
|
|
2911
|
+
# for did in devs:
|
|
2912
|
+
# dev = db_controller.get_jm_device_by_id(did)
|
|
2913
|
+
# online_devs.append(dev)
|
|
2914
|
+
# if len(online_devs) > snode.ha_jm_count - 1:
|
|
2915
|
+
# break
|
|
2916
|
+
#
|
|
2917
|
+
# snode.remote_jm_devices = online_devs
|
|
2918
|
+
# snode.remote_jm_devices = _connect_to_remote_jm_devs(snode)
|
|
2919
|
+
# snode.write_to_db()
|
|
2920
|
+
#
|
|
2921
|
+
# time.sleep(2)
|
|
2922
|
+
#
|
|
2923
|
+
if not lvol_list:
|
|
2924
|
+
prim_node_suspend = False
|
|
2925
|
+
#
|
|
2926
|
+
# ret, err = _create_bdev_stack(snode, [], primary_node=snode)
|
|
2927
|
+
#
|
|
2928
|
+
# if err:
|
|
2929
|
+
# logger.error(f"Failed to recreate lvstore on node {snode.get_id()}")
|
|
2930
|
+
# logger.error(err)
|
|
2931
|
+
# return False
|
|
2932
|
+
#
|
|
2933
|
+
# ret = rpc_client.bdev_examine(snode.raid)
|
|
2934
|
+
# ret = rpc_client.bdev_wait_for_examine()
|
|
2935
|
+
# ret = rpc_client.bdev_lvol_set_lvs_groupid(snode.lvstore, snode.jm_vuid)
|
|
2893
2936
|
|
|
2894
2937
|
if not prim_node_suspend:
|
|
2895
2938
|
if snode.jm_vuid:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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-11.0.4 → sbcli_dev-11.0.6}/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
|
{sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/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-11.0.4 → sbcli_dev-11.0.6}/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-11.0.4 → sbcli_dev-11.0.6}/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-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/services/cached_lvol_stat_collector.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/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-11.0.4 → sbcli_dev-11.0.6}/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-11.0.4 → sbcli_dev-11.0.6}/simplyblock_core/services/tasks_runner_failed_migration.py
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-11.0.4 → sbcli_dev-11.0.6}/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
|