sbcli-dev 11.1.2__tar.gz → 11.1.4__tar.gz
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-11.1.2 → sbcli_dev-11.1.4}/PKG-INFO +1 -1
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/sbcli_dev.egg-info/PKG-INFO +1 -1
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/constants.py +1 -1
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/env_var +1 -1
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/rpc_client.py +2 -2
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/snode_client.py +9 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/storage_node_ops.py +19 -13
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/blueprints/snode_ops.py +18 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/node_utils.py +48 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/README.md +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/pyproject.toml +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/requirements.txt +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/sbcli_dev.egg-info/SOURCES.txt +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/sbcli_dev.egg-info/dependency_links.txt +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/sbcli_dev.egg-info/entry_points.txt +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/sbcli_dev.egg-info/requires.txt +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/sbcli_dev.egg-info/top_level.txt +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/setup.cfg +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/setup.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_cli/__init__.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_cli/cli.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_cli/main.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/__init__.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/cluster_ops.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/controllers/device_controller.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/controllers/events_controller.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/controllers/health_controller.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/controllers/lvol_controller.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/controllers/pool_controller.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/controllers/snapshot_controller.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/controllers/tasks_controller.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/db_controller.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/distr_controller.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/mgmt_node_ops.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/models/cluster.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/models/deployer.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/models/events.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/models/iface.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/models/job_schedule.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/models/lvol_model.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/models/nvme_device.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/models/pool.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/models/stats.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/models/storage_node.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/scripts/__init__.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/scripts/dashboard.yml +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/scripts/deploy_fdb.sh +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/scripts/deploy_stack.sh +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/scripts/docker-compose-swarm.yml +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/scripts/foundation.yml +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/scripts/objstore.yml +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/scripts/prepare_fdb.sh +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/scripts/prometheus.yml +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/services/cached_lvol_stat_collector.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/services/capacity_and_stats_collector.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/services/health_check_service.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/services/log_agg_service.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/services/lvol_stat_collector.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/services/main_distr_event_collector.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/services/new_device_discovery.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/services/port_stat_collector.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/services/spdk/__init__.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/services/spdk/client.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/services/spdk_http_proxy_server.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/services/spdk_stats_collector.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/services/storage_node_monitor.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/services/tasks_runner_failed_migration.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/services/tasks_runner_migration.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/services/tasks_runner_new_dev_migration.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/services/tasks_runner_node_add.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/services/tasks_runner_restart.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/utils.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/workers/cleanup_foundationdb.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/README.md +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/__init__.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/app.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/blueprints/snode_ops_k8s.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/blueprints/web_api_cluster.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/blueprints/web_api_lvol.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/blueprints/web_api_pool.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/blueprints/web_api_storage_node.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/caching_node_app.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/caching_node_app_k8s.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/requirements.txt +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/snode_app.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/snode_app_k8s.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/static/delete.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/static/tst.py +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_web/utils.py +0 -0
|
@@ -178,7 +178,7 @@ class RPCClient:
|
|
|
178
178
|
"trtype": trtype,
|
|
179
179
|
"adrfam": "IPv4",
|
|
180
180
|
"traddr": traddr,
|
|
181
|
-
"trsvcid": trsvcid
|
|
181
|
+
"trsvcid": str(trsvcid)
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
if ana_state:
|
|
@@ -896,7 +896,7 @@ class RPCClient:
|
|
|
896
896
|
"trtype": trtype,
|
|
897
897
|
"adrfam": "IPv4",
|
|
898
898
|
"traddr": traddr,
|
|
899
|
-
"trsvcid": trsvcid
|
|
899
|
+
"trsvcid": str(trsvcid)
|
|
900
900
|
}
|
|
901
901
|
}
|
|
902
902
|
return self._request("nvmf_subsystem_remove_listener", params)
|
|
@@ -134,3 +134,12 @@ class SNodeClient:
|
|
|
134
134
|
|
|
135
135
|
def get_file_content(self, file_name):
|
|
136
136
|
return self._request("GET", f"get_file_content/{file_name}")
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
def firewall_set_port(self, port_id, port_type="tcp", action="block"):
|
|
140
|
+
params = {
|
|
141
|
+
"port_id": port_id,
|
|
142
|
+
"port_type": port_type,
|
|
143
|
+
"action": action,
|
|
144
|
+
}
|
|
145
|
+
return self._request("POST", "firewall_set_port", params)
|
|
@@ -2880,12 +2880,15 @@ def recreate_lvstore(snode):
|
|
|
2880
2880
|
elif sec_node.status == StorageNode.STATUS_ONLINE:
|
|
2881
2881
|
sec_rpc_client = RPCClient(sec_node.mgmt_ip, sec_node.rpc_port, sec_node.rpc_username, sec_node.rpc_password)
|
|
2882
2882
|
|
|
2883
|
-
for lvol in lvol_list:
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2883
|
+
# for lvol in lvol_list:
|
|
2884
|
+
# if lvol.ha_type == "ha":
|
|
2885
|
+
# for iface in sec_node.data_nics:
|
|
2886
|
+
# if iface.ip4_address:
|
|
2887
|
+
# ret = sec_rpc_client.nvmf_subsystem_listener_set_ana_state(
|
|
2888
|
+
# lvol.nqn, iface.ip4_address, constants.LVOL_PORT, False, "inaccessible")
|
|
2889
|
+
|
|
2890
|
+
sec_node_api = SNodeClient(sec_node.api_endpoint)
|
|
2891
|
+
sec_node_api.firewall_set_port(constants.LVOL_PORT, "tcp", "block")
|
|
2889
2892
|
|
|
2890
2893
|
sec_rpc_client.bdev_lvol_set_leader(False, lvs_name=snode.lvstore, bs_nonleadership=True)
|
|
2891
2894
|
sec_rpc_client.bdev_distrib_force_to_non_leader(snode.jm_vuid)
|
|
@@ -2963,13 +2966,16 @@ def recreate_lvstore(snode):
|
|
|
2963
2966
|
|
|
2964
2967
|
if sec_node and sec_node.status == StorageNode.STATUS_ONLINE:
|
|
2965
2968
|
time.sleep(10)
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2969
|
+
sec_node_api = SNodeClient(sec_node.api_endpoint)
|
|
2970
|
+
sec_node_api.firewall_set_port(constants.LVOL_PORT, "tcp", "allow")
|
|
2971
|
+
|
|
2972
|
+
# sec_rpc_client = RPCClient(sec_node.mgmt_ip, sec_node.rpc_port, sec_node.rpc_username, sec_node.rpc_password, timeout=3, retry=2)
|
|
2973
|
+
# for lvol in lvol_list:
|
|
2974
|
+
# if lvol.ha_type == "ha":
|
|
2975
|
+
# for iface in sec_node.data_nics:
|
|
2976
|
+
# if iface.ip4_address:
|
|
2977
|
+
# ret = sec_rpc_client.nvmf_subsystem_listener_set_ana_state(
|
|
2978
|
+
# lvol.nqn, iface.ip4_address, constants.LVOL_PORT, False)
|
|
2973
2979
|
return True
|
|
2974
2980
|
|
|
2975
2981
|
|
|
@@ -483,3 +483,21 @@ def bind_device_to_spdk():
|
|
|
483
483
|
time.sleep(1)
|
|
484
484
|
|
|
485
485
|
return utils.get_response(True)
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
@bp.route('/firewall_set_port', methods=['POST'])
|
|
489
|
+
def firewall_set_port():
|
|
490
|
+
data = request.get_json()
|
|
491
|
+
if "port_id" not in data:
|
|
492
|
+
return utils.get_response(False, "Required parameter is missing: port_id")
|
|
493
|
+
if "port_type" not in data:
|
|
494
|
+
return utils.get_response(False, "Required parameter is missing: port_type")
|
|
495
|
+
if "action" not in data:
|
|
496
|
+
return utils.get_response(False, "Required parameter is missing: action")
|
|
497
|
+
|
|
498
|
+
port_id = data['port_id']
|
|
499
|
+
port_type = data['port_type']
|
|
500
|
+
action = data['action']
|
|
501
|
+
|
|
502
|
+
ret = node_utils.firewall_port(port_id, port_type, block=action=="block")
|
|
503
|
+
return utils.get_response(ret)
|
|
@@ -170,3 +170,51 @@ def get_memory_details():
|
|
|
170
170
|
def get_host_arch():
|
|
171
171
|
out, err, rc = run_command("uname -m")
|
|
172
172
|
return out
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
def firewall_port(port_id=9090, port_type="tcp", block=True):
|
|
176
|
+
|
|
177
|
+
if block:
|
|
178
|
+
cmd_list=[
|
|
179
|
+
"systemctl restart iptables",
|
|
180
|
+
"iptables -L -n",
|
|
181
|
+
"iptables -P INPUT ACCEPT",
|
|
182
|
+
"iptables -P FORWARD ACCEPT",
|
|
183
|
+
"iptables -P OUTPUT ACCEPT",
|
|
184
|
+
f"iptables -A INPUT -p {port_type} --dport {port_id} -j DROP",
|
|
185
|
+
f"iptables -A INPUT -p {port_type} --dport {port_id} -j REJECT",
|
|
186
|
+
f"iptables -A OUTPUT -p {port_type} --dport {port_id} -j DROP",
|
|
187
|
+
f"iptables -A OUTPUT -p {port_type} --dport {port_id} -j REJECT"
|
|
188
|
+
]
|
|
189
|
+
else:
|
|
190
|
+
cmd_list=[
|
|
191
|
+
"systemctl restart iptables",
|
|
192
|
+
"iptables -L -n",
|
|
193
|
+
"iptables -P INPUT ACCEPT",
|
|
194
|
+
"iptables -P FORWARD ACCEPT",
|
|
195
|
+
"iptables -P OUTPUT ACCEPT",
|
|
196
|
+
# f"iptables -D INPUT -p {port_type} --dport {port_id} -j DROP",
|
|
197
|
+
# f"iptables -D INPUT -p {port_type} --dport {port_id} -j REJECT",
|
|
198
|
+
# f"iptables -D OUTPUT -p {port_type} --dport {port_id} -j DROP",
|
|
199
|
+
# f"iptables -D OUTPUT -p {port_type} --dport {port_id} -j REJECT"
|
|
200
|
+
]
|
|
201
|
+
# systemctl start iptables
|
|
202
|
+
# iptables -L -n
|
|
203
|
+
# sudo iptables -P INPUT ACCEPT
|
|
204
|
+
# sudo iptables -P FORWARD ACCEPT
|
|
205
|
+
# sudo iptables -P OUTPUT ACCEPT
|
|
206
|
+
|
|
207
|
+
# iptables -A INPUT -p tcp --dport 9090 -j DROP
|
|
208
|
+
# iptables -A INPUT -p tcp --dport 9090 -j REJECT
|
|
209
|
+
# iptables -A OUTPUT -p tcp --dport 9090 -j DROP
|
|
210
|
+
# iptables -A OUTPUT -p tcp --dport 9090 -j REJECT
|
|
211
|
+
|
|
212
|
+
out = ""
|
|
213
|
+
for cmd in cmd_list:
|
|
214
|
+
stream = os.popen(cmd)
|
|
215
|
+
ret = stream.read()
|
|
216
|
+
if ret != "":
|
|
217
|
+
out += ret + "\n"
|
|
218
|
+
logger.info(ret)
|
|
219
|
+
|
|
220
|
+
return out
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/controllers/caching_node_controller.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/scripts/clean_local_storage_deploy.sh
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/scripts/dashboards/node-exporter.json
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
|
{sbcli_dev-11.1.2 → sbcli_dev-11.1.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
|
{sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/services/cached_lvol_stat_collector.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-11.1.2 → sbcli_dev-11.1.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
|
{sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/services/main_distr_event_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
|
{sbcli_dev-11.1.2 → sbcli_dev-11.1.4}/simplyblock_core/services/tasks_runner_failed_migration.py
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-11.1.2 → sbcli_dev-11.1.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
|