Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
oceanbase
obdeploy
提交
7ac5be6c
O
obdeploy
项目概览
oceanbase
/
obdeploy
1 年多 前同步成功
通知
7
Star
73
Fork
132
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
obdeploy
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
未验证
提交
7ac5be6c
编写于
4月 06, 2022
作者:
R
Rongfeng Fu
提交者:
GitHub
4月 06, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
typo (#96)
上级
ee5a76bb
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
18 addition
and
18 deletion
+18
-18
_deploy.py
_deploy.py
+2
-2
plugins/oceanbase/3.1.0/create_tenant.py
plugins/oceanbase/3.1.0/create_tenant.py
+3
-3
plugins/oceanbase/3.1.0/generate_config.py
plugins/oceanbase/3.1.0/generate_config.py
+3
-3
plugins/oceanbase/3.1.0/start_check.py
plugins/oceanbase/3.1.0/start_check.py
+1
-1
plugins/oceanbase/3.1.0/upgrade_route.py
plugins/oceanbase/3.1.0/upgrade_route.py
+3
-3
plugins/sysbench/3.1.0/run_test.py
plugins/sysbench/3.1.0/run_test.py
+3
-3
plugins/tpch/3.1.0/run_test.py
plugins/tpch/3.1.0/run_test.py
+3
-3
未找到文件。
_deploy.py
浏览文件 @
7ac5be6c
...
...
@@ -1035,7 +1035,7 @@ class ConfigParserManager(Manager):
}
self
.
component_parsers
=
{}
def
_format
e
_paraser_name
(
self
,
style
):
def
_format_paraser_name
(
self
,
style
):
style
=
style
.
title
()
return
'%sConfigParser'
%
style
.
replace
(
'-'
,
''
).
replace
(
' '
,
''
).
replace
(
'_'
,
''
)
...
...
@@ -1048,7 +1048,7 @@ class ConfigParserManager(Manager):
DynamicLoading
.
add_lib_path
(
lib_path
)
self
.
stdio
and
getattr
(
self
.
stdio
,
'verbose'
,
'print'
)(
'load config parser: %s'
%
path
)
module
=
DynamicLoading
.
import_module
(
module_name
,
self
.
stdio
)
clz_name
=
self
.
_format
e
_paraser_name
(
style
)
clz_name
=
self
.
_format_paraser_name
(
style
)
try
:
return
getattr
(
module
,
clz_name
)
except
:
...
...
plugins/oceanbase/3.1.0/create_tenant.py
浏览文件 @
7ac5be6c
...
...
@@ -43,14 +43,14 @@ def format_size(size, precision=1):
idx
=
0
if
precision
:
div
=
1024.0
format
e
=
'%.'
+
str
(
precision
)
+
'f%s'
format
=
'%.'
+
str
(
precision
)
+
'f%s'
else
:
div
=
1024
format
e
=
'%d%s'
format
=
'%d%s'
while
idx
<
5
and
size
>=
1024
:
size
/=
1024.0
idx
+=
1
return
format
e
%
(
size
,
units
[
idx
])
return
format
%
(
size
,
units
[
idx
])
def
create_tenant
(
plugin_context
,
cursor
,
*
args
,
**
kwargs
):
...
...
plugins/oceanbase/3.1.0/generate_config.py
浏览文件 @
7ac5be6c
...
...
@@ -43,16 +43,16 @@ def format_size(size, precision=1):
idx
=
0
if
precision
:
div
=
1024.0
format
e
=
'%.'
+
str
(
precision
)
+
'f%s'
format
=
'%.'
+
str
(
precision
)
+
'f%s'
limit
=
1024
else
:
div
=
1024
limit
=
1024
format
e
=
'%d%s'
format
=
'%d%s'
while
idx
<
units_num
and
size
>=
limit
:
size
/=
div
idx
+=
1
return
format
e
%
(
size
,
units
[
idx
])
return
format
%
(
size
,
units
[
idx
])
def
get_system_memory
(
memory_limit
):
...
...
plugins/oceanbase/3.1.0/start_check.py
浏览文件 @
7ac5be6c
...
...
@@ -216,7 +216,7 @@ def _start_check(plugin_context, strict_check=False, *args, **kwargs):
free_memory
=
parse_size
(
str
(
v
))
total_use
=
servers_memory
[
ip
][
'percentage'
]
*
total_memory
/
100
+
servers_memory
[
ip
][
'num'
]
if
total_use
>
free_memory
:
stdio
.
error
(
EC_OBSERVER_NOT_ENOUGH_MEMORY
.
format
e
(
ip
=
ip
,
free
=
format_size
(
free_memory
),
need
=
format_size
(
total_use
)))
stdio
.
error
(
EC_OBSERVER_NOT_ENOUGH_MEMORY
.
format
(
ip
=
ip
,
free
=
format_size
(
free_memory
),
need
=
format_size
(
total_use
)))
# disk
disk
=
{
'/'
:
0
}
ret
=
client
.
execute_command
(
'df --block-size=1024'
)
...
...
plugins/oceanbase/3.1.0/upgrade_route.py
浏览文件 @
7ac5be6c
...
...
@@ -157,10 +157,10 @@ class ObVersionGraph(object):
if
len
(
res
)
==
1
:
res
.
insert
(
0
,
start_node
)
return
format
e
_route
(
res
)
return
format_route
(
res
)
def
format
e
_route
(
routes
):
def
format_route
(
routes
):
return
[{
'version'
:
node
.
version
,
'release'
:
None
if
node
.
release
==
VersionNode
.
RELEASE_NULL
else
node
.
release
,
...
...
@@ -174,7 +174,7 @@ def upgrade_route(plugin_context, current_repository, dest_repository, *args, **
repository_dir
=
dest_repository
.
repository_dir
if
current_repository
.
version
==
dest_repository
.
version
:
return
plugin_context
.
return_true
(
route
=
format
e
_route
([
current_repository
,
dest_repository
]))
return
plugin_context
.
return_true
(
route
=
format_route
([
current_repository
,
dest_repository
]))
upgrade_dep_name
=
'etc/oceanbase_upgrade_dep.yml'
upgrade_dep_path
=
os
.
path
.
join
(
repository_dir
,
upgrade_dep_name
)
...
...
plugins/sysbench/3.1.0/run_test.py
浏览文件 @
7ac5be6c
...
...
@@ -51,16 +51,16 @@ def format_size(size, precision=1):
idx
=
0
if
precision
:
div
=
1024.0
format
e
=
'%.'
+
str
(
precision
)
+
'f%s'
format
=
'%.'
+
str
(
precision
)
+
'f%s'
limit
=
1024
else
:
div
=
1024
limit
=
1024
format
e
=
'%d%s'
format
=
'%d%s'
while
idx
<
units_num
and
size
>=
limit
:
size
/=
div
idx
+=
1
return
format
e
%
(
size
,
units
[
idx
])
return
format
%
(
size
,
units
[
idx
])
def
exec_cmd
(
cmd
):
...
...
plugins/tpch/3.1.0/run_test.py
浏览文件 @
7ac5be6c
...
...
@@ -51,16 +51,16 @@ def format_size(size, precision=1):
idx
=
0
if
precision
:
div
=
1024.0
format
e
=
'%.'
+
str
(
precision
)
+
'f%s'
format
=
'%.'
+
str
(
precision
)
+
'f%s'
limit
=
1024
else
:
div
=
1024
limit
=
1024
format
e
=
'%d%s'
format
=
'%d%s'
while
idx
<
units_num
and
size
>=
limit
:
size
/=
div
idx
+=
1
return
format
e
%
(
size
,
units
[
idx
])
return
format
%
(
size
,
units
[
idx
])
def
exec_cmd
(
cmd
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录