sbcli-dev 4.0.4__zip → 4.0.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-4.0.4 → sbcli_dev-4.0.6}/PKG-INFO +1 -1
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/env_var +1 -1
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/sbcli_dev.egg-info/PKG-INFO +1 -1
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/constants.py +3 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/controllers/device_controller.py +6 -2
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/services/spdk_http_proxy_server.py +13 -9
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/snode_client.py +5 -1
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/storage_node_ops.py +29 -7
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/blueprints/snode_ops.py +13 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/README.md +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/pyproject.toml +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/sbcli_dev.egg-info/SOURCES.txt +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/sbcli_dev.egg-info/dependency_links.txt +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/sbcli_dev.egg-info/entry_points.txt +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/sbcli_dev.egg-info/requires.txt +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/sbcli_dev.egg-info/top_level.txt +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/setup.cfg +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/setup.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_cli/cli.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_cli/main.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/__init__.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/cluster_ops.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/compute_node_ops.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/controllers/events_controller.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/controllers/health_controller.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/controllers/lvol_controller.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/controllers/pool_controller.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/controllers/snapshot_controller.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/controllers/tasks_controller.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/distr_controller.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/kv_store.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/mgmt_node_ops.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/models/cluster.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/models/compute_node.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/models/deployer.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/models/events.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/models/global_settings.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/models/iface.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/models/job_schedule.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/models/lvol_model.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/models/nvme_device.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/models/pool.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/models/stats.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/models/storage_node.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/rpc_client.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/scripts/__init__.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/scripts/dashboard.yml +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/scripts/deploy_stack.sh +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/scripts/docker-compose-swarm.yml +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/scripts/objstore.yml +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/scripts/prometheus.yml +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/services/cached_lvol_stat_collector.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/services/capacity_and_stats_collector.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/services/health_check_service.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/services/log_agg_service.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/services/lvol_stat_collector.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/services/main_distr_event_collector.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/services/new_device_discovery.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/services/port_stat_collector.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/services/storage_node_monitor.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/services/tasks_runner_failed_migration.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/services/tasks_runner_migration.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/services/tasks_runner_new_dev_migration.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/services/tasks_runner_node_add.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/services/tasks_runner_restart.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/utils.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/__init__.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/app.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/blueprints/snode_ops_k8s.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/blueprints/web_api_cluster.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/blueprints/web_api_lvol.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/blueprints/web_api_pool.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/blueprints/web_api_storage_node.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/caching_node_app.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/caching_node_app_k8s.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/node_utils.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/snode_app.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/snode_app_k8s.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/static/delete.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/static/tst.py +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_web/utils.py +0 -0
|
@@ -672,7 +672,7 @@ def add_device(device_id):
|
|
|
672
672
|
if snode.jm_device and snode.jm_device.raid_bdev:
|
|
673
673
|
# looking for jm partition
|
|
674
674
|
rpc_client = RPCClient(snode.mgmt_ip, snode.rpc_port, snode.rpc_username, snode.rpc_password)
|
|
675
|
-
jm_dev_part = f"{dev.nvme_bdev[:-
|
|
675
|
+
jm_dev_part = f"{dev.nvme_bdev[:-2]}p1"
|
|
676
676
|
ret = rpc_client.get_bdevs(jm_dev_part)
|
|
677
677
|
if ret:
|
|
678
678
|
logger.info(f"JM part found: {jm_dev_part}")
|
|
@@ -714,6 +714,10 @@ def set_jm_device_state(device_id, state):
|
|
|
714
714
|
for node_index, node in enumerate(snodes):
|
|
715
715
|
if node.get_id() == snode.get_id() or node.status != StorageNode.STATUS_ONLINE:
|
|
716
716
|
continue
|
|
717
|
+
for jm_dev in node.remote_jm_devices:
|
|
718
|
+
if jm_dev.get_id() == device_id and jm_device.status != JMDevice.STATUS_ONLINE:
|
|
719
|
+
node.remote_jm_devices.remove(jm_dev)
|
|
720
|
+
break
|
|
717
721
|
logger.info(f"Connecting to node: {node.get_id()}")
|
|
718
722
|
node.remote_jm_devices = storage_node_ops._connect_to_remote_jm_devs(node)
|
|
719
723
|
node.write_to_db(db_controller.kv_store)
|
|
@@ -796,7 +800,7 @@ def restart_jm_device(device_id, force=False):
|
|
|
796
800
|
for dev in snode.nvme_devices:
|
|
797
801
|
if dev.status != NVMeDevice.STATUS_ONLINE:
|
|
798
802
|
continue
|
|
799
|
-
dev_part = f"{dev.nvme_bdev[:-
|
|
803
|
+
dev_part = f"{dev.nvme_bdev[:-2]}p1"
|
|
800
804
|
if dev_part in bdevs_names:
|
|
801
805
|
if dev_part not in jm_nvme_bdevs:
|
|
802
806
|
jm_nvme_bdevs.append(dev_part)
|
|
@@ -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):
|
|
@@ -798,16 +798,24 @@ def _connect_to_remote_jm_devs(this_node, jm_ids=[]):
|
|
|
798
798
|
if jm_ids:
|
|
799
799
|
for jm_id in jm_ids:
|
|
800
800
|
jm_dev = db_controller.get_jm_device_by_id(jm_id)
|
|
801
|
-
|
|
801
|
+
if jm_dev:
|
|
802
|
+
remote_devices.append(jm_dev)
|
|
802
803
|
elif len(this_node.remote_jm_devices) > 0:
|
|
803
804
|
remote_devices = this_node.remote_jm_devices
|
|
804
805
|
else:
|
|
805
806
|
for node in db_controller.get_storage_nodes_by_cluster_id(this_node.cluster_id):
|
|
806
807
|
if node.get_id() == this_node.get_id() or node.status != StorageNode.STATUS_ONLINE:
|
|
807
808
|
continue
|
|
808
|
-
if node.jm_device:
|
|
809
|
+
if node.jm_device and node.jm_device.status == JMDevice.STATUS_ONLINE:
|
|
809
810
|
remote_devices.append(node.jm_device)
|
|
810
811
|
|
|
812
|
+
if len(remote_devices) < 2:
|
|
813
|
+
online_jms = get_next_ha_jms(this_node)
|
|
814
|
+
for jm_id in online_jms:
|
|
815
|
+
jm_dev = db_controller.get_jm_device_by_id(jm_id)
|
|
816
|
+
if jm_dev:
|
|
817
|
+
remote_devices.append(jm_dev)
|
|
818
|
+
|
|
811
819
|
for jm_dev in remote_devices:
|
|
812
820
|
name = f"remote_{jm_dev.jm_bdev}"
|
|
813
821
|
bdev_name = f"{name}n1"
|
|
@@ -1004,7 +1012,8 @@ def add_node(cluster_id, node_ip, iface_name, data_nics_list,
|
|
|
1004
1012
|
try:
|
|
1005
1013
|
results, err = snode_api.spdk_process_start(
|
|
1006
1014
|
spdk_cpu_mask, spdk_mem, spdk_image, spdk_debug, cluster_ip, fdb_connection,
|
|
1007
|
-
namespace, mgmt_ip, constants.RPC_HTTP_PROXY_PORT, rpc_user, rpc_pass
|
|
1015
|
+
namespace, mgmt_ip, constants.RPC_HTTP_PROXY_PORT, rpc_user, rpc_pass,
|
|
1016
|
+
multi_threading_enabled=constants.SPDK_PROXY_MULTI_THREADING_ENABLED, timeout=constants.SPDK_PROXY_TIMEOUT)
|
|
1008
1017
|
except Exception as e:
|
|
1009
1018
|
logger.error(e)
|
|
1010
1019
|
return False
|
|
@@ -1353,6 +1362,10 @@ def remove_storage_node(node_id, force_remove=False, force_migrate=False):
|
|
|
1353
1362
|
distr_controller.disconnect_device(dev)
|
|
1354
1363
|
device_controller.device_set_failed(dev.get_id())
|
|
1355
1364
|
|
|
1365
|
+
if snode.jm_device:
|
|
1366
|
+
logger.info("Removing JM")
|
|
1367
|
+
device_controller.remove_jm_device(snode.jm_device.get_id(), force=True)
|
|
1368
|
+
|
|
1356
1369
|
logger.info("Removing storage node")
|
|
1357
1370
|
|
|
1358
1371
|
logger.debug("Leaving swarm...")
|
|
@@ -1535,7 +1548,8 @@ def restart_storage_node(
|
|
|
1535
1548
|
fdb_connection = cluster.db_connection
|
|
1536
1549
|
results, err = snode_api.spdk_process_start(
|
|
1537
1550
|
snode.spdk_cpu_mask, spdk_mem, snode.spdk_image, spdk_debug, cluster_ip, fdb_connection,
|
|
1538
|
-
snode.namespace, snode.mgmt_ip, constants.RPC_HTTP_PROXY_PORT, snode.rpc_username, snode.rpc_password
|
|
1551
|
+
snode.namespace, snode.mgmt_ip, constants.RPC_HTTP_PROXY_PORT, snode.rpc_username, snode.rpc_password,
|
|
1552
|
+
multi_threading_enabled=constants.SPDK_PROXY_MULTI_THREADING_ENABLED, timeout=constants.SPDK_PROXY_TIMEOUT)
|
|
1539
1553
|
except Exception as e:
|
|
1540
1554
|
logger.error(e)
|
|
1541
1555
|
return False
|
|
@@ -1685,6 +1699,7 @@ def restart_storage_node(
|
|
|
1685
1699
|
|
|
1686
1700
|
if snode.enable_ha_jm:
|
|
1687
1701
|
logger.info("Connecting to remote JMs")
|
|
1702
|
+
snode.remote_jm_devices = []
|
|
1688
1703
|
snode.remote_jm_devices = _connect_to_remote_jm_devs(snode)
|
|
1689
1704
|
|
|
1690
1705
|
logger.info("Setting node status to Online")
|
|
@@ -1712,6 +1727,9 @@ def restart_storage_node(
|
|
|
1712
1727
|
continue
|
|
1713
1728
|
tasks_controller.add_device_mig_task(dev.get_id())
|
|
1714
1729
|
|
|
1730
|
+
if cluster.status == cluster.STATUS_UNREADY:
|
|
1731
|
+
logger.info("Done")
|
|
1732
|
+
return "Success"
|
|
1715
1733
|
# Create distribs, raid0, and lvstore and expose lvols to the fabrics
|
|
1716
1734
|
if snode.lvstore_stack:
|
|
1717
1735
|
temp_rpc_client = RPCClient(
|
|
@@ -2560,12 +2578,15 @@ def get_next_ha_jms(current_node):
|
|
|
2560
2578
|
for node in db_controller.get_storage_nodes_by_cluster_id(current_node.cluster_id):
|
|
2561
2579
|
if node.get_id() == current_node.get_id() or node.status != StorageNode.STATUS_ONLINE:
|
|
2562
2580
|
continue
|
|
2563
|
-
if node.jm_device:
|
|
2581
|
+
if node.jm_device and node.jm_device.status == JMDevice.STATUS_ONLINE:
|
|
2564
2582
|
jm_count[node.jm_device.get_id()] = 1 + jm_count.get(node.jm_device.get_id(), 0)
|
|
2565
2583
|
for rem_jm_device in node.remote_jm_devices:
|
|
2566
2584
|
if rem_jm_device.get_id() != current_node.jm_device.get_id():
|
|
2567
|
-
|
|
2568
|
-
|
|
2585
|
+
try:
|
|
2586
|
+
if db_controller.get_jm_device_by_id(rem_jm_device.get_id()).status == JMDevice.STATUS_ONLINE:
|
|
2587
|
+
jm_count[rem_jm_device.get_id()] = 1 + jm_count.get(rem_jm_device.get_id(), 0)
|
|
2588
|
+
except :
|
|
2589
|
+
pass
|
|
2569
2590
|
jm_count = dict(sorted(jm_count.items(), key=lambda x: x[1]))
|
|
2570
2591
|
return list(jm_count.keys())[:2]
|
|
2571
2592
|
|
|
@@ -2595,6 +2616,7 @@ def create_lvstore(snode, ndcs, npcs, distr_bs, distr_chunk_bs, page_size_in_blo
|
|
|
2595
2616
|
if snode.enable_ha_jm:
|
|
2596
2617
|
jm_vuid = utils.get_random_vuid()
|
|
2597
2618
|
online_jms = get_next_ha_jms(snode)
|
|
2619
|
+
logger.debug(f"online_jms: {str(online_jms)}")
|
|
2598
2620
|
snode.remote_jm_devices = _connect_to_remote_jm_devs(snode, online_jms)
|
|
2599
2621
|
snode.write_to_db()
|
|
2600
2622
|
|
|
@@ -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
|
|
File without changes
|
{sbcli_dev-4.0.4 → sbcli_dev-4.0.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
|
|
File without changes
|
{sbcli_dev-4.0.4 → sbcli_dev-4.0.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
|
|
File without changes
|
{sbcli_dev-4.0.4 → sbcli_dev-4.0.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
|
|
File without changes
|
{sbcli_dev-4.0.4 → sbcli_dev-4.0.6}/simplyblock_core/services/tasks_runner_failed_migration.py
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-4.0.4 → sbcli_dev-4.0.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
|