sbcli-dev 17.2.1__tar.gz → 17.2.2__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-17.2.1 → sbcli_dev-17.2.2}/PKG-INFO +1 -1
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/sbcli_dev.egg-info/PKG-INFO +1 -1
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_cli/clibase.py +2 -1
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/controllers/lvol_controller.py +42 -32
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/env_var +1 -1
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/web_api_lvol.py +2 -2
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/README.md +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/pyproject.toml +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/requirements.txt +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/sbcli_dev.egg-info/SOURCES.txt +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/sbcli_dev.egg-info/dependency_links.txt +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/sbcli_dev.egg-info/entry_points.txt +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/sbcli_dev.egg-info/requires.txt +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/sbcli_dev.egg-info/top_level.txt +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/setup.cfg +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/setup.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_cli/__init__.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_cli/cli.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_cli/main.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/__init__.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/cluster_ops.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/constants.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/controllers/device_controller.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/controllers/events_controller.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/controllers/health_controller.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/controllers/pool_controller.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/controllers/snapshot_controller.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/controllers/tasks_controller.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/controllers/tcp_ports_events.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/db_controller.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/distr_controller.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/mgmt_node_ops.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/models/cluster.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/models/deployer.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/models/events.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/models/iface.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/models/job_schedule.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/models/lvol_model.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/models/nvme_device.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/models/pool.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/models/stats.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/models/storage_node.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/rpc_client.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/scripts/__init__.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/scripts/dashboard.yml +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/scripts/deploy_fdb.sh +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/scripts/deploy_stack.sh +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/scripts/docker-compose-swarm.yml +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/scripts/foundation.yml +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/scripts/objstore.yml +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/scripts/prepare_fdb.sh +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/scripts/prometheus.yml +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/services/cached_lvol_stat_collector.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/services/capacity_and_stats_collector.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/services/health_check_service.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/services/lvol_stat_collector.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/services/main_distr_event_collector.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/services/new_device_discovery.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/services/spdk/__init__.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/services/spdk/client.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/services/spdk_http_proxy_server.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/services/spdk_stats_collector.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/services/storage_node_monitor.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/services/tasks_runner_failed_migration.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/services/tasks_runner_migration.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/services/tasks_runner_new_dev_migration.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/services/tasks_runner_node_add.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/services/tasks_runner_restart.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/snode_client.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/storage_node_ops.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/test/test_utils.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/utils.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/workers/cleanup_foundationdb.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/README.md +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/__init__.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/app.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/snode_ops.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/snode_ops_k8s.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/swagger_ui_blueprint.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/web_api_cluster.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/web_api_pool.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/web_api_storage_node.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/node_utils.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/node_utils_k8s.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/requirements.txt +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/static/SimplyBlock-API.postman_collection.json +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/static/delete.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/static/swagger.yaml +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/static/tst.py +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/utils.py +0 -0
|
@@ -426,7 +426,8 @@ class CLIWrapperBase:
|
|
|
426
426
|
def volume__resize(self, sub_command, args):
|
|
427
427
|
volume_id = args.volume_id
|
|
428
428
|
size = utils.parse_size(args.size)
|
|
429
|
-
|
|
429
|
+
ret, err = lvol_controller.resize_lvol(volume_id, size)
|
|
430
|
+
return ret
|
|
430
431
|
|
|
431
432
|
def volume__create_snapshot(self, sub_command, args):
|
|
432
433
|
volume_id = args.volume_id
|
|
@@ -1061,10 +1061,16 @@ def list_lvols(is_json, cluster_id, pool_id_or_name, all=False):
|
|
|
1061
1061
|
logger.debug(lvol)
|
|
1062
1062
|
if lvol.deleted is True and all is False:
|
|
1063
1063
|
continue
|
|
1064
|
+
size_used = 0
|
|
1065
|
+
records = db_controller.get_lvol_stats(lvol, 1)
|
|
1066
|
+
if records:
|
|
1067
|
+
size_used = records[0].size_used
|
|
1068
|
+
|
|
1064
1069
|
data.append({
|
|
1065
1070
|
"Id": lvol.uuid,
|
|
1066
1071
|
"Name": lvol.lvol_name,
|
|
1067
1072
|
"Size": utils.humanbytes(lvol.size),
|
|
1073
|
+
"Used": f"{utils.humanbytes(size_used)}",
|
|
1068
1074
|
"Hostname": lvol.hostname,
|
|
1069
1075
|
"HA": lvol.ha_type,
|
|
1070
1076
|
"BlobID": lvol.blobid or "",
|
|
@@ -1172,32 +1178,38 @@ def resize_lvol(id, new_size):
|
|
|
1172
1178
|
db_controller = DBController()
|
|
1173
1179
|
lvol = db_controller.get_lvol_by_id(id)
|
|
1174
1180
|
if not lvol:
|
|
1175
|
-
|
|
1176
|
-
|
|
1181
|
+
msg = f"LVol not found: {id}"
|
|
1182
|
+
logger.error(msg)
|
|
1183
|
+
return False, msg
|
|
1177
1184
|
|
|
1178
1185
|
pool = db_controller.get_pool_by_id(lvol.pool_uuid)
|
|
1179
1186
|
if pool.status == Pool.STATUS_INACTIVE:
|
|
1180
|
-
|
|
1181
|
-
|
|
1187
|
+
msg = f"Pool is disabled {pool.get_id()}"
|
|
1188
|
+
logger.error(msg)
|
|
1189
|
+
return False, msg
|
|
1182
1190
|
|
|
1183
1191
|
if lvol.size >= new_size:
|
|
1184
|
-
|
|
1185
|
-
|
|
1192
|
+
msg = f"New size {new_size} must be higher than the original size {lvol.size}"
|
|
1193
|
+
logger.error(msg)
|
|
1194
|
+
return False, msg
|
|
1186
1195
|
|
|
1187
1196
|
if lvol.max_size < new_size:
|
|
1188
|
-
|
|
1189
|
-
|
|
1197
|
+
msg = f"New size {new_size} must be smaller than the max size {lvol.max_size}"
|
|
1198
|
+
logger.error(msg)
|
|
1199
|
+
return False, msg
|
|
1190
1200
|
|
|
1191
1201
|
if 0 < pool.lvol_max_size < new_size:
|
|
1192
|
-
|
|
1193
|
-
|
|
1202
|
+
msg = f"Pool Max LVol size is: {utils.humanbytes(pool.lvol_max_size)}, "\
|
|
1203
|
+
"LVol size: {utils.humanbytes(new_size)} must be below this limit"
|
|
1204
|
+
logger.error(msg)
|
|
1205
|
+
return False, msg
|
|
1194
1206
|
|
|
1195
1207
|
if pool.pool_max_size > 0:
|
|
1196
1208
|
total = pool_controller.get_pool_total_capacity(pool.get_id())
|
|
1197
1209
|
if total + new_size > pool.pool_max_size:
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
return False
|
|
1210
|
+
msg =f"Invalid LVol size: {utils.humanbytes(new_size)}, Pool max size has reached {utils.humanbytes(total+new_size)} of {utils.humanbytes(pool.pool_max_size)}"
|
|
1211
|
+
logger.error(msg)
|
|
1212
|
+
return False, msg
|
|
1201
1213
|
|
|
1202
1214
|
snode = db_controller.get_storage_node_by_id(lvol.node_id)
|
|
1203
1215
|
|
|
@@ -1209,13 +1221,13 @@ def resize_lvol(id, new_size):
|
|
|
1209
1221
|
rpc_client = RPCClient(
|
|
1210
1222
|
snode.mgmt_ip, snode.rpc_port, snode.rpc_username, snode.rpc_password)
|
|
1211
1223
|
|
|
1212
|
-
error = False
|
|
1213
1224
|
if lvol.ha_type == "single":
|
|
1214
1225
|
|
|
1215
1226
|
ret = rpc_client.bdev_lvol_resize(f"{lvol.lvs_name}/{lvol.lvol_bdev}", size_in_mib)
|
|
1216
1227
|
if not ret:
|
|
1217
|
-
|
|
1218
|
-
error
|
|
1228
|
+
msg = f"Error resizing lvol on node: {snode.get_id()}"
|
|
1229
|
+
logger.error(msg)
|
|
1230
|
+
return False, msg
|
|
1219
1231
|
|
|
1220
1232
|
else:
|
|
1221
1233
|
primary_node = None
|
|
@@ -1229,7 +1241,7 @@ def resize_lvol(id, new_size):
|
|
|
1229
1241
|
if sec_node.status == StorageNode.STATUS_DOWN:
|
|
1230
1242
|
msg = f"Secondary node is in down status, can not resize lvol"
|
|
1231
1243
|
logger.error(msg)
|
|
1232
|
-
|
|
1244
|
+
return False, msg
|
|
1233
1245
|
|
|
1234
1246
|
elif sec_node.status == StorageNode.STATUS_ONLINE:
|
|
1235
1247
|
secondary_node = sec_node
|
|
@@ -1259,10 +1271,8 @@ def resize_lvol(id, new_size):
|
|
|
1259
1271
|
# both primary and secondary are not online
|
|
1260
1272
|
msg = f"Host nodes are not online"
|
|
1261
1273
|
logger.error(msg)
|
|
1262
|
-
|
|
1274
|
+
return False, msg
|
|
1263
1275
|
|
|
1264
|
-
if error:
|
|
1265
|
-
return False
|
|
1266
1276
|
|
|
1267
1277
|
if primary_node:
|
|
1268
1278
|
logger.info(f"Resizing LVol: {lvol.get_id()} on node: {primary_node.get_id()}")
|
|
@@ -1272,8 +1282,9 @@ def resize_lvol(id, new_size):
|
|
|
1272
1282
|
|
|
1273
1283
|
ret = rpc_client.bdev_lvol_resize(f"{lvol.lvs_name}/{lvol.lvol_bdev}", size_in_mib)
|
|
1274
1284
|
if not ret:
|
|
1275
|
-
|
|
1276
|
-
error
|
|
1285
|
+
msg = f"Error resizing lvol on node: {primary_node.get_id()}"
|
|
1286
|
+
logger.error(msg)
|
|
1287
|
+
return False, msg
|
|
1277
1288
|
|
|
1278
1289
|
if secondary_node:
|
|
1279
1290
|
logger.info(f"Resizing LVol: {lvol.get_id()} on node: {secondary_node.get_id()}")
|
|
@@ -1285,18 +1296,17 @@ def resize_lvol(id, new_size):
|
|
|
1285
1296
|
|
|
1286
1297
|
ret = sec_rpc_client.bdev_lvol_resize(f"{lvol.lvs_name}/{lvol.lvol_bdev}", size_in_mib)
|
|
1287
1298
|
if not ret:
|
|
1288
|
-
|
|
1289
|
-
error
|
|
1299
|
+
msg = f"Error resizing lvol on node: {sec_node.get_id()}"
|
|
1300
|
+
logger.error(msg)
|
|
1301
|
+
return False, msg
|
|
1290
1302
|
|
|
1303
|
+
lvol = db_controller.get_lvol_by_id(id)
|
|
1304
|
+
lvol.size = new_size
|
|
1305
|
+
lvol.write_to_db(db_controller.kv_store)
|
|
1306
|
+
logger.info("Done")
|
|
1307
|
+
|
|
1308
|
+
return True, None
|
|
1291
1309
|
|
|
1292
|
-
if not error:
|
|
1293
|
-
lvol = db_controller.get_lvol_by_id(id)
|
|
1294
|
-
lvol.size = new_size
|
|
1295
|
-
lvol.write_to_db(db_controller.kv_store)
|
|
1296
|
-
logger.info("Done")
|
|
1297
|
-
return True
|
|
1298
|
-
else:
|
|
1299
|
-
return False
|
|
1300
1310
|
|
|
1301
1311
|
|
|
1302
1312
|
def set_read_only(id):
|
|
@@ -259,8 +259,8 @@ def resize_lvol(uuid):
|
|
|
259
259
|
|
|
260
260
|
new_size = core_utils.parse_size(cl_data['size'])
|
|
261
261
|
|
|
262
|
-
ret = lvol_controller.resize_lvol(uuid, new_size)
|
|
263
|
-
return utils.get_response(ret)
|
|
262
|
+
ret, error = lvol_controller.resize_lvol(uuid, new_size)
|
|
263
|
+
return utils.get_response(ret, error)
|
|
264
264
|
|
|
265
265
|
|
|
266
266
|
@bp.route('/lvol/connect/<string:uuid>', methods=['GET'])
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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-17.2.1 → sbcli_dev-17.2.2}/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
|
|
File without changes
|
{sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/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-17.2.1 → sbcli_dev-17.2.2}/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-17.2.1 → sbcli_dev-17.2.2}/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-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/services/cached_lvol_stat_collector.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/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
|
{sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/services/main_distr_event_collector.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_core/services/tasks_runner_failed_migration.py
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/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
|
{sbcli_dev-17.2.1 → sbcli_dev-17.2.2}/simplyblock_web/static/SimplyBlock-API.postman_collection.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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|