sbcli-dev 3.9.4__zip → 3.9.6__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.4 → sbcli_dev-3.9.6}/PKG-INFO +1 -1
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/env_var +1 -1
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/sbcli_dev.egg-info/PKG-INFO +1 -1
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/cluster_ops.py +2 -1
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/constants.py +1 -1
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/controllers/device_controller.py +13 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/distr_controller.py +5 -4
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/scripts/__init__.py +4 -2
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/scripts/deploy_stack.sh +1 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/scripts/docker-compose-swarm.yml +41 -14
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/services/health_check_service.py +8 -6
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/services/main_distr_event_collector.py +32 -1
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/storage_node_ops.py +3 -3
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/README.md +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/pyproject.toml +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/sbcli_dev.egg-info/SOURCES.txt +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/sbcli_dev.egg-info/dependency_links.txt +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/sbcli_dev.egg-info/entry_points.txt +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/sbcli_dev.egg-info/requires.txt +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/sbcli_dev.egg-info/top_level.txt +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/setup.cfg +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/setup.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_cli/cli.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_cli/main.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/__init__.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/compute_node_ops.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/controllers/events_controller.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/controllers/health_controller.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/controllers/lvol_controller.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/controllers/pool_controller.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/controllers/snapshot_controller.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/controllers/tasks_controller.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/kv_store.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/mgmt_node_ops.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/models/cluster.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/models/compute_node.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/models/deployer.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/models/events.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/models/global_settings.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/models/iface.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/models/job_schedule.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/models/lvol_model.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/models/nvme_device.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/models/pool.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/models/stats.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/models/storage_node.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/rpc_client.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/scripts/dashboard.yml +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/scripts/objstore.yml +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/scripts/prometheus.yml +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/services/cached_lvol_stat_collector.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/services/capacity_and_stats_collector.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/services/log_agg_service.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/services/lvol_stat_collector.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/services/new_device_discovery.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/services/port_stat_collector.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/services/spdk_http_proxy_server.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/services/storage_node_monitor.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/services/tasks_runner_failed_migration.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/services/tasks_runner_migration.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/services/tasks_runner_new_dev_migration.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/services/tasks_runner_node_add.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/services/tasks_runner_restart.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/snode_client.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_core/utils.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/__init__.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/app.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/blueprints/snode_ops.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/blueprints/snode_ops_k8s.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/blueprints/web_api_cluster.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/blueprints/web_api_lvol.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/blueprints/web_api_pool.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/blueprints/web_api_storage_node.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/caching_node_app.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/caching_node_app_k8s.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/node_utils.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/snode_app.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/snode_app_k8s.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/static/delete.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/static/tst.py +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/simplyblock_web/utils.py +0 -0
|
@@ -215,8 +215,9 @@ def create_cluster(blk_size, page_size_in_blocks, cli_pass,
|
|
|
215
215
|
shutil.rmtree(temp_dir)
|
|
216
216
|
|
|
217
217
|
logger.info("Deploying swarm stack ...")
|
|
218
|
+
log_level = "DEBUG" if constants.LOG_WEB_DEBUG else "INFO"
|
|
218
219
|
ret = scripts.deploy_stack(cli_pass, DEV_IP, constants.SIMPLY_BLOCK_DOCKER_IMAGE, c.secret, c.uuid,
|
|
219
|
-
log_del_interval, metrics_retention_period)
|
|
220
|
+
log_del_interval, metrics_retention_period, log_level=log_level)
|
|
220
221
|
logger.info("Deploying swarm stack > Done")
|
|
221
222
|
|
|
222
223
|
if ret == 0:
|
|
@@ -80,6 +80,19 @@ def device_set_read_only(device_id):
|
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
def device_set_online(device_id):
|
|
83
|
+
db_controller = DBController()
|
|
84
|
+
dev = db_controller.get_storage_devices(device_id)
|
|
85
|
+
snode = db_controller.get_storage_node_by_id(dev.node_id)
|
|
86
|
+
logger.info("Make other nodes connect to the node devices")
|
|
87
|
+
snodes = db_controller.get_storage_nodes_by_cluster_id(snode.cluster_id)
|
|
88
|
+
for node in snodes:
|
|
89
|
+
if node.get_id() == snode.get_id() or node.status != StorageNode.STATUS_ONLINE:
|
|
90
|
+
continue
|
|
91
|
+
node.remote_devices = storage_node_ops._connect_to_remote_devs(node)
|
|
92
|
+
if node.enable_ha_jm:
|
|
93
|
+
node.remote_jm_devices = storage_node_ops._connect_to_remote_jm_devs(node)
|
|
94
|
+
node.write_to_db()
|
|
95
|
+
|
|
83
96
|
ret = device_set_state(device_id, NVMeDevice.STATUS_ONLINE)
|
|
84
97
|
if ret:
|
|
85
98
|
logger.info("Adding task to device data migration")
|
|
@@ -43,10 +43,10 @@ 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 != StorageNode.STATUS_ONLINE:
|
|
47
47
|
continue
|
|
48
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=
|
|
49
|
+
rpc_client = RPCClient(node.mgmt_ip, node.rpc_port, node.rpc_username, node.rpc_password, timeout=5, retry=2)
|
|
50
50
|
ret = rpc_client.distr_status_events_update(events)
|
|
51
51
|
if not ret:
|
|
52
52
|
logger.warning("Failed to send event update")
|
|
@@ -59,7 +59,7 @@ def disconnect_device(device):
|
|
|
59
59
|
if node.status != node.STATUS_ONLINE:
|
|
60
60
|
continue
|
|
61
61
|
new_remote_devices = []
|
|
62
|
-
rpc_client = RPCClient(node.mgmt_ip, node.rpc_port, node.rpc_username, node.rpc_password, timeout=5, retry=
|
|
62
|
+
rpc_client = RPCClient(node.mgmt_ip, node.rpc_port, node.rpc_username, node.rpc_password, timeout=5, retry=2)
|
|
63
63
|
for rem_dev in node.remote_devices:
|
|
64
64
|
if rem_dev.get_id() == device.get_id():
|
|
65
65
|
ctrl_name = rem_dev.remote_bdev[:-2]
|
|
@@ -98,7 +98,8 @@ def get_distr_cluster_map(snodes, target_node):
|
|
|
98
98
|
break
|
|
99
99
|
if not name:
|
|
100
100
|
name = f"remote_{dev.alceml_bdev}n1"
|
|
101
|
-
dev_status
|
|
101
|
+
if dev_status == NVMeDevice.STATUS_ONLINE:
|
|
102
|
+
dev_status = NVMeDevice.STATUS_UNAVAILABLE
|
|
102
103
|
logger.debug(f"Device: {dev.get_id()}, status: {dev_status}, bdev_name: {name}")
|
|
103
104
|
dev_map[dev.cluster_device_order] = {
|
|
104
105
|
"UUID": dev.get_id(),
|
|
@@ -30,10 +30,12 @@ def configure_docker(docker_ip):
|
|
|
30
30
|
return __run_script(['bash', '-x', os.path.join(DIR_PATH, 'config_docker.sh'), docker_ip])
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
def deploy_stack(cli_pass, dev_ip, image_name, graylog_password, cluster_id,
|
|
33
|
+
def deploy_stack(cli_pass, dev_ip, image_name, graylog_password, cluster_id,
|
|
34
|
+
log_del_interval, metrics_retention_period, log_level):
|
|
34
35
|
pass_hash = hashlib.sha256(graylog_password.encode('utf-8')).hexdigest()
|
|
35
36
|
return __run_script(
|
|
36
|
-
['sudo', 'bash', '-x', os.path.join(DIR_PATH, 'deploy_stack.sh'), cli_pass, dev_ip, image_name, pass_hash,
|
|
37
|
+
['sudo', 'bash', '-x', os.path.join(DIR_PATH, 'deploy_stack.sh'), cli_pass, dev_ip, image_name, pass_hash,
|
|
38
|
+
graylog_password, cluster_id, log_del_interval, metrics_retention_period, log_level])
|
|
37
39
|
|
|
38
40
|
|
|
39
41
|
def deploy_cleaner():
|
|
@@ -6,6 +6,7 @@ services:
|
|
|
6
6
|
networks:
|
|
7
7
|
- hostnet
|
|
8
8
|
environment:
|
|
9
|
+
SIMPLYBLOCK_LOG_LEVEL: '$LOG_LEVEL'
|
|
9
10
|
FDB_CLUSTER_FILE_CONTENTS: '$FDB_CLUSTER_FILE_CONTENTS'
|
|
10
11
|
FDB_NETWORKING_MODE: 'container'
|
|
11
12
|
FDB_CLUSTER_FILE: '/etc/foundationdb/fdb.cluster'
|
|
@@ -32,8 +33,9 @@ services:
|
|
|
32
33
|
volumes:
|
|
33
34
|
- "/etc/foundationdb:/etc/foundationdb"
|
|
34
35
|
environment:
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
SIMPLYBLOCK_LOG_LEVEL: "$LOG_LEVEL"
|
|
37
|
+
FLASK_DEBUG: "False"
|
|
38
|
+
FLASK_ENV: "production"
|
|
37
39
|
|
|
38
40
|
StorageNodeMonitor:
|
|
39
41
|
image: $SIMPLYBLOCK_DOCKER_IMAGE
|
|
@@ -45,6 +47,8 @@ services:
|
|
|
45
47
|
- "/etc/foundationdb:/etc/foundationdb"
|
|
46
48
|
networks:
|
|
47
49
|
- hostnet
|
|
50
|
+
environment:
|
|
51
|
+
SIMPLYBLOCK_LOG_LEVEL: "$LOG_LEVEL"
|
|
48
52
|
|
|
49
53
|
MgmtNodeMonitor:
|
|
50
54
|
image: $SIMPLYBLOCK_DOCKER_IMAGE
|
|
@@ -56,6 +60,8 @@ services:
|
|
|
56
60
|
- "/etc/foundationdb:/etc/foundationdb"
|
|
57
61
|
networks:
|
|
58
62
|
- hostnet
|
|
63
|
+
environment:
|
|
64
|
+
SIMPLYBLOCK_LOG_LEVEL: "$LOG_LEVEL"
|
|
59
65
|
|
|
60
66
|
CachingNodeMonitor:
|
|
61
67
|
image: $SIMPLYBLOCK_DOCKER_IMAGE
|
|
@@ -67,6 +73,8 @@ services:
|
|
|
67
73
|
- "/etc/foundationdb:/etc/foundationdb"
|
|
68
74
|
networks:
|
|
69
75
|
- hostnet
|
|
76
|
+
environment:
|
|
77
|
+
SIMPLYBLOCK_LOG_LEVEL: "$LOG_LEVEL"
|
|
70
78
|
|
|
71
79
|
LVolStatsCollector:
|
|
72
80
|
image: $SIMPLYBLOCK_DOCKER_IMAGE
|
|
@@ -78,6 +86,8 @@ services:
|
|
|
78
86
|
- "/etc/foundationdb:/etc/foundationdb"
|
|
79
87
|
networks:
|
|
80
88
|
- hostnet
|
|
89
|
+
environment:
|
|
90
|
+
SIMPLYBLOCK_LOG_LEVEL: "$LOG_LEVEL"
|
|
81
91
|
|
|
82
92
|
CachedLVolStatsCollector:
|
|
83
93
|
image: $SIMPLYBLOCK_DOCKER_IMAGE
|
|
@@ -89,18 +99,8 @@ services:
|
|
|
89
99
|
- "/etc/foundationdb:/etc/foundationdb"
|
|
90
100
|
networks:
|
|
91
101
|
- hostnet
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
image: $SIMPLYBLOCK_DOCKER_IMAGE
|
|
95
|
-
command: "python simplyblock_core/services/port_stat_collector.py"
|
|
96
|
-
networks:
|
|
97
|
-
- hostnet
|
|
98
|
-
deploy:
|
|
99
|
-
mode: global
|
|
100
|
-
placement:
|
|
101
|
-
constraints: [node.role == worker]
|
|
102
|
-
volumes:
|
|
103
|
-
- "/etc/foundationdb:/etc/foundationdb"
|
|
102
|
+
environment:
|
|
103
|
+
SIMPLYBLOCK_LOG_LEVEL: "$LOG_LEVEL"
|
|
104
104
|
|
|
105
105
|
MainDistrEventCollector:
|
|
106
106
|
image: $SIMPLYBLOCK_DOCKER_IMAGE
|
|
@@ -112,6 +112,8 @@ services:
|
|
|
112
112
|
constraints: [node.role == manager]
|
|
113
113
|
volumes:
|
|
114
114
|
- "/etc/foundationdb:/etc/foundationdb"
|
|
115
|
+
environment:
|
|
116
|
+
SIMPLYBLOCK_LOG_LEVEL: "$LOG_LEVEL"
|
|
115
117
|
|
|
116
118
|
HAProxy:
|
|
117
119
|
image: haproxytech/haproxy-debian:latest
|
|
@@ -127,6 +129,8 @@ services:
|
|
|
127
129
|
- monitoring-net
|
|
128
130
|
volumes:
|
|
129
131
|
- "$DIR/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg"
|
|
132
|
+
environment:
|
|
133
|
+
SIMPLYBLOCK_LOG_LEVEL: "$LOG_LEVEL"
|
|
130
134
|
|
|
131
135
|
CapacityAndStatsCollector:
|
|
132
136
|
image: $SIMPLYBLOCK_DOCKER_IMAGE
|
|
@@ -138,6 +142,8 @@ services:
|
|
|
138
142
|
- "/etc/foundationdb:/etc/foundationdb"
|
|
139
143
|
networks:
|
|
140
144
|
- hostnet
|
|
145
|
+
environment:
|
|
146
|
+
SIMPLYBLOCK_LOG_LEVEL: "$LOG_LEVEL"
|
|
141
147
|
|
|
142
148
|
CapacityMonitor:
|
|
143
149
|
image: $SIMPLYBLOCK_DOCKER_IMAGE
|
|
@@ -149,6 +155,8 @@ services:
|
|
|
149
155
|
- "/etc/foundationdb:/etc/foundationdb"
|
|
150
156
|
networks:
|
|
151
157
|
- hostnet
|
|
158
|
+
environment:
|
|
159
|
+
SIMPLYBLOCK_LOG_LEVEL: "$LOG_LEVEL"
|
|
152
160
|
|
|
153
161
|
HealthCheck:
|
|
154
162
|
image: $SIMPLYBLOCK_DOCKER_IMAGE
|
|
@@ -160,6 +168,8 @@ services:
|
|
|
160
168
|
- "/etc/foundationdb:/etc/foundationdb"
|
|
161
169
|
networks:
|
|
162
170
|
- hostnet
|
|
171
|
+
environment:
|
|
172
|
+
SIMPLYBLOCK_LOG_LEVEL: "$LOG_LEVEL"
|
|
163
173
|
|
|
164
174
|
DeviceMonitor:
|
|
165
175
|
image: $SIMPLYBLOCK_DOCKER_IMAGE
|
|
@@ -171,6 +181,8 @@ services:
|
|
|
171
181
|
- "/etc/foundationdb:/etc/foundationdb"
|
|
172
182
|
networks:
|
|
173
183
|
- hostnet
|
|
184
|
+
environment:
|
|
185
|
+
SIMPLYBLOCK_LOG_LEVEL: "$LOG_LEVEL"
|
|
174
186
|
|
|
175
187
|
LVolMonitor:
|
|
176
188
|
image: $SIMPLYBLOCK_DOCKER_IMAGE
|
|
@@ -182,10 +194,13 @@ services:
|
|
|
182
194
|
- "/etc/foundationdb:/etc/foundationdb"
|
|
183
195
|
networks:
|
|
184
196
|
- hostnet
|
|
197
|
+
environment:
|
|
198
|
+
SIMPLYBLOCK_LOG_LEVEL: "$LOG_LEVEL"
|
|
185
199
|
|
|
186
200
|
CleanupFDB:
|
|
187
201
|
image: $SIMPLYBLOCK_DOCKER_IMAGE
|
|
188
202
|
environment:
|
|
203
|
+
SIMPLYBLOCK_LOG_LEVEL: "$LOG_LEVEL"
|
|
189
204
|
LOG_DELETION_INTERVAL: "${LOG_DELETION_INTERVAL}"
|
|
190
205
|
command: "python simplyblock_core/workers/cleanup_foundationdb.py"
|
|
191
206
|
deploy:
|
|
@@ -206,6 +221,8 @@ services:
|
|
|
206
221
|
- "/etc/foundationdb:/etc/foundationdb"
|
|
207
222
|
networks:
|
|
208
223
|
- hostnet
|
|
224
|
+
environment:
|
|
225
|
+
SIMPLYBLOCK_LOG_LEVEL: "$LOG_LEVEL"
|
|
209
226
|
|
|
210
227
|
TasksRunnerMigration:
|
|
211
228
|
image: $SIMPLYBLOCK_DOCKER_IMAGE
|
|
@@ -217,6 +234,8 @@ services:
|
|
|
217
234
|
- "/etc/foundationdb:/etc/foundationdb"
|
|
218
235
|
networks:
|
|
219
236
|
- hostnet
|
|
237
|
+
environment:
|
|
238
|
+
SIMPLYBLOCK_LOG_LEVEL: "$LOG_LEVEL"
|
|
220
239
|
|
|
221
240
|
TasksRunnerFailedMigration:
|
|
222
241
|
image: $SIMPLYBLOCK_DOCKER_IMAGE
|
|
@@ -228,6 +247,8 @@ services:
|
|
|
228
247
|
- "/etc/foundationdb:/etc/foundationdb"
|
|
229
248
|
networks:
|
|
230
249
|
- hostnet
|
|
250
|
+
environment:
|
|
251
|
+
SIMPLYBLOCK_LOG_LEVEL: "$LOG_LEVEL"
|
|
231
252
|
|
|
232
253
|
TasksRunnerNewDeviceMigration:
|
|
233
254
|
image: $SIMPLYBLOCK_DOCKER_IMAGE
|
|
@@ -239,6 +260,8 @@ services:
|
|
|
239
260
|
- "/etc/foundationdb:/etc/foundationdb"
|
|
240
261
|
networks:
|
|
241
262
|
- hostnet
|
|
263
|
+
environment:
|
|
264
|
+
SIMPLYBLOCK_LOG_LEVEL: "$LOG_LEVEL"
|
|
242
265
|
|
|
243
266
|
NewDeviceDiscovery:
|
|
244
267
|
image: $SIMPLYBLOCK_DOCKER_IMAGE
|
|
@@ -250,6 +273,8 @@ services:
|
|
|
250
273
|
- "/etc/foundationdb:/etc/foundationdb"
|
|
251
274
|
networks:
|
|
252
275
|
- hostnet
|
|
276
|
+
environment:
|
|
277
|
+
SIMPLYBLOCK_LOG_LEVEL: "$LOG_LEVEL"
|
|
253
278
|
|
|
254
279
|
TasksNodeAddRunner:
|
|
255
280
|
image: $SIMPLYBLOCK_DOCKER_IMAGE
|
|
@@ -261,6 +286,8 @@ services:
|
|
|
261
286
|
- "/etc/foundationdb:/etc/foundationdb"
|
|
262
287
|
networks:
|
|
263
288
|
- hostnet
|
|
289
|
+
environment:
|
|
290
|
+
SIMPLYBLOCK_LOG_LEVEL: "$LOG_LEVEL"
|
|
264
291
|
|
|
265
292
|
|
|
266
293
|
volumes:
|
|
@@ -4,6 +4,7 @@ from datetime import datetime
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
from simplyblock_core.controllers import health_controller, storage_events, device_events
|
|
7
|
+
from simplyblock_core.models.nvme_device import NVMeDevice
|
|
7
8
|
from simplyblock_core.models.storage_node import StorageNode
|
|
8
9
|
from simplyblock_core.rpc_client import RPCClient
|
|
9
10
|
from simplyblock_core import constants, kv_store, utils, distr_controller
|
|
@@ -107,12 +108,13 @@ while True:
|
|
|
107
108
|
snode.rpc_username, snode.rpc_password,
|
|
108
109
|
timeout=10, retry=1)
|
|
109
110
|
for remote_device in snode.remote_devices:
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
111
|
+
if db_controller.get_storage_device_by_id(remote_device.get_id()).status == NVMeDevice.STATUS_ONLINE:
|
|
112
|
+
ret = rpc_client.get_bdevs(remote_device.remote_bdev)
|
|
113
|
+
if ret:
|
|
114
|
+
logger.info(f"Checking bdev: {remote_device.remote_bdev} ... ok")
|
|
115
|
+
else:
|
|
116
|
+
logger.info(f"Checking bdev: {remote_device.remote_bdev} ... not found")
|
|
117
|
+
node_remote_devices_check &= bool(ret)
|
|
116
118
|
|
|
117
119
|
if snode.jm_device:
|
|
118
120
|
jm_device = snode.jm_device
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
+
import datetime
|
|
2
3
|
import threading
|
|
3
4
|
import time
|
|
4
5
|
|
|
@@ -9,6 +10,7 @@ from simplyblock_core.models.lvol_model import LVol
|
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
from simplyblock_core.models.nvme_device import NVMeDevice
|
|
13
|
+
from simplyblock_core.models.storage_node import StorageNode
|
|
12
14
|
from simplyblock_core.rpc_client import RPCClient
|
|
13
15
|
|
|
14
16
|
|
|
@@ -31,6 +33,17 @@ def process_device_event(event):
|
|
|
31
33
|
if dev.status not in [NVMeDevice.STATUS_ONLINE, NVMeDevice.STATUS_READONLY]:
|
|
32
34
|
logger.info(f"The storage device is not online, skipping. status: {dev.status}")
|
|
33
35
|
event.status = 'skipped'
|
|
36
|
+
node_status_event = {
|
|
37
|
+
"timestamp": datetime.datetime.now().isoformat("T", "seconds") + 'Z',
|
|
38
|
+
"event_type": "device_status",
|
|
39
|
+
"storage_ID": storage_id,
|
|
40
|
+
"status": dev.status}
|
|
41
|
+
events = {"events": [node_status_event]}
|
|
42
|
+
snode = db_controller.get_storage_node_by_id(node_id)
|
|
43
|
+
rpc_client = RPCClient(snode.mgmt_ip, snode.rpc_port, snode.rpc_username, snode.rpc_password)
|
|
44
|
+
ret = rpc_client.distr_status_events_update(events)
|
|
45
|
+
if not ret:
|
|
46
|
+
logger.warning("Failed to send event update")
|
|
34
47
|
return
|
|
35
48
|
|
|
36
49
|
device = dev
|
|
@@ -56,9 +69,27 @@ def process_device_event(event):
|
|
|
56
69
|
new_remote_devices.append(rem_dev)
|
|
57
70
|
node.remote_devices = new_remote_devices
|
|
58
71
|
node.write_to_db(db_controller.kv_store)
|
|
59
|
-
|
|
72
|
+
node_status_event = {
|
|
73
|
+
"timestamp": datetime.datetime.now().isoformat("T", "seconds") + 'Z',
|
|
74
|
+
"event_type": "device_status",
|
|
75
|
+
"storage_ID": storage_id,
|
|
76
|
+
"status": NVMeDevice.STATUS_UNAVAILABLE}
|
|
77
|
+
events = {"events": [node_status_event]}
|
|
78
|
+
ret = rpc_client.distr_status_events_update(events)
|
|
79
|
+
if not ret:
|
|
80
|
+
logger.warning("Failed to send event update")
|
|
81
|
+
|
|
82
|
+
dev_node = db_controller.get_storage_node_by_id(device.node_id)
|
|
83
|
+
if dev_node.status == StorageNode.STATUS_ONLINE:
|
|
84
|
+
device_controller.device_set_io_error(device_id, True)
|
|
85
|
+
device_controller.device_set_unavailable(device_id)
|
|
60
86
|
|
|
61
87
|
else:
|
|
88
|
+
if node.status not in [StorageNode.STATUS_ONLINE, StorageNode.STATUS_SUSPENDED]:
|
|
89
|
+
logger.info(f"Node is not online, skipping. status: {node.status}")
|
|
90
|
+
event.status = 'skipped'
|
|
91
|
+
return
|
|
92
|
+
|
|
62
93
|
if event.message == 'SPDK_BDEV_EVENT_REMOVE':
|
|
63
94
|
if device.node_id == node_id:
|
|
64
95
|
logger.info(f"Removing storage id: {storage_id} from node: {node_id}")
|
|
@@ -752,7 +752,7 @@ def _connect_to_remote_devs(this_node):
|
|
|
752
752
|
|
|
753
753
|
rpc_client = RPCClient(
|
|
754
754
|
this_node.mgmt_ip, this_node.rpc_port,
|
|
755
|
-
this_node.rpc_username, this_node.rpc_password, timeout=
|
|
755
|
+
this_node.rpc_username, this_node.rpc_password, timeout=10, retry=2)
|
|
756
756
|
|
|
757
757
|
remote_devices = []
|
|
758
758
|
# connect to remote devs
|
|
@@ -786,7 +786,7 @@ def _connect_to_remote_jm_devs(this_node, jm_ids=[]):
|
|
|
786
786
|
|
|
787
787
|
rpc_client = RPCClient(
|
|
788
788
|
this_node.mgmt_ip, this_node.rpc_port,
|
|
789
|
-
this_node.rpc_username, this_node.rpc_password, timeout=
|
|
789
|
+
this_node.rpc_username, this_node.rpc_password, timeout=10, retry=2)
|
|
790
790
|
|
|
791
791
|
node_bdevs = rpc_client.get_bdevs()
|
|
792
792
|
node_bdev_names = [b['name'] for b in node_bdevs]
|
|
@@ -1640,7 +1640,7 @@ def restart_storage_node(
|
|
|
1640
1640
|
logger.info(f"Device not found: {db_dev.get_id()}")
|
|
1641
1641
|
db_dev.status = NVMeDevice.STATUS_REMOVED
|
|
1642
1642
|
removed_devices.append(db_dev)
|
|
1643
|
-
|
|
1643
|
+
distr_controller.send_dev_status_event(db_dev, db_dev.status)
|
|
1644
1644
|
|
|
1645
1645
|
if snode.jm_device and "serial_number" in snode.jm_device.device_data_dict:
|
|
1646
1646
|
known_devices_sn.append(snode.jm_device.device_data_dict['serial_number'])
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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.4 → sbcli_dev-3.9.6}/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
|
{sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/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-3.9.4 → sbcli_dev-3.9.6}/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.4 → sbcli_dev-3.9.6}/simplyblock_core/services/tasks_runner_failed_migration.py
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-3.9.4 → sbcli_dev-3.9.6}/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
|