sbcli-dev 5.3.1__tar.gz → 6.0.0__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-5.3.1 → sbcli_dev-6.0.0}/PKG-INFO +1 -1
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/env_var +1 -1
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/sbcli_dev.egg-info/PKG-INFO +1 -1
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/sbcli_dev.egg-info/SOURCES.txt +3 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_cli/cli.py +40 -11
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/cluster_ops.py +76 -15
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/constants.py +2 -2
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/controllers/device_controller.py +51 -42
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/controllers/device_events.py +1 -1
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/controllers/events_controller.py +1 -1
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/controllers/health_controller.py +88 -43
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/controllers/lvol_controller.py +208 -157
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/distr_controller.py +20 -5
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/kv_store.py +23 -6
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/models/base_model.py +4 -1
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/models/cluster.py +4 -1
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/models/events.py +3 -2
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/models/lvol_model.py +3 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/models/stats.py +2 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/models/storage_node.py +8 -4
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/rpc_client.py +94 -10
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/scripts/__init__.py +10 -1
- sbcli_dev-6.0.0/simplyblock_core/scripts/deploy_fdb.sh +7 -0
- sbcli_dev-6.0.0/simplyblock_core/scripts/foundation.yml +42 -0
- sbcli_dev-6.0.0/simplyblock_core/scripts/prepare_fdb.sh +12 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/services/capacity_and_stats_collector.py +1 -1
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/services/health_check_service.py +55 -71
- sbcli_dev-6.0.0/simplyblock_core/services/lvol_stat_collector.py +236 -0
- sbcli_dev-6.0.0/simplyblock_core/services/main_distr_event_collector.py +192 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/services/new_device_discovery.py +2 -2
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/services/storage_node_monitor.py +106 -31
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/services/tasks_runner_migration.py +4 -4
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/services/tasks_runner_node_add.py +11 -1
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/services/tasks_runner_restart.py +7 -4
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/storage_node_ops.py +669 -345
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/utils.py +24 -1
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/blueprints/snode_ops.py +3 -4
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/blueprints/snode_ops_k8s.py +1 -1
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/blueprints/web_api_cluster.py +2 -1
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/blueprints/web_api_storage_node.py +9 -2
- sbcli_dev-5.3.1/simplyblock_core/services/lvol_stat_collector.py +0 -134
- sbcli_dev-5.3.1/simplyblock_core/services/main_distr_event_collector.py +0 -179
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/README.md +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/pyproject.toml +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/sbcli_dev.egg-info/dependency_links.txt +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/sbcli_dev.egg-info/entry_points.txt +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/sbcli_dev.egg-info/requires.txt +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/sbcli_dev.egg-info/top_level.txt +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/setup.cfg +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/setup.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_cli/main.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/__init__.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/compute_node_ops.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/controllers/pool_controller.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/controllers/snapshot_controller.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/controllers/tasks_controller.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/mgmt_node_ops.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/models/compute_node.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/models/deployer.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/models/global_settings.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/models/iface.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/models/job_schedule.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/models/nvme_device.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/models/pool.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/scripts/dashboard.yml +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/scripts/deploy_stack.sh +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/scripts/docker-compose-swarm.yml +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/scripts/objstore.yml +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/scripts/prometheus.yml +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/services/cached_lvol_stat_collector.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/services/log_agg_service.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/services/port_stat_collector.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/services/spdk_http_proxy_server.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/services/tasks_runner_failed_migration.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/services/tasks_runner_new_dev_migration.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_core/snode_client.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/__init__.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/app.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/blueprints/web_api_lvol.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/blueprints/web_api_pool.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/caching_node_app.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/caching_node_app_k8s.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/node_utils.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/snode_app.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/snode_app_k8s.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/static/delete.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/static/tst.py +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-5.3.1 → sbcli_dev-6.0.0}/simplyblock_web/utils.py +0 -0
|
@@ -66,12 +66,15 @@ simplyblock_core/scripts/dashboard.yml
|
|
|
66
66
|
simplyblock_core/scripts/datasource.yml
|
|
67
67
|
simplyblock_core/scripts/db_config_double.sh
|
|
68
68
|
simplyblock_core/scripts/db_config_single.sh
|
|
69
|
+
simplyblock_core/scripts/deploy_fdb.sh
|
|
69
70
|
simplyblock_core/scripts/deploy_stack.sh
|
|
70
71
|
simplyblock_core/scripts/docker-compose-swarm-monitoring.yml
|
|
71
72
|
simplyblock_core/scripts/docker-compose-swarm.yml
|
|
73
|
+
simplyblock_core/scripts/foundation.yml
|
|
72
74
|
simplyblock_core/scripts/haproxy.cfg
|
|
73
75
|
simplyblock_core/scripts/install_deps.sh
|
|
74
76
|
simplyblock_core/scripts/objstore.yml
|
|
77
|
+
simplyblock_core/scripts/prepare_fdb.sh
|
|
75
78
|
simplyblock_core/scripts/prometheus.yml
|
|
76
79
|
simplyblock_core/scripts/run_ssh.sh
|
|
77
80
|
simplyblock_core/scripts/set_db_config.sh
|
|
@@ -46,7 +46,7 @@ class CLIWrapper:
|
|
|
46
46
|
sub_command.add_argument("--max-lvol", help='Max lvol per storage node', dest='max_lvol', type=int)
|
|
47
47
|
sub_command.add_argument("--max-snap", help='Max snapshot per storage node', dest='max_snap', type=int, default=500)
|
|
48
48
|
sub_command.add_argument("--max-prov", help='Maximum amount of GB to be provisioned via all storage nodes', dest='max_prov')
|
|
49
|
-
sub_command.add_argument("--number-of-distribs", help='The number of distirbs to be created on the node', dest='number_of_distribs', type=int, default=
|
|
49
|
+
sub_command.add_argument("--number-of-distribs", help='The number of distirbs to be created on the node', dest='number_of_distribs', type=int, default=2)
|
|
50
50
|
sub_command.add_argument("--number-of-devices", help='Number of devices per storage node if it\'s not supported EC2 instance', dest='number_of_devices', type=int)
|
|
51
51
|
sub_command.add_argument("--cpu-mask", help='SPDK app CPU mask, default is all cores found', dest='spdk_cpu_mask')
|
|
52
52
|
|
|
@@ -57,6 +57,7 @@ class CLIWrapper:
|
|
|
57
57
|
sub_command.add_argument("--iobuf_large_bufsize", help='bdev_set_options param', dest='large_bufsize', type=int, default=0)
|
|
58
58
|
sub_command.add_argument("--enable-test-device", help='Enable creation of test device', action='store_true')
|
|
59
59
|
sub_command.add_argument("--disable-ha-jm", help='Disable HA JM for distrib creation', action='store_false', dest='enable_ha_jm', default=True)
|
|
60
|
+
sub_command.add_argument("--is-secondary-node", help='add as secondary node', action='store_true', dest='is_secondary_node', default=False)
|
|
60
61
|
sub_command.add_argument("--namespace", help='k8s namespace to deploy on',)
|
|
61
62
|
|
|
62
63
|
|
|
@@ -124,6 +125,7 @@ class CLIWrapper:
|
|
|
124
125
|
sub_command.add_argument("node_id", help='Node ID')
|
|
125
126
|
sub_command.add_argument("--history", help='list history records -one for every 15 minutes- '
|
|
126
127
|
'for XX days and YY hours -up to 10 days in total-, format: XXdYYh')
|
|
128
|
+
sub_command.add_argument("--records", help='Number of records, default: 20', type=int, default=20)
|
|
127
129
|
|
|
128
130
|
sub_command = self.add_sub_command(
|
|
129
131
|
subparser, 'get-capacity', 'Get node capacity statistics')
|
|
@@ -206,6 +208,7 @@ class CLIWrapper:
|
|
|
206
208
|
sub_command.add_argument("device_id", help='Storage device ID')
|
|
207
209
|
sub_command.add_argument("--history", help='list history records -one for every 15 minutes- '
|
|
208
210
|
'for XX days and YY hours -up to 10 days in total-, format: XXdYYh')
|
|
211
|
+
sub_command.add_argument("--records", help='Number of records, default: 20', type=int, default=20)
|
|
209
212
|
|
|
210
213
|
sub_command = self.add_sub_command(subparser, 'port-list', 'Get Data interfaces list for a node')
|
|
211
214
|
sub_command.add_argument("node_id", help='Storage node ID')
|
|
@@ -292,13 +295,15 @@ class CLIWrapper:
|
|
|
292
295
|
sub_command.add_argument("--distr-chunk-bs", help='(Dev) distrb bdev chunk block size, default: 4096', type=int,
|
|
293
296
|
default=4096)
|
|
294
297
|
sub_command.add_argument("--ha-type", help='LVol HA type (single, ha), default is cluster HA type',
|
|
295
|
-
dest='ha_type', choices=["single", "ha"
|
|
298
|
+
dest='ha_type', choices=["single", "ha"], default='single')
|
|
296
299
|
sub_command.add_argument("--enable-node-affinity", help='Enable node affinity for storage nodes', action='store_true')
|
|
297
300
|
sub_command.add_argument("--qpair-count", help='tcp transport qpair count', type=int, dest='qpair_count',
|
|
298
|
-
default=
|
|
301
|
+
default=20, choices=range(128))
|
|
299
302
|
sub_command.add_argument("--max-queue-size", help='The max size the queue will grow', type=int, default=128)
|
|
300
303
|
sub_command.add_argument("--inflight-io-threshold", help='The number of inflight IOs allowed before the IO queuing starts', type=int, default=4)
|
|
301
304
|
sub_command.add_argument("--enable-qos", help='Enable qos bdev for storage nodes', action='store_true', dest='enable_qos')
|
|
305
|
+
sub_command.add_argument("--strict-node-anti-affinity", help='Enable strict node anti affinity for storage nodes', action='store_true')
|
|
306
|
+
|
|
302
307
|
|
|
303
308
|
|
|
304
309
|
# add cluster
|
|
@@ -320,13 +325,14 @@ class CLIWrapper:
|
|
|
320
325
|
sub_command.add_argument("--distr-chunk-bs", help='(Dev) distrb bdev chunk block size, default: 4096', type=int,
|
|
321
326
|
default=4096)
|
|
322
327
|
sub_command.add_argument("--ha-type", help='LVol HA type (single, ha), default is cluster HA type',
|
|
323
|
-
dest='ha_type', choices=["single", "ha"
|
|
328
|
+
dest='ha_type', choices=["single", "ha"], default='single')
|
|
324
329
|
sub_command.add_argument("--enable-node-affinity", help='Enable node affinity for storage nodes', action='store_true')
|
|
325
330
|
sub_command.add_argument("--qpair-count", help='tcp transport qpair count', type=int, dest='qpair_count',
|
|
326
331
|
default=6, choices=range(128))
|
|
327
332
|
sub_command.add_argument("--max-queue-size", help='The max size the queue will grow', type=int, default=128)
|
|
328
333
|
sub_command.add_argument("--inflight-io-threshold", help='The number of inflight IOs allowed before the IO queuing starts', type=int, default=4)
|
|
329
334
|
sub_command.add_argument("--enable-qos", help='Enable qos bdev for storage nodes', action='store_true', dest='enable_qos')
|
|
335
|
+
sub_command.add_argument("--strict-node-anti-affinity", help='Enable strict node anti affinity for storage nodes', action='store_true')
|
|
330
336
|
|
|
331
337
|
# Activate cluster
|
|
332
338
|
sub_command = self.add_sub_command(subparser, 'activate', 'Create distribs and raid0 bdevs on all the storage node and move the cluster to active state')
|
|
@@ -530,6 +536,7 @@ class CLIWrapper:
|
|
|
530
536
|
sub_command.add_argument("id", help='LVol id')
|
|
531
537
|
sub_command.add_argument("--history", help='(XXdYYh), list history records (one for every 15 minutes) '
|
|
532
538
|
'for XX days and YY hours (up to 10 days in total).')
|
|
539
|
+
sub_command.add_argument("--records", help='Number of records, default: 20', type=int, default=20)
|
|
533
540
|
|
|
534
541
|
sub_command = self.add_sub_command(subparser, "check", 'Health check LVol')
|
|
535
542
|
sub_command.add_argument("id", help='UUID of LVol')
|
|
@@ -624,6 +631,7 @@ class CLIWrapper:
|
|
|
624
631
|
sub_command.add_argument("id", help='Pool id')
|
|
625
632
|
sub_command.add_argument("--history", help='(XXdYYh), list history records (one for every 15 minutes) '
|
|
626
633
|
'for XX days and YY hours (up to 10 days in total).')
|
|
634
|
+
sub_command.add_argument("--records", help='Number of records, default: 20', type=int, default=20)
|
|
627
635
|
|
|
628
636
|
subparser = self.add_command('snapshot', 'Snapshot commands')
|
|
629
637
|
|
|
@@ -686,6 +694,9 @@ class CLIWrapper:
|
|
|
686
694
|
sub_command.add_argument("--history", help='(XXdYYh), list history records (one for every 15 minutes) '
|
|
687
695
|
'for XX days and YY hours (up to 10 days in total).')
|
|
688
696
|
|
|
697
|
+
self.parser.add_argument("--cmd", help='cmd', nargs = '+')
|
|
698
|
+
|
|
699
|
+
|
|
689
700
|
|
|
690
701
|
def init_parser(self):
|
|
691
702
|
self.parser = argparse.ArgumentParser(prog=constants.SIMPLY_BLOCK_CLI_NAME, description='SimplyBlock management CLI')
|
|
@@ -709,6 +720,13 @@ class CLIWrapper:
|
|
|
709
720
|
self.logger.setLevel(logging.INFO)
|
|
710
721
|
logging.getLogger("urllib3.connectionpool").setLevel(logging.WARNING)
|
|
711
722
|
|
|
723
|
+
if args.cmd:
|
|
724
|
+
cmd = args.cmd
|
|
725
|
+
func = cmd[0]
|
|
726
|
+
if func == "deploy-fdb":
|
|
727
|
+
cluster_ops.open_db_from_zip(" ".join(cmd[1:]))
|
|
728
|
+
return
|
|
729
|
+
|
|
712
730
|
args_dict = args.__dict__
|
|
713
731
|
ret = ""
|
|
714
732
|
if args.command in ['storage-node', 'sn']:
|
|
@@ -773,7 +791,8 @@ class CLIWrapper:
|
|
|
773
791
|
enable_test_device=enable_test_device,
|
|
774
792
|
namespace=namespace,
|
|
775
793
|
number_of_distribs=number_of_distribs,
|
|
776
|
-
enable_ha_jm=enable_ha_jm
|
|
794
|
+
enable_ha_jm=enable_ha_jm,
|
|
795
|
+
is_secondary_node=args.is_secondary_node,
|
|
777
796
|
)
|
|
778
797
|
|
|
779
798
|
return out
|
|
@@ -854,7 +873,8 @@ class CLIWrapper:
|
|
|
854
873
|
elif sub_command == "get-io-stats-device":
|
|
855
874
|
device_id = args.device_id
|
|
856
875
|
history = args.history
|
|
857
|
-
|
|
876
|
+
records = args.records
|
|
877
|
+
data = device_controller.get_device_iostats(device_id, history, records_count=records)
|
|
858
878
|
if data:
|
|
859
879
|
ret = utils.print_table(data)
|
|
860
880
|
else:
|
|
@@ -872,7 +892,8 @@ class CLIWrapper:
|
|
|
872
892
|
elif sub_command == "get-io-stats":
|
|
873
893
|
node_id = args.node_id
|
|
874
894
|
history = args.history
|
|
875
|
-
|
|
895
|
+
records = args.records
|
|
896
|
+
data = storage_ops.get_node_iostats_history(node_id, history, records_count=records)
|
|
876
897
|
|
|
877
898
|
if data:
|
|
878
899
|
ret = utils.print_table(data)
|
|
@@ -1070,7 +1091,8 @@ class CLIWrapper:
|
|
|
1070
1091
|
elif sub_command == "get-io-stats":
|
|
1071
1092
|
id = args.id
|
|
1072
1093
|
history = args.history
|
|
1073
|
-
|
|
1094
|
+
records = args.records
|
|
1095
|
+
data = lvol_controller.get_io_stats(id, history, records_count=records)
|
|
1074
1096
|
if data:
|
|
1075
1097
|
ret = utils.print_table(data)
|
|
1076
1098
|
else:
|
|
@@ -1079,6 +1101,10 @@ class CLIWrapper:
|
|
|
1079
1101
|
id = args.id
|
|
1080
1102
|
history = args.history
|
|
1081
1103
|
ret = lvol_controller.get_capacity(id, history)
|
|
1104
|
+
if ret:
|
|
1105
|
+
ret = utils.print_table(ret)
|
|
1106
|
+
else:
|
|
1107
|
+
return False
|
|
1082
1108
|
elif sub_command == "check":
|
|
1083
1109
|
id = args.id
|
|
1084
1110
|
ret = health_controller.check_lvol(id)
|
|
@@ -1160,7 +1186,7 @@ class CLIWrapper:
|
|
|
1160
1186
|
ret = pool_controller.get_capacity(args.pool_id)
|
|
1161
1187
|
|
|
1162
1188
|
elif sub_command == "get-io-stats":
|
|
1163
|
-
ret = pool_controller.get_io_stats(args.id, args.history)
|
|
1189
|
+
ret = pool_controller.get_io_stats(args.id, args.history, args.records)
|
|
1164
1190
|
|
|
1165
1191
|
else:
|
|
1166
1192
|
self.parser.print_help()
|
|
@@ -1269,11 +1295,13 @@ class CLIWrapper:
|
|
|
1269
1295
|
max_queue_size = args.max_queue_size
|
|
1270
1296
|
inflight_io_threshold = args.inflight_io_threshold
|
|
1271
1297
|
enable_qos = args.enable_qos
|
|
1298
|
+
strict_node_anti_affinity = args.strict_node_anti_affinity
|
|
1299
|
+
|
|
1272
1300
|
|
|
1273
1301
|
return cluster_ops.add_cluster(
|
|
1274
1302
|
blk_size, page_size_in_blocks, cap_warn, cap_crit, prov_cap_warn, prov_cap_crit,
|
|
1275
1303
|
distr_ndcs, distr_npcs, distr_bs, distr_chunk_bs, ha_type, enable_node_affinity,
|
|
1276
|
-
qpair_count, max_queue_size, inflight_io_threshold, enable_qos)
|
|
1304
|
+
qpair_count, max_queue_size, inflight_io_threshold, enable_qos, strict_node_anti_affinity)
|
|
1277
1305
|
|
|
1278
1306
|
|
|
1279
1307
|
def cluster_create(self, args):
|
|
@@ -1299,6 +1327,7 @@ class CLIWrapper:
|
|
|
1299
1327
|
max_queue_size = args.max_queue_size
|
|
1300
1328
|
inflight_io_threshold = args.inflight_io_threshold
|
|
1301
1329
|
enable_qos = args.enable_qos
|
|
1330
|
+
strict_node_anti_affinity = args.strict_node_anti_affinity
|
|
1302
1331
|
|
|
1303
1332
|
|
|
1304
1333
|
return cluster_ops.create_cluster(
|
|
@@ -1306,7 +1335,7 @@ class CLIWrapper:
|
|
|
1306
1335
|
CLI_PASS, cap_warn, cap_crit, prov_cap_warn, prov_cap_crit,
|
|
1307
1336
|
ifname, log_del_interval, metrics_retention_period, contact_point, grafana_endpoint,
|
|
1308
1337
|
distr_ndcs, distr_npcs, distr_bs, distr_chunk_bs, ha_type, enable_node_affinity,
|
|
1309
|
-
qpair_count, max_queue_size, inflight_io_threshold, enable_qos)
|
|
1338
|
+
qpair_count, max_queue_size, inflight_io_threshold, enable_qos, strict_node_anti_affinity)
|
|
1310
1339
|
|
|
1311
1340
|
|
|
1312
1341
|
def query_yes_no(self, question, default="yes"):
|
|
@@ -14,7 +14,8 @@ import requests
|
|
|
14
14
|
from jinja2 import Environment, FileSystemLoader
|
|
15
15
|
|
|
16
16
|
from simplyblock_core import utils, scripts, constants, mgmt_node_ops, storage_node_ops, distr_controller
|
|
17
|
-
from simplyblock_core.controllers import cluster_events, device_controller, storage_events
|
|
17
|
+
from simplyblock_core.controllers import cluster_events, device_controller, storage_events, pool_controller, \
|
|
18
|
+
lvol_controller
|
|
18
19
|
from simplyblock_core.kv_store import DBController, KVStore
|
|
19
20
|
from simplyblock_core.models.cluster import Cluster
|
|
20
21
|
from simplyblock_core.rpc_client import RPCClient
|
|
@@ -103,7 +104,7 @@ def _add_graylog_input(cluster_ip, password):
|
|
|
103
104
|
def create_cluster(blk_size, page_size_in_blocks, cli_pass,
|
|
104
105
|
cap_warn, cap_crit, prov_cap_warn, prov_cap_crit, ifname, log_del_interval, metrics_retention_period,
|
|
105
106
|
contact_point, grafana_endpoint, distr_ndcs, distr_npcs, distr_bs, distr_chunk_bs, ha_type,
|
|
106
|
-
enable_node_affinity, qpair_count, max_queue_size, inflight_io_threshold, enable_qos):
|
|
107
|
+
enable_node_affinity, qpair_count, max_queue_size, inflight_io_threshold, enable_qos, strict_node_anti_affinity):
|
|
107
108
|
|
|
108
109
|
logger.info("Installing dependencies...")
|
|
109
110
|
ret = scripts.install_deps()
|
|
@@ -171,11 +172,12 @@ def create_cluster(blk_size, page_size_in_blocks, cli_pass,
|
|
|
171
172
|
else:
|
|
172
173
|
c.grafana_endpoint = f"http://{DEV_IP}/grafana"
|
|
173
174
|
c.enable_node_affinity = enable_node_affinity
|
|
174
|
-
c.qpair_count = qpair_count or
|
|
175
|
+
c.qpair_count = qpair_count or 6
|
|
175
176
|
|
|
176
177
|
c.max_queue_size = max_queue_size
|
|
177
178
|
c.inflight_io_threshold = inflight_io_threshold
|
|
178
179
|
c.enable_qos = enable_qos
|
|
180
|
+
c.strict_node_anti_affinity = strict_node_anti_affinity
|
|
179
181
|
|
|
180
182
|
alerts_template_folder = os.path.join(TOP_DIR, "simplyblock_core/scripts/alerting/")
|
|
181
183
|
alert_resources_file = "alert_resources.yaml"
|
|
@@ -295,7 +297,7 @@ def deploy_spdk(node_docker, spdk_cpu_mask, spdk_mem):
|
|
|
295
297
|
|
|
296
298
|
def add_cluster(blk_size, page_size_in_blocks, cap_warn, cap_crit, prov_cap_warn, prov_cap_crit,
|
|
297
299
|
distr_ndcs, distr_npcs, distr_bs, distr_chunk_bs, ha_type, enable_node_affinity, qpair_count,
|
|
298
|
-
max_queue_size, inflight_io_threshold, enable_qos):
|
|
300
|
+
max_queue_size, inflight_io_threshold, enable_qos, strict_node_anti_affinity):
|
|
299
301
|
db_controller = DBController()
|
|
300
302
|
clusters = db_controller.get_clusters()
|
|
301
303
|
if not clusters:
|
|
@@ -314,6 +316,7 @@ def add_cluster(blk_size, page_size_in_blocks, cap_warn, cap_crit, prov_cap_warn
|
|
|
314
316
|
cluster.secret = utils.generate_string(20)
|
|
315
317
|
cluster.db_connection = default_cluster.db_connection
|
|
316
318
|
cluster.grafana_endpoint = default_cluster.grafana_endpoint
|
|
319
|
+
cluster.strict_node_anti_affinity = strict_node_anti_affinity
|
|
317
320
|
|
|
318
321
|
_create_update_user(cluster.uuid, cluster.grafana_endpoint, default_cluster.secret, cluster.secret)
|
|
319
322
|
|
|
@@ -327,7 +330,7 @@ def add_cluster(blk_size, page_size_in_blocks, cap_warn, cap_crit, prov_cap_warn
|
|
|
327
330
|
cluster.distr_chunk_bs = distr_chunk_bs
|
|
328
331
|
cluster.ha_type = ha_type
|
|
329
332
|
cluster.enable_node_affinity = enable_node_affinity
|
|
330
|
-
cluster.qpair_count = qpair_count or
|
|
333
|
+
cluster.qpair_count = qpair_count or 6
|
|
331
334
|
cluster.max_queue_size = max_queue_size
|
|
332
335
|
cluster.inflight_io_threshold = inflight_io_threshold
|
|
333
336
|
cluster.enable_qos = enable_qos
|
|
@@ -360,11 +363,13 @@ def cluster_activate(cl_id, force=False):
|
|
|
360
363
|
logger.warning(f"Failed to activate cluster, Cluster is in an ACTIVE state, use --force to reactivate")
|
|
361
364
|
return False
|
|
362
365
|
set_cluster_status(cl_id, Cluster.STATUS_IN_ACTIVATION)
|
|
363
|
-
snodes = db_controller.
|
|
366
|
+
snodes = db_controller.get_primary_storage_nodes_by_cluster_id(cl_id)
|
|
364
367
|
online_nodes = []
|
|
365
368
|
dev_count = 0
|
|
366
369
|
|
|
367
370
|
for node in snodes:
|
|
371
|
+
if node.is_secondary_node:
|
|
372
|
+
continue
|
|
368
373
|
if node.status == node.STATUS_ONLINE:
|
|
369
374
|
online_nodes.append(node)
|
|
370
375
|
for dev in node.nvme_devices:
|
|
@@ -378,7 +383,21 @@ def cluster_activate(cl_id, force=False):
|
|
|
378
383
|
records = db_controller.get_cluster_capacity(cluster)
|
|
379
384
|
max_size = records[0]['size_total']
|
|
380
385
|
|
|
386
|
+
if cluster.ha_type == "ha":
|
|
387
|
+
for snode in snodes:
|
|
388
|
+
if snode.is_secondary_node or snode.secondary_node_id:
|
|
389
|
+
continue
|
|
390
|
+
secondary_nodes = storage_node_ops.get_secondary_nodes(snode)
|
|
391
|
+
if not secondary_nodes:
|
|
392
|
+
logger.error(f"Failed to activate cluster, No enough secondary nodes")
|
|
393
|
+
set_cluster_status(cl_id, Cluster.STATUS_UNREADY)
|
|
394
|
+
return False
|
|
395
|
+
snode.secondary_node_id = secondary_nodes[0]
|
|
396
|
+
snode.write_to_db()
|
|
397
|
+
|
|
381
398
|
for snode in snodes:
|
|
399
|
+
if snode.is_secondary_node:
|
|
400
|
+
continue
|
|
382
401
|
if snode.lvstore:
|
|
383
402
|
logger.warning(f"Node {snode.get_id()} already has lvstore {snode.lvstore}")
|
|
384
403
|
ret = storage_node_ops.recreate_lvstore(snode)
|
|
@@ -391,6 +410,8 @@ def cluster_activate(cl_id, force=False):
|
|
|
391
410
|
return False
|
|
392
411
|
if not cluster.cluster_max_size:
|
|
393
412
|
cluster.cluster_max_size = max_size
|
|
413
|
+
cluster.cluster_max_devices = dev_count
|
|
414
|
+
cluster.cluster_max_nodes = len(online_nodes)
|
|
394
415
|
cluster.write_to_db(db_controller.kv_store)
|
|
395
416
|
set_cluster_status(cl_id, Cluster.STATUS_ACTIVE)
|
|
396
417
|
logger.info("Cluster activated successfully")
|
|
@@ -660,12 +681,16 @@ def get_logs(cluster_id, is_json=False):
|
|
|
660
681
|
if 'vuid' in record.object_dict:
|
|
661
682
|
vuid = record.object_dict['vuid']
|
|
662
683
|
|
|
684
|
+
msg = record.message
|
|
685
|
+
if record.event in ["device_status", "node_status"]:
|
|
686
|
+
msg = msg+f" ({record.count})"
|
|
687
|
+
|
|
663
688
|
out.append({
|
|
664
689
|
"Date": record.get_date_string(),
|
|
665
690
|
"NodeId": record.node_id,
|
|
666
691
|
"Event": record.event,
|
|
667
692
|
"Level": record.event_level,
|
|
668
|
-
"Message":
|
|
693
|
+
"Message":msg,
|
|
669
694
|
"Storage_ID": str(Storage_ID),
|
|
670
695
|
"VUID": str(vuid),
|
|
671
696
|
"Status": record.status,
|
|
@@ -713,14 +738,11 @@ def update_cluster(cl_id):
|
|
|
713
738
|
except Exception as e:
|
|
714
739
|
print(e)
|
|
715
740
|
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
# storage_node_ops.shutdown_storage_node(node.get_id(), force=True)
|
|
722
|
-
# time.sleep(3)
|
|
723
|
-
# storage_node_ops.restart_storage_node(node.get_id())
|
|
741
|
+
for node in db_controller.get_storage_nodes_by_cluster_id(cl_id):
|
|
742
|
+
try:
|
|
743
|
+
storage_node_ops.start_storage_node_api_container(node.mgmt_ip)
|
|
744
|
+
except:
|
|
745
|
+
pass
|
|
724
746
|
|
|
725
747
|
logger.info("Done")
|
|
726
748
|
return True
|
|
@@ -787,3 +809,42 @@ def delete_cluster(cl_id):
|
|
|
787
809
|
cluster_events.cluster_delete(cluster)
|
|
788
810
|
cluster.remove(db_controller.kv_store)
|
|
789
811
|
logger.info("Done")
|
|
812
|
+
|
|
813
|
+
def open_db_from_zip(fip_path):
|
|
814
|
+
import boto3
|
|
815
|
+
s3 = boto3.client('s3')
|
|
816
|
+
|
|
817
|
+
|
|
818
|
+
out = '/tmp/fdb.zip'
|
|
819
|
+
try:
|
|
820
|
+
os.remove(out)
|
|
821
|
+
except:
|
|
822
|
+
pass
|
|
823
|
+
|
|
824
|
+
buket_name = 'simplyblock-e2e-test-logs'
|
|
825
|
+
file_name = ""
|
|
826
|
+
if fip_path.startswith('s3://'):
|
|
827
|
+
# s3://simplyblock-e2e-test-logs/12220160320/mgmt/fdb.zip
|
|
828
|
+
buket_name = fip_path.split("/")[2]
|
|
829
|
+
file_name = "/".join(fip_path.split("/")[3:])
|
|
830
|
+
|
|
831
|
+
|
|
832
|
+
elif len(fip_path.split('/'))<=3:
|
|
833
|
+
# /12220160320/mgmt/fdb.zip
|
|
834
|
+
file_name = fip_path
|
|
835
|
+
|
|
836
|
+
elif fip_path.startswith('https://'):
|
|
837
|
+
#https://simplyblock-e2e-test-logs.s3.us-east-2.amazonaws.com/12220160320/mgmt/fdb.zip
|
|
838
|
+
buket_name = fip_path.split("/")[2]
|
|
839
|
+
buket_name = buket_name.split(".")[0]
|
|
840
|
+
file_name = "/".join(fip_path.split("/")[3:])
|
|
841
|
+
else:
|
|
842
|
+
file_name = fip_path
|
|
843
|
+
|
|
844
|
+
try:
|
|
845
|
+
ret = s3.download_file(buket_name, file_name, out)
|
|
846
|
+
except Exception as e:
|
|
847
|
+
logger.error(e)
|
|
848
|
+
|
|
849
|
+
if os.path.exists(out):
|
|
850
|
+
scripts.deploy_fdb_from_file_service(out)
|
|
@@ -46,7 +46,7 @@ weights = {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
HEALTH_CHECK_INTERVAL_SEC =
|
|
49
|
+
HEALTH_CHECK_INTERVAL_SEC = 30
|
|
50
50
|
|
|
51
51
|
GRAYLOG_CHECK_INTERVAL_SEC = 60
|
|
52
52
|
|
|
@@ -67,7 +67,7 @@ GELF_PORT = 12202
|
|
|
67
67
|
MIN_HUGE_PAGE_MEMORY_FOR_LVOL = 209715200
|
|
68
68
|
MIN_SYS_MEMORY_FOR_LVOL = 524288000
|
|
69
69
|
EXTRA_SMALL_POOL_COUNT = 1024
|
|
70
|
-
EXTRA_LARGE_POOL_COUNT =
|
|
70
|
+
EXTRA_LARGE_POOL_COUNT = 16000
|
|
71
71
|
# EXTRA_SMALL_POOL_COUNT = 0
|
|
72
72
|
# EXTRA_LARGE_POOL_COUNT = 0
|
|
73
73
|
EXTRA_HUGE_PAGE_MEMORY = 2147483648
|
|
@@ -24,13 +24,15 @@ def device_set_state(device_id, state):
|
|
|
24
24
|
logger.error("node not found")
|
|
25
25
|
return False
|
|
26
26
|
|
|
27
|
+
device = None
|
|
27
28
|
for dev in snode.nvme_devices:
|
|
28
29
|
if dev.get_id() == device_id:
|
|
29
30
|
device = dev
|
|
30
31
|
break
|
|
31
32
|
|
|
32
|
-
if device
|
|
33
|
-
|
|
33
|
+
if not device:
|
|
34
|
+
logger.error("device not found")
|
|
35
|
+
return False
|
|
34
36
|
|
|
35
37
|
if state == NVMeDevice.STATUS_ONLINE:
|
|
36
38
|
device.retries_exhausted = False
|
|
@@ -38,26 +40,26 @@ def device_set_state(device_id, state):
|
|
|
38
40
|
if state == NVMeDevice.STATUS_REMOVED:
|
|
39
41
|
device.deleted = True
|
|
40
42
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
if state == NVMeDevice.STATUS_READONLY and device.status == NVMeDevice.STATUS_UNAVAILABLE:
|
|
44
|
+
return False
|
|
45
|
+
|
|
46
|
+
if device.status != state:
|
|
47
|
+
old_status = dev.status
|
|
48
|
+
device.status = state
|
|
49
|
+
snode.write_to_db(db_controller.kv_store)
|
|
50
|
+
device_events.device_status_change(device, device.status, old_status)
|
|
44
51
|
|
|
45
|
-
distr_controller.
|
|
52
|
+
distr_controller.send_dev_status_event(device, device.status)
|
|
46
53
|
|
|
47
54
|
if state == NVMeDevice.STATUS_ONLINE:
|
|
48
|
-
snode = db_controller.get_storage_node_by_id(dev.node_id)
|
|
49
55
|
logger.info("Make other nodes connect to the node devices")
|
|
50
56
|
snodes = db_controller.get_storage_nodes_by_cluster_id(snode.cluster_id)
|
|
51
57
|
for node in snodes:
|
|
52
58
|
if node.get_id() == snode.get_id() or node.status != StorageNode.STATUS_ONLINE:
|
|
53
59
|
continue
|
|
54
60
|
node.remote_devices = storage_node_ops._connect_to_remote_devs(node)
|
|
55
|
-
if node.enable_ha_jm:
|
|
56
|
-
node.remote_jm_devices = storage_node_ops._connect_to_remote_jm_devs(node)
|
|
57
61
|
node.write_to_db()
|
|
58
|
-
distr_controller.send_cluster_map_to_node(node)
|
|
59
62
|
|
|
60
|
-
device_events.device_status_change(device, device.status, old_status)
|
|
61
63
|
return True
|
|
62
64
|
|
|
63
65
|
|
|
@@ -553,6 +555,7 @@ def device_set_retries_exhausted(device_id, retries_exhausted):
|
|
|
553
555
|
dev = db_controller.get_storage_devices(device_id)
|
|
554
556
|
if not dev:
|
|
555
557
|
logger.error("device not found")
|
|
558
|
+
return False
|
|
556
559
|
|
|
557
560
|
snode = db_controller.get_storage_node_by_id(dev.node_id)
|
|
558
561
|
if not snode:
|
|
@@ -737,16 +740,22 @@ def set_jm_device_state(device_id, state):
|
|
|
737
740
|
jm_device.status = state
|
|
738
741
|
snode.write_to_db(db_controller.kv_store)
|
|
739
742
|
|
|
740
|
-
if snode.enable_ha_jm and state
|
|
743
|
+
if snode.enable_ha_jm and state == NVMeDevice.STATUS_ONLINE:
|
|
744
|
+
rpc_client = RPCClient(snode.mgmt_ip, snode.rpc_port, snode.rpc_username, snode.rpc_password, timeout=5)
|
|
745
|
+
jm_bdev = f"jm_{snode.get_id()}"
|
|
746
|
+
subsystem_nqn = snode.subsystem + ":dev:" + jm_bdev
|
|
747
|
+
|
|
748
|
+
for iface in snode.data_nics:
|
|
749
|
+
if iface.ip4_address:
|
|
750
|
+
ret = rpc_client.nvmf_subsystem_listener_set_ana_state(
|
|
751
|
+
subsystem_nqn, iface.ip4_address, "4420", True)
|
|
752
|
+
break
|
|
753
|
+
|
|
741
754
|
# make other nodes connect to the new devices
|
|
742
755
|
snodes = db_controller.get_storage_nodes_by_cluster_id(snode.cluster_id)
|
|
743
756
|
for node_index, node in enumerate(snodes):
|
|
744
757
|
if node.get_id() == snode.get_id() or node.status != StorageNode.STATUS_ONLINE:
|
|
745
758
|
continue
|
|
746
|
-
for jm_dev in node.remote_jm_devices:
|
|
747
|
-
if jm_dev.get_id() == device_id and jm_device.status != JMDevice.STATUS_ONLINE:
|
|
748
|
-
node.remote_jm_devices.remove(jm_dev)
|
|
749
|
-
break
|
|
750
759
|
logger.info(f"Connecting to node: {node.get_id()}")
|
|
751
760
|
node.remote_jm_devices = storage_node_ops._connect_to_remote_jm_devs(node)
|
|
752
761
|
node.write_to_db(db_controller.kv_store)
|
|
@@ -848,32 +857,32 @@ def restart_jm_device(device_id, force=False, format_alceml=False):
|
|
|
848
857
|
snode.write_to_db(db_controller.kv_store)
|
|
849
858
|
set_jm_device_state(snode.jm_device.get_id(), JMDevice.STATUS_ONLINE)
|
|
850
859
|
else:
|
|
851
|
-
nvme_bdev = jm_device.nvme_bdev
|
|
852
|
-
if snode.enable_test_device:
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
alceml_cpu_mask = ""
|
|
859
|
-
alceml_worker_cpu_mask = ""
|
|
860
|
-
|
|
861
|
-
if snode.alceml_cpu_cores:
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
if snode.alceml_worker_cpu_cores:
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
ret = rpc_client.bdev_alceml_create(jm_device.alceml_bdev, nvme_bdev, jm_device.get_id(),
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
if not ret:
|
|
875
|
-
|
|
876
|
-
|
|
860
|
+
# nvme_bdev = jm_device.nvme_bdev
|
|
861
|
+
# if snode.enable_test_device:
|
|
862
|
+
# ret = rpc_client.bdev_passtest_create(jm_device.testing_bdev, jm_device.nvme_bdev)
|
|
863
|
+
# if not ret:
|
|
864
|
+
# logger.error(f"Failed to create passtest bdev {jm_device.testing_bdev}")
|
|
865
|
+
# # return False
|
|
866
|
+
# nvme_bdev = jm_device.testing_bdev
|
|
867
|
+
# alceml_cpu_mask = ""
|
|
868
|
+
# alceml_worker_cpu_mask = ""
|
|
869
|
+
#
|
|
870
|
+
# if snode.alceml_cpu_cores:
|
|
871
|
+
# alceml_cpu_mask = utils.decimal_to_hex_power_of_2(snode.alceml_cpu_cores[snode.alceml_cpu_index])
|
|
872
|
+
# snode.alceml_cpu_index = (snode.alceml_cpu_index + 1) % len(snode.alceml_cpu_cores)
|
|
873
|
+
#
|
|
874
|
+
# if snode.alceml_worker_cpu_cores:
|
|
875
|
+
# alceml_worker_cpu_mask = utils.decimal_to_hex_power_of_2(
|
|
876
|
+
# snode.alceml_worker_cpu_cores[snode.alceml_worker_cpu_index])
|
|
877
|
+
# snode.alceml_worker_cpu_index = (snode.alceml_worker_cpu_index + 1) % len(snode.alceml_worker_cpu_cores)
|
|
878
|
+
#
|
|
879
|
+
# ret = rpc_client.bdev_alceml_create(jm_device.alceml_bdev, nvme_bdev, jm_device.get_id(),
|
|
880
|
+
# pba_init_mode=1, alceml_cpu_mask=alceml_cpu_mask,
|
|
881
|
+
# alceml_worker_cpu_mask=alceml_worker_cpu_mask)
|
|
882
|
+
#
|
|
883
|
+
# if not ret:
|
|
884
|
+
# logger.error(f"Failed to create alceml bdev: {jm_device.alceml_bdev}")
|
|
885
|
+
# return False
|
|
877
886
|
|
|
878
887
|
jm_bdev = f"jm_{snode.get_id()}"
|
|
879
888
|
ret = rpc_client.bdev_jm_create(jm_bdev, jm_device.alceml_bdev, jm_cpu_mask=snode.jm_cpu_mask)
|
|
@@ -37,7 +37,7 @@ def device_status_change(device, new_state, old_status, caused_by=ec.CAUSED_BY_C
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
def device_restarted(device, caused_by=ec.CAUSED_BY_CLI):
|
|
40
|
-
_device_event(device, f"Device restarted", caused_by, ec.EVENT_STATUS_CHANGE)
|
|
40
|
+
_device_event(device, f"Device restarted, status: {device.status}", caused_by, ec.EVENT_STATUS_CHANGE)
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
def device_reset(device, caused_by=ec.CAUSED_BY_CLI):
|