sbcli-dev 3.9.12__zip → 4.0.0__zip
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-3.9.12 → sbcli_dev-4.0.0}/PKG-INFO +1 -1
- sbcli_dev-4.0.0/env_var +7 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/sbcli_dev.egg-info/PKG-INFO +1 -1
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/constants.py +1 -1
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/controllers/device_controller.py +1 -3
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/controllers/tasks_controller.py +3 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/distr_controller.py +2 -2
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/services/health_check_service.py +1 -1
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/services/main_distr_event_collector.py +35 -33
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/services/spdk_http_proxy_server.py +3 -1
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/storage_node_ops.py +7 -8
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/blueprints/snode_ops_k8s.py +1 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2 +2 -2
- sbcli_dev-3.9.12/env_var +0 -7
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/README.md +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/pyproject.toml +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/sbcli_dev.egg-info/SOURCES.txt +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/sbcli_dev.egg-info/dependency_links.txt +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/sbcli_dev.egg-info/entry_points.txt +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/sbcli_dev.egg-info/requires.txt +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/sbcli_dev.egg-info/top_level.txt +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/setup.cfg +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/setup.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_cli/cli.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_cli/main.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/__init__.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/cluster_ops.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/compute_node_ops.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/controllers/events_controller.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/controllers/health_controller.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/controllers/lvol_controller.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/controllers/pool_controller.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/controllers/snapshot_controller.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/kv_store.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/mgmt_node_ops.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/models/cluster.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/models/compute_node.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/models/deployer.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/models/events.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/models/global_settings.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/models/iface.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/models/job_schedule.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/models/lvol_model.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/models/nvme_device.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/models/pool.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/models/stats.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/models/storage_node.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/rpc_client.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/scripts/__init__.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/scripts/dashboard.yml +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/scripts/deploy_stack.sh +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/scripts/docker-compose-swarm.yml +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/scripts/objstore.yml +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/scripts/prometheus.yml +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/services/cached_lvol_stat_collector.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/services/capacity_and_stats_collector.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/services/log_agg_service.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/services/lvol_stat_collector.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/services/new_device_discovery.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/services/port_stat_collector.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/services/storage_node_monitor.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/services/tasks_runner_failed_migration.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/services/tasks_runner_migration.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/services/tasks_runner_new_dev_migration.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/services/tasks_runner_node_add.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/services/tasks_runner_restart.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/snode_client.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/utils.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/__init__.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/app.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/blueprints/snode_ops.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/blueprints/web_api_cluster.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/blueprints/web_api_lvol.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/blueprints/web_api_pool.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/blueprints/web_api_storage_node.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/caching_node_app.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/caching_node_app_k8s.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/node_utils.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/snode_app.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/snode_app_k8s.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/static/delete.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/static/tst.py +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_web/utils.py +0 -0
sbcli_dev-4.0.0/env_var
ADDED
|
@@ -11,7 +11,7 @@ LOG_WEB_DEBUG = False
|
|
|
11
11
|
|
|
12
12
|
INSTALL_DIR = os.path.dirname(os.path.realpath(__file__))
|
|
13
13
|
|
|
14
|
-
NODE_MONITOR_INTERVAL_SEC =
|
|
14
|
+
NODE_MONITOR_INTERVAL_SEC = 10
|
|
15
15
|
DEVICE_MONITOR_INTERVAL_SEC = 5
|
|
16
16
|
STAT_COLLECTOR_INTERVAL_SEC = 60*5 # 5 minutes
|
|
17
17
|
LVOL_STAT_COLLECTOR_INTERVAL_SEC = 5
|
|
@@ -660,11 +660,9 @@ def add_device(device_id):
|
|
|
660
660
|
else:
|
|
661
661
|
node.remote_devices.append(device_obj)
|
|
662
662
|
node.write_to_db(db_controller.kv_store)
|
|
663
|
-
distr_controller.send_cluster_map_to_node(node)
|
|
664
663
|
time.sleep(1)
|
|
665
664
|
|
|
666
|
-
|
|
667
|
-
distr_controller.send_cluster_map_to_node(snode)
|
|
665
|
+
distr_controller.send_dev_status_event(device_obj, device_obj.status)
|
|
668
666
|
|
|
669
667
|
device_events.device_create(device_obj)
|
|
670
668
|
|
|
@@ -7,6 +7,7 @@ import uuid
|
|
|
7
7
|
from simplyblock_core import kv_store, constants, utils
|
|
8
8
|
from simplyblock_core.controllers import tasks_events, device_controller
|
|
9
9
|
from simplyblock_core.models.job_schedule import JobSchedule
|
|
10
|
+
from simplyblock_core.models.storage_node import StorageNode
|
|
10
11
|
|
|
11
12
|
logger = logging.getLogger()
|
|
12
13
|
db_controller = kv_store.DBController()
|
|
@@ -155,6 +156,8 @@ def get_active_node_mig_task(cluster_id, node_id):
|
|
|
155
156
|
def add_device_failed_mig_task(device_id):
|
|
156
157
|
device = db_controller.get_storage_devices(device_id)
|
|
157
158
|
for node in db_controller.get_storage_nodes_by_cluster_id(device.cluster_id):
|
|
159
|
+
if node.status == StorageNode.STATUS_REMOVED:
|
|
160
|
+
continue
|
|
158
161
|
for bdev in node.lvstore_stack:
|
|
159
162
|
if bdev['type'] == "bdev_distr":
|
|
160
163
|
_add_task(JobSchedule.FN_FAILED_DEV_MIG, device.cluster_id, node.get_id(), device.get_id(),
|
|
@@ -24,7 +24,7 @@ def send_node_status_event(node, node_status):
|
|
|
24
24
|
logger.debug(node_status_event)
|
|
25
25
|
snodes = db_controller.get_storage_nodes_by_cluster_id(node.cluster_id)
|
|
26
26
|
for node in snodes:
|
|
27
|
-
if node.status
|
|
27
|
+
if node.status not in [StorageNode.STATUS_ONLINE, StorageNode.STATUS_SUSPENDED]:
|
|
28
28
|
continue
|
|
29
29
|
logger.info(f"Sending to: {node.get_id()}")
|
|
30
30
|
rpc_client = RPCClient(node.mgmt_ip, node.rpc_port, node.rpc_username, node.rpc_password, timeout=10)
|
|
@@ -43,7 +43,7 @@ def send_dev_status_event(device, dev_status):
|
|
|
43
43
|
logger.debug(node_status_event)
|
|
44
44
|
snodes = db_controller.get_storage_nodes_by_cluster_id(device.cluster_id)
|
|
45
45
|
for node in snodes:
|
|
46
|
-
if node.status
|
|
46
|
+
if node.status not in [StorageNode.STATUS_ONLINE, StorageNode.STATUS_SUSPENDED]:
|
|
47
47
|
continue
|
|
48
48
|
logging.debug(f"Sending event updates, device: {storage_ID}, status: {dev_status}, node: {node.get_id()}")
|
|
49
49
|
rpc_client = RPCClient(node.mgmt_ip, node.rpc_port, node.rpc_username, node.rpc_password, timeout=5, retry=2)
|
|
@@ -54,7 +54,7 @@ while True:
|
|
|
54
54
|
for snode in snodes:
|
|
55
55
|
logger.info("Node: %s, status %s", snode.get_id(), snode.status)
|
|
56
56
|
|
|
57
|
-
if snode.status not in [StorageNode.STATUS_ONLINE, StorageNode.STATUS_UNREACHABLE]:
|
|
57
|
+
if snode.status not in [StorageNode.STATUS_ONLINE, StorageNode.STATUS_UNREACHABLE, StorageNode.STATUS_SUSPENDED]:
|
|
58
58
|
logger.info(f"Node status is: {snode.status}, skipping")
|
|
59
59
|
set_node_health_check(snode, False)
|
|
60
60
|
for dev in snode.nvme_devices:
|
{sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/services/main_distr_event_collector.py
RENAMED
|
@@ -150,43 +150,45 @@ def process_event(event_id):
|
|
|
150
150
|
def start_event_collector_on_node(node_id):
|
|
151
151
|
logger.info(f"Starting Distr event collector on node: {node_id}")
|
|
152
152
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
snode
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
snode.rpc_password,
|
|
161
|
-
timeout=10, retry=2)
|
|
162
|
-
|
|
163
|
-
try:
|
|
164
|
-
events = client.distr_status_events_discard_then_get(0, constants.DISTR_EVENT_COLLECTOR_NUM_OF_EVENTS)
|
|
165
|
-
if events:
|
|
166
|
-
logger.info(f"Found events: {len(events)}")
|
|
167
|
-
event_ids = []
|
|
168
|
-
for ev in events:
|
|
169
|
-
logger.debug(ev)
|
|
170
|
-
ev_id = events_controller.log_distr_event(snode.cluster_id, snode.get_id(), ev)
|
|
171
|
-
event_ids.append(ev_id)
|
|
172
|
-
|
|
173
|
-
for eid in event_ids:
|
|
174
|
-
logger.info(f"Processing event: {eid}")
|
|
175
|
-
process_event(eid)
|
|
176
|
-
|
|
177
|
-
logger.info(f"Discarding events: {len(events)}")
|
|
178
|
-
client.distr_status_events_discard_then_get(len(events), 0)
|
|
179
|
-
else:
|
|
180
|
-
logger.info("no events found, sleeping")
|
|
181
|
-
|
|
182
|
-
except Exception as e:
|
|
183
|
-
logger.error("Failed to process distr events")
|
|
184
|
-
logger.exception(e)
|
|
153
|
+
snode = db_controller.get_storage_node_by_id(node_id)
|
|
154
|
+
client = rpc_client.RPCClient(
|
|
155
|
+
snode.mgmt_ip,
|
|
156
|
+
snode.rpc_port,
|
|
157
|
+
snode.rpc_username,
|
|
158
|
+
snode.rpc_password,
|
|
159
|
+
timeout=10, retry=2)
|
|
185
160
|
|
|
161
|
+
while True:
|
|
162
|
+
page = 1
|
|
163
|
+
while True:
|
|
164
|
+
try:
|
|
165
|
+
events = client.distr_status_events_discard_then_get(
|
|
166
|
+
0, constants.DISTR_EVENT_COLLECTOR_NUM_OF_EVENTS * page)
|
|
167
|
+
if events:
|
|
168
|
+
logger.info(f"Found events: {len(events)}")
|
|
169
|
+
event_ids = []
|
|
170
|
+
for ev in events:
|
|
171
|
+
logger.debug(ev)
|
|
172
|
+
ev_id = events_controller.log_distr_event(snode.cluster_id, snode.get_id(), ev)
|
|
173
|
+
event_ids.append(ev_id)
|
|
174
|
+
|
|
175
|
+
for eid in event_ids:
|
|
176
|
+
logger.info(f"Processing event: {eid}")
|
|
177
|
+
process_event(eid)
|
|
178
|
+
|
|
179
|
+
logger.info(f"Discarding events: {len(events)}")
|
|
180
|
+
client.distr_status_events_discard_then_get(len(events), 0)
|
|
181
|
+
page *= 10
|
|
182
|
+
else:
|
|
183
|
+
logger.info("no events found, sleeping")
|
|
184
|
+
break
|
|
185
|
+
except Exception as e:
|
|
186
|
+
logger.error("Failed to process distr events")
|
|
187
|
+
logger.exception(e)
|
|
188
|
+
break
|
|
186
189
|
time.sleep(constants.DISTR_EVENT_COLLECTOR_INTERVAL_SEC)
|
|
187
190
|
|
|
188
191
|
|
|
189
|
-
|
|
190
192
|
threads_maps = {}
|
|
191
193
|
|
|
192
194
|
while True:
|
|
@@ -8,6 +8,7 @@ import socket
|
|
|
8
8
|
import ssl
|
|
9
9
|
import sys
|
|
10
10
|
|
|
11
|
+
from http.server import HTTPServer
|
|
11
12
|
from http.server import ThreadingHTTPServer
|
|
12
13
|
from http.server import BaseHTTPRequestHandler
|
|
13
14
|
|
|
@@ -127,7 +128,8 @@ def run_server(host, port, user, password, cert=None):
|
|
|
127
128
|
|
|
128
129
|
try:
|
|
129
130
|
ServerHandler.key = key
|
|
130
|
-
httpd = ThreadingHTTPServer((host, port), ServerHandler)
|
|
131
|
+
# httpd = ThreadingHTTPServer((host, port), ServerHandler)
|
|
132
|
+
httpd = HTTPServer((host, port), ServerHandler)
|
|
131
133
|
httpd.timeout = TIMEOUT
|
|
132
134
|
if cert is not None:
|
|
133
135
|
httpd.socket = ssl.wrap_socket(httpd.socket, certfile=cert, server_side=True)
|
|
@@ -1288,9 +1288,9 @@ def delete_storage_node(node_id):
|
|
|
1288
1288
|
|
|
1289
1289
|
snode.remove(db_controller.kv_store)
|
|
1290
1290
|
|
|
1291
|
-
for
|
|
1292
|
-
logger.info(f"Sending cluster map to
|
|
1293
|
-
send_cluster_map(
|
|
1291
|
+
for node in db_controller.get_storage_nodes_by_cluster_id(snode.cluster_id):
|
|
1292
|
+
logger.info(f"Sending cluster map to node: {node.get_id()}")
|
|
1293
|
+
send_cluster_map(node.get_id())
|
|
1294
1294
|
|
|
1295
1295
|
storage_events.snode_delete(snode)
|
|
1296
1296
|
logger.info("done")
|
|
@@ -1697,16 +1697,15 @@ def restart_storage_node(
|
|
|
1697
1697
|
node.remote_jm_devices = _connect_to_remote_jm_devs(node)
|
|
1698
1698
|
node.write_to_db(kv_store)
|
|
1699
1699
|
|
|
1700
|
-
|
|
1701
|
-
|
|
1700
|
+
logger.info(f"Sending device status event")
|
|
1701
|
+
for dev in snode.nvme_devices:
|
|
1702
|
+
distr_controller.send_dev_status_event(dev, dev.status)
|
|
1702
1703
|
|
|
1703
1704
|
logger.info("Starting migration tasks")
|
|
1704
1705
|
for dev in snode.nvme_devices:
|
|
1705
1706
|
if dev.status != NVMeDevice.STATUS_ONLINE:
|
|
1706
|
-
logger.
|
|
1707
|
+
logger.debug(f"Device is not online: {dev.get_id()}, status: {dev.status}")
|
|
1707
1708
|
continue
|
|
1708
|
-
|
|
1709
|
-
# distr_controller.send_dev_status_event(dev, NVMeDevice.STATUS_ONLINE)
|
|
1710
1709
|
tasks_controller.add_device_mig_task(dev.get_id())
|
|
1711
1710
|
|
|
1712
1711
|
# Create distribs, raid0, and lvstore and expose lvols to the fabrics
|
|
@@ -352,6 +352,7 @@ def spdk_process_start():
|
|
|
352
352
|
'SPDK_CPU_MASK': spdk_cpu_mask,
|
|
353
353
|
'SPDK_MEM': spdk_mem,
|
|
354
354
|
'MEM_GEGA': spdk_mem_gega,
|
|
355
|
+
'MEM2_GEGA': spdk_mem_gega+4,
|
|
355
356
|
'SERVER_IP': data['server_ip'],
|
|
356
357
|
'RPC_PORT': data['rpc_port'],
|
|
357
358
|
'RPC_USERNAME': data['rpc_username'],
|
sbcli_dev-3.9.12/env_var
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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-3.9.12 → sbcli_dev-4.0.0}/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-3.9.12 → sbcli_dev-4.0.0}/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
|
{sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/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
|
{sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/services/cached_lvol_stat_collector.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/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
|
{sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/simplyblock_core/services/tasks_runner_failed_migration.py
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-3.9.12 → sbcli_dev-4.0.0}/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
|