sbcli-dev 3.9.3__zip → 3.9.4__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.3 → sbcli_dev-3.9.4}/PKG-INFO +1 -1
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/env_var +1 -1
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/sbcli_dev.egg-info/PKG-INFO +1 -1
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/sbcli_dev.egg-info/SOURCES.txt +0 -1
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/controllers/lvol_controller.py +1 -1
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/distr_controller.py +4 -4
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/services/health_check_service.py +0 -4
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/services/main_distr_event_collector.py +1 -1
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2 +2 -32
- sbcli_dev-3.9.3/simplyblock_core/services/distr_event_collector.py +0 -157
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/README.md +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/pyproject.toml +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/sbcli_dev.egg-info/dependency_links.txt +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/sbcli_dev.egg-info/entry_points.txt +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/sbcli_dev.egg-info/requires.txt +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/sbcli_dev.egg-info/top_level.txt +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/setup.cfg +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/setup.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_cli/cli.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_cli/main.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/__init__.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/cluster_ops.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/compute_node_ops.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/constants.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/controllers/device_controller.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/controllers/events_controller.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/controllers/health_controller.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/controllers/pool_controller.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/controllers/snapshot_controller.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/controllers/tasks_controller.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/kv_store.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/mgmt_node_ops.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/models/cluster.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/models/compute_node.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/models/deployer.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/models/events.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/models/global_settings.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/models/iface.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/models/job_schedule.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/models/lvol_model.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/models/nvme_device.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/models/pool.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/models/stats.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/models/storage_node.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/rpc_client.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/scripts/__init__.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/scripts/dashboard.yml +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/scripts/deploy_stack.sh +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/scripts/docker-compose-swarm.yml +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/scripts/objstore.yml +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/scripts/prometheus.yml +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/services/cached_lvol_stat_collector.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/services/capacity_and_stats_collector.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/services/log_agg_service.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/services/lvol_stat_collector.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/services/new_device_discovery.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/services/port_stat_collector.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/services/spdk_http_proxy_server.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/services/storage_node_monitor.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/services/tasks_runner_failed_migration.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/services/tasks_runner_migration.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/services/tasks_runner_new_dev_migration.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/services/tasks_runner_node_add.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/services/tasks_runner_restart.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/snode_client.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/storage_node_ops.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/utils.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/__init__.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/app.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/blueprints/snode_ops.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/blueprints/snode_ops_k8s.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/blueprints/web_api_cluster.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/blueprints/web_api_lvol.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/blueprints/web_api_pool.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/blueprints/web_api_storage_node.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/caching_node_app.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/caching_node_app_k8s.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/node_utils.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/snode_app.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/snode_app_k8s.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/static/delete.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/static/tst.py +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_web/utils.py +0 -0
|
@@ -90,7 +90,6 @@ simplyblock_core/services/caching_node_monitor.py
|
|
|
90
90
|
simplyblock_core/services/cap_monitor.py
|
|
91
91
|
simplyblock_core/services/capacity_and_stats_collector.py
|
|
92
92
|
simplyblock_core/services/device_monitor.py
|
|
93
|
-
simplyblock_core/services/distr_event_collector.py
|
|
94
93
|
simplyblock_core/services/health_check_service.py
|
|
95
94
|
simplyblock_core/services/install_service.sh
|
|
96
95
|
simplyblock_core/services/log_agg_service.py
|
|
@@ -186,7 +186,7 @@ def _get_next_3_nodes(cluster_id, lvol_size=0):
|
|
|
186
186
|
# node_stat_list = db_controller.get_node_stats(node, limit=1000)
|
|
187
187
|
# combined_record = utils.sum_records(node_stat_list)
|
|
188
188
|
node_st = {
|
|
189
|
-
"lvol": len(node.lvols)
|
|
189
|
+
"lvol": len(node.lvols)+1,
|
|
190
190
|
# "cpu": 1 + (node.cpu * node.cpu_hz),
|
|
191
191
|
# "r_io": combined_record.read_io_ps,
|
|
192
192
|
# "w_io": combined_record.write_io_ps,
|
|
@@ -34,7 +34,6 @@ def send_node_status_event(node, node_status):
|
|
|
34
34
|
def send_dev_status_event(device, dev_status):
|
|
35
35
|
db_controller = DBController()
|
|
36
36
|
storage_ID = device.cluster_device_order
|
|
37
|
-
logging.info(f"Sending event updates, device: {storage_ID}, status: {dev_status}")
|
|
38
37
|
node_status_event = {
|
|
39
38
|
"timestamp": datetime.datetime.now().isoformat("T", "seconds") + 'Z',
|
|
40
39
|
"event_type": "device_status",
|
|
@@ -46,8 +45,8 @@ def send_dev_status_event(device, dev_status):
|
|
|
46
45
|
for node in snodes:
|
|
47
46
|
if node.status != node.STATUS_ONLINE:
|
|
48
47
|
continue
|
|
49
|
-
|
|
50
|
-
rpc_client = RPCClient(node.mgmt_ip, node.rpc_port, node.rpc_username, node.rpc_password, timeout=
|
|
48
|
+
logging.debug(f"Sending event updates, device: {storage_ID}, status: {dev_status}, node: {node.get_id()}")
|
|
49
|
+
rpc_client = RPCClient(node.mgmt_ip, node.rpc_port, node.rpc_username, node.rpc_password, timeout=3, retry=1)
|
|
51
50
|
ret = rpc_client.distr_status_events_update(events)
|
|
52
51
|
if not ret:
|
|
53
52
|
logger.warning("Failed to send event update")
|
|
@@ -82,7 +81,6 @@ def get_distr_cluster_map(snodes, target_node):
|
|
|
82
81
|
dev_w_map = []
|
|
83
82
|
node_w = 0
|
|
84
83
|
for i, dev in enumerate(snode.nvme_devices):
|
|
85
|
-
logger.debug(f"Device: {dev.get_id()}, status: {dev.status}")
|
|
86
84
|
if dev.status in [NVMeDevice.STATUS_JM, NVMeDevice.STATUS_NEW]:
|
|
87
85
|
continue
|
|
88
86
|
dev_w = int(dev.size/(1024*1024*1024)) or 1
|
|
@@ -100,6 +98,8 @@ def get_distr_cluster_map(snodes, target_node):
|
|
|
100
98
|
break
|
|
101
99
|
if not name:
|
|
102
100
|
name = f"remote_{dev.alceml_bdev}n1"
|
|
101
|
+
dev_status = NVMeDevice.STATUS_UNAVAILABLE
|
|
102
|
+
logger.debug(f"Device: {dev.get_id()}, status: {dev_status}, bdev_name: {name}")
|
|
103
103
|
dev_map[dev.cluster_device_order] = {
|
|
104
104
|
"UUID": dev.get_id(),
|
|
105
105
|
"bdev_name": name,
|
|
@@ -68,10 +68,6 @@ while True:
|
|
|
68
68
|
node_api_check = health_controller._check_node_api(snode.mgmt_ip)
|
|
69
69
|
logger.info(f"Check: node API {snode.mgmt_ip}:5000 ... {node_api_check}")
|
|
70
70
|
|
|
71
|
-
if snode.status == StorageNode.STATUS_OFFLINE:
|
|
72
|
-
set_node_health_check(snode, ping_check & node_api_check)
|
|
73
|
-
continue
|
|
74
|
-
|
|
75
71
|
# 3- check node RPC
|
|
76
72
|
node_rpc_check = health_controller._check_node_rpc(
|
|
77
73
|
snode.mgmt_ip, snode.rpc_port, snode.rpc_username, snode.rpc_password)
|
|
@@ -56,7 +56,7 @@ def process_device_event(event):
|
|
|
56
56
|
new_remote_devices.append(rem_dev)
|
|
57
57
|
node.remote_devices = new_remote_devices
|
|
58
58
|
node.write_to_db(db_controller.kv_store)
|
|
59
|
-
|
|
59
|
+
device_controller.device_set_unavailable(device_id)
|
|
60
60
|
|
|
61
61
|
else:
|
|
62
62
|
if event.message == 'SPDK_BDEV_EVENT_REMOVE':
|
|
@@ -90,9 +90,9 @@ spec:
|
|
|
90
90
|
resources:
|
|
91
91
|
limits:
|
|
92
92
|
hugepages-2Mi: {{ MEM_GEGA }}Gi
|
|
93
|
-
memory:
|
|
93
|
+
memory: 4Gi
|
|
94
94
|
requests:
|
|
95
|
-
memory:
|
|
95
|
+
memory: 4Gi
|
|
96
96
|
|
|
97
97
|
- name: spdk-proxy-container
|
|
98
98
|
image: {{ SIMPLYBLOCK_DOCKER_IMAGE }}
|
|
@@ -110,33 +110,3 @@ spec:
|
|
|
110
110
|
value: "{{ RPC_USERNAME }}"
|
|
111
111
|
- name: RPC_PASSWORD
|
|
112
112
|
value: "{{ RPC_PASSWORD }}"
|
|
113
|
-
|
|
114
|
-
{# - name: node-exporter#}
|
|
115
|
-
{# image: prom/node-exporter:v1.7.0#}
|
|
116
|
-
{# user: root#}
|
|
117
|
-
{# command:#}
|
|
118
|
-
{# - '--path.procfs=/host/proc'#}
|
|
119
|
-
{# - '--path.sysfs=/host/sys'#}
|
|
120
|
-
{# - '--path.rootfs=/host'#}
|
|
121
|
-
{# - '--collector.filesystem.ignored-mount-points="^(/rootfs|/host|)/(sys|proc|dev|host|etc)($$|/)"'#}
|
|
122
|
-
{# - '--collector.filesystem.ignored-fs-types="^(sys|proc|auto|cgroup|devpts|ns|au|fuse\.lxc|mqueue)(fs|)$$"'#}
|
|
123
|
-
{# - '--no-collector.ipvs'#}
|
|
124
|
-
{# volumeMounts:#}
|
|
125
|
-
{# - name: host-sys#}
|
|
126
|
-
{# mountPath: /host/sys#}
|
|
127
|
-
{# readOnly: true#}
|
|
128
|
-
{# - name: host-proc#}
|
|
129
|
-
{# mountPath: /host/proc#}
|
|
130
|
-
{# readOnly: true#}
|
|
131
|
-
{# - name: host-rootfs#}
|
|
132
|
-
{# mountPath: /rootfs#}
|
|
133
|
-
{# readOnly: true#}
|
|
134
|
-
|
|
135
|
-
- name: distr-event-collector
|
|
136
|
-
image: {{ SIMPLYBLOCK_DOCKER_IMAGE }}
|
|
137
|
-
imagePullPolicy: "Always"
|
|
138
|
-
command: ["python", "simplyblock_core/services/distr_event_collector.py"]
|
|
139
|
-
volumeMounts:
|
|
140
|
-
- name: foundationdb
|
|
141
|
-
mountPath: /etc/foundationdb
|
|
142
|
-
readOnly: true
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
# coding=utf-8
|
|
2
|
-
import time
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
from simplyblock_core import constants, kv_store, utils, rpc_client
|
|
6
|
-
from simplyblock_core.controllers import events_controller, device_controller, lvol_events
|
|
7
|
-
from simplyblock_core.models.lvol_model import LVol
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
from simplyblock_core.models.nvme_device import NVMeDevice
|
|
11
|
-
from simplyblock_core.rpc_client import RPCClient
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
logger = utils.get_logger(__name__)
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
# get DB controller
|
|
18
|
-
db_controller = kv_store.DBController()
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
def process_device_event(event):
|
|
22
|
-
if event.message in ['SPDK_BDEV_EVENT_REMOVE', "error_open", 'error_read', "error_write", "error_unmap"]:
|
|
23
|
-
node_id = event.node_id
|
|
24
|
-
storage_id = event.storage_id
|
|
25
|
-
|
|
26
|
-
device = None
|
|
27
|
-
for node in db_controller.get_storage_nodes():
|
|
28
|
-
for dev in node.nvme_devices:
|
|
29
|
-
if dev.cluster_device_order == storage_id:
|
|
30
|
-
if dev.status not in [NVMeDevice.STATUS_ONLINE, NVMeDevice.STATUS_READONLY]:
|
|
31
|
-
logger.info(f"The storage device is not online, skipping. status: {dev.status}")
|
|
32
|
-
# event.status = 'skipped'
|
|
33
|
-
# return
|
|
34
|
-
device = dev
|
|
35
|
-
break
|
|
36
|
-
|
|
37
|
-
if not device:
|
|
38
|
-
logger.info(f"Device not found!, storage id: {storage_id} from node: {node_id}")
|
|
39
|
-
event.status = 'device_not_found'
|
|
40
|
-
return
|
|
41
|
-
|
|
42
|
-
device_id = device.get_id()
|
|
43
|
-
if event.message == 'SPDK_BDEV_EVENT_REMOVE':
|
|
44
|
-
if device.node_id == node_id:
|
|
45
|
-
logger.info(f"Removing storage id: {storage_id} from node: {node_id}")
|
|
46
|
-
device_controller.device_remove(device_id)
|
|
47
|
-
else:
|
|
48
|
-
logger.info(f"Removing remote storage id: {storage_id} from node: {node_id}")
|
|
49
|
-
new_remote_devices = []
|
|
50
|
-
device_node = db_controller.get_storage_node_by_id(node_id)
|
|
51
|
-
rpc_client = RPCClient(device_node.mgmt_ip, device_node.rpc_port,
|
|
52
|
-
device_node.rpc_username, device_node.rpc_password)
|
|
53
|
-
for rem_dev in device_node.remote_devices:
|
|
54
|
-
if rem_dev.get_id() == device.get_id():
|
|
55
|
-
ctrl_name = rem_dev.remote_bdev[:-2]
|
|
56
|
-
rpc_client.bdev_nvme_detach_controller(ctrl_name)
|
|
57
|
-
else:
|
|
58
|
-
new_remote_devices.append(rem_dev)
|
|
59
|
-
device_node.remote_devices = new_remote_devices
|
|
60
|
-
device_node.write_to_db(db_controller.kv_store)
|
|
61
|
-
|
|
62
|
-
elif event.message in ['error_write', 'error_unmap']:
|
|
63
|
-
logger.info(f"Setting device to read-only")
|
|
64
|
-
device_controller.device_set_io_error(device_id, True)
|
|
65
|
-
device_controller.device_set_read_only(device_id)
|
|
66
|
-
else:
|
|
67
|
-
logger.info(f"Setting device to unavailable")
|
|
68
|
-
device_controller.device_set_io_error(device_id, True)
|
|
69
|
-
device_controller.device_set_unavailable(device_id)
|
|
70
|
-
|
|
71
|
-
event.status = 'processed'
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
def process_lvol_event(event):
|
|
75
|
-
if event.message in ["error_open", 'error_read', "error_write", "error_unmap"]:
|
|
76
|
-
# vuid = event.object_dict['vuid']
|
|
77
|
-
node_id = event.node_id
|
|
78
|
-
lvols = []
|
|
79
|
-
for lv in db_controller.get_lvols(): # pass
|
|
80
|
-
if lv.node_id == node_id:
|
|
81
|
-
lvols.append(lv)
|
|
82
|
-
|
|
83
|
-
if not lvols:
|
|
84
|
-
logger.error(f"LVols on node {node_id} not found")
|
|
85
|
-
event.status = 'lvols_not_found'
|
|
86
|
-
else:
|
|
87
|
-
for lvol in lvols:
|
|
88
|
-
if lvol.status == LVol.STATUS_ONLINE:
|
|
89
|
-
logger.info("Setting LVol to offline")
|
|
90
|
-
lvol.io_error = True
|
|
91
|
-
old_status = lvol.status
|
|
92
|
-
lvol.status = LVol.STATUS_OFFLINE
|
|
93
|
-
lvol.write_to_db(db_controller.kv_store)
|
|
94
|
-
lvol_events.lvol_status_change(lvol, lvol.status, old_status, caused_by="monitor")
|
|
95
|
-
lvol_events.lvol_io_error_change(lvol, True, False, caused_by="monitor")
|
|
96
|
-
event.status = 'processed'
|
|
97
|
-
else:
|
|
98
|
-
logger.error(f"Unknown LVol event message: {event.message}")
|
|
99
|
-
event.status = "event_unknown"
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
def process_event(event_id):
|
|
103
|
-
event = db_controller.get_events(event_id)[0]
|
|
104
|
-
if event.event == "device_status":
|
|
105
|
-
if event.storage_id >= 0:
|
|
106
|
-
process_device_event(event)
|
|
107
|
-
|
|
108
|
-
if event.vuid >= 0:
|
|
109
|
-
process_lvol_event(event)
|
|
110
|
-
|
|
111
|
-
event.write_to_db(db_controller.kv_store)
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
hostname = utils.get_hostname()
|
|
115
|
-
logger.info("Getting node info...")
|
|
116
|
-
while True:
|
|
117
|
-
time.sleep(constants.DISTR_EVENT_COLLECTOR_INTERVAL_SEC)
|
|
118
|
-
|
|
119
|
-
snode = db_controller.get_storage_node_by_hostname(hostname)
|
|
120
|
-
if not snode:
|
|
121
|
-
logger.error("This node is not part of the cluster, hostname: %s, Retrying..." % hostname)
|
|
122
|
-
continue
|
|
123
|
-
|
|
124
|
-
logger.info(f"Starting Distr event collector on node: {hostname}")
|
|
125
|
-
|
|
126
|
-
client = rpc_client.RPCClient(
|
|
127
|
-
snode.mgmt_ip,
|
|
128
|
-
snode.rpc_port,
|
|
129
|
-
snode.rpc_username,
|
|
130
|
-
snode.rpc_password,
|
|
131
|
-
timeout=10, retry=2)
|
|
132
|
-
|
|
133
|
-
try:
|
|
134
|
-
events = client.distr_status_events_discard_then_get(0, constants.DISTR_EVENT_COLLECTOR_NUM_OF_EVENTS)
|
|
135
|
-
|
|
136
|
-
if not events:
|
|
137
|
-
logger.debug("no events found")
|
|
138
|
-
continue
|
|
139
|
-
|
|
140
|
-
logger.info(f"Found events: {len(events)}")
|
|
141
|
-
event_ids = []
|
|
142
|
-
for ev in events:
|
|
143
|
-
logger.debug(ev)
|
|
144
|
-
ev_id = events_controller.log_distr_event(snode.cluster_id, snode.get_id(), ev)
|
|
145
|
-
event_ids.append(ev_id)
|
|
146
|
-
|
|
147
|
-
for eid in event_ids:
|
|
148
|
-
logger.info(f"Processing event: {eid}")
|
|
149
|
-
process_event(eid)
|
|
150
|
-
|
|
151
|
-
logger.info(f"Discarding events: {len(events)}")
|
|
152
|
-
client.distr_status_events_discard_then_get(len(events), 0)
|
|
153
|
-
|
|
154
|
-
except Exception as e:
|
|
155
|
-
logger.error("Failed to process distr events")
|
|
156
|
-
logger.exception(e)
|
|
157
|
-
continue
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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.3 → sbcli_dev-3.9.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
|
{sbcli_dev-3.9.3 → sbcli_dev-3.9.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
|
{sbcli_dev-3.9.3 → sbcli_dev-3.9.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
|
{sbcli_dev-3.9.3 → sbcli_dev-3.9.4}/simplyblock_core/services/tasks_runner_failed_migration.py
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-3.9.3 → sbcli_dev-3.9.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
|
|
File without changes
|