sbcli-pre 25.3.8__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.
Files changed (162) hide show
  1. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/PKG-INFO +1 -1
  2. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/sbcli_pre.egg-info/PKG-INFO +1 -1
  3. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_cli/cli.py +4 -0
  4. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_cli/clibase.py +3 -4
  5. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/cluster_ops.py +50 -28
  6. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/constants.py +1 -1
  7. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/controllers/tasks_controller.py +3 -2
  8. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/db_controller.py +4 -4
  9. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/env_var +1 -1
  10. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/services/storage_node_monitor.py +9 -3
  11. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/storage_node_ops.py +1 -1
  12. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/README.md +0 -0
  13. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/pyproject.toml +0 -0
  14. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/requirements.txt +0 -0
  15. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/sbcli_pre.egg-info/SOURCES.txt +0 -0
  16. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/sbcli_pre.egg-info/dependency_links.txt +0 -0
  17. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/sbcli_pre.egg-info/entry_points.txt +0 -0
  18. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/sbcli_pre.egg-info/requires.txt +0 -0
  19. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/sbcli_pre.egg-info/top_level.txt +0 -0
  20. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/setup.cfg +0 -0
  21. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/setup.py +0 -0
  22. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_cli/__init__.py +0 -0
  23. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_cli/main.py +0 -0
  24. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/__init__.py +0 -0
  25. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/cnode_client.py +0 -0
  26. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/controllers/__init__.py +0 -0
  27. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/controllers/caching_node_controller.py +0 -0
  28. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/controllers/cluster_events.py +0 -0
  29. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/controllers/device_controller.py +0 -0
  30. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/controllers/device_events.py +0 -0
  31. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/controllers/events_controller.py +0 -0
  32. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/controllers/health_controller.py +0 -0
  33. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/controllers/lvol_controller.py +0 -0
  34. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/controllers/lvol_events.py +0 -0
  35. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/controllers/mgmt_events.py +0 -0
  36. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/controllers/pool_controller.py +0 -0
  37. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/controllers/pool_events.py +0 -0
  38. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/controllers/snapshot_controller.py +0 -0
  39. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/controllers/snapshot_events.py +0 -0
  40. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/controllers/storage_events.py +0 -0
  41. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/controllers/tasks_events.py +0 -0
  42. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/controllers/tcp_ports_events.py +0 -0
  43. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/distr_controller.py +0 -0
  44. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/mgmt_node_ops.py +0 -0
  45. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/models/__init__.py +0 -0
  46. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/models/base_model.py +0 -0
  47. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/models/caching_node.py +0 -0
  48. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/models/cluster.py +0 -0
  49. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/models/deployer.py +0 -0
  50. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/models/events.py +0 -0
  51. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/models/iface.py +0 -0
  52. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/models/job_schedule.py +0 -0
  53. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/models/lvol_model.py +0 -0
  54. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/models/mgmt_node.py +0 -0
  55. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/models/nvme_device.py +0 -0
  56. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/models/pool.py +0 -0
  57. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/models/port_stat.py +0 -0
  58. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/models/snapshot.py +0 -0
  59. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/models/stats.py +0 -0
  60. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/models/storage_node.py +0 -0
  61. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/pci_utils.py +0 -0
  62. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/rpc_client.py +0 -0
  63. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/scripts/__init__.py +0 -0
  64. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
  65. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
  66. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
  67. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/scripts/config_docker.sh +0 -0
  68. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/scripts/dashboard.yml +0 -0
  69. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
  70. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/scripts/dashboards/devices.json +0 -0
  71. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
  72. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
  73. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
  74. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/scripts/dashboards/pools.json +0 -0
  75. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/scripts/datasource.yml +0 -0
  76. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/scripts/db_config_double.sh +0 -0
  77. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/scripts/db_config_single.sh +0 -0
  78. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/scripts/deploy_fdb.sh +0 -0
  79. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/scripts/deploy_stack.sh +0 -0
  80. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +0 -0
  81. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/scripts/docker-compose-swarm.yml +0 -0
  82. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/scripts/foundation.yml +0 -0
  83. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/scripts/haproxy.cfg +0 -0
  84. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/scripts/install_deps.sh +0 -0
  85. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/scripts/objstore.yml +0 -0
  86. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/scripts/prepare_fdb.sh +0 -0
  87. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/scripts/prometheus.yml +0 -0
  88. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/scripts/run_ssh.sh +0 -0
  89. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/scripts/set_db_config.sh +0 -0
  90. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
  91. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/services/__init__.py +0 -0
  92. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/services/cached_lvol_stat_collector.py +0 -0
  93. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/services/caching_node_monitor.py +0 -0
  94. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/services/cap_monitor.py +0 -0
  95. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/services/capacity_and_stats_collector.py +0 -0
  96. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/services/device_monitor.py +0 -0
  97. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/services/health_check_service.py +0 -0
  98. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/services/install_service.sh +0 -0
  99. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/services/lvol_monitor.py +0 -0
  100. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/services/lvol_stat_collector.py +0 -0
  101. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/services/main_distr_event_collector.py +0 -0
  102. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
  103. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/services/new_device_discovery.py +0 -0
  104. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/services/remove_service.sh +0 -0
  105. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/services/service_template.service +0 -0
  106. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/services/spdk/__init__.py +0 -0
  107. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/services/spdk/client.py +0 -0
  108. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/services/spdk_http_proxy_server.py +0 -0
  109. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/services/spdk_stats_collector.py +0 -0
  110. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/services/tasks_runner_failed_migration.py +0 -0
  111. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/services/tasks_runner_migration.py +0 -0
  112. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/services/tasks_runner_new_dev_migration.py +0 -0
  113. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/services/tasks_runner_node_add.py +0 -0
  114. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/services/tasks_runner_restart.py +0 -0
  115. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/shell_utils.py +0 -0
  116. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/snode_client.py +0 -0
  117. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/test/test_utils.py +0 -0
  118. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/utils.py +0 -0
  119. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_core/workers/cleanup_foundationdb.py +0 -0
  120. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/README.md +0 -0
  121. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/__init__.py +0 -0
  122. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/app.py +0 -0
  123. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/auth_middleware.py +0 -0
  124. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/__init__.py +0 -0
  125. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
  126. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
  127. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/node_api_basic.py +0 -0
  128. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
  129. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
  130. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/snode_ops.py +0 -0
  131. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/snode_ops_k8s.py +0 -0
  132. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/swagger_ui_blueprint.py +0 -0
  133. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
  134. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/web_api_cluster.py +0 -0
  135. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
  136. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/web_api_device.py +0 -0
  137. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/web_api_lvol.py +0 -0
  138. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
  139. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/web_api_pool.py +0 -0
  140. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
  141. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/blueprints/web_api_storage_node.py +0 -0
  142. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/caching_node_app.py +0 -0
  143. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/caching_node_app_k8s.py +0 -0
  144. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/node_utils.py +0 -0
  145. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/node_utils_k8s.py +0 -0
  146. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/node_webapp.py +0 -0
  147. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/requirements.txt +0 -0
  148. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/snode_app.py +0 -0
  149. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/snode_app_k8s.py +0 -0
  150. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/static/SimplyBlock-API.postman_collection.json +0 -0
  151. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/static/delete.py +0 -0
  152. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/static/deploy.py +0 -0
  153. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/static/deploy_cnode.yaml +0 -0
  154. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/static/deploy_spdk.yaml +0 -0
  155. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/static/is_up.py +0 -0
  156. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/static/list_deps.py +0 -0
  157. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/static/rpac.yaml +0 -0
  158. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/static/swagger.yaml +0 -0
  159. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/static/tst.py +0 -0
  160. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2 +0 -0
  161. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2 +0 -0
  162. {sbcli-pre-25.3.8 → sbcli-pre-25.3.10}/simplyblock_web/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sbcli-pre
