sbcli-dev 17.2.0__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.0 → sbcli_dev-17.2.2}/PKG-INFO +1 -1
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/sbcli_dev.egg-info/PKG-INFO +1 -1
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_cli/clibase.py +2 -1
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/constants.py +1 -1
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/controllers/lvol_controller.py +43 -32
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/env_var +1 -1
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/models/lvol_model.py +1 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/services/cap_monitor.py +1 -1
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/web_api_lvol.py +2 -9
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/README.md +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/pyproject.toml +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/requirements.txt +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/sbcli_dev.egg-info/SOURCES.txt +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/sbcli_dev.egg-info/dependency_links.txt +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/sbcli_dev.egg-info/entry_points.txt +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/sbcli_dev.egg-info/requires.txt +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/sbcli_dev.egg-info/top_level.txt +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/setup.cfg +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/setup.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_cli/__init__.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_cli/cli.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_cli/main.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/__init__.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/cluster_ops.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/controllers/device_controller.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/controllers/events_controller.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/controllers/health_controller.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/controllers/pool_controller.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/controllers/snapshot_controller.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/controllers/tasks_controller.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/controllers/tcp_ports_events.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/db_controller.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/distr_controller.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/mgmt_node_ops.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/models/cluster.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/models/deployer.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/models/events.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/models/iface.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/models/job_schedule.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/models/nvme_device.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/models/pool.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/models/stats.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/models/storage_node.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/rpc_client.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/scripts/__init__.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/scripts/dashboard.yml +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/scripts/deploy_fdb.sh +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/scripts/deploy_stack.sh +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/scripts/docker-compose-swarm.yml +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/scripts/foundation.yml +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/scripts/objstore.yml +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/scripts/prepare_fdb.sh +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/scripts/prometheus.yml +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/services/cached_lvol_stat_collector.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/services/capacity_and_stats_collector.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/services/health_check_service.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/services/lvol_stat_collector.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/services/main_distr_event_collector.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/services/new_device_discovery.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/services/spdk/__init__.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/services/spdk/client.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/services/spdk_http_proxy_server.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/services/spdk_stats_collector.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/services/storage_node_monitor.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/services/tasks_runner_failed_migration.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/services/tasks_runner_migration.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/services/tasks_runner_new_dev_migration.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/services/tasks_runner_node_add.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/services/tasks_runner_restart.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/snode_client.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/storage_node_ops.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/test/test_utils.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/utils.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/workers/cleanup_foundationdb.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/README.md +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/__init__.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/app.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/snode_ops.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/snode_ops_k8s.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/swagger_ui_blueprint.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/web_api_cluster.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/web_api_pool.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/blueprints/web_api_storage_node.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/node_utils.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/node_utils_k8s.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/requirements.txt +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/static/SimplyBlock-API.postman_collection.json +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/static/delete.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/static/swagger.yaml +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/static/tst.py +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-17.2.0 → 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
|
|
@@ -35,7 +35,7 @@ PROT_STAT_COLLECTOR_INTERVAL_SEC = 2
|
|
|
35
35
|
SPDK_STAT_COLLECTOR_INTERVAL_SEC = 5
|
|
36
36
|
DISTR_EVENT_COLLECTOR_INTERVAL_SEC = 2
|
|
37
37
|
DISTR_EVENT_COLLECTOR_NUM_OF_EVENTS = 10
|
|
38
|
-
CAP_MONITOR_INTERVAL_SEC =
|
|
38
|
+
CAP_MONITOR_INTERVAL_SEC = 10
|
|
39
39
|
SSD_VENDOR_WHITE_LIST = ["1d0f:cd01", "1d0f:cd00"]
|
|
40
40
|
CACHED_LVOL_STAT_COLLECTOR_INTERVAL_SEC = 5
|
|
41
41
|
DEV_DISCOVERY_INTERVAL_SEC = 60
|
|
@@ -588,6 +588,7 @@ def add_lvol_ha(name, size, host_id_or_name, ha_type, pool_id_or_name, use_comp,
|
|
|
588
588
|
return False, error
|
|
589
589
|
|
|
590
590
|
lvol.pool_uuid = pool.get_id()
|
|
591
|
+
lvol.pool_name = pool.pool_name
|
|
591
592
|
lvol.status = LVol.STATUS_ONLINE
|
|
592
593
|
lvol.write_to_db(db_controller.kv_store)
|
|
593
594
|
lvol_events.lvol_create(lvol)
|
|
@@ -1060,10 +1061,16 @@ def list_lvols(is_json, cluster_id, pool_id_or_name, all=False):
|
|
|
1060
1061
|
logger.debug(lvol)
|
|
1061
1062
|
if lvol.deleted is True and all is False:
|
|
1062
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
|
+
|
|
1063
1069
|
data.append({
|
|
1064
1070
|
"Id": lvol.uuid,
|
|
1065
1071
|
"Name": lvol.lvol_name,
|
|
1066
1072
|
"Size": utils.humanbytes(lvol.size),
|
|
1073
|
+
"Used": f"{utils.humanbytes(size_used)}",
|
|
1067
1074
|
"Hostname": lvol.hostname,
|
|
1068
1075
|
"HA": lvol.ha_type,
|
|
1069
1076
|
"BlobID": lvol.blobid or "",
|
|
@@ -1171,32 +1178,38 @@ def resize_lvol(id, new_size):
|
|
|
1171
1178
|
db_controller = DBController()
|
|
1172
1179
|
lvol = db_controller.get_lvol_by_id(id)
|
|
1173
1180
|
if not lvol:
|
|
1174
|
-
|
|
1175
|
-
|
|
1181
|
+
msg = f"LVol not found: {id}"
|
|
1182
|
+
logger.error(msg)
|
|
1183
|
+
return False, msg
|
|
1176
1184
|
|
|
1177
1185
|
pool = db_controller.get_pool_by_id(lvol.pool_uuid)
|
|
1178
1186
|
if pool.status == Pool.STATUS_INACTIVE:
|
|
1179
|
-
|
|
1180
|
-
|
|
1187
|
+
msg = f"Pool is disabled {pool.get_id()}"
|
|
1188
|
+
logger.error(msg)
|
|
1189
|
+
return False, msg
|
|
1181
1190
|
|
|
1182
1191
|
if lvol.size >= new_size:
|
|
1183
|
-
|
|
1184
|
-
|
|
1192
|
+
msg = f"New size {new_size} must be higher than the original size {lvol.size}"
|
|
1193
|
+
logger.error(msg)
|
|
1194
|
+
return False, msg
|
|
1185
1195
|
|
|
1186
1196
|
if lvol.max_size < new_size:
|
|
1187
|
-
|
|
1188
|
-
|
|
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
|
|
1189
1200
|
|
|
1190
1201
|
if 0 < pool.lvol_max_size < new_size:
|
|
1191
|
-
|
|
1192
|
-
|
|
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
|
|
1193
1206
|
|
|
1194
1207
|
if pool.pool_max_size > 0:
|
|
1195
1208
|
total = pool_controller.get_pool_total_capacity(pool.get_id())
|
|
1196
1209
|
if total + new_size > pool.pool_max_size:
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
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
|
|
1200
1213
|
|
|
1201
1214
|
snode = db_controller.get_storage_node_by_id(lvol.node_id)
|
|
1202
1215
|
|
|
@@ -1208,13 +1221,13 @@ def resize_lvol(id, new_size):
|
|
|
1208
1221
|
rpc_client = RPCClient(
|
|
1209
1222
|
snode.mgmt_ip, snode.rpc_port, snode.rpc_username, snode.rpc_password)
|
|
1210
1223
|
|
|
1211
|
-
error = False
|
|
1212
1224
|
if lvol.ha_type == "single":
|
|
1213
1225
|
|
|
1214
1226
|
ret = rpc_client.bdev_lvol_resize(f"{lvol.lvs_name}/{lvol.lvol_bdev}", size_in_mib)
|
|
1215
1227
|
if not ret:
|
|
1216
|
-
|
|
1217
|
-
error
|
|
1228
|
+
msg = f"Error resizing lvol on node: {snode.get_id()}"
|
|
1229
|
+
logger.error(msg)
|
|
1230
|
+
return False, msg
|
|
1218
1231
|
|
|
1219
1232
|
else:
|
|
1220
1233
|
primary_node = None
|
|
@@ -1228,7 +1241,7 @@ def resize_lvol(id, new_size):
|
|
|
1228
1241
|
if sec_node.status == StorageNode.STATUS_DOWN:
|
|
1229
1242
|
msg = f"Secondary node is in down status, can not resize lvol"
|
|
1230
1243
|
logger.error(msg)
|
|
1231
|
-
|
|
1244
|
+
return False, msg
|
|
1232
1245
|
|
|
1233
1246
|
elif sec_node.status == StorageNode.STATUS_ONLINE:
|
|
1234
1247
|
secondary_node = sec_node
|
|
@@ -1258,10 +1271,8 @@ def resize_lvol(id, new_size):
|
|
|
1258
1271
|
# both primary and secondary are not online
|
|
1259
1272
|
msg = f"Host nodes are not online"
|
|
1260
1273
|
logger.error(msg)
|
|
1261
|
-
|
|
1274
|
+
return False, msg
|
|
1262
1275
|
|
|
1263
|
-
if error:
|
|
1264
|
-
return False
|
|
1265
1276
|
|
|
1266
1277
|
if primary_node:
|
|
1267
1278
|
logger.info(f"Resizing LVol: {lvol.get_id()} on node: {primary_node.get_id()}")
|
|
@@ -1271,8 +1282,9 @@ def resize_lvol(id, new_size):
|
|
|
1271
1282
|
|
|
1272
1283
|
ret = rpc_client.bdev_lvol_resize(f"{lvol.lvs_name}/{lvol.lvol_bdev}", size_in_mib)
|
|
1273
1284
|
if not ret:
|
|
1274
|
-
|
|
1275
|
-
error
|
|
1285
|
+
msg = f"Error resizing lvol on node: {primary_node.get_id()}"
|
|
1286
|
+
logger.error(msg)
|
|
1287
|
+
return False, msg
|
|
1276
1288
|
|
|
1277
1289
|
if secondary_node:
|
|
1278
1290
|
logger.info(f"Resizing LVol: {lvol.get_id()} on node: {secondary_node.get_id()}")
|
|
@@ -1284,18 +1296,17 @@ def resize_lvol(id, new_size):
|
|
|
1284
1296
|
|
|
1285
1297
|
ret = sec_rpc_client.bdev_lvol_resize(f"{lvol.lvs_name}/{lvol.lvol_bdev}", size_in_mib)
|
|
1286
1298
|
if not ret:
|
|
1287
|
-
|
|
1288
|
-
error
|
|
1299
|
+
msg = f"Error resizing lvol on node: {sec_node.get_id()}"
|
|
1300
|
+
logger.error(msg)
|
|
1301
|
+
return False, msg
|
|
1289
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
|
|
1290
1309
|
|
|
1291
|
-
if not error:
|
|
1292
|
-
lvol = db_controller.get_lvol_by_id(id)
|
|
1293
|
-
lvol.size = new_size
|
|
1294
|
-
lvol.write_to_db(db_controller.kv_store)
|
|
1295
|
-
logger.info("Done")
|
|
1296
|
-
return True
|
|
1297
|
-
else:
|
|
1298
|
-
return False
|
|
1299
1310
|
|
|
1300
1311
|
|
|
1301
1312
|
def set_read_only(id):
|
|
@@ -32,7 +32,7 @@ while True:
|
|
|
32
32
|
logger.warning(f"Cluster absolute cap critical, util: {size_util}% of cluster util: {cl.cap_crit}, "
|
|
33
33
|
f"putting the cluster in read_only mode")
|
|
34
34
|
if cl.id in last_event:
|
|
35
|
-
diff = datetime.now(timezone.utc) - datetime.
|
|
35
|
+
diff = datetime.now(timezone.utc) - datetime.fromtimestamp(last_event[cl.id]["date"]/1000, timezone.utc)
|
|
36
36
|
if diff and diff.total_seconds() > 60 * 15:
|
|
37
37
|
ev = cluster_events.cluster_cap_crit(cl, size_util)
|
|
38
38
|
if ev:
|
|
@@ -38,13 +38,6 @@ def list_lvols(uuid):
|
|
|
38
38
|
data = []
|
|
39
39
|
for lvol in lvols:
|
|
40
40
|
tmp = lvol.get_clean_dict()
|
|
41
|
-
tmp['pool_name'] = lvol.pool_uuid
|
|
42
|
-
# records_list = lvol_controller.get_io_stats(lvol.get_id(), history=None, parse_sizes=False)
|
|
43
|
-
# records_list = False
|
|
44
|
-
# if records_list:
|
|
45
|
-
# tmp['iostats'] = records_list
|
|
46
|
-
# else:
|
|
47
|
-
tmp['iostats'] = []
|
|
48
41
|
data.append(tmp)
|
|
49
42
|
return utils.get_response(data)
|
|
50
43
|
|
|
@@ -266,8 +259,8 @@ def resize_lvol(uuid):
|
|
|
266
259
|
|
|
267
260
|
new_size = core_utils.parse_size(cl_data['size'])
|
|
268
261
|
|
|
269
|
-
ret = lvol_controller.resize_lvol(uuid, new_size)
|
|
270
|
-
return utils.get_response(ret)
|
|
262
|
+
ret, error = lvol_controller.resize_lvol(uuid, new_size)
|
|
263
|
+
return utils.get_response(ret, error)
|
|
271
264
|
|
|
272
265
|
|
|
273
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
|
{sbcli_dev-17.2.0 → 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
|
{sbcli_dev-17.2.0 → sbcli_dev-17.2.2}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-17.2.0 → 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.0 → 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.0 → 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.0 → sbcli_dev-17.2.2}/simplyblock_core/services/cached_lvol_stat_collector.py
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-17.2.0 → 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.0 → 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.0 → sbcli_dev-17.2.2}/simplyblock_core/services/tasks_runner_failed_migration.py
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-17.2.0 → 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.0 → 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
|