sbcli-dev 6.0.2__tar.gz → 6.0.4__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-6.0.2 → sbcli_dev-6.0.4}/PKG-INFO +1 -1
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/env_var +1 -1
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/sbcli_dev.egg-info/PKG-INFO +1 -1
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/controllers/device_controller.py +1 -1
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/models/storage_node.py +1 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/services/tasks_runner_migration.py +10 -1
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/storage_node_ops.py +15 -6
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/utils.py +48 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/README.md +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/pyproject.toml +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/sbcli_dev.egg-info/SOURCES.txt +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/sbcli_dev.egg-info/dependency_links.txt +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/sbcli_dev.egg-info/entry_points.txt +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/sbcli_dev.egg-info/requires.txt +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/sbcli_dev.egg-info/top_level.txt +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/setup.cfg +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/setup.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_cli/cli.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_cli/main.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/__init__.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/cluster_ops.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/compute_node_ops.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/constants.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/controllers/events_controller.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/controllers/health_controller.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/controllers/lvol_controller.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/controllers/pool_controller.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/controllers/snapshot_controller.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/controllers/tasks_controller.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/distr_controller.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/kv_store.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/mgmt_node_ops.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/models/cluster.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/models/compute_node.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/models/deployer.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/models/events.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/models/global_settings.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/models/iface.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/models/job_schedule.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/models/lvol_model.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/models/nvme_device.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/models/pool.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/models/stats.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/rpc_client.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/scripts/__init__.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/scripts/dashboard.yml +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/scripts/deploy_fdb.sh +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/scripts/deploy_stack.sh +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/scripts/docker-compose-swarm.yml +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/scripts/foundation.yml +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/scripts/objstore.yml +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/scripts/prepare_fdb.sh +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/scripts/prometheus.yml +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/services/cached_lvol_stat_collector.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/services/capacity_and_stats_collector.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/services/health_check_service.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/services/log_agg_service.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/services/lvol_stat_collector.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/services/main_distr_event_collector.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/services/new_device_discovery.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/services/port_stat_collector.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/services/spdk_http_proxy_server.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/services/storage_node_monitor.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/services/tasks_runner_failed_migration.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/services/tasks_runner_new_dev_migration.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/services/tasks_runner_node_add.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/services/tasks_runner_restart.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/snode_client.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/__init__.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/app.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/blueprints/snode_ops.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/blueprints/snode_ops_k8s.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/blueprints/web_api_cluster.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/blueprints/web_api_lvol.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/blueprints/web_api_pool.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/blueprints/web_api_storage_node.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/caching_node_app.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/caching_node_app_k8s.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/node_utils.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/snode_app.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/snode_app_k8s.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/static/delete.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/static/tst.py +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/simplyblock_web/utils.py +0 -0
|
@@ -754,7 +754,7 @@ def set_jm_device_state(device_id, state):
|
|
|
754
754
|
# make other nodes connect to the new devices
|
|
755
755
|
snodes = db_controller.get_storage_nodes_by_cluster_id(snode.cluster_id)
|
|
756
756
|
for node_index, node in enumerate(snodes):
|
|
757
|
-
if node.
|
|
757
|
+
if node.status != StorageNode.STATUS_ONLINE:
|
|
758
758
|
continue
|
|
759
759
|
logger.info(f"Connecting to node: {node.get_id()}")
|
|
760
760
|
node.remote_jm_devices = storage_node_ops._connect_to_remote_jm_devs(node)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
2
|
import time
|
|
3
|
-
|
|
3
|
+
from datetime import datetime
|
|
4
4
|
|
|
5
5
|
from simplyblock_core import constants, kv_store, utils
|
|
6
6
|
from simplyblock_core.controllers import tasks_events, tasks_controller
|
|
@@ -42,6 +42,15 @@ def task_runner(task):
|
|
|
42
42
|
task.write_to_db(db_controller.kv_store)
|
|
43
43
|
return False
|
|
44
44
|
|
|
45
|
+
if snode.online_since:
|
|
46
|
+
diff = datetime.now() - datetime.fromisoformat(snode.online_since)
|
|
47
|
+
if diff.total_seconds() < 60 * 5:
|
|
48
|
+
task.function_result = "node is online < 5 min, retrying"
|
|
49
|
+
task.status = JobSchedule.STATUS_SUSPENDED
|
|
50
|
+
task.retry += 1
|
|
51
|
+
task.write_to_db(db_controller.kv_store)
|
|
52
|
+
return False
|
|
53
|
+
|
|
45
54
|
rpc_client = RPCClient(snode.mgmt_ip, snode.rpc_port, snode.rpc_username, snode.rpc_password,
|
|
46
55
|
timeout=5, retry=2)
|
|
47
56
|
if "migration" not in task.function_params:
|
|
@@ -1893,11 +1893,8 @@ def restart_storage_node(
|
|
|
1893
1893
|
if snode.lvstore_stack or snode.is_secondary_node:
|
|
1894
1894
|
ret = recreate_lvstore(snode)
|
|
1895
1895
|
if not ret:
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
# logger.info("Dumping lvstore data")
|
|
1899
|
-
# ret = dump_lvstore(node_id)
|
|
1900
|
-
# print(ret)
|
|
1896
|
+
logger.error("Failed to recreate lvstore")
|
|
1897
|
+
return False
|
|
1901
1898
|
|
|
1902
1899
|
time.sleep(4)
|
|
1903
1900
|
|
|
@@ -1924,12 +1921,20 @@ def list_storage_nodes(is_json, cluster_id=None):
|
|
|
1924
1921
|
nodes = db_controller.get_storage_nodes()
|
|
1925
1922
|
data = []
|
|
1926
1923
|
output = ""
|
|
1924
|
+
now = datetime.datetime.now()
|
|
1927
1925
|
|
|
1928
1926
|
for node in nodes:
|
|
1929
1927
|
logger.debug(node)
|
|
1930
1928
|
logger.debug("*" * 20)
|
|
1931
1929
|
total_devices = len(node.nvme_devices)
|
|
1932
1930
|
online_devices = 0
|
|
1931
|
+
uptime = ""
|
|
1932
|
+
if node.online_since:
|
|
1933
|
+
try:
|
|
1934
|
+
uptime = utils.strfdelta((now - datetime.datetime.fromisoformat(node.online_since)))
|
|
1935
|
+
except:
|
|
1936
|
+
pass
|
|
1937
|
+
|
|
1933
1938
|
for dev in node.nvme_devices:
|
|
1934
1939
|
if dev.status == NVMeDevice.STATUS_ONLINE:
|
|
1935
1940
|
online_devices += 1
|
|
@@ -1941,7 +1946,7 @@ def list_storage_nodes(is_json, cluster_id=None):
|
|
|
1941
1946
|
"LVols": f"{len(node.lvols)}",
|
|
1942
1947
|
"Status": node.status,
|
|
1943
1948
|
"Health": node.health_check,
|
|
1944
|
-
|
|
1949
|
+
"Up time": uptime,
|
|
1945
1950
|
"Cloud ID": node.cloud_instance_id,
|
|
1946
1951
|
"Cloud Type": node.cloud_instance_type,
|
|
1947
1952
|
"Ext IP": node.cloud_instance_public_ip,
|
|
@@ -2823,6 +2828,8 @@ def set_node_status(node_id, status):
|
|
|
2823
2828
|
old_status = snode.status
|
|
2824
2829
|
snode.status = status
|
|
2825
2830
|
snode.updated_at = str(datetime.datetime.now())
|
|
2831
|
+
if status == StorageNode.STATUS_ONLINE:
|
|
2832
|
+
snode.online_since = str(datetime.datetime.now())
|
|
2826
2833
|
snode.write_to_db(db_controller.kv_store)
|
|
2827
2834
|
storage_events.snode_status_change(snode, snode.status, old_status, caused_by="monitor")
|
|
2828
2835
|
distr_controller.send_node_status_event(snode, status)
|
|
@@ -2911,6 +2918,8 @@ def recreate_lvstore_on_sec(snode, primary_node=None):
|
|
|
2911
2918
|
ret = rpc_client.nvmf_subsystem_listener_set_ana_state(
|
|
2912
2919
|
lvol.nqn, iface.ip4_address, "4420", False)
|
|
2913
2920
|
|
|
2921
|
+
return True
|
|
2922
|
+
|
|
2914
2923
|
|
|
2915
2924
|
def recreate_lvstore(snode):
|
|
2916
2925
|
db_controller = DBController(KVStore())
|
|
@@ -639,3 +639,51 @@ def nearest_upper_power_of_2(n):
|
|
|
639
639
|
return n
|
|
640
640
|
# Otherwise, return the nearest upper power of 2
|
|
641
641
|
return 1 << n.bit_length()
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
def strfdelta(tdelta, fmt='{D:02}d {H:02}h {M:02}m {S:02}s', inputtype='timedelta'):
|
|
645
|
+
"""Convert a datetime.timedelta object or a regular number to a custom-
|
|
646
|
+
formatted string, just like the stftime() method does for datetime.datetime
|
|
647
|
+
objects.
|
|
648
|
+
|
|
649
|
+
The fmt argument allows custom formatting to be specified. Fields can
|
|
650
|
+
include seconds, minutes, hours, days, and weeks. Each field is optional.
|
|
651
|
+
|
|
652
|
+
Some examples:
|
|
653
|
+
'{D:02}d {H:02}h {M:02}m {S:02}s' --> '05d 08h 04m 02s' (default)
|
|
654
|
+
'{W}w {D}d {H}:{M:02}:{S:02}' --> '4w 5d 8:04:02'
|
|
655
|
+
'{D:2}d {H:2}:{M:02}:{S:02}' --> ' 5d 8:04:02'
|
|
656
|
+
'{H}h {S}s' --> '72h 800s'
|
|
657
|
+
|
|
658
|
+
The inputtype argument allows tdelta to be a regular number instead of the
|
|
659
|
+
default, which is a datetime.timedelta object. Valid inputtype strings:
|
|
660
|
+
's', 'seconds',
|
|
661
|
+
'm', 'minutes',
|
|
662
|
+
'h', 'hours',
|
|
663
|
+
'd', 'days',
|
|
664
|
+
'w', 'weeks'
|
|
665
|
+
"""
|
|
666
|
+
|
|
667
|
+
# Convert tdelta to integer seconds.
|
|
668
|
+
if inputtype == 'timedelta':
|
|
669
|
+
remainder = int(tdelta.total_seconds())
|
|
670
|
+
elif inputtype in ['s', 'seconds']:
|
|
671
|
+
remainder = int(tdelta)
|
|
672
|
+
elif inputtype in ['m', 'minutes']:
|
|
673
|
+
remainder = int(tdelta)*60
|
|
674
|
+
elif inputtype in ['h', 'hours']:
|
|
675
|
+
remainder = int(tdelta)*3600
|
|
676
|
+
elif inputtype in ['d', 'days']:
|
|
677
|
+
remainder = int(tdelta)*86400
|
|
678
|
+
elif inputtype in ['w', 'weeks']:
|
|
679
|
+
remainder = int(tdelta)*604800
|
|
680
|
+
|
|
681
|
+
f = string.Formatter()
|
|
682
|
+
desired_fields = [field_tuple[1] for field_tuple in f.parse(fmt)]
|
|
683
|
+
possible_fields = ('W', 'D', 'H', 'M', 'S')
|
|
684
|
+
constants = {'W': 604800, 'D': 86400, 'H': 3600, 'M': 60, 'S': 1}
|
|
685
|
+
values = {}
|
|
686
|
+
for field in possible_fields:
|
|
687
|
+
if field in desired_fields and field in constants:
|
|
688
|
+
values[field], remainder = divmod(remainder, constants[field])
|
|
689
|
+
return f.format(fmt, **values)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2
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
|
{sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/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
|
|
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-6.0.2 → sbcli_dev-6.0.4}/simplyblock_core/services/tasks_runner_failed_migration.py
RENAMED
|
File without changes
|
{sbcli_dev-6.0.2 → sbcli_dev-6.0.4}/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
|