3
- Version: 25.3.8
3
+ Version: 25.3.10
4
4
  Summary: CLI for managing SimplyBlock cluster
5
5
  Home-page: https://www.simplyblock.io/
6
6
  Author: Hamdy
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sbcli-pre
3
- Version: 25.3.8
3
+ Version: 25.3.10
4
4
  Summary: CLI for managing SimplyBlock cluster
5
5
  Home-page: https://www.simplyblock.io/
6
6
  Author: Hamdy
@@ -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
- cluster_id = args.cluster_id
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.cluster_id, mgmt_only=args.mgmt_only, restart_cluster=args.restart)
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.cluster_id)
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 'storage_ID' in record.object_dict:
1177
- Storage_ID = record.object_dict['storage_ID']
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 'vuid' in record.object_dict:
1184
- vuid = record.object_dict['vuid']
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(cl_id, mgmt_only=False, restart_cluster=False):
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(cl_id)
1218
+ cluster = db_controller.get_cluster_by_id(cluster_id)
1219
1219
  if not cluster:
1220
- logger.error(f"Cluster not found {cl_id}")
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(cl_id)
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=constants.SIMPLY_BLOCK_DOCKER_IMAGE, force_update=True)
1244
+ service.update(image=service_image, force_update=True)
1242
1245
  logger.info("Done updating mgmt cluster")
1243
1246
  except Exception as e:
1244
- print(e)
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
- if not mgmt_only:
1247
- set_cluster_status(cl_id, Cluster.STATUS_SUSPENDED)
1248
- logger.info("updating storage nodes")
1249
- for node in db_controller.get_storage_nodes_by_cluster_id(cl_id):
1250
- if node.status in [StorageNode.STATUS_ONLINE, StorageNode.STATUS_SUSPENDED]:
1251
- try:
1252
- storage_node_ops.start_storage_node_api_container(node.mgmt_ip)
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
@@ -114,7 +114,7 @@ INSTANCE_STORAGE_DATA = {
114
114
  'm6id.8xlarge': {'number_of_devices': 1, 'size_per_device_gb': 1900},
115
115
  }
116
116
 
117
- MAX_SNAP_COUNT = 15
117
+ MAX_SNAP_COUNT = 100
118
118
 
119
119
  SPDK_PROXY_MULTI_THREADING_ENABLED=True
120
120
  SPDK_PROXY_TIMEOUT=60*5
@@ -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=False)
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(" "):
@@ -1,5 +1,5 @@
1
1
  SIMPLY_BLOCK_COMMAND_NAME=sbcli-pre
2
- SIMPLY_BLOCK_VERSION=25.3.8
2
+ SIMPLY_BLOCK_VERSION=25.3.10
3
3
 
4
4
  SIMPLY_BLOCK_DOCKER_IMAGE=public.ecr.aws/simply-block/simplyblock:R25.3-PRE-Hotfix
5
5
  SIMPLY_BLOCK_SPDK_ULTRA_IMAGE=public.ecr.aws/simply-block/ultra:R25.3-PRE-latest
@@ -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 statuss, check auto restart for nodes
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 not in [StorageNode.STATUS_ONLINE, StorageNode.STATUS_REMOVED]:
147
- logger.error(f"can not activate cluster: node in not online {node.get_id()}: {node.status}")
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