diff --git a/executer27-requirements.txt b/executer27-requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..bc7364e28ddb800ee7e22e28e3bea44c92c91fe7 --- /dev/null +++ b/executer27-requirements.txt @@ -0,0 +1,2 @@ +protobuf==3.18.0 +mysql-connector-python==8.0.21 diff --git a/optimize/oceanbase-ce/4.0.0.0/tpch.yaml b/optimize/oceanbase-ce/4.0.0.0/tpch.yaml index d29b066edfb32ec528a7b944ccfc2bfd3ab0c860..6345ba455b11e5507784a9c5934b8d94514bc77a 100644 --- a/optimize/oceanbase-ce/4.0.0.0/tpch.yaml +++ b/optimize/oceanbase-ce/4.0.0.0/tpch.yaml @@ -69,10 +69,6 @@ test: variables: - name: ob_sql_work_area_percentage value: 80 - - name: optimizer_use_sql_plan_baselines - value: true - - name: optimizer_capture_sql_plan_baselines - value: true - name: ob_query_timeout value: 36000000000 - name: ob_trx_timeout diff --git a/optimize/oceanbase/4.0.0.0/tpch.yaml b/optimize/oceanbase/4.0.0.0/tpch.yaml index d29b066edfb32ec528a7b944ccfc2bfd3ab0c860..6345ba455b11e5507784a9c5934b8d94514bc77a 100644 --- a/optimize/oceanbase/4.0.0.0/tpch.yaml +++ b/optimize/oceanbase/4.0.0.0/tpch.yaml @@ -69,10 +69,6 @@ test: variables: - name: ob_sql_work_area_percentage value: 80 - - name: optimizer_use_sql_plan_baselines - value: true - - name: optimizer_capture_sql_plan_baselines - value: true - name: ob_query_timeout value: 36000000000 - name: ob_trx_timeout diff --git a/plugins/grafana/7.5.17/init.py b/plugins/grafana/7.5.17/init.py index 55e744c731d1d7cf4ac3d2384043769a03c41ea6..40ea1f25fa30e1fc5323cab302b516c98b0632b7 100644 --- a/plugins/grafana/7.5.17/init.py +++ b/plugins/grafana/7.5.17/init.py @@ -115,8 +115,9 @@ def init(plugin_context, local_home_path, repository_dir, *args, **kwargs): dashboard_template_path = os.path.join(home_path, 'conf/provisioning/dashboards/templates') if client.execute_command('bash -c "mkdir -p %s"' % dashboard_template_path): - ob_dashboard = os.path.join(os.path.split(__file__)[0], 'oceanbase-metrics_rev1.json') - client.put_file(ob_dashboard, dashboard_template_path) + file_name = 'oceanbase-metrics_rev1.json' + ob_dashboard = os.path.join(os.path.split(__file__)[0], file_name) + client.put_file(ob_dashboard, os.path.join(dashboard_template_path, file_name)) else: critical(EC_FAIL_TO_INIT_PATH.format(server=server, key='conf/provisioning/dashboards/templates', msg=InitDirFailedErrorMessage.CREATE_FAILED.format(path=dashboard_template_path))) continue diff --git a/plugins/oceanbase/3.1.0/start_check.py b/plugins/oceanbase/3.1.0/start_check.py index 93d35f2862425e7039f92ed4ffc6b5447ab55a73..fe757f86a373d179fd3b06a4d122a235b775868c 100644 --- a/plugins/oceanbase/3.1.0/start_check.py +++ b/plugins/oceanbase/3.1.0/start_check.py @@ -50,7 +50,6 @@ def parse_size(size): if not isinstance(size, str) or size.isdigit(): _bytes = int(size) else: - print (size) units = {"B": 1, "K": 1<<10, "M": 1<<20, "G": 1<<30, "T": 1<<40} match = re.match(r'(0|[1-9][0-9]*)\s*([B,K,M,G,T])', size.upper()) _bytes = int(match.group(1)) * units[match.group(2)] @@ -264,9 +263,9 @@ def _start_check(plugin_context, strict_check=False, *args, **kwargs): if min_start_need > server_memory_stats['available']: error(EC_OBSERVER_NOT_ENOUGH_MEMORY_ALAILABLE.format(ip=ip, available=format_size(server_memory_stats['available']), need=format_size(min_start_need))) elif total_use > server_memory_stats['free'] + server_memory_stats['buffers'] + server_memory_stats['cached']: - error(EC_OBSERVER_NOT_ENOUGH_MEMORY_CACHED.format(ip=ip, free=format_size(server_memory_stats['free']), cached=format_size(server_memory_stats['buffers'] + server_memory_stats['cached']), need=format_size(min_start_need))) + error(EC_OBSERVER_NOT_ENOUGH_MEMORY_CACHED.format(ip=ip, free=format_size(server_memory_stats['free']), cached=format_size(server_memory_stats['buffers'] + server_memory_stats['cached']), need=format_size(total_use))) elif total_use > server_memory_stats['free']: - alert(EC_OBSERVER_NOT_ENOUGH_MEMORY.format(ip=ip, free=format_size(server_memory_stats['free']), need=format_size(min_start_need))) + alert(EC_OBSERVER_NOT_ENOUGH_MEMORY.format(ip=ip, free=format_size(server_memory_stats['free']), need=format_size(total_use))) # disk disk = {'/': 0} ret = client.execute_command('df --block-size=1024') diff --git a/plugins/oceanbase/3.1.0/upgrade_route.py b/plugins/oceanbase/3.1.0/upgrade_route.py index 9147d6903b3a5063332e6b2ac8c0d7b7357a1d6c..be428f6996687f0c8e0a0c902c47f91517e6ed91 100644 --- a/plugins/oceanbase/3.1.0/upgrade_route.py +++ b/plugins/oceanbase/3.1.0/upgrade_route.py @@ -173,6 +173,10 @@ def upgrade_route(plugin_context, current_repository, dest_repository, *args, ** stdio = plugin_context.stdio repository_dir = dest_repository.repository_dir + if dest_repository.version >= Version("4.1"): + stdio.error('upgrade observer to version {} is not support, please upgrade obd first.'.format(dest_repository.version)) + return + if current_repository.version == dest_repository.version: return plugin_context.return_true(route=format_route([current_repository, dest_repository])) diff --git a/plugins/oceanbase/4.0.0.0/parameter.yaml b/plugins/oceanbase/4.0.0.0/parameter.yaml index 253e2232a59e59b9f1252d8c34bf3d97ee5a94c9..b45643153a75df6a54995fe8506d07355d4a0990 100644 --- a/plugins/oceanbase/4.0.0.0/parameter.yaml +++ b/plugins/oceanbase/4.0.0.0/parameter.yaml @@ -1013,7 +1013,7 @@ require: true type: INT default: 2147483648 - min_value: 268435456 + min_value: 1073741824 max_value: NULL need_restart: false description_en: the minimum memory limit of the resource pool diff --git a/plugins/oceanbase/4.0.0.0/start_check.py b/plugins/oceanbase/4.0.0.0/start_check.py index dd08d81ab80ecf0e8fa0dc2d694f05ff3b9d907a..98b975844213d2844ef314799b307133667d9850 100644 --- a/plugins/oceanbase/4.0.0.0/start_check.py +++ b/plugins/oceanbase/4.0.0.0/start_check.py @@ -287,9 +287,9 @@ def _start_check(plugin_context, strict_check=False, *args, **kwargs): if min_start_need > server_memory_stats['available']: error(EC_OBSERVER_NOT_ENOUGH_MEMORY_ALAILABLE.format(ip=ip, available=format_size(server_memory_stats['available']), need=format_size(min_start_need))) elif total_use > server_memory_stats['free'] + server_memory_stats['buffers'] + server_memory_stats['cached']: - error(EC_OBSERVER_NOT_ENOUGH_MEMORY_CACHED.format(ip=ip, free=format_size(server_memory_stats['free']), cached=format_size(server_memory_stats['buffers'] + server_memory_stats['cached']), need=format_size(min_start_need))) + error(EC_OBSERVER_NOT_ENOUGH_MEMORY_CACHED.format(ip=ip, free=format_size(server_memory_stats['free']), cached=format_size(server_memory_stats['buffers'] + server_memory_stats['cached']), need=format_size(total_use))) elif total_use > server_memory_stats['free']: - alert(EC_OBSERVER_NOT_ENOUGH_MEMORY.format(ip=ip, free=format_size(server_memory_stats['free']), need=format_size(min_start_need))) + alert(EC_OBSERVER_NOT_ENOUGH_MEMORY.format(ip=ip, free=format_size(server_memory_stats['free']), need=format_size(total_use))) # disk disk = {'/': 0} ret = client.execute_command('df --block-size=1024') diff --git a/profile/obd.sh b/profile/obd.sh index ee066d9f8b492afb8bdea14848df583090f12a3a..1aa5028e9242bdd3b0f20bdc9997fae56b6da464 100644 --- a/profile/obd.sh +++ b/profile/obd.sh @@ -52,7 +52,7 @@ function _obd_complete_func cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" - all_cmds["obd"]="mirror cluster test update repo" + all_cmds["obd"]="mirror cluster test update repo demo" all_cmds["obd cluster"]="autodeploy tenant start deploy redeploy restart reload destroy stop edit-config list display upgrade chst check4ocp reinstall" all_cmds["obd cluster *"]="_obd_reply_deploy_names" all_cmds["obd cluster tenant"]="create drop" @@ -66,8 +66,9 @@ function _obd_complete_func if [ -f "$env_file" ] && [ "$(grep '"OBD_DEV_MODE": "1"' "$env_file")" != "" ]; then all_cmds["obd"]="${all_cmds[obd]} devmode env tool" all_cmds["obd devmode"]="enable disable" - all_cmds["obd tool"]="command db_connect" + all_cmds["obd tool"]="command db_connect dooba" all_cmds["obd tool db_connect"]="_obd_reply_deploy_names" + all_cmds["obd tool dooba"]="_obd_reply_deploy_names" all_cmds["obd tool command"]="_obd_reply_deploy_names" all_cmds["obd tool command *"]="_obd_reply_tool_commands" all_cmds["obd env"]="set unset show clear"