sbcli-dev 4.0.3__zip → 4.0.5__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-4.0.3 → sbcli_dev-4.0.5}/PKG-INFO +1 -1
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/env_var +1 -1
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/sbcli_dev.egg-info/PKG-INFO +1 -1
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/constants.py +3 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/controllers/device_controller.py +13 -13
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/controllers/tasks_controller.py +1 -2
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/services/spdk_http_proxy_server.py +13 -9
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/snode_client.py +5 -1
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/storage_node_ops.py +8 -3
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/blueprints/snode_ops.py +13 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/README.md +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/pyproject.toml +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/sbcli_dev.egg-info/SOURCES.txt +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/sbcli_dev.egg-info/dependency_links.txt +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/sbcli_dev.egg-info/entry_points.txt +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/sbcli_dev.egg-info/requires.txt +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/sbcli_dev.egg-info/top_level.txt +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/setup.cfg +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/setup.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_cli/cli.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_cli/main.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/__init__.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/cluster_ops.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/compute_node_ops.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/controllers/events_controller.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/controllers/health_controller.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/controllers/lvol_controller.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/controllers/pool_controller.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/controllers/snapshot_controller.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/distr_controller.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/kv_store.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/mgmt_node_ops.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/models/cluster.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/models/compute_node.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/models/deployer.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/models/events.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/models/global_settings.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/models/iface.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/models/job_schedule.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/models/lvol_model.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/models/nvme_device.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/models/pool.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/models/stats.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/models/storage_node.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/rpc_client.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/scripts/__init__.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/scripts/dashboard.yml +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/scripts/deploy_stack.sh +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/scripts/docker-compose-swarm.yml +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/scripts/objstore.yml +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/scripts/prometheus.yml +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/services/cached_lvol_stat_collector.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/services/capacity_and_stats_collector.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/services/health_check_service.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/services/log_agg_service.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/services/lvol_stat_collector.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/services/main_distr_event_collector.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/services/new_device_discovery.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/services/port_stat_collector.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/services/storage_node_monitor.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/services/tasks_runner_failed_migration.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/services/tasks_runner_migration.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/services/tasks_runner_new_dev_migration.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/services/tasks_runner_node_add.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/services/tasks_runner_restart.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/utils.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/__init__.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/app.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/blueprints/snode_ops_k8s.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/blueprints/web_api_cluster.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/blueprints/web_api_lvol.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/blueprints/web_api_pool.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/blueprints/web_api_storage_node.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/caching_node_app.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/caching_node_app_k8s.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/node_utils.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/snode_app.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/snode_app_k8s.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/static/delete.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/static/tst.py +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_web/utils.py +0 -0
|
@@ -38,6 +38,19 @@ def device_set_state(device_id, state):
|
|
|
38
38
|
old_status = dev.status
|
|
39
39
|
device.status = state
|
|
40
40
|
snode.write_to_db(db_controller.kv_store)
|
|
41
|
+
|
|
42
|
+
if state == NVMeDevice.STATUS_ONLINE:
|
|
43
|
+
snode = db_controller.get_storage_node_by_id(dev.node_id)
|
|
44
|
+
logger.info("Make other nodes connect to the node devices")
|
|
45
|
+
snodes = db_controller.get_storage_nodes_by_cluster_id(snode.cluster_id)
|
|
46
|
+
for node in snodes:
|
|
47
|
+
if node.get_id() == snode.get_id() or node.status != StorageNode.STATUS_ONLINE:
|
|
48
|
+
continue
|
|
49
|
+
node.remote_devices = storage_node_ops._connect_to_remote_devs(node)
|
|
50
|
+
if node.enable_ha_jm:
|
|
51
|
+
node.remote_jm_devices = storage_node_ops._connect_to_remote_jm_devs(node)
|
|
52
|
+
node.write_to_db()
|
|
53
|
+
|
|
41
54
|
distr_controller.send_dev_status_event(device, device.status)
|
|
42
55
|
device_events.device_status_change(device, device.status, old_status)
|
|
43
56
|
return True
|
|
@@ -80,19 +93,6 @@ def device_set_read_only(device_id):
|
|
|
80
93
|
|
|
81
94
|
|
|
82
95
|
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
|
-
|
|
96
96
|
ret = device_set_state(device_id, NVMeDevice.STATUS_ONLINE)
|
|
97
97
|
if ret:
|
|
98
98
|
logger.info("Adding task to device data migration")
|
|
@@ -80,8 +80,7 @@ def add_device_mig_task(device_id):
|
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
def add_device_to_auto_restart(device):
|
|
83
|
-
return
|
|
84
|
-
# return _add_task(JobSchedule.FN_DEV_RESTART, device.cluster_id, device.node_id, device.get_id())
|
|
83
|
+
return _add_task(JobSchedule.FN_DEV_RESTART, device.cluster_id, device.node_id, device.get_id())
|
|
85
84
|
|
|
86
85
|
|
|
87
86
|
def add_node_to_auto_restart(node):
|
|
@@ -13,7 +13,6 @@ from http.server import ThreadingHTTPServer
|
|
|
13
13
|
from http.server import BaseHTTPRequestHandler
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
TIMEOUT = 5*60 # 5 min
|
|
17
16
|
rpc_sock = '/var/tmp/spdk.sock'
|
|
18
17
|
logger_handler = logging.StreamHandler(stream=sys.stdout)
|
|
19
18
|
logger_handler.setFormatter(logging.Formatter('%(asctime)s: %(levelname)s: %(message)s'))
|
|
@@ -34,7 +33,7 @@ def get_env_var(name, default=None, is_required=False):
|
|
|
34
33
|
|
|
35
34
|
def rpc_call(req):
|
|
36
35
|
req_data = json.loads(req.decode('ascii'))
|
|
37
|
-
|
|
36
|
+
logger.debug(f"Request data: {str(req_data)}")
|
|
38
37
|
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
|
39
38
|
sock.settimeout(TIMEOUT)
|
|
40
39
|
sock.connect(rpc_sock)
|
|
@@ -64,7 +63,7 @@ def rpc_call(req):
|
|
|
64
63
|
if not response and len(buf) > 0:
|
|
65
64
|
raise
|
|
66
65
|
|
|
67
|
-
|
|
66
|
+
logger.debug(f"Response data: {buf}")
|
|
68
67
|
|
|
69
68
|
return buf
|
|
70
69
|
|
|
@@ -122,24 +121,28 @@ class ServerHandler(BaseHTTPRequestHandler):
|
|
|
122
121
|
self.do_INTERNALERROR()
|
|
123
122
|
|
|
124
123
|
|
|
125
|
-
def run_server(host, port, user, password, cert=None):
|
|
124
|
+
def run_server(host, port, user, password, cert=None, is_threading_enabled=False):
|
|
126
125
|
# encoding user and password
|
|
127
126
|
key = base64.b64encode((user+':'+password).encode(encoding='ascii')).decode('ascii')
|
|
128
127
|
|
|
129
128
|
try:
|
|
130
129
|
ServerHandler.key = key
|
|
131
|
-
|
|
132
|
-
|
|
130
|
+
if is_threading_enabled:
|
|
131
|
+
httpd = ThreadingHTTPServer((host, port), ServerHandler)
|
|
132
|
+
else:
|
|
133
|
+
httpd = HTTPServer((host, port), ServerHandler)
|
|
133
134
|
httpd.timeout = TIMEOUT
|
|
134
135
|
if cert is not None:
|
|
135
136
|
httpd.socket = ssl.wrap_socket(httpd.socket, certfile=cert, server_side=True)
|
|
136
|
-
|
|
137
|
+
logger.info('Started RPC http proxy server')
|
|
137
138
|
httpd.serve_forever()
|
|
138
139
|
except KeyboardInterrupt:
|
|
139
|
-
|
|
140
|
+
logger.info('Shutting down server')
|
|
140
141
|
httpd.socket.close()
|
|
141
142
|
|
|
142
143
|
|
|
144
|
+
TIMEOUT = int(get_env_var("TIMEOUT", is_required=False, default=60*5))
|
|
145
|
+
is_threading_enabled = get_env_var("MULTI_THREADING_ENABLED", is_required=False, default=False)
|
|
143
146
|
server_ip = get_env_var("SERVER_IP", is_required=True)
|
|
144
147
|
rpc_port = get_env_var("RPC_PORT", is_required=True)
|
|
145
148
|
rpc_username = get_env_var("RPC_USERNAME", is_required=True)
|
|
@@ -150,4 +153,5 @@ try:
|
|
|
150
153
|
except Exception:
|
|
151
154
|
rpc_port = 8080
|
|
152
155
|
|
|
153
|
-
|
|
156
|
+
is_threading_enabled = bool(is_threading_enabled)
|
|
157
|
+
run_server(server_ip, rpc_port, rpc_username, rpc_password, is_threading_enabled=is_threading_enabled)
|
|
@@ -72,7 +72,7 @@ class SNodeClient:
|
|
|
72
72
|
|
|
73
73
|
def spdk_process_start(self, spdk_cpu_mask, spdk_mem, spdk_image=None, spdk_debug=None, cluster_ip=None,
|
|
74
74
|
fdb_connection=None, namespace=None, server_ip=None, rpc_port=None,
|
|
75
|
-
rpc_username=None, rpc_password=None):
|
|
75
|
+
rpc_username=None, rpc_password=None, multi_threading_enabled=False, timeout=0):
|
|
76
76
|
params = {
|
|
77
77
|
"cluster_ip": cluster_ip,
|
|
78
78
|
"server_ip": server_ip,
|
|
@@ -92,6 +92,10 @@ class SNodeClient:
|
|
|
92
92
|
params['fdb_connection'] = fdb_connection
|
|
93
93
|
if namespace:
|
|
94
94
|
params["namespace"] = namespace
|
|
95
|
+
if multi_threading_enabled:
|
|
96
|
+
params["multi_threading_enabled"] = multi_threading_enabled
|
|
97
|
+
if timeout:
|
|
98
|
+
params["timeout"] = timeout
|
|
95
99
|
return self._request("POST", "spdk_process_start", params)
|
|
96
100
|
|
|
97
101
|
def join_swarm(self, cluster_ip, join_token, db_connection, cluster_id):
|
|
@@ -790,7 +790,10 @@ def _connect_to_remote_jm_devs(this_node, jm_ids=[]):
|
|
|
790
790
|
this_node.rpc_username, this_node.rpc_password, timeout=10, retry=2)
|
|
791
791
|
|
|
792
792
|
node_bdevs = rpc_client.get_bdevs()
|
|
793
|
-
|
|
793
|
+
if node_bdevs:
|
|
794
|
+
node_bdev_names = [b['name'] for b in node_bdevs]
|
|
795
|
+
else:
|
|
796
|
+
node_bdev_names = []
|
|
794
797
|
remote_devices = []
|
|
795
798
|
if jm_ids:
|
|
796
799
|
for jm_id in jm_ids:
|
|
@@ -1001,7 +1004,8 @@ def add_node(cluster_id, node_ip, iface_name, data_nics_list,
|
|
|
1001
1004
|
try:
|
|
1002
1005
|
results, err = snode_api.spdk_process_start(
|
|
1003
1006
|
spdk_cpu_mask, spdk_mem, spdk_image, spdk_debug, cluster_ip, fdb_connection,
|
|
1004
|
-
namespace, mgmt_ip, constants.RPC_HTTP_PROXY_PORT, rpc_user, rpc_pass
|
|
1007
|
+
namespace, mgmt_ip, constants.RPC_HTTP_PROXY_PORT, rpc_user, rpc_pass,
|
|
1008
|
+
multi_threading_enabled=constants.SPDK_PROXY_MULTI_THREADING_ENABLED, timeout=constants.SPDK_PROXY_TIMEOUT)
|
|
1005
1009
|
except Exception as e:
|
|
1006
1010
|
logger.error(e)
|
|
1007
1011
|
return False
|
|
@@ -1532,7 +1536,8 @@ def restart_storage_node(
|
|
|
1532
1536
|
fdb_connection = cluster.db_connection
|
|
1533
1537
|
results, err = snode_api.spdk_process_start(
|
|
1534
1538
|
snode.spdk_cpu_mask, spdk_mem, snode.spdk_image, spdk_debug, cluster_ip, fdb_connection,
|
|
1535
|
-
snode.namespace, snode.mgmt_ip, constants.RPC_HTTP_PROXY_PORT, snode.rpc_username, snode.rpc_password
|
|
1539
|
+
snode.namespace, snode.mgmt_ip, constants.RPC_HTTP_PROXY_PORT, snode.rpc_username, snode.rpc_password,
|
|
1540
|
+
multi_threading_enabled=constants.SPDK_PROXY_MULTI_THREADING_ENABLED, timeout=constants.SPDK_PROXY_TIMEOUT)
|
|
1536
1541
|
except Exception as e:
|
|
1537
1542
|
logger.error(e)
|
|
1538
1543
|
return False
|
|
@@ -96,6 +96,17 @@ def spdk_process_start():
|
|
|
96
96
|
if 'spdk_mem' in data:
|
|
97
97
|
spdk_mem = data['spdk_mem']
|
|
98
98
|
|
|
99
|
+
multi_threading_enabled = False
|
|
100
|
+
if 'multi_threading_enabled' in data:
|
|
101
|
+
multi_threading_enabled = bool(data['multi_threading_enabled'])
|
|
102
|
+
|
|
103
|
+
timeout = 60*5
|
|
104
|
+
if 'timeout' in data:
|
|
105
|
+
try:
|
|
106
|
+
timeout = int(data['timeout'])
|
|
107
|
+
except:
|
|
108
|
+
pass
|
|
109
|
+
|
|
99
110
|
if spdk_mem:
|
|
100
111
|
spdk_mem = int(utils.parse_size(spdk_mem) / (1000 * 1000))
|
|
101
112
|
else:
|
|
@@ -157,6 +168,8 @@ def spdk_process_start():
|
|
|
157
168
|
f"RPC_PORT={data['rpc_port']}",
|
|
158
169
|
f"RPC_USERNAME={data['rpc_username']}",
|
|
159
170
|
f"RPC_PASSWORD={data['rpc_password']}",
|
|
171
|
+
f"MULTI_THREADING_ENABLED={multi_threading_enabled}",
|
|
172
|
+
f"TIMEOUT={timeout}",
|
|
160
173
|
]
|
|
161
174
|
# restart_policy={"Name": "always"}
|
|
162
175
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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-4.0.3 → sbcli_dev-4.0.5}/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-4.0.3 → sbcli_dev-4.0.5}/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-4.0.3 → sbcli_dev-4.0.5}/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
|
{sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/simplyblock_core/services/tasks_runner_failed_migration.py
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-4.0.3 → sbcli_dev-4.0.5}/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
|