sbcli-dev 19.0.0__tar.gz → 19.0.2__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-19.0.0 → sbcli_dev-19.0.2}/PKG-INFO +1 -1
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/sbcli_dev.egg-info/PKG-INFO +1 -1
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/cluster_ops.py +2 -53
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/env_var +1 -1
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/mgmt_node_ops.py +3 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/models/cluster.py +1 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/models/storage_node.py +1 -1
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/dashboards/cluster.json +1 -1
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/dashboards/devices.json +1 -1
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/dashboards/lvols.json +1 -1
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/dashboards/nodes.json +2 -2
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/dashboards/pools.json +1 -1
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/utils.py +55 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/README.md +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/pyproject.toml +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/requirements.txt +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/sbcli_dev.egg-info/SOURCES.txt +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/sbcli_dev.egg-info/dependency_links.txt +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/sbcli_dev.egg-info/entry_points.txt +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/sbcli_dev.egg-info/requires.txt +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/sbcli_dev.egg-info/top_level.txt +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/setup.cfg +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/setup.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_cli/__init__.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_cli/cli.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_cli/clibase.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_cli/main.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/__init__.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/constants.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/controllers/device_controller.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/controllers/events_controller.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/controllers/health_controller.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/controllers/lvol_controller.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/controllers/pool_controller.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/controllers/snapshot_controller.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/controllers/tasks_controller.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/controllers/tcp_ports_events.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/db_controller.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/distr_controller.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/models/deployer.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/models/events.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/models/hublvol.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/models/iface.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/models/job_schedule.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/models/lvol_model.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/models/nvme_device.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/models/pool.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/models/stats.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/rpc_client.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/__init__.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/dashboard.yml +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/deploy_fdb.sh +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/deploy_stack.sh +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/docker-compose-swarm.yml +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/foundation.yml +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/helpers/__init__.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/helpers/deploy_cluster.sh +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/helpers/destroy_cluster.sh +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/helpers/nvme_disconnect_by_ip.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/objstore.yml +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/prepare_fdb.sh +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/prometheus.yml.j2 +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/services/cached_lvol_stat_collector.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/services/capacity_and_stats_collector.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/services/health_check_service.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/services/lvol_stat_collector.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/services/main_distr_event_collector.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/services/new_device_discovery.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/services/spdk/__init__.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/services/spdk/client.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/services/spdk_http_proxy_server.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/services/storage_node_monitor.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/services/tasks_cluster_status.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/services/tasks_runner_failed_migration.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/services/tasks_runner_migration.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/services/tasks_runner_new_dev_migration.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/services/tasks_runner_node_add.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/services/tasks_runner_port_allow.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/services/tasks_runner_restart.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/snode_client.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/storage_node_ops.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/test/test_models.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/test/test_utils.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/workers/cleanup_foundationdb.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/README.md +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/__init__.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/app.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/blueprints/snode_ops.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/blueprints/snode_ops_k8s.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/blueprints/swagger_ui_blueprint.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/blueprints/web_api_cluster.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/blueprints/web_api_lvol.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/blueprints/web_api_metrics.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/blueprints/web_api_pool.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/blueprints/web_api_storage_node.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/node_configure.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/node_utils.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/node_utils_k8s.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/static/SimplyBlock-API.postman_collection.json +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/static/delete.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/static/swagger.yaml +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/static/tst.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/test/api/test_lvol.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/test/api/test_pool.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/test/api/test_snapshot.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/test/api/test_storage_node.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/test/conftest.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/test/pytest.ini +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/test/requirements.txt +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/test/util.py +0 -0
- {sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/utils.py +0 -0
|
@@ -3,8 +3,6 @@ import datetime
|
|
|
3
3
|
import json
|
|
4
4
|
import os
|
|
5
5
|
import socket
|
|
6
|
-
import re
|
|
7
|
-
import tempfile
|
|
8
6
|
import subprocess
|
|
9
7
|
import time
|
|
10
8
|
import uuid
|
|
@@ -13,7 +11,6 @@ import typing as t
|
|
|
13
11
|
|
|
14
12
|
import docker
|
|
15
13
|
import requests
|
|
16
|
-
from jinja2 import Environment, FileSystemLoader
|
|
17
14
|
|
|
18
15
|
from simplyblock_core import utils, scripts, constants, mgmt_node_ops, storage_node_ops
|
|
19
16
|
from simplyblock_core.controllers import cluster_events, device_controller, pool_controller, \
|
|
@@ -30,7 +27,6 @@ from simplyblock_core.models.storage_node import StorageNode
|
|
|
30
27
|
from simplyblock_core.utils import pull_docker_image_with_retry
|
|
31
28
|
|
|
32
29
|
logger = utils.get_logger(__name__)
|
|
33
|
-
TOP_DIR = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
|
|
34
30
|
|
|
35
31
|
db_controller = DBController()
|
|
36
32
|
|
|
@@ -216,56 +212,9 @@ def create_cluster(blk_size, page_size_in_blocks, cli_pass,
|
|
|
216
212
|
c.inflight_io_threshold = inflight_io_threshold
|
|
217
213
|
c.enable_qos = enable_qos
|
|
218
214
|
c.strict_node_anti_affinity = strict_node_anti_affinity
|
|
215
|
+
c.contact_point = contact_point
|
|
219
216
|
|
|
220
|
-
|
|
221
|
-
alert_resources_file = "alert_resources.yaml"
|
|
222
|
-
|
|
223
|
-
env = Environment(loader=FileSystemLoader(alerts_template_folder), trim_blocks=True, lstrip_blocks=True)
|
|
224
|
-
template = env.get_template(f'{alert_resources_file}.j2')
|
|
225
|
-
|
|
226
|
-
slack_pattern = re.compile(r"https://hooks\.slack\.com/services/\S+")
|
|
227
|
-
email_pattern = re.compile(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$")
|
|
228
|
-
|
|
229
|
-
if slack_pattern.match(contact_point):
|
|
230
|
-
ALERT_TYPE = "slack"
|
|
231
|
-
elif email_pattern.match(contact_point):
|
|
232
|
-
ALERT_TYPE = "email"
|
|
233
|
-
else:
|
|
234
|
-
ALERT_TYPE = "slack"
|
|
235
|
-
contact_point = 'https://hooks.slack.com/services/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'
|
|
236
|
-
|
|
237
|
-
values = {
|
|
238
|
-
'CONTACT_POINT': contact_point,
|
|
239
|
-
'GRAFANA_ENDPOINT': c.grafana_endpoint,
|
|
240
|
-
'ALERT_TYPE': ALERT_TYPE,
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
with tempfile.TemporaryDirectory() as temp_dir:
|
|
244
|
-
temp_file_path = os.path.join(temp_dir, alert_resources_file)
|
|
245
|
-
with open(temp_file_path, 'w') as file:
|
|
246
|
-
file.write(template.render(values))
|
|
247
|
-
|
|
248
|
-
destination_file_path = os.path.join(alerts_template_folder, alert_resources_file)
|
|
249
|
-
subprocess.check_call(['sudo', '-v']) # sudo -v checks if the current user has sudo permissions
|
|
250
|
-
subprocess.check_call(['sudo', 'mv', temp_file_path, destination_file_path])
|
|
251
|
-
print(f"File moved to {destination_file_path} successfully.")
|
|
252
|
-
|
|
253
|
-
scripts_folder = os.path.join(TOP_DIR, "simplyblock_core/scripts/")
|
|
254
|
-
prometheus_file = "prometheus.yml"
|
|
255
|
-
env = Environment(loader=FileSystemLoader(scripts_folder), trim_blocks=True, lstrip_blocks=True)
|
|
256
|
-
template = env.get_template(f'{prometheus_file}.j2')
|
|
257
|
-
values = {
|
|
258
|
-
'CLUSTER_ID': c.uuid,
|
|
259
|
-
'CLUSTER_SECRET': c.secret}
|
|
260
|
-
|
|
261
|
-
with tempfile.TemporaryDirectory() as temp_dir:
|
|
262
|
-
file_path = os.path.join(temp_dir, prometheus_file)
|
|
263
|
-
with open(file_path, 'w') as file:
|
|
264
|
-
file.write(template.render(values))
|
|
265
|
-
|
|
266
|
-
prometheus_file_path = os.path.join(scripts_folder, prometheus_file)
|
|
267
|
-
subprocess.check_call(['sudo', 'mv', file_path, prometheus_file_path])
|
|
268
|
-
print(f"File moved to {prometheus_file_path} successfully.")
|
|
217
|
+
utils.render_and_deploy_alerting_configs(contact_point, c.grafana_endpoint, c.uuid, c.secret)
|
|
269
218
|
|
|
270
219
|
logger.info("Deploying swarm stack ...")
|
|
271
220
|
log_level = "DEBUG" if constants.LOG_WEB_DEBUG else "INFO"
|
|
@@ -60,6 +60,9 @@ def deploy_mgmt_node(cluster_ip, cluster_id, ifname, cluster_secret):
|
|
|
60
60
|
logger.error("Node already exists in the cluster")
|
|
61
61
|
return False
|
|
62
62
|
|
|
63
|
+
utils.render_and_deploy_alerting_configs(cluster_data['contact_point'], cluster_data['grafana_endpoint'],
|
|
64
|
+
cluster_data['uuid'], cluster_data['secret'])
|
|
65
|
+
|
|
63
66
|
logger.info("Joining docker swarm...")
|
|
64
67
|
try:
|
|
65
68
|
cluster_docker = utils.get_docker_client(cluster_id)
|
|
@@ -240,7 +240,7 @@ class StorageNode(BaseNodeObject):
|
|
|
240
240
|
for ip in (iface.ip4_address for iface in primary_node.data_nics):
|
|
241
241
|
ret = rpc_client.bdev_nvme_attach_controller_tcp(
|
|
242
242
|
primary_node.hublvol.bdev_name, primary_node.hublvol.nqn,
|
|
243
|
-
ip, primary_node.hublvol.nvmf_port)
|
|
243
|
+
ip, primary_node.hublvol.nvmf_port, multipath=True)
|
|
244
244
|
if not ret:
|
|
245
245
|
logger.warning(f'Failed to connect to hublvol on {ip}')
|
|
246
246
|
|
|
@@ -2070,7 +2070,7 @@
|
|
|
2070
2070
|
"names": [
|
|
2071
2071
|
"{__name__=\"cluster_unmap_io_ps\", cluster=\"c3663938-6610-44d5-9897-d7bfa60a43e1\", exported_job=\"collector\", instance=\"192.168.178.52:9091\", job=\"metricsgateway\"}"
|
|
2072
2072
|
],
|
|
2073
|
-
"prefix": "All except
|
|
2073
|
+
"prefix": "All except:",
|
|
2074
2074
|
"readOnly": true
|
|
2075
2075
|
}
|
|
2076
2076
|
},
|
|
@@ -2087,7 +2087,7 @@
|
|
|
2087
2087
|
"names": [
|
|
2088
2088
|
"{__name__=\"device_unmap_io_ps\", cluster=\"c3663938-6610-44d5-9897-d7bfa60a43e1\", exported_job=\"collector\", instance=\"192.168.178.52:9091\", job=\"metricsgateway\"}"
|
|
2089
2089
|
],
|
|
2090
|
-
"prefix": "All except
|
|
2090
|
+
"prefix": "All except:",
|
|
2091
2091
|
"readOnly": true
|
|
2092
2092
|
}
|
|
2093
2093
|
},
|
|
@@ -2086,7 +2086,7 @@
|
|
|
2086
2086
|
"names": [
|
|
2087
2087
|
"{__name__=\"lvol_unmap_io_ps\", cluster=\"c3663938-6610-44d5-9897-d7bfa60a43e1\", exported_job=\"collector\", instance=\"192.168.178.52:9091\", job=\"metricsgateway\"}"
|
|
2088
2088
|
],
|
|
2089
|
-
"prefix": "All except
|
|
2089
|
+
"prefix": "All except:",
|
|
2090
2090
|
"readOnly": true
|
|
2091
2091
|
}
|
|
2092
2092
|
},
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"names": [
|
|
102
102
|
"{__name__=\"snode_size_total\", cluster=\"9baa11f4-0b47-47e1-9dec-20dacdda59d0\", exported_job=\"collector\", instance=\"pushgateway:9091\", job=\"metricsgateway\", snode=\"90499750-6b1e-4452-8ff5-125166f33865\"}"
|
|
103
103
|
],
|
|
104
|
-
"prefix": "All except
|
|
104
|
+
"prefix": "All except:",
|
|
105
105
|
"readOnly": true
|
|
106
106
|
}
|
|
107
107
|
},
|
|
@@ -2111,7 +2111,7 @@
|
|
|
2111
2111
|
"names": [
|
|
2112
2112
|
"{__name__=\"snode_unmap_io_ps\", cluster=\"c3663938-6610-44d5-9897-d7bfa60a43e1\", exported_job=\"collector\", instance=\"192.168.178.52:9091\", job=\"metricsgateway\"}"
|
|
2113
2113
|
],
|
|
2114
|
-
"prefix": "All except
|
|
2114
|
+
"prefix": "All except:",
|
|
2115
2115
|
"readOnly": true
|
|
2116
2116
|
}
|
|
2117
2117
|
},
|
|
@@ -2084,7 +2084,7 @@
|
|
|
2084
2084
|
"names": [
|
|
2085
2085
|
"{__name__=\"pool_unmap_io_ps\", cluster=\"c3663938-6610-44d5-9897-d7bfa60a43e1\", exported_job=\"collector\", instance=\"192.168.178.52:9091\", job=\"metricsgateway\"}"
|
|
2086
2086
|
],
|
|
2087
|
-
"prefix": "All except
|
|
2087
|
+
"prefix": "All except:",
|
|
2088
2088
|
"readOnly": true
|
|
2089
2089
|
}
|
|
2090
2090
|
},
|
|
@@ -16,6 +16,9 @@ import docker
|
|
|
16
16
|
from prettytable import PrettyTable
|
|
17
17
|
from docker.errors import APIError, DockerException, ImageNotFound
|
|
18
18
|
|
|
19
|
+
import tempfile
|
|
20
|
+
from jinja2 import Environment, FileSystemLoader
|
|
21
|
+
|
|
19
22
|
from simplyblock_core import constants
|
|
20
23
|
from simplyblock_core import shell_utils
|
|
21
24
|
from simplyblock_core.models.job_schedule import JobSchedule
|
|
@@ -1760,3 +1763,55 @@ def remove_container(client: docker.DockerClient, name, timeout=3):
|
|
|
1760
1763
|
except docker.errors.APIError as e:
|
|
1761
1764
|
if 'Conflict ("removal of container {container.id} is already in progress")' != e.response.reason:
|
|
1762
1765
|
raise
|
|
1766
|
+
|
|
1767
|
+
def render_and_deploy_alerting_configs(contact_point, grafana_endpoint, cluster_uuid, cluster_secret):
|
|
1768
|
+
TOP_DIR = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
|
|
1769
|
+
alerts_template_folder = os.path.join(TOP_DIR, "simplyblock_core/scripts/alerting/")
|
|
1770
|
+
alert_resources_file = "alert_resources.yaml"
|
|
1771
|
+
|
|
1772
|
+
env = Environment(loader=FileSystemLoader(alerts_template_folder), trim_blocks=True, lstrip_blocks=True)
|
|
1773
|
+
template = env.get_template(f'{alert_resources_file}.j2')
|
|
1774
|
+
|
|
1775
|
+
slack_pattern = re.compile(r"https://hooks\.slack\.com/services/\S+")
|
|
1776
|
+
email_pattern = re.compile(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$")
|
|
1777
|
+
|
|
1778
|
+
if slack_pattern.match(contact_point):
|
|
1779
|
+
ALERT_TYPE = "slack"
|
|
1780
|
+
elif email_pattern.match(contact_point):
|
|
1781
|
+
ALERT_TYPE = "email"
|
|
1782
|
+
else:
|
|
1783
|
+
ALERT_TYPE = "slack"
|
|
1784
|
+
contact_point = 'https://hooks.slack.com/services/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'
|
|
1785
|
+
|
|
1786
|
+
values = {
|
|
1787
|
+
'CONTACT_POINT': contact_point,
|
|
1788
|
+
'GRAFANA_ENDPOINT': grafana_endpoint,
|
|
1789
|
+
'ALERT_TYPE': ALERT_TYPE,
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1792
|
+
with tempfile.TemporaryDirectory() as temp_dir:
|
|
1793
|
+
temp_file_path = os.path.join(temp_dir, alert_resources_file)
|
|
1794
|
+
with open(temp_file_path, 'w') as file:
|
|
1795
|
+
file.write(template.render(values))
|
|
1796
|
+
|
|
1797
|
+
destination_file_path = os.path.join(alerts_template_folder, alert_resources_file)
|
|
1798
|
+
subprocess.check_call(['sudo', '-v']) # sudo -v checks if the current user has sudo permissions
|
|
1799
|
+
subprocess.check_call(['sudo', 'mv', temp_file_path, destination_file_path])
|
|
1800
|
+
print(f"File moved to {destination_file_path} successfully.")
|
|
1801
|
+
|
|
1802
|
+
scripts_folder = os.path.join(TOP_DIR, "simplyblock_core/scripts/")
|
|
1803
|
+
prometheus_file = "prometheus.yml"
|
|
1804
|
+
env = Environment(loader=FileSystemLoader(scripts_folder), trim_blocks=True, lstrip_blocks=True)
|
|
1805
|
+
template = env.get_template(f'{prometheus_file}.j2')
|
|
1806
|
+
values = {
|
|
1807
|
+
'CLUSTER_ID': cluster_uuid,
|
|
1808
|
+
'CLUSTER_SECRET': cluster_secret}
|
|
1809
|
+
|
|
1810
|
+
with tempfile.TemporaryDirectory() as temp_dir:
|
|
1811
|
+
file_path = os.path.join(temp_dir, prometheus_file)
|
|
1812
|
+
with open(file_path, 'w') as file:
|
|
1813
|
+
file.write(template.render(values))
|
|
1814
|
+
|
|
1815
|
+
prometheus_file_path = os.path.join(scripts_folder, prometheus_file)
|
|
1816
|
+
subprocess.check_call(['sudo', 'mv', file_path, prometheus_file_path])
|
|
1817
|
+
print(f"File moved to {prometheus_file_path} successfully.")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/controllers/caching_node_controller.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/clean_local_storage_deploy.sh
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/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
|
{sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/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
|
{sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/scripts/helpers/nvme_disconnect_by_ip.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_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/services/cached_lvol_stat_collector.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/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_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/services/main_distr_event_collector.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/services/tasks_runner_failed_migration.py
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_core/services/tasks_runner_new_dev_migration.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-19.0.0 → sbcli_dev-19.0.2}/simplyblock_web/static/SimplyBlock-API.postman_collection.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
|
|
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
|