sbcli-pre 25.3.9__tar.gz → 25.3.10__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-pre-25.3.9 → sbcli-pre-25.3.10}/PKG-INFO +1 -1
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/sbcli_pre.egg-info/PKG-INFO +1 -1
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_cli/cli.py +4 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_cli/clibase.py +3 -4
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/cluster_ops.py +50 -28
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/controllers/tasks_controller.py +3 -2
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/db_controller.py +4 -4
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/env_var +1 -1
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/services/storage_node_monitor.py +9 -3
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/storage_node_ops.py +1 -1
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/README.md +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/pyproject.toml +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/requirements.txt +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/sbcli_pre.egg-info/SOURCES.txt +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/sbcli_pre.egg-info/dependency_links.txt +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/sbcli_pre.egg-info/entry_points.txt +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/sbcli_pre.egg-info/requires.txt +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/sbcli_pre.egg-info/top_level.txt +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/setup.cfg +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/setup.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_cli/__init__.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_cli/main.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/__init__.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/cnode_client.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/constants.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/controllers/device_controller.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/controllers/events_controller.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/controllers/health_controller.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/controllers/lvol_controller.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/controllers/pool_controller.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/controllers/snapshot_controller.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/controllers/tcp_ports_events.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/distr_controller.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/mgmt_node_ops.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/models/__init__.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/models/base_model.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/models/cluster.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/models/deployer.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/models/events.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/models/iface.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/models/job_schedule.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/models/lvol_model.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/models/nvme_device.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/models/pool.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/models/stats.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/models/storage_node.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/pci_utils.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/rpc_client.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/scripts/__init__.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/scripts/dashboard.yml +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/scripts/deploy_fdb.sh +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/scripts/deploy_stack.sh +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/scripts/docker-compose-swarm.yml +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/scripts/foundation.yml +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/scripts/objstore.yml +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/scripts/prepare_fdb.sh +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/scripts/prometheus.yml +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/services/__init__.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/services/cached_lvol_stat_collector.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/services/capacity_and_stats_collector.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/services/health_check_service.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/services/lvol_stat_collector.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/services/main_distr_event_collector.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/services/new_device_discovery.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/services/service_template.service +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/services/spdk/__init__.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/services/spdk/client.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/services/spdk_http_proxy_server.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/services/spdk_stats_collector.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/services/tasks_runner_failed_migration.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/services/tasks_runner_migration.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/services/tasks_runner_new_dev_migration.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/services/tasks_runner_node_add.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/services/tasks_runner_restart.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/shell_utils.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/snode_client.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/test/test_utils.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/utils.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/workers/cleanup_foundationdb.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/README.md +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/__init__.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/app.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/snode_ops.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/snode_ops_k8s.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/swagger_ui_blueprint.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/web_api_cluster.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/web_api_lvol.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/web_api_pool.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/web_api_storage_node.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/caching_node_app.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/caching_node_app_k8s.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/node_utils.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/node_utils_k8s.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/node_webapp.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/requirements.txt +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/snode_app.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/snode_app_k8s.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/static/SimplyBlock-API.postman_collection.json +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/static/delete.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/static/deploy.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/static/is_up.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/static/swagger.yaml +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/static/tst.py +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2 +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2 +0 -0
- {sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/utils.py +0 -0
@@ -515,6 +515,7 @@ class CLIWrapper(CLIWrapperBase):
|
|
515
515
|
def init_cluster__get_logs(self, subparser):
|
516
516
|
subcommand = self.add_sub_command(subparser, 'get-logs', 'Returns a cluster\'s status logs')
|
517
517
|
subcommand.add_argument('cluster_id', help='Cluster id', type=str).completer = self._completer_get_cluster_list
|
518
|
+
argument = subcommand.add_argument('--limit', help='show last number of logs, default 50', type=int, default=50, dest='limit', required=False)
|
518
519
|
|
519
520
|
def init_cluster__get_secret(self, subparser):
|
520
521
|
subcommand = self.add_sub_command(subparser, 'get-secret', 'Gets a cluster\'s secret')
|
@@ -534,6 +535,8 @@ class CLIWrapper(CLIWrapperBase):
|
|
534
535
|
subcommand.add_argument('cluster_id', help='Cluster id', type=str).completer = self._completer_get_cluster_list
|
535
536
|
argument = subcommand.add_argument('--cp-only', help='Update the control plane only', type=bool, default=False, dest='mgmt_only', required=False)
|
536
537
|
argument = subcommand.add_argument('--restart', help='Restart the management services', type=bool, default=False, dest='restart', required=False)
|
538
|
+
argument = subcommand.add_argument('--spdk-image', help='Restart the storage nodes using the provided image', type=str, dest='spdk_image', required=False)
|
539
|
+
argument = subcommand.add_argument('--mgmt-image', help='Restart the management services using the provided image', type=str, dest='mgmt_image', required=False)
|
537
540
|
|
538
541
|
def init_cluster__graceful_shutdown(self, subparser):
|
539
542
|
subcommand = self.add_sub_command(subparser, 'graceful-shutdown', 'Initiates a graceful shutdown of a cluster\'s storage nodes')
|
@@ -548,6 +551,7 @@ class CLIWrapper(CLIWrapperBase):
|
|
548
551
|
def init_cluster__list_tasks(self, subparser):
|
549
552
|
subcommand = self.add_sub_command(subparser, 'list-tasks', 'Lists tasks of a cluster')
|
550
553
|
subcommand.add_argument('cluster_id', help='Cluster id', type=str).completer = self._completer_get_cluster_list
|
554
|
+
argument = subcommand.add_argument('--limit', help='show last number of tasks, default 50', type=int, default=50, dest='limit', required=False)
|
551
555
|
|
552
556
|
def init_cluster__cancel_task(self, subparser):
|
553
557
|
subcommand = self.add_sub_command(subparser, 'cancel-task', 'Cancels task by task id')
|
@@ -311,8 +311,7 @@ class CLIWrapperBase:
|
|
311
311
|
return False
|
312
312
|
|
313
313
|
def cluster__get_logs(self, sub_command, args):
|
314
|
-
|
315
|
-
return cluster_ops.get_logs(cluster_id)
|
314
|
+
return cluster_ops.get_logs(**args.__dict__)
|
316
315
|
|
317
316
|
def cluster__get_secret(self, sub_command, args):
|
318
317
|
cluster_id = args.cluster_id
|
@@ -328,7 +327,7 @@ class CLIWrapperBase:
|
|
328
327
|
return health_controller.check_cluster(cluster_id)
|
329
328
|
|
330
329
|
def cluster__update(self, sub_command, args):
|
331
|
-
return cluster_ops.update_cluster(args.
|
330
|
+
return cluster_ops.update_cluster(**args.__dict__)
|
332
331
|
|
333
332
|
def cluster__graceful_shutdown(self, sub_command, args):
|
334
333
|
return cluster_ops.cluster_grace_shutdown(args.cluster_id)
|
@@ -337,7 +336,7 @@ class CLIWrapperBase:
|
|
337
336
|
return cluster_ops.cluster_grace_startup(args.cluster_id, args.clear_data, args.spdk_image)
|
338
337
|
|
339
338
|
def cluster__list_tasks(self, sub_command, args):
|
340
|
-
return tasks_controller.list_tasks(args.
|
339
|
+
return tasks_controller.list_tasks(**args.__dict__)
|
341
340
|
|
342
341
|
def cluster__cancel_task(self, sub_command, args):
|
343
342
|
return tasks_controller.cancel_task(args.task_id)
|
@@ -1161,27 +1161,27 @@ def set_secret(cluster_id, secret):
|
|
1161
1161
|
return "Done"
|
1162
1162
|
|
1163
1163
|
|
1164
|
-
def get_logs(cluster_id, is_json=False):
|
1164
|
+
def get_logs(cluster_id, is_json=False, limit=50, **kwargs):
|
1165
1165
|
db_controller = DBController()
|
1166
1166
|
cluster = db_controller.get_cluster_by_id(cluster_id)
|
1167
1167
|
if not cluster:
|
1168
1168
|
logger.error(f"Cluster not found {cluster_id}")
|
1169
1169
|
return False
|
1170
1170
|
|
1171
|
-
events = db_controller.get_events(cluster_id)
|
1171
|
+
events = db_controller.get_events(cluster_id, limit=limit, reverse=True)
|
1172
1172
|
out = []
|
1173
|
+
events.reverse()
|
1173
1174
|
for record in events:
|
1174
|
-
logger.debug(record)
|
1175
1175
|
Storage_ID = None
|
1176
|
-
if
|
1177
|
-
Storage_ID = record.
|
1176
|
+
if record.storage_id >= 0:
|
1177
|
+
Storage_ID = record.storage_id
|
1178
1178
|
|
1179
1179
|
elif 'cluster_device_order' in record.object_dict:
|
1180
1180
|
Storage_ID = record.object_dict['cluster_device_order']
|
1181
1181
|
|
1182
1182
|
vuid = None
|
1183
|
-
if
|
1184
|
-
vuid = record.
|
1183
|
+
if record.vuid > 0:
|
1184
|
+
vuid = record.vuid
|
1185
1185
|
|
1186
1186
|
msg = record.message
|
1187
1187
|
if record.event in ["device_status", "node_status"]:
|
@@ -1213,11 +1213,11 @@ def get_cluster(cl_id):
|
|
1213
1213
|
return json.dumps(cluster.get_clean_dict(), indent=2, sort_keys=True)
|
1214
1214
|
|
1215
1215
|
|
1216
|
-
def update_cluster(
|
1216
|
+
def update_cluster(cluster_id, mgmt_only=False, restart=False, spdk_image=None, mgmt_image=None, **kwargs):
|
1217
1217
|
db_controller = DBController()
|
1218
|
-
cluster = db_controller.get_cluster_by_id(
|
1218
|
+
cluster = db_controller.get_cluster_by_id(cluster_id)
|
1219
1219
|
if not cluster:
|
1220
|
-
logger.error(f"Cluster not found {
|
1220
|
+
logger.error(f"Cluster not found {cluster_id}")
|
1221
1221
|
return False
|
1222
1222
|
|
1223
1223
|
try:
|
@@ -1230,34 +1230,56 @@ def update_cluster(cl_id, mgmt_only=False, restart_cluster=False):
|
|
1230
1230
|
|
1231
1231
|
try:
|
1232
1232
|
logger.info("Updating mgmt cluster")
|
1233
|
-
cluster_docker = utils.get_docker_client(
|
1233
|
+
cluster_docker = utils.get_docker_client(cluster_id)
|
1234
1234
|
logger.info(f"Pulling image {constants.SIMPLY_BLOCK_DOCKER_IMAGE}")
|
1235
1235
|
cluster_docker.images.pull(constants.SIMPLY_BLOCK_DOCKER_IMAGE)
|
1236
1236
|
image_without_tag = constants.SIMPLY_BLOCK_DOCKER_IMAGE.split(":")[0]
|
1237
1237
|
image_without_tag = image_without_tag.split("/")[-1]
|
1238
|
+
service_image = constants.SIMPLY_BLOCK_DOCKER_IMAGE
|
1239
|
+
if mgmt_image:
|
1240
|
+
service_image = mgmt_image
|
1238
1241
|
for service in cluster_docker.services.list():
|
1239
1242
|
if image_without_tag in service.attrs['Spec']['Labels']['com.docker.stack.image']:
|
1240
1243
|
logger.info(f"Updating service {service.name}")
|
1241
|
-
service.update(image=
|
1244
|
+
service.update(image=service_image, force_update=True)
|
1242
1245
|
logger.info("Done updating mgmt cluster")
|
1243
1246
|
except Exception as e:
|
1244
|
-
|
1247
|
+
logger.exception(e)
|
1248
|
+
|
1249
|
+
if mgmt_only:
|
1250
|
+
return True
|
1251
|
+
|
1252
|
+
logger.info("Updating spdk image on storage nodes")
|
1253
|
+
for node in db_controller.get_storage_nodes_by_cluster_id(cluster_id):
|
1254
|
+
if node.status in [StorageNode.STATUS_ONLINE, StorageNode.STATUS_SUSPENDED, StorageNode.STATUS_DOWN]:
|
1255
|
+
try:
|
1256
|
+
node_docker = docker.DockerClient(base_url=f"tcp://{node.mgmt_ip}:2375", version="auto", timeout=60 * 5)
|
1257
|
+
img = constants.SIMPLY_BLOCK_SPDK_ULTRA_IMAGE
|
1258
|
+
if spdk_image:
|
1259
|
+
img = spdk_image
|
1260
|
+
logger.info(f"Pulling image {img}")
|
1261
|
+
node_docker.images.pull(img)
|
1262
|
+
except Exception as e:
|
1263
|
+
logger.error(e)
|
1264
|
+
|
1265
|
+
if not restart:
|
1266
|
+
return True
|
1267
|
+
|
1268
|
+
logger.info("Restarting cluster")
|
1269
|
+
for node in db_controller.get_storage_nodes_by_cluster_id(cluster_id):
|
1270
|
+
if node.status == StorageNode.STATUS_ONLINE:
|
1271
|
+
logger.info(f"Suspending node: {node.get_id()}")
|
1272
|
+
storage_node_ops.suspend_storage_node(node.get_id())
|
1273
|
+
logger.info(f"Shutting down node: {node.get_id()}")
|
1274
|
+
storage_node_ops.shutdown_storage_node(node.get_id(), force=True)
|
1245
1275
|
|
1246
|
-
|
1247
|
-
|
1248
|
-
|
1249
|
-
|
1250
|
-
|
1251
|
-
|
1252
|
-
|
1253
|
-
except Exception as e:
|
1254
|
-
logger.error(e)
|
1255
|
-
|
1256
|
-
if restart_cluster:
|
1257
|
-
logger.info("Restarting cluster")
|
1258
|
-
ret = cluster_grace_shutdown(cl_id)
|
1259
|
-
if ret:
|
1260
|
-
cluster_grace_startup(cl_id)
|
1276
|
+
for node in db_controller.get_storage_nodes_by_cluster_id(cluster_id):
|
1277
|
+
if node.status == StorageNode.STATUS_OFFLINE:
|
1278
|
+
if spdk_image:
|
1279
|
+
logger.info(f"Restarting node: {node.get_id()} with SPDK image: {spdk_image}")
|
1280
|
+
else:
|
1281
|
+
logger.info(f"Restarting node: {node.get_id()}")
|
1282
|
+
storage_node_ops.restart_storage_node(node.get_id(), force=True, spdk_image=spdk_image)
|
1261
1283
|
|
1262
1284
|
logger.info("Done")
|
1263
1285
|
return True
|
@@ -97,14 +97,15 @@ def add_node_to_auto_restart(node):
|
|
97
97
|
return _add_task(JobSchedule.FN_NODE_RESTART, node.cluster_id, node.get_id(), "")
|
98
98
|
|
99
99
|
|
100
|
-
def list_tasks(cluster_id, is_json=False):
|
100
|
+
def list_tasks(cluster_id, is_json=False, limit=50, **kwargs):
|
101
101
|
cluster = db_controller.get_cluster_by_id(cluster_id)
|
102
102
|
if not cluster:
|
103
103
|
logger.error("Cluster not found: %s", cluster_id)
|
104
104
|
return False
|
105
105
|
|
106
106
|
data = []
|
107
|
-
tasks = db_controller.get_job_tasks(cluster_id, reverse=
|
107
|
+
tasks = db_controller.get_job_tasks(cluster_id, reverse=True, limit=limit)
|
108
|
+
tasks.reverse()
|
108
109
|
if tasks and is_json is True:
|
109
110
|
for t in tasks:
|
110
111
|
data.append(t.get_clean_dict())
|
@@ -264,11 +264,11 @@ class DBController(metaclass=Singleton):
|
|
264
264
|
stats = PortStat().read_from_db(self.kv_store, id="%s/%s" % (node_id, port_id), limit=limit, reverse=True)
|
265
265
|
return stats
|
266
266
|
|
267
|
-
def get_events(self, event_id=" ") -> List[EventObj]:
|
268
|
-
return EventObj().read_from_db(self.kv_store, id=event_id)
|
267
|
+
def get_events(self, event_id=" ", limit=0, reverse=False) -> List[EventObj]:
|
268
|
+
return EventObj().read_from_db(self.kv_store, id=event_id, limit=limit, reverse=reverse)
|
269
269
|
|
270
|
-
def get_job_tasks(self, cluster_id, reverse=True) -> List[JobSchedule]:
|
271
|
-
return JobSchedule().read_from_db(self.kv_store, id=cluster_id, reverse=reverse)
|
270
|
+
def get_job_tasks(self, cluster_id, reverse=True, limit=0) -> List[JobSchedule]:
|
271
|
+
return JobSchedule().read_from_db(self.kv_store, id=cluster_id, reverse=reverse, limit=limit)
|
272
272
|
|
273
273
|
def get_task_by_id(self, task_id) -> JobSchedule:
|
274
274
|
for task in self.get_job_tasks(" "):
|
@@ -140,13 +140,19 @@ def update_cluster_status(cluster_id):
|
|
140
140
|
elif current_cluster_status == Cluster.STATUS_SUSPENDED and next_current_status \
|
141
141
|
in [Cluster.STATUS_ACTIVE, Cluster.STATUS_DEGRADED]:
|
142
142
|
# needs activation
|
143
|
-
# check node
|
143
|
+
# check node status, check auto restart for nodes
|
144
144
|
can_activate = True
|
145
145
|
for node in db_controller.get_storage_nodes_by_cluster_id(cluster_id):
|
146
|
-
if node.status
|
147
|
-
|
146
|
+
if node.status in [StorageNode.STATUS_IN_SHUTDOWN, StorageNode.STATUS_IN_CREATION,
|
147
|
+
StorageNode.STATUS_RESTARTING]:
|
148
|
+
logger.error(f"can not activate cluster: node is not in correct status {node.get_id()}: {node.status}")
|
148
149
|
can_activate = False
|
149
150
|
break
|
151
|
+
|
152
|
+
# if node.status not in [StorageNode.STATUS_ONLINE, StorageNode.STATUS_REMOVED]:
|
153
|
+
# logger.error(f"can not activate cluster: node in not online {node.get_id()}: {node.status}")
|
154
|
+
# can_activate = False
|
155
|
+
# break
|
150
156
|
if tasks_controller.get_active_node_restart_task(cluster_id, node.get_id()):
|
151
157
|
logger.error(f"can not activate cluster: restart tasks found")
|
152
158
|
can_activate = False
|
@@ -2961,7 +2961,7 @@ def recreate_lvstore(snode):
|
|
2961
2961
|
snode.rpc_username, snode.rpc_password)
|
2962
2962
|
|
2963
2963
|
sec_node = db_controller.get_storage_node_by_id(snode.secondary_node_id)
|
2964
|
-
sec_node_api = SNodeClient(sec_node.api_endpoint)
|
2964
|
+
sec_node_api = SNodeClient(sec_node.api_endpoint, timeout=5, retry=5)
|
2965
2965
|
|
2966
2966
|
lvol_list = []
|
2967
2967
|
for lv in db_controller.get_lvols_by_node_id(snode.get_id()):
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
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-pre-25.3.9 → sbcli-pre-25.3.10}/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-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2
RENAMED
File without changes
|
File without changes
|
{sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/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-pre-25.3.9 → sbcli-pre-25.3.10}/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-pre-25.3.9 → sbcli-pre-25.3.10}/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-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/services/cached_lvol_stat_collector.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/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
|
{sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/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
|
{sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_core/services/tasks_runner_failed_migration.py
RENAMED
File without changes
|
File without changes
|
{sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/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
|
{sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/node_api_caching_docker.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
|
{sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2
RENAMED
File without changes
|
{sbcli-pre-25.3.9 → sbcli-pre-25.3.10}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2
RENAMED
File without changes
|
File without changes
|