sbcli-dev 11.0.0__tar.gz → 11.0.3__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.0 → sbcli_dev-11.0.3}/PKG-INFO +1 -1
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/sbcli_dev.egg-info/PKG-INFO +1 -1
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/controllers/lvol_controller.py +31 -10
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/controllers/snapshot_controller.py +52 -1
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/env_var +1 -1
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/models/lvol_model.py +2 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/README.md +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/pyproject.toml +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/requirements.txt +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/sbcli_dev.egg-info/SOURCES.txt +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/sbcli_dev.egg-info/dependency_links.txt +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/sbcli_dev.egg-info/entry_points.txt +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/sbcli_dev.egg-info/requires.txt +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/sbcli_dev.egg-info/top_level.txt +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/setup.cfg +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/setup.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_cli/__init__.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_cli/cli.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_cli/main.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/__init__.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/cluster_ops.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/constants.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/controllers/device_controller.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/controllers/events_controller.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/controllers/health_controller.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/controllers/pool_controller.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/controllers/tasks_controller.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/db_controller.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/distr_controller.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/mgmt_node_ops.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/models/cluster.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/models/deployer.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/models/events.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/models/iface.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/models/job_schedule.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/models/nvme_device.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/models/pool.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/models/stats.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/models/storage_node.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/rpc_client.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/scripts/__init__.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/scripts/dashboard.yml +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/scripts/deploy_fdb.sh +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/scripts/deploy_stack.sh +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/scripts/docker-compose-swarm.yml +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/scripts/foundation.yml +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/scripts/objstore.yml +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/scripts/prepare_fdb.sh +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/scripts/prometheus.yml +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/services/cached_lvol_stat_collector.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/services/capacity_and_stats_collector.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/services/health_check_service.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/services/log_agg_service.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/services/lvol_stat_collector.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/services/main_distr_event_collector.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/services/new_device_discovery.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/services/port_stat_collector.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/services/spdk_http_proxy_server.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/services/storage_node_monitor.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/services/tasks_runner_failed_migration.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/services/tasks_runner_migration.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/services/tasks_runner_new_dev_migration.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/services/tasks_runner_node_add.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/services/tasks_runner_restart.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/snode_client.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/storage_node_ops.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/utils.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/workers/cleanup_foundationdb.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/README.md +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/__init__.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/app.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/blueprints/snode_ops.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/blueprints/snode_ops_k8s.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/blueprints/web_api_cluster.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/blueprints/web_api_lvol.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/blueprints/web_api_pool.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/blueprints/web_api_storage_node.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/caching_node_app.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/caching_node_app_k8s.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/node_utils.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/requirements.txt +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/snode_app.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/snode_app_k8s.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/static/delete.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/static/tst.py +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_web/utils.py +0 -0
|
@@ -123,7 +123,7 @@ def validate_add_lvol_func(name, size, host_id_or_name, pool_id_or_name,
|
|
|
123
123
|
total = pool_controller.get_pool_total_capacity(pool.get_id())
|
|
124
124
|
if total + size > pool.pool_max_size:
|
|
125
125
|
return False, f"Invalid LVol size: {utils.humanbytes(size)} " \
|
|
126
|
-
f"Pool max size has reached {utils.humanbytes(total)} of {utils.humanbytes(pool.pool_max_size)}"
|
|
126
|
+
f"Pool max size has reached {utils.humanbytes(total+size)} of {utils.humanbytes(pool.pool_max_size)}"
|
|
127
127
|
|
|
128
128
|
for lvol in db_controller.get_lvols(pool.cluster_id):
|
|
129
129
|
if lvol.pool_uuid == pool.get_id():
|
|
@@ -414,7 +414,7 @@ def add_lvol_ha(name, size, host_id_or_name, ha_type, pool_id_or_name, use_comp,
|
|
|
414
414
|
lvol.namespace = namespace or ""
|
|
415
415
|
lvol.size = int(size)
|
|
416
416
|
lvol.max_size = int(max_size)
|
|
417
|
-
lvol.status = LVol.
|
|
417
|
+
lvol.status = LVol.STATUS_IN_CREATION
|
|
418
418
|
|
|
419
419
|
lvol.create_dt = str(datetime.now())
|
|
420
420
|
lvol.ha_type = ha_type
|
|
@@ -485,6 +485,7 @@ def add_lvol_ha(name, size, host_id_or_name, ha_type, pool_id_or_name, use_comp,
|
|
|
485
485
|
lvol.crypto_key1 = crypto_key1
|
|
486
486
|
lvol.crypto_key2 = crypto_key2
|
|
487
487
|
|
|
488
|
+
lvol.write_to_db(db_controller.kv_store)
|
|
488
489
|
|
|
489
490
|
lvol_bdev, error = add_lvol_on_node(lvol, host_node)
|
|
490
491
|
if error:
|
|
@@ -495,12 +496,25 @@ def add_lvol_ha(name, size, host_id_or_name, ha_type, pool_id_or_name, use_comp,
|
|
|
495
496
|
|
|
496
497
|
if ha_type == "ha":
|
|
497
498
|
sec_node = db_controller.get_storage_node_by_id(host_node.secondary_node_id)
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
499
|
+
if sec_node and sec_node.status == StorageNode.STATUS_ONLINE:
|
|
500
|
+
ret, error = add_lvol_on_node(lvol, sec_node, ha_inode_self=1)
|
|
501
|
+
if error:
|
|
502
|
+
logger.error(error)
|
|
503
|
+
logger.error(f"Failed to add lvol on node: {sec_node.get_id()}")
|
|
504
|
+
logger.info(f"Removing LVol from {host_node.get_id()}")
|
|
505
|
+
lvol.status = LVol.STATUS_IN_DELETION
|
|
506
|
+
lvol.write_to_db(db_controller.kv_store)
|
|
507
|
+
ret=delete_lvol_from_node(lvol.get_id(), host_node.get_id())
|
|
508
|
+
if ret:
|
|
509
|
+
lvol.remove(db_controller.kv_store)
|
|
510
|
+
else:
|
|
511
|
+
logger.error(f"Failed to remove lvol from node {host_node.get_id()}, LVol status: {lvol.status}")
|
|
512
|
+
return False, error
|
|
513
|
+
|
|
514
|
+
lvol.nodes.append(host_node.secondary_node_id)
|
|
502
515
|
|
|
503
516
|
lvol.pool_uuid = pool.get_id()
|
|
517
|
+
lvol.status = LVol.STATUS_ONLINE
|
|
504
518
|
lvol.write_to_db(db_controller.kv_store)
|
|
505
519
|
lvol_events.lvol_create(lvol)
|
|
506
520
|
|
|
@@ -1115,10 +1129,17 @@ def resize_lvol(id, new_size):
|
|
|
1115
1129
|
if lvol.max_size < new_size:
|
|
1116
1130
|
logger.error(f"New size {new_size} must be smaller than the max size {lvol.max_size}")
|
|
1117
1131
|
return False
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1132
|
+
|
|
1133
|
+
if 0 < pool.lvol_max_size < new_size:
|
|
1134
|
+
logger.error(f"Pool Max LVol size is: {utils.humanbytes(pool.lvol_max_size)}, LVol size: {utils.humanbytes(new_size)} must be below this limit")
|
|
1135
|
+
return False
|
|
1136
|
+
|
|
1137
|
+
if pool.pool_max_size > 0:
|
|
1138
|
+
total = pool_controller.get_pool_total_capacity(pool.get_id())
|
|
1139
|
+
if total + new_size > pool.pool_max_size:
|
|
1140
|
+
logger.error( f"Invalid LVol size: {utils.humanbytes(new_size)} "
|
|
1141
|
+
f"Pool max size has reached {utils.humanbytes(total+new_size)} of {utils.humanbytes(pool.pool_max_size)}")
|
|
1142
|
+
return False
|
|
1122
1143
|
|
|
1123
1144
|
snode = db_controller.get_storage_node_by_id(lvol.node_id)
|
|
1124
1145
|
|
|
@@ -58,6 +58,25 @@ def add(lvol_id, snapshot_name):
|
|
|
58
58
|
logger.error(msg)
|
|
59
59
|
return False, msg
|
|
60
60
|
|
|
61
|
+
|
|
62
|
+
rec = db_controller.get_lvol_stats(lvol, 1)
|
|
63
|
+
if rec:
|
|
64
|
+
size = rec[0].size_used
|
|
65
|
+
else:
|
|
66
|
+
size = lvol.size
|
|
67
|
+
|
|
68
|
+
if 0 < pool.lvol_max_size < size:
|
|
69
|
+
logger.error(f"Pool Max LVol size is: {utils.humanbytes(pool.lvol_max_size)}, LVol size: {utils.humanbytes(size)} must be below this limit")
|
|
70
|
+
return False
|
|
71
|
+
|
|
72
|
+
if pool.pool_max_size > 0:
|
|
73
|
+
total = pool_controller.get_pool_total_capacity(pool.get_id())
|
|
74
|
+
if total + size > pool.pool_max_size:
|
|
75
|
+
logger.error( f"Invalid LVol size: {utils.humanbytes(size)} "
|
|
76
|
+
f"Pool max size has reached {utils.humanbytes(total+size)} of {utils.humanbytes(pool.pool_max_size)}")
|
|
77
|
+
return False
|
|
78
|
+
|
|
79
|
+
|
|
61
80
|
##############################################################################
|
|
62
81
|
# Validate adding snap on storage node
|
|
63
82
|
snode_api = SNodeClient(snode.api_endpoint)
|
|
@@ -104,7 +123,7 @@ def add(lvol_id, snapshot_name):
|
|
|
104
123
|
logger.info("Creating Snapshot bdev")
|
|
105
124
|
ret = rpc_client.lvol_create_snapshot(f"{lvol.lvs_name}/{lvol.lvol_bdev}", snap_bdev_name)
|
|
106
125
|
if not ret:
|
|
107
|
-
return False, "Failed to create snapshot
|
|
126
|
+
return False, f"Failed to create snapshot on node: {snode.get_id()}"
|
|
108
127
|
|
|
109
128
|
size = lvol.size
|
|
110
129
|
used_size = 0
|
|
@@ -124,6 +143,14 @@ def add(lvol_id, snapshot_name):
|
|
|
124
143
|
sec_rpc_client.bdev_lvol_set_leader(False, lvs_name=lvol.lvs_name)
|
|
125
144
|
ret = sec_rpc_client.bdev_lvol_snapshot_register(
|
|
126
145
|
f"{lvol.lvs_name}/{lvol.lvol_bdev}", snap_bdev_name, snap_uuid, blobid)
|
|
146
|
+
if not ret:
|
|
147
|
+
msg = f"Failed to register snapshot on node: {sec_node.get_id()}"
|
|
148
|
+
logger.error(msg)
|
|
149
|
+
logger.info(f"Removing snapshot from {snode.get_id()}")
|
|
150
|
+
ret = rpc_client.delete_lvol(f"{lvol.lvs_name}/{snap_bdev_name}")
|
|
151
|
+
if not ret:
|
|
152
|
+
logger.error(f"Failed to delete snap from node: {snode.get_id()}")
|
|
153
|
+
return False, msg
|
|
127
154
|
|
|
128
155
|
|
|
129
156
|
snap = SnapShot()
|
|
@@ -298,6 +325,19 @@ def clone(snapshot_id, clone_name, new_size=0):
|
|
|
298
325
|
logger.error(msg)
|
|
299
326
|
return False, msg
|
|
300
327
|
|
|
328
|
+
size = snap.size
|
|
329
|
+
if 0 < pool.lvol_max_size < size:
|
|
330
|
+
logger.error(f"Pool Max LVol size is: {utils.humanbytes(pool.lvol_max_size)}, LVol size: {utils.humanbytes(size)} must be below this limit")
|
|
331
|
+
return False
|
|
332
|
+
|
|
333
|
+
if pool.pool_max_size > 0:
|
|
334
|
+
total = pool_controller.get_pool_total_capacity(pool.get_id())
|
|
335
|
+
if total + size > pool.pool_max_size:
|
|
336
|
+
logger.error( f"Invalid LVol size: {utils.humanbytes(size)} "
|
|
337
|
+
f"Pool max size has reached {utils.humanbytes(total+size)} of {utils.humanbytes(pool.pool_max_size)}")
|
|
338
|
+
return False
|
|
339
|
+
|
|
340
|
+
|
|
301
341
|
# Validate cloning snap on storage node
|
|
302
342
|
snode_api = SNodeClient(snode.api_endpoint)
|
|
303
343
|
result, _ = snode_api.info()
|
|
@@ -404,6 +444,17 @@ def clone(snapshot_id, clone_name, new_size=0):
|
|
|
404
444
|
if sec_node.status == StorageNode.STATUS_ONLINE:
|
|
405
445
|
ret, error = lvol_controller.add_lvol_on_node(lvol, sec_node, ha_inode_self=1)
|
|
406
446
|
if error:
|
|
447
|
+
logger.error(error)
|
|
448
|
+
logger.error(f"Failed to add clone on node: {sec_node.get_id()}")
|
|
449
|
+
logger.info(f"Removing clone from {snode.get_id()}")
|
|
450
|
+
lvol.status = LVol.STATUS_IN_DELETION
|
|
451
|
+
lvol.write_to_db(db_controller.kv_store)
|
|
452
|
+
ret = lvol_controller.delete_lvol_from_node(lvol.get_id(), snode.get_id())
|
|
453
|
+
if ret:
|
|
454
|
+
lvol.remove(db_controller.kv_store)
|
|
455
|
+
else:
|
|
456
|
+
logger.error(f"Failed to remove clone from node {snode.get_id()}, LVol status: {lvol.status}")
|
|
457
|
+
|
|
407
458
|
return False, error
|
|
408
459
|
|
|
409
460
|
lvol.nodes.append(snode.secondary_node_id)
|
|
@@ -8,6 +8,7 @@ from simplyblock_core.models.nvme_device import NVMeDevice
|
|
|
8
8
|
|
|
9
9
|
class LVol(BaseModel):
|
|
10
10
|
|
|
11
|
+
STATUS_IN_CREATION = 'in_creation'
|
|
11
12
|
STATUS_ONLINE = 'online'
|
|
12
13
|
STATUS_OFFLINE = 'offline'
|
|
13
14
|
STATUS_IN_DELETION = 'in_deletion'
|
|
@@ -16,6 +17,7 @@ class LVol(BaseModel):
|
|
|
16
17
|
STATUS_ONLINE: 1,
|
|
17
18
|
STATUS_OFFLINE: 2,
|
|
18
19
|
STATUS_IN_DELETION: 3,
|
|
20
|
+
STATUS_IN_CREATION: 4,
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
base_bdev: str = ""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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.0 → sbcli_dev-11.0.3}/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
|
{sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/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.0 → sbcli_dev-11.0.3}/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.0 → sbcli_dev-11.0.3}/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.0 → sbcli_dev-11.0.3}/simplyblock_core/services/cached_lvol_stat_collector.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/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.0 → sbcli_dev-11.0.3}/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.0 → sbcli_dev-11.0.3}/simplyblock_core/services/tasks_runner_failed_migration.py
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-11.0.0 → sbcli_dev-11.0.3}/simplyblock_core/services/tasks_runner_new_dev_migration.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|