未验证 提交 4f4ee079 编写于 作者: R Rongfeng Fu 提交者: GitHub

V1.6.2 (#148)

上级 f212d71a
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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')
......
......@@ -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]))
......
......@@ -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
......
......@@ -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')
......
......@@ -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"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